[coreboot] [PATCH] Move cmos.default handling to bootblock

Patrick Georgi Patrick.Georgi at secunet.com
Tue Feb 1 11:50:17 CET 2011


The cmos.default code wasn't actually used so far, due to an oversight
when forward-porting this feature from an old branch.

- Extend walkcbfs' use by factoring out the stage handling into C code.
- New sanitize_cmos() function that looks if CMOS data is invalid and
  cmos.default exists and if so overwrites CMOS with cmos.default data.
- Use sanitize_cmos() in both bootblock implementations.
- Drop the need to reboot after writing CMOS: CMOS wasn't used so far,
  so we can go on without a reboot.
- Remove the restriction that cmos.default only works on CAR boards.
- Always build in cmos.default support on boards that USE_OPTION_TABLE.

Signed-off-by: Patrick Georgi <patrick.georgi at secunet.com>

It's abuild tested and boot tested with emulation/qemu-x86.

With this patch CMOS recovery only works on bootblock enabled boards/chipsets.
Consider this an incentive to implement bootblock support where necessary :-)
---
 src/arch/x86/Kconfig                    |    6 -----
 src/arch/x86/Makefile.bootblock.inc     |    2 +-
 src/arch/x86/include/bootblock_common.h |   34 ++++++++++++++++++++++++++++--
 src/arch/x86/init/bootblock_normal.c    |    4 +++
 src/arch/x86/init/bootblock_simple.c    |    5 ++++
 src/arch/x86/lib/walkcbfs.S             |   10 +--------
 src/pc80/mc146818rtc_early.c            |   28 -------------------------
 7 files changed, 42 insertions(+), 47 deletions(-)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Move-cmos.default-handling-to-bootblock.patch
Type: text/x-patch
Size: 6236 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20110201/49fd80b8/attachment.patch>


More information about the coreboot mailing list