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. */
13
struct
rmodule_header
{
14
uint16_t
magic
;
15
uint8_t
version
;
16
uint8_t
type
;
17
/* The payload represents the program's loadable code and data. */
18
uint32_t
payload_begin_offset
;
19
uint32_t
payload_end_offset
;
20
/* Begin and of relocation information about the program module. */
21
uint32_t
relocations_begin_offset
;
22
uint32_t
relocations_end_offset
;
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
*/
28
uint32_t
module_link_start_address
;
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. */
32
uint32_t
module_program_size
;
33
/* This is program's execution entry point. */
34
uint32_t
module_entry_point
;
35
/* Optional parameter structure that can be used to pass data into
36
* the module. */
37
uint32_t
parameters_begin
;
38
uint32_t
parameters_end
;
39
/* BSS section information so the loader can clear the bss. */
40
uint32_t
bss_begin
;
41
uint32_t
bss_end
;
42
/* Add some room for growth. */
43
uint32_t
padding
[4];
44
}
__packed
;
45
46
#endif
/* RMODULE_DEFS_H */
__packed
struct rmodule_header __packed
stddef.h
stdint.h
uint16_t
unsigned short uint16_t
Definition:
stdint.h:11
uint32_t
unsigned int uint32_t
Definition:
stdint.h:14
uint8_t
unsigned char uint8_t
Definition:
stdint.h:8
rmodule_header
Definition:
rmodule-defs.h:13
rmodule_header::module_link_start_address
uint32_t module_link_start_address
Definition:
rmodule-defs.h:28
rmodule_header::magic
uint16_t magic
Definition:
rmodule-defs.h:14
rmodule_header::relocations_begin_offset
uint32_t relocations_begin_offset
Definition:
rmodule-defs.h:21
rmodule_header::parameters_begin
uint32_t parameters_begin
Definition:
rmodule-defs.h:37
rmodule_header::bss_begin
uint32_t bss_begin
Definition:
rmodule-defs.h:40
rmodule_header::module_entry_point
uint32_t module_entry_point
Definition:
rmodule-defs.h:34
rmodule_header::bss_end
uint32_t bss_end
Definition:
rmodule-defs.h:41
rmodule_header::payload_end_offset
uint32_t payload_end_offset
Definition:
rmodule-defs.h:19
rmodule_header::type
uint8_t type
Definition:
rmodule-defs.h:16
rmodule_header::module_program_size
uint32_t module_program_size
Definition:
rmodule-defs.h:32
rmodule_header::relocations_end_offset
uint32_t relocations_end_offset
Definition:
rmodule-defs.h:22
rmodule_header::padding
uint32_t padding[4]
Definition:
rmodule-defs.h:43
rmodule_header::version
uint8_t version
Definition:
rmodule-defs.h:15
rmodule_header::parameters_end
uint32_t parameters_end
Definition:
rmodule-defs.h:38
rmodule_header::payload_begin_offset
uint32_t payload_begin_offset
Definition:
rmodule-defs.h:18
src
commonlib
include
commonlib
rmodule-defs.h
Generated by
1.9.1