[coreboot] New patch to review for coreboot: 2a35d40 Use a fixed chip order for bootblock_devices.h
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Wed Nov 14 21:46:38 CET 2012
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1858
-gerrit
commit 2a35d400f6f639d6aa8604066a68eb68f17ffadc
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Wed Nov 14 20:09:20 2012 +0200
Use a fixed chip order for bootblock_devices.h
Bootblock init functions will be called in the following
order if bootblock_devices.h is activated in a follow-up:
northbridge, southbridge, superio, cpu
Most notably, this change moves CPU last. Only existing use for CPU
hook here is for microcode update, this benefits from SPI speedups
and Flash decode enables in southbridge part.
Change-Id: Idbee921f4a22252da49fc3c4f65e1e00afd71db1
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
util/sconfig/main.c | 23 ++++++++++++++---------
1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/util/sconfig/main.c b/util/sconfig/main.c
index cdf54bc..1938471 100644
--- a/util/sconfig/main.c
+++ b/util/sconfig/main.c
@@ -659,6 +659,8 @@ int main(int argc, char** argv) {
walk_device_tree(autogen, &root, pass1, NULL);
} else if (scan_mode == BOOTBLOCK_MODE) {
+ const char * initorder[] = {"northbridge","southbridge","superio","cpu", 0};
+ int i = 0;
h = &headers;
while (h->next) {
h = h->next;
@@ -671,16 +673,19 @@ int main(int argc, char** argv) {
fprintf(autogen, "#include \"mainboard/%s/bootblock.c\"\n", mainboard);
fprintf(autogen, "#else\n");
fprintf(autogen, "static void bootblock_mainboard_init(void)\n{\n");
- h = &headers;
- while (h->next) {
- h = h->next;
- if (!h->chiph_exists)
- continue;
- char * buf = translate_name(h->name, SPLIT_1ST);
- if (buf) {
- fprintf(autogen, "\tbootblock_%s_init();\n", buf);
- free(buf);
+ while (initorder[i]) {
+ h = &headers;
+ while (h->next) {
+ h = h->next;
+ if (!h->chiph_exists)
+ continue;
+ char * buf = translate_name(h->name, SPLIT_1ST);
+ if (buf && !strcmp(buf, initorder[i])) {
+ fprintf(autogen, "\tbootblock_%s_init();\n", buf);
+ free(buf);
+ }
}
+ i++;
}
fprintf(autogen, "}\n");
fprintf(autogen, "#endif\n");
More information about the coreboot
mailing list