diff options
Diffstat (limited to 'freebsd/sys/x86/x86/legacy.c')
-rw-r--r-- | freebsd/sys/x86/x86/legacy.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/freebsd/sys/x86/x86/legacy.c b/freebsd/sys/x86/x86/legacy.c index 4c2174ba..9297f1f3 100644 --- a/freebsd/sys/x86/x86/legacy.c +++ b/freebsd/sys/x86/x86/legacy.c @@ -115,6 +115,7 @@ legacy_probe(device_t dev) return (0); } +#ifndef __rtems__ /* * Grope around in the PCI config space to see if this is a chipset * that is capable of doing memory-mapped config cycles. This also @@ -154,13 +155,16 @@ legacy_pci_cfgregopen(device_t dev) if (bootverbose && cfgmech == CFGMECH_PCIE) device_printf(dev, "Enabled ECAM PCIe accesses\n"); } +#endif /* __rtems__ */ static int legacy_attach(device_t dev) { device_t child; +#ifndef __rtems__ legacy_pci_cfgregopen(dev); +#endif /* __rtems__ */ /* * Let our child drivers identify any child devices that they @@ -282,7 +286,9 @@ static struct resource_list *cpu_get_rlist(device_t dev, device_t child); struct cpu_device { struct resource_list cd_rl; +#ifndef __rtems__ struct pcpu *cd_pcpu; +#endif /* __rtems__ */ }; static device_method_t cpu_methods[] = { @@ -342,18 +348,24 @@ cpu_add_child(device_t bus, u_int order, const char *name, int unit) { struct cpu_device *cd; device_t child; +#ifndef __rtems__ struct pcpu *pc; +#endif /* __rtems__ */ if ((cd = malloc(sizeof(*cd), M_DEVBUF, M_NOWAIT | M_ZERO)) == NULL) return (NULL); resource_list_init(&cd->cd_rl); +#ifndef __rtems__ pc = pcpu_find(device_get_unit(bus)); cd->cd_pcpu = pc; +#endif /* __rtems__ */ child = device_add_child_ordered(bus, order, name, unit); if (child != NULL) { +#ifndef __rtems__ pc->pc_device = child; +#endif /* __rtems__ */ device_set_ivars(child, cd); } else free(cd, M_DEVBUF); @@ -375,6 +387,7 @@ cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) struct cpu_device *cpdev; switch (index) { +#ifndef __rtems__ case CPU_IVAR_PCPU: cpdev = device_get_ivars(child); *result = (uintptr_t)cpdev->cd_pcpu; @@ -386,6 +399,7 @@ cpu_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) break; } /* FALLTHROUGH */ +#endif /* __rtems__ */ default: return (ENOENT); } |