1 #ifndef LINUXBIOS_TABLES_H
2 #define LINUXBIOS_TABLES_H
6 /* The linuxbios table information is for conveying information
7 * from the firmware to the loaded OS image. Primarily this
8 * is expected to be information that cannot be discovered by
9 * other means, such as quering the hardware directly.
11 * All of the information should be Position Independent Data.
12 * That is it should be safe to relocated any of the information
13 * without it's meaning/correctnes changing. For table that
14 * can reasonably be used on multiple architectures the data
15 * size should be fixed. This should ease the transition between
16 * 32 bit and 64 bit architectures etc.
18 * The completeness test for the information in this table is:
19 * - Can all of the hardware be detected?
20 * - Are the per motherboard constants available?
21 * - Is there enough to allow a kernel to run that was written before
22 * a particular motherboard is constructed? (Assuming the kernel
23 * has drivers for all of the hardware but it does not have
24 * assumptions on how the hardware is connected together).
26 * With this test it should be straight forward to determine if a
27 * table entry is required or not. This should remove much of the
28 * long term compatibility burden as table entries which are
29 * irrelevant or have been replaced by better alternatives may be
30 * dropped. Of course it is polite and expidite to include extra
31 * table entries and be backwards compatible, but it is not required.
37 uint8_t signature[4]; /* LBIO */
38 uint32_t header_bytes;
39 uint32_t header_checksum;
41 uint32_t table_checksum;
42 uint32_t table_entries;
45 /* Every entry in the boot enviroment list will correspond to a boot
46 * info record. Encoding both type and size. The type is obviously
47 * so you can tell what it is. The size allows you to skip that
48 * boot enviroment record if you don't know what it easy. This allows
49 * forward compatibility with records not yet defined.
52 uint32_t tag; /* tag ID */
53 uint32_t size; /* size of record (in bytes) */
56 #define LB_TAG_UNUSED 0x0000
58 #define LB_TAG_MEMORY 0x0001
60 struct lb_memory_range {
65 #define LB_MEM_RESERVED 2
72 struct lb_memory_range map[0];
75 #define LB_TAG_HWRPB 0x0002
82 #define LB_TAG_FORWARD 0x0011
91 #endif /* LINUXBIOS_TABLES_H */