Skip to content

Commit

Permalink
HV: elf_loader: introduce the multiboot_header data structure
Browse files Browse the repository at this point in the history
Define the multiboot_header data structure and
MULTIBOOT_MEMORY related definitions.

Tracked-On: projectacrn#8642

Signed-off-by: Zhang Chen <[email protected]>
Signed-off-by: Victor Sun <[email protected]>
Reviewed-by: Junjie Mao <[email protected]>
  • Loading branch information
zhangckid committed Jul 3, 2024
1 parent e36a61a commit 2f400ba
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions hypervisor/boot/include/multiboot_std.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,36 @@
#define MULTIBOOT_INFO_HAS_LOADER_NAME 0x00000200U

#ifndef ASSEMBLER

struct multiboot_header {
/* Must be MULTIBOOT_MAGIC - see above. */
uint32_t magic;

/* Feature flags. */
uint32_t flags;

/* The above fields plus this one must equal 0 mod 2^32. */
uint32_t checksum;

/* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */
uint32_t header_addr;
uint32_t load_addr;
uint32_t load_end_addr;
uint32_t bss_end_addr;
uint32_t entry_addr;

/* These are only valid if MULTIBOOT_VIDEO_MODE is set. */
uint32_t mode_type;
uint32_t width;
uint32_t height;
uint32_t depth;
} __packed;

#define MULTIBOOT_MEMORY_AVAILABLE 1U
#define MULTIBOOT_MEMORY_RESERVED 2U
#define MULTIBOOT_MEMORY_ACPI_RECLAIMABLE 3U
#define MULTIBOOT_MEMORY_NVS 4U
#define MULTIBOOT_MEMORY_BADRAM 5U
struct multiboot_mmap {
uint32_t size;
uint64_t baseaddr;
Expand Down

0 comments on commit 2f400ba

Please sign in to comment.