6 /* This defines the structure of a table of parameters useful for ELF
7 * bootable images. These parameters are all passed and generated
8 * by the bootloader to the booted image. For simplicity and
9 * consistency the Elf Note format is reused.
11 * All of the information must be Position Independent Data.
12 * That is it must be safe to relocate the whole ELF boot parameter
13 * block without changing the meaning or correctnes of the data.
14 * Additionally it must be safe to permute the order of the ELF notes
15 * to any possible permutation without changing the meaning or correctness
20 #define ELF_HEAD_SIZE (8*1024)
21 #define ELF_BOOT_MAGIC 0x0E1FB007
23 typedef uint16_t Elf_Half;
24 typedef uint32_t Elf_Word;
25 typedef uint64_t Elf_Xword;
29 Elf_Word b_signature; /* "0x0E1FB007" */
37 Elf_Word n_namesz; /* Length of the note's name. */
38 Elf_Word n_descsz; /* Length of the note's descriptor. */
39 Elf_Word n_type; /* Type of the note. */
43 /* For standard notes n_namesz must be zero */
44 /* All of the following standard note types provide a single null
45 * terminated string in the descriptor.
47 #define EBN_FIRMWARE_TYPE 0x00000001
48 /* On platforms that support multiple classes of firmware this field
49 * specifies the class of firmware you are loaded under.
51 #define EBN_BOOTLOADER_NAME 0x00000002
52 /* This specifies just the name of the bootloader for easy comparison */
53 #define EBN_BOOTLOADER_VERSION 0x00000003
54 /* This specifies the version of the bootlader */
55 #define EBN_COMMAND_LINE 0x00000004
56 /* This specifies a command line that can be set by user interaction,
57 * and is provided as a free form string to the loaded image.
61 /* Standardized Elf image notes for booting... The name for all of these is ELFBoot */
63 #define ELF_NOTE_BOOT "ELFBoot"
65 #define EIN_PROGRAM_NAME 0x00000001
66 /* The program in this ELF file */
67 #define EIN_PROGRAM_VERSION 0x00000002
68 /* The version of the program in this ELF file */
69 #define EIN_PROGRAM_CHECKSUM 0x00000003
70 /* ip style checksum of the memory image. */
73 /* Linux image notes for booting... The name for all of these is Linux */
75 #define LINUX_NOTE_BOOT "Linux"
77 #define LIN_COMMAND_LINE 0x00000001
78 /* The command line to pass to the loaded kernel. */
79 #define LIN_ROOT_DEV 0x00000002
80 /* The root dev to pass to the loaded kernel. */
81 #define LIN_RAMDISK_FLAGS 0x00000003
82 /* Various old ramdisk flags */
83 #define LIN_INITRD_START 0x00000004
84 /* Start of the ramdisk in bytes */
85 #define LIN_INITRD_SIZE 0x00000005
86 /* Size of the ramdisk in bytes */
89 #endif /* ELF_BOOT_H */