RFC: linuxbios table fix

Eric W. Biederman ebiederman at lnxi.com
Thu Dec 9 13:53:01 CET 2004

Stefan I believe I have a better fix for the LinuxBIOS table
bug then __attribute__((packed)).

How does this look?

I am still worried about ppc, and big endian architectures in general.
But I don't think we currently have any users there.

I don't know what is the best long term strategy for handling 64bit
numbers but for this instance where we need a better definition for
the current structure simply using a structure with 2 32bit ints
looks like a sane way to go.


--- checkin/freebios2/src/include/boot/linuxbios_tables.h       Tue Apr 22 13:01:45 2003
+++ linuxbios/freebios2/src/include/boot/linuxbios_tables.h     Thu Dec  9 16:55:18 2004
@@ -57,14 +57,17 @@
 #define LB_TAG_MEMORY  0x0001
+struct lb_uint64 {
+       uint32_t lo;
+       uint32_t hi;
 struct lb_memory_range {
-       uint64_t start;
-       uint64_t size;
+       struct lb_uint64 start;
+       struct lb_uint64 size;
        uint32_t type;
 #define LB_MEM_RAM       1     /* Memory anyone can use */
 #define LB_MEM_RESERVED  2     /* Don't use this memory region */
 #define LB_MEM_TABLE     16    /* Ram configuration tables are kept in */
 struct lb_memory {

More information about the coreboot mailing list