Since some people disapprove of white space cleanups mixed in regular commits
[coreboot.git] / util / mkelfImage / linux-i386 / uniform_boot.h
1 #ifndef _LINUX_UNIFORM_BOOT_H
2 #define _LINUX_UNIFORM_BOOT_H
3
4 /* The uniform boot environment information is restricted to
5  * hardware information.  In particular for a simple enough machine
6  * all of the environment information should be able to reside in
7  * a rom and not need to be moved.  This information is the
8  * information a trivial boot room can pass to linux to let it
9  * run the hardware.
10  *
11  * Also 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. The exception is the
14  * uniform_boot_header with it's two pointers arg & env.
15  *
16  * The addresses in the arg & env pointers must be physical
17  * addresses. A physical address is an address you put in the page
18  * table.
19  *
20  * The Command line is for user policy.  Things like the default
21  * root device.
22  *
23  */
24
25 struct uniform_boot_header
26 {
27         unsigned long header_bytes;
28         unsigned long header_checksum;
29         unsigned long arg;
30         unsigned long arg_bytes;
31         unsigned long env;
32         unsigned long env_bytes;
33 };
34
35 /* Every entry in the boot enviroment list will correspond to a boot
36  * info record.  Encoding both type and size.  The type is obviously
37  * so you can tell what it is.  The size allows you to skip that
38  * boot enviroment record if you don't know what it easy.  This allows
39  * forward compatibility with records not yet defined.
40  */
41 struct ube_record {
42         unsigned long tag;              /* tag ID */
43         unsigned long size;             /* size of record (in bytes) */
44         unsigned long data[0];          /* data */
45 };
46
47
48 #define UBE_TAG_MEMORY  0x0001
49
50 struct ube_memory_range {
51         unsigned long long start;
52         unsigned long long size;
53         unsigned long type;
54 #define UBE_MEM_RAM      1
55 #define UBE_MEM_RESERVED 2
56 #define UBE_MEM_ACPI     3
57 #define UBE_MEM_NVS      4
58
59 };
60
61 struct ube_memory {
62         unsigned long tag;
63         unsigned long size;
64         struct ube_memory_range map[0];
65 };
66
67 #endif /* _LINUX_UNIFORM_BOOT_H */