Use bootprio_find_named_rom() for ramdisk and cbfs payload priorities.
authorKevin O'Connor <kevin@koconnor.net>
Thu, 30 Dec 2010 02:59:44 +0000 (21:59 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 30 Dec 2010 23:35:59 +0000 (18:35 -0500)
src/coreboot.c
src/ramdisk.c

index b4dfd8ab024e3578533320951ded153107e990d5..c9ee0823e7e4043b1f77782c1b8136277113a8a7 100644 (file)
@@ -605,7 +605,7 @@ register_cbfs_payload(void)
             break;
         const char *filename = cbfs_filename(file);
         char *desc = znprintf(MAXDESCSIZE, "Payload [%s]", &filename[4]);
-        boot_add_cbfs(file, desc, -1);
+        boot_add_cbfs(file, desc, bootprio_find_named_rom(filename, 0));
     }
 }
 
index 53913762ffabea0a7b6d67c02824ad64e549225d..bae30e213d419f25bb36aee6a938341512ef9ee5 100644 (file)
@@ -21,8 +21,9 @@ ramdisk_setup(void)
     struct cbfs_file *file = cbfs_findprefix("floppyimg/", NULL);
     if (!file)
         return;
+    const char *filename = cbfs_filename(file);
     u32 size = cbfs_datasize(file);
-    dprintf(3, "Found floppy file %s of size %d\n", cbfs_filename(file), size);
+    dprintf(3, "Found floppy file %s of size %d\n", filename, size);
     int ftype = find_floppy_type(size);
     if (ftype < 0) {
         dprintf(3, "No floppy type found for ramdisk size\n");
@@ -45,9 +46,9 @@ ramdisk_setup(void)
     if (!drive_g)
         return;
     drive_g->type = DTYPE_RAMDISK;
-    dprintf(1, "Mapping CBFS floppy %s to addr %p\n", cbfs_filename(file), pos);
-    char *desc = znprintf(MAXDESCSIZE, "Ramdisk [%s]", cbfs_filename(file));
-    boot_add_floppy(drive_g, desc, -1);
+    dprintf(1, "Mapping CBFS floppy %s to addr %p\n", filename, pos);
+    char *desc = znprintf(MAXDESCSIZE, "Ramdisk [%s]", &filename[10]);
+    boot_add_floppy(drive_g, desc, bootprio_find_named_rom(filename, 0));
 }
 
 static int