From 4bd0de0b2ecb0d59fb0703df71062c61e7c34cf6 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Sat, 3 Dec 2005 22:39:23 +0000 Subject: add cmos checksum range to linuxbios table git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2125 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/arch/i386/boot/linuxbios_table.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/arch/i386/boot/linuxbios_table.c b/src/arch/i386/boot/linuxbios_table.c index 10d3b0ce9d..a625fe0473 100644 --- a/src/arch/i386/boot/linuxbios_table.c +++ b/src/arch/i386/boot/linuxbios_table.c @@ -98,6 +98,24 @@ struct lb_mainboard *lb_mainboard(struct lb_header *header) return mainboard; } +struct cmos_checksum *lb_cmos_checksum(struct lb_header *header) +{ + struct lb_record *rec; + struct cmos_checksum *cmos_checksum; + rec = lb_new_record(header); + cmos_checksum = (struct cmos_checksum *)rec; + cmos_checksum->tag = LB_TAG_OPTION_CHECKSUM; + + cmos_checksum->size = (sizeof(*cmos_checksum)); + + cmos_checksum->range_start = LB_CKS_RANGE_START * 8; + cmos_checksum->range_end = ( LB_CKS_RANGE_END * 8 ) + 7; + cmos_checksum->location = LB_CKS_LOC * 8; + cmos_checksum->type = CHECKSUM_PCBIOS; + + return cmos_checksum; +} + void lb_strings(struct lb_header *header) { static const struct { @@ -346,6 +364,8 @@ unsigned long write_linuxbios_table( rec_dest = lb_new_record(head); rec_src = (struct lb_record *)(void *)&option_table; memcpy(rec_dest, rec_src, rec_src->size); + /* Create cmos checksum entry in linuxbios table */ + lb_cmos_checksum(head); } /* Record where RAM is located */ mem = build_lb_mem(head); -- cgit v1.2.3