Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33153
Change subject: console: Make die() and friends variadic
......................................................................
console: Make die() and friends variadic
die() currently only accepts a fixed message string, which is rather
inconvenient when there is extra information that would be helpful to
print in the error message. This currently requires an extra call to
printk(), which is somewhat awkward:
printk(BIOS_EMERG, "Bad table, opcode %d at %d", id, i);
die(""); // what do I say here?
die() already has a printk() inside it to print the error message, so
let's just make it variadic to combine the two.
die("Bad table, opcode %d at %d", id, i); // much better
Forwarding variadic arguments from one function to another is rather
tricky, so die_with_post_code() is redefined as a variadic macro
instead.
Change-Id: I28b9eac32899a1aa89e086e0d3889b75459581aa
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
---
M src/console/die.c
M src/include/console/console.h
2 files changed, 10 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/33153/1
diff --git a/src/console/die.c b/src/console/die.c
index 513d1c4..3a17126 100644
--- a/src/console/die.c
+++ b/src/console/die.c
@@ -30,17 +30,15 @@
}
/* Report a fatal error */
-void __noreturn die(const char *msg)
+void __noreturn die(const char *fmt, ...)
{
- printk(BIOS_EMERG, "%s", msg);
+ va_list args;
+
+ va_start(args, fmt);
+ vprintk(BIOS_EMERG, fmt, args);
+ va_end(args);
+
die_notify();
halt();
}
-
-/* Report a fatal error with a post code */
-void __noreturn die_with_post_code(uint8_t value, const char *msg)
-{
- post_code(value);
- die(msg);
-}
#endif
diff --git a/src/include/console/console.h b/src/include/console/console.h
index 082ba29..369ce5b 100644
--- a/src/include/console/console.h
+++ b/src/include/console/console.h
@@ -42,8 +42,9 @@
#endif
/* this function is weak and can be overridden by a mainboard function. */
void mainboard_post(u8 value);
-void __noreturn die(const char *msg);
-void __noreturn die_with_post_code(uint8_t value, const char *msg);
+void __noreturn die(const char *fmt, ...);
+#define die_with_post_code(value, fmt, ...) \
+ do { post_code(value); die(fmt, ##__VA_ARGS__); } while (0)
/*
* This function is weak and can be overridden to provide additional
--
To view, visit https://review.coreboot.org/c/coreboot/+/33153
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I28b9eac32899a1aa89e086e0d3889b75459581aa
Gerrit-Change-Number: 33153
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Hello Iru Cai,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/30912
to review the following change.
Change subject: autoport: Generate a libgfxinit template
......................................................................
autoport: Generate a libgfxinit template
Change-Id: I213628e525cc11c502de7d538bd60f49f3a930b9
Signed-off-by: Iru Cai <mytbk920423(a)gmail.com>
---
M util/autoport/main.go
1 file changed, 42 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/30912/1
diff --git a/util/autoport/main.go b/util/autoport/main.go
index 05a829b..c1a7907 100644
--- a/util/autoport/main.go
+++ b/util/autoport/main.go
@@ -748,6 +748,10 @@
ScanRoot(ctx)
+ KconfigBool["MAINBOARD_HAS_LIBGFXINIT"] = true
+ KconfigComment["MAINBOARD_HAS_LIBGFXINIT"] = "FIXME: check this"
+ AddRAMStageFile("gma-mainboard.ads", "CONFIG_MAINBOARD_USE_LIBGFXINIT")
+
if len(ROMStageFiles) > 0 || len(RAMStageFiles) > 0 || len(SMMFiles) > 0 {
mf := Create(ctx, "Makefile.inc")
defer mf.Close()
@@ -882,4 +886,42 @@
}
`)
+ gma := Create(ctx, "gma-mainboard.ads")
+ defer gma.Close()
+
+ gma.WriteString(`--
+-- This file is part of the coreboot project.
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 2 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+
+with HW.GFX.GMA;
+with HW.GFX.GMA.Display_Probing;
+
+use HW.GFX.GMA;
+use HW.GFX.GMA.Display_Probing;
+
+private package GMA.Mainboard is
+
+ ports : constant Port_List :=
+ (DP1,
+ DP2,
+ DP3,
+ HDMI1,
+ HDMI2,
+ HDMI3,
+ Analog,
+ Internal,
+ others => Disabled);
+
+end GMA.Mainboard;
+`)
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/30912
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I213628e525cc11c502de7d538bd60f49f3a930b9
Gerrit-Change-Number: 30912
Gerrit-PatchSet: 1
Gerrit-Owner: Iru Cai (vimacs) <mytbk920423(a)gmail.com>
Gerrit-Reviewer: Iru Cai <mytbk920423(a)gmail.com>
Gerrit-MessageType: newchange
Kacper Słomiński has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30980
Change subject: mainboard/Kconfig: add option for a 6144 KB(6 MB) ROM size
......................................................................
mainboard/Kconfig: add option for a 6144 KB(6 MB) ROM size
Signed-off-by: Kacper Słomiński <kacper.slominski72(a)gmail.com>
Change-Id: I7a1949c3512528b6b73955d907efc21728eed739
---
M src/mainboard/Kconfig
1 file changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/30980/1
diff --git a/src/mainboard/Kconfig b/src/mainboard/Kconfig
index 363df55..c88d317 100644
--- a/src/mainboard/Kconfig
+++ b/src/mainboard/Kconfig
@@ -24,6 +24,8 @@
bool
config BOARD_ROMSIZE_KB_4096
bool
+config BOARD_ROMSIZE_KB_6144
+ bool
config BOARD_ROMSIZE_KB_8192
bool
config BOARD_ROMSIZE_KB_10240
@@ -47,6 +49,7 @@
default COREBOOT_ROMSIZE_KB_1024 if BOARD_ROMSIZE_KB_1024
default COREBOOT_ROMSIZE_KB_2048 if BOARD_ROMSIZE_KB_2048
default COREBOOT_ROMSIZE_KB_4096 if BOARD_ROMSIZE_KB_4096
+ default COREBOOT_ROMSIZE_KB_6144 if BOARD_ROMSIZE_KB_6144
default COREBOOT_ROMSIZE_KB_8192 if BOARD_ROMSIZE_KB_8192
default COREBOOT_ROMSIZE_KB_10240 if BOARD_ROMSIZE_KB_10240
default COREBOOT_ROMSIZE_KB_12288 if BOARD_ROMSIZE_KB_12288
@@ -94,6 +97,11 @@
help
Choose this option if you have a 4096 KB (4 MB) ROM chip.
+config COREBOOT_ROMSIZE_KB_6144
+ bool "6144 KB (6 MB)"
+ help
+ Choose this option if you have a 6144 KB (6 MB) ROM chip.
+
config COREBOOT_ROMSIZE_KB_8192
bool "8192 KB (8 MB)"
help
@@ -136,6 +144,7 @@
default 1024 if COREBOOT_ROMSIZE_KB_1024
default 2048 if COREBOOT_ROMSIZE_KB_2048
default 4096 if COREBOOT_ROMSIZE_KB_4096
+ default 6144 if COREBOOT_ROMSIZE_KB_6144
default 8192 if COREBOOT_ROMSIZE_KB_8192
default 10240 if COREBOOT_ROMSIZE_KB_10240
default 12288 if COREBOOT_ROMSIZE_KB_12288
@@ -153,6 +162,7 @@
default 0x100000 if COREBOOT_ROMSIZE_KB_1024
default 0x200000 if COREBOOT_ROMSIZE_KB_2048
default 0x400000 if COREBOOT_ROMSIZE_KB_4096
+ default 0x600000 if COREBOOT_ROMSIZE_KB_6144
default 0x800000 if COREBOOT_ROMSIZE_KB_8192
default 0xa00000 if COREBOOT_ROMSIZE_KB_10240
default 0xc00000 if COREBOOT_ROMSIZE_KB_12288
--
To view, visit https://review.coreboot.org/c/coreboot/+/30980
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7a1949c3512528b6b73955d907efc21728eed739
Gerrit-Change-Number: 30980
Gerrit-PatchSet: 1
Gerrit-Owner: Kacper Słomiński <kacper.slominski72(a)gmail.com>
Gerrit-MessageType: newchange