summaryrefslogtreecommitdiff
path: root/util/mkelfImage/linux-i386/uniform_boot.h
blob: ac814967f6a8ad1b1d1260c87d44b3f1ae3c8119 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef _LINUX_UNIFORM_BOOT_H
#define _LINUX_UNIFORM_BOOT_H

/* The uniform boot environment information is restricted to
 * hardware information.  In particular for a simple enough machine
 * all of the environment information should be able to reside in
 * a rom and not need to be moved.  This information is the
 * information a trivial boot room can pass to linux to let it
 * run the hardware.
 *
 * Also all of the information should be Position Independent Data.
 * That is it should be safe to relocated any of the information
 * without it's meaning/correctnes changing. The exception is the
 * uniform_boot_header with it's two pointers arg & env.
 *
 * The addresses in the arg & env pointers must be physical
 * addresses. A physical address is an address you put in the page
 * table.
 *
 * The Command line is for user policy.  Things like the default
 * root device.
 *
 */

struct uniform_boot_header
{
	unsigned long header_bytes;
	unsigned long header_checksum;
	unsigned long arg;
	unsigned long arg_bytes;
	unsigned long env;
	unsigned long env_bytes;
};

/* Every entry in the boot enviroment list will correspond to a boot
 * info record.  Encoding both type and size.  The type is obviously
 * so you can tell what it is.  The size allows you to skip that
 * boot enviroment record if you don't know what it easy.  This allows
 * forward compatibility with records not yet defined.
 */
struct ube_record {
	unsigned long tag;		/* tag ID */
	unsigned long size;		/* size of record (in bytes) */
	unsigned long data[0];		/* data */
};


#define UBE_TAG_MEMORY	0x0001

struct ube_memory_range {
	unsigned long long start;
	unsigned long long size;
	unsigned long type;
#define UBE_MEM_RAM      1
#define UBE_MEM_RESERVED 2
#define UBE_MEM_ACPI     3
#define UBE_MEM_NVS      4

};

struct ube_memory {
	unsigned long tag;
	unsigned long size;
	struct ube_memory_range map[0];
};

#endif /* _LINUX_UNIFORM_BOOT_H */