[LinuxBIOS] cmos checksum in linuxbios table
Stefan Reinauer
stepan at openbios.org
Sat Dec 3 18:47:49 CET 2005
Hi,
I suggest putting the cmos checksum areas into the LinuxBIOS table.
This was obviously planned a long time ago and I already implemented
support for that in the lxbios utility.
See below patch to implement this thing in LinuxBIOS.
Stefan
-------------- next part --------------
Index: src/arch/i386/boot/linuxbios_table.c
===================================================================
--- src/arch/i386/boot/linuxbios_table.c (revision 2117)
+++ src/arch/i386/boot/linuxbios_table.c (working copy)
@@ -98,6 +98,24 @@
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_option));
+
+ 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 @@
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);
More information about the coreboot
mailing list