summaryrefslogtreecommitdiff
path: root/src/arch/i386/boot
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@openbios.org>2005-12-03 22:39:23 +0000
committerStefan Reinauer <stepan@openbios.org>2005-12-03 22:39:23 +0000
commit4bd0de0b2ecb0d59fb0703df71062c61e7c34cf6 (patch)
treea240d3433d5864bfb6e21e5d2f14a852c1b02f84 /src/arch/i386/boot
parent0cf46ca21556e46abd03207ea3300b30233affdf (diff)
add cmos checksum range to linuxbios table
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@2125 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/arch/i386/boot')
-rw-r--r--src/arch/i386/boot/linuxbios_table.c20
1 files changed, 20 insertions, 0 deletions
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);