coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
rmodule-defs.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 #ifndef RMODULE_DEFS_H
3 #define RMODULE_DEFS_H
4 
5 #include <stdint.h>
6 #include <stddef.h>
7 
8 #define RMODULE_MAGIC 0xf8fe
9 #define RMODULE_VERSION_1 1
10 
11 /* All fields with '_offset' in the name are byte offsets into the flat blob.
12  * The linker and the linker script takes are of assigning the values. */
17  /* The payload represents the program's loadable code and data. */
20  /* Begin and of relocation information about the program module. */
23  /* The starting address of the linked program. This address is vital
24  * for determining relocation offsets as the relocation info and other
25  * symbols (bss, entry point) need this value as a basis to calculate
26  * the offsets.
27  */
29  /* The module_program_size is the size of memory used while running
30  * the program. The program is assumed to consume a contiguous amount
31  * of memory. */
33  /* This is program's execution entry point. */
35  /* Optional parameter structure that can be used to pass data into
36  * the module. */
39  /* BSS section information so the loader can clear the bss. */
42  /* Add some room for growth. */
45 
46 #endif /* RMODULE_DEFS_H */
struct rmodule_header __packed
unsigned short uint16_t
Definition: stdint.h:11
unsigned int uint32_t
Definition: stdint.h:14
unsigned char uint8_t
Definition: stdint.h:8
uint32_t module_link_start_address
Definition: rmodule-defs.h:28
uint16_t magic
Definition: rmodule-defs.h:14
uint32_t relocations_begin_offset
Definition: rmodule-defs.h:21
uint32_t parameters_begin
Definition: rmodule-defs.h:37
uint32_t bss_begin
Definition: rmodule-defs.h:40
uint32_t module_entry_point
Definition: rmodule-defs.h:34
uint32_t bss_end
Definition: rmodule-defs.h:41
uint32_t payload_end_offset
Definition: rmodule-defs.h:19
uint32_t module_program_size
Definition: rmodule-defs.h:32
uint32_t relocations_end_offset
Definition: rmodule-defs.h:22
uint32_t padding[4]
Definition: rmodule-defs.h:43
uint8_t version
Definition: rmodule-defs.h:15
uint32_t parameters_end
Definition: rmodule-defs.h:38
uint32_t payload_begin_offset
Definition: rmodule-defs.h:18