move apic cluster before pci_domain in MB Config.lb

git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1897 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Yinghai Lu 2005-01-21 22:58:15 +00:00
parent b5d9af4105
commit 6a2798d28b
1 changed files with 13 additions and 11 deletions

View File

@ -721,7 +721,7 @@ static unsigned int cpu_bus_scan(device_t dev, unsigned int max)
{ {
struct bus *cpu_bus; struct bus *cpu_bus;
device_t dev_mc; device_t dev_mc;
int i; int i, j;
int enable_apic_ext_id = 0; int enable_apic_ext_id = 0;
int bsp_apic_id = lapicid(); // bsp apicid int bsp_apic_id = lapicid(); // bsp apicid
int apic_id_offset = bsp_apic_id; int apic_id_offset = bsp_apic_id;
@ -745,16 +745,18 @@ static unsigned int cpu_bus_scan(device_t dev, unsigned int max)
dev = dev_find_slot(0, PCI_DEVFN(0x18 + i, 3)); dev = dev_find_slot(0, PCI_DEVFN(0x18 + i, 3));
if(!dev) { if(!dev) {
// in case in mb Config.lb we move apic cluster before pci_domain and not set that for second CPU // in case in mb Config.lb we move apic cluster before pci_domain and not set that for second CPU
struct device dummy; for(j=0; j<4; j++) {
uint32_t id; struct device dummy;
dummy.bus = dev_mc->bus; uint32_t id;
dummy.path.type = DEVICE_PATH_PCI; dummy.bus = dev_mc->bus;
dummy.path.u.pci.devfn = PCI_DEVFN(0x18 + i, 3); dummy.path.type = DEVICE_PATH_PCI;
id = pci_read_config32(&dummy, PCI_VENDOR_ID); dummy.path.u.pci.devfn = PCI_DEVFN(0x18 + i, j);
if (id != 0xffffffff && id != 0x00000000 && id = pci_read_config32(&dummy, PCI_VENDOR_ID);
id != 0x0000ffff && id != 0xffff0000) { if (id != 0xffffffff && id != 0x00000000 &&
//create that for it id != 0x0000ffff && id != 0xffff0000) {
dev = alloc_dev(dev_mc->bus, &dummy.path); //create that for it
dev = alloc_dev(dev_mc->bus, &dummy.path);
}
} }
} }