m5a99x-evo: ugly quirks, but WOOT: ohai seabios :-)
[coreboot.git] / src / devices / device.c
index a2619bf00070db755f83b8870f5806313f6352be..688ccc9fe2bc37d7dfe7bdbdcea30488d4264f62 100644 (file)
@@ -41,6 +41,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <smp/spinlock.h>
+#if CONFIG_ARCH_X86
+#include <arch/ebda.h>
+#endif
 
 /** Linked list of ALL devices */
 struct device *all_devices = &dev_root;
@@ -322,7 +325,7 @@ static void compute_resources(struct bus *bus, struct resource *bridge,
                    (resource->flags & IORESOURCE_ASSIGNED)) {
                        printk(BIOS_ERR,
                               "Resource limit looks wrong! (no APIC?)\n");
-                       printk(BIOS_ERR, "%s %02lx limit %08Lx\n",
+                       printk(BIOS_ERR, "%s %02lx limit %08llx\n",
                               dev_path(dev), resource->index, resource->limit);
                }
 
@@ -627,7 +630,7 @@ static void avoid_fixed_resources(struct device *dev)
        for (res = dev->resource_list; res; res = res->next) {
                if ((res->flags & IORESOURCE_FIXED))
                        continue;
-               printk(BIOS_SPEW, "%s:@%s %02lx limit %08Lx\n", __func__,
+               printk(BIOS_SPEW, "%s:@%s %02lx limit %08llx\n", __func__,
                       dev_path(dev), res->index, res->limit);
                if ((res->flags & MEM_MASK) == PREF_TYPE &&
                    (res->limit < limits.pref.limit))
@@ -660,9 +663,9 @@ static void avoid_fixed_resources(struct device *dev)
                else
                        continue;
 
-               printk(BIOS_SPEW, "%s2: %s@%02lx limit %08Lx\n", __func__,
+               printk(BIOS_SPEW, "%s2: %s@%02lx limit %08llx\n", __func__,
                             dev_path(dev), res->index, res->limit);
-               printk(BIOS_SPEW, "\tlim->base %08Lx lim->limit %08Lx\n",
+               printk(BIOS_SPEW, "\tlim->base %08llx lim->limit %08llx\n",
                             lim->base, lim->limit);
 
                /* Is the resource outside the limits? */
@@ -909,6 +912,7 @@ void dev_enumerate(void)
                printk(BIOS_ERR, "dev_root missing scan_bus operation");
                return;
        }
+       printk(BIOS_INFO, "Enumerating buses... starting with root now\n");
        scan_bus(root, 0);
        printk(BIOS_INFO, "done\n");
 }
@@ -1102,6 +1106,11 @@ void dev_initialize(void)
 
        printk(BIOS_INFO, "Initializing devices...\n");
 
+#if CONFIG_ARCH_X86
+       /* Ensure EBDA is prepared before Option ROMs. */
+       setup_default_ebda();
+#endif
+
        /* First call the mainboard init. */
        init_dev(&dev_root);