1/*
2 * Copyright 2017, Genode Labs GmbH
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 */
6
7#pragma once
8
9#define MULTIBOOT2_MAGIC 0x36d76289
10
11#include <types.h>
12
13typedef struct multiboot2_header {
14    uint32_t total_size;
15    uint32_t unknown;
16} PACKED multiboot2_header_t;
17
18typedef struct multiboot2_tag {
19    uint32_t type;
20    uint32_t size;
21} PACKED multiboot2_tag_t;
22
23typedef struct multiboot2_memory {
24    uint64_t addr;
25    uint64_t size;
26    uint32_t type;
27    uint32_t reserved;
28} PACKED multiboot2_memory_t;
29
30typedef struct multiboot2_module {
31    uint32_t start;
32    uint32_t end;
33    char     string [1];
34} PACKED multiboot2_module_t;
35
36typedef struct multiboot2_fb {
37    uint64_t addr;
38    uint32_t pitch;
39    uint32_t width;
40    uint32_t height;
41    uint8_t  bpp;
42    uint8_t  type;
43} PACKED multiboot2_fb_t;
44
45enum multiboot2_tags {
46    MULTIBOOT2_TAG_END     = 0,
47    MULTIBOOT2_TAG_CMDLINE = 1,
48    MULTIBOOT2_TAG_MODULE  = 3,
49    MULTIBOOT2_TAG_MEMORY  = 6,
50    MULTIBOOT2_TAG_FB      = 8,
51    MULTIBOOT2_TAG_ACPI_1  = 14,
52    MULTIBOOT2_TAG_ACPI_2  = 15,
53};
54
55