summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/devices/device.c13
-rw-r--r--src/mainboard/tyan/s2885/Config.lb32
-rw-r--r--src/northbridge/amd/amdk8/northbridge.c18
3 files changed, 32 insertions, 31 deletions
diff --git a/src/devices/device.c b/src/devices/device.c
index e4e8f24344..8ad489b11a 100644
--- a/src/devices/device.c
+++ b/src/devices/device.c
@@ -613,19 +613,6 @@ void dev_initialize(void)
struct device *dev;
printk_info("Initializing devices...\n");
-#if CONFIG_CONSOLE_VGA == 1
- for (dev = all_devices; dev; dev = dev->next) {
- if (dev->enabled && !dev->initialized &&
- dev->ops && dev->ops->init)
- {
- if( !dev->on_mainboard ) continue; // process addon card in second run
- else if( dev->rom_address!=0 ) continue; // onboard and it is assigned via MB Config.lb, process it later
- printk_debug("%s init\n", dev_path(dev));
- dev->initialized = 1;
- dev->ops->init(dev);
- }
- }
-#endif
for (dev = all_devices; dev; dev = dev->next) {
if (dev->enabled && !dev->initialized &&
dev->ops && dev->ops->init)
diff --git a/src/mainboard/tyan/s2885/Config.lb b/src/mainboard/tyan/s2885/Config.lb
index 0a198638f8..a974cb5644 100644
--- a/src/mainboard/tyan/s2885/Config.lb
+++ b/src/mainboard/tyan/s2885/Config.lb
@@ -127,6 +127,14 @@ end
# sample config for tyan/s2885
chip northbridge/amd/amdk8/root_complex
+ device apic_cluster 0 on
+ chip cpu/amd/socket_940
+ device apic 0 on end
+ end
+# chip cpu/amd/socket_940
+# device apic 1 on end
+# end
+ end
device pci_domain 0 on
chip northbridge/amd/amdk8
device pci 18.0 on # LDT0
@@ -237,23 +245,15 @@ chip northbridge/amd/amdk8/root_complex
device pci 18.3 on end
end
- chip northbridge/amd/amdk8
- device pci 19.0 on end
- device pci 19.0 on end
- device pci 19.0 on end
- device pci 19.1 on end
- device pci 19.2 on end
- device pci 19.3 on end
- end
+# chip northbridge/amd/amdk8
+# device pci 19.0 on end
+# device pci 19.0 on end
+# device pci 19.0 on end
+# device pci 19.1 on end
+# device pci 19.2 on end
+# device pci 19.3 on end
+# end
end
- device apic_cluster 0 on
- chip cpu/amd/socket_940
- device apic 0 on end
- end
- chip cpu/amd/socket_940
- device apic 1 on end
- end
- end
# chip drivers/generic/debug
# device pnp 0.0 on end
diff --git a/src/northbridge/amd/amdk8/northbridge.c b/src/northbridge/amd/amdk8/northbridge.c
index 4136f9f27c..6fd4cf96ce 100644
--- a/src/northbridge/amd/amdk8/northbridge.c
+++ b/src/northbridge/amd/amdk8/northbridge.c
@@ -741,8 +741,22 @@ static unsigned int cpu_bus_scan(device_t dev, unsigned int max)
device_t dev, cpu;
struct device_path cpu_path;
- /* Find the cpu's memory controller */
- dev = dev_find_slot(0, PCI_DEVFN(0x18 + i, 0));
+ /* Find the cpu's memory controller */
+ dev = dev_find_slot(0, PCI_DEVFN(0x18 + i, 3));
+ if(!dev) {
+ // in case in mb Config.lb we move apic cluster before pci_domain and not set that for second CPU
+ struct device dummy;
+ uint32_t id;
+ dummy.bus = dev_mc->bus;
+ dummy.path.type = DEVICE_PATH_PCI;
+ dummy.path.u.pci.devfn = PCI_DEVFN(0x18 + i, 3);
+ id = pci_read_config32(&dummy, PCI_VENDOR_ID);
+ if (id != 0xffffffff && id != 0x00000000 &&
+ id != 0x0000ffff && id != 0xffff0000) {
+ //create that for it
+ dev = alloc_dev(dev_mc->bus, &dummy.path);
+ }
+ }
/* Build the cpu device path */
cpu_path.type = DEVICE_PATH_APIC;