[coreboot-gerrit] New patch to review for coreboot: 6d66fa6 PC Engines ALIX 1C: Make it compatible with nvramtool.
Denis Carikli (GNUtoo@no-log.org)
gerrit at coreboot.org
Wed May 8 23:33:52 CEST 2013
Denis Carikli (GNUtoo at no-log.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3222
-gerrit
commit 6d66fa6e233cb83a5a4a815d3824bddd27b7f6a5
Author: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
Date: Wed May 8 23:15:11 2013 +0200
PC Engines ALIX 1C: Make it compatible with nvramtool.
This commit was inspired by the Lenovo X60 mainboard.c code.
It was tested on the ALIX 1C with the following result:
The first boot had garbage on serial, but the second boot
was ok and nvramtool worked:
# ./nvramtool -a
boot_option = Fallback
last_boot = Fallback
ECC_memory = Disable
baud_rate = 115200
power_on_after_fail = Disable
debug_level = Spew
# Bad value -> boot_first = 0xf
# Bad value -> boot_second = 0xf
# Bad value -> boot_third = 0xf
boot_index = 0xf
boot_countdown = 0x7f
Change-Id: I4553db56be8e016b60b0c2d44b1bfd8265f3dd55
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
---
src/mainboard/pcengines/alix1c/Kconfig | 1 +
src/mainboard/pcengines/alix1c/mainboard.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+)
diff --git a/src/mainboard/pcengines/alix1c/Kconfig b/src/mainboard/pcengines/alix1c/Kconfig
index 315b7ed..ea3c17a 100644
--- a/src/mainboard/pcengines/alix1c/Kconfig
+++ b/src/mainboard/pcengines/alix1c/Kconfig
@@ -12,6 +12,7 @@ config BOARD_SPECIFIC_OPTIONS # dummy
select UDELAY_TSC
select BOARD_ROMSIZE_KB_512
select POWER_BUTTON_DEFAULT_DISABLE
+ select HAVE_OPTION_TABLE
config MAINBOARD_DIR
string
diff --git a/src/mainboard/pcengines/alix1c/mainboard.c b/src/mainboard/pcengines/alix1c/mainboard.c
index 7c67fce..e8032a3 100644
--- a/src/mainboard/pcengines/alix1c/mainboard.c
+++ b/src/mainboard/pcengines/alix1c/mainboard.c
@@ -19,10 +19,28 @@
#include <console/console.h>
#include <device/device.h>
+#include <pc80/mc146818rtc.h>
static void init(struct device *dev)
{
+ u8 defaults_loaded = 0;
+
printk(BIOS_DEBUG, "ALIX1.C ENTER %s\n", __func__);
+
+ if (get_option(&defaults_loaded, "cmos_defaults_loaded") < 0) {
+ printk(BIOS_INFO, "failed to get cmos_defaults_loaded");
+ defaults_loaded = 0;
+ }
+ if (!defaults_loaded) {
+ printk(BIOS_INFO, "Restoring CMOS defaults\n");
+ /* set baudrate to 115200 baud */
+ set_option("baud_rate", &(u8[]){ 0x00 });
+ /* set default debug_level (DEFAULT_CONSOLE_LOGLEVEL starts at 1) */
+ set_option("debug_level",
+ &(u8[]) { CONFIG_DEFAULT_CONSOLE_LOGLEVEL+1 });
+ set_option("cmos_defaults_loaded", &(u8[]){ 0x01 });
+ }
+
printk(BIOS_DEBUG, "ALIX1.C EXIT %s\n", __func__);
}
More information about the coreboot-gerrit
mailing list