1
0
Fork 0
mirror of https://github.com/tailix/libkernaux.git synced 2024-10-30 11:54:01 -04:00
libkernaux/fixtures/multiboot2_header_example1.h

97 lines
2.8 KiB
C
Raw Normal View History

#include <kernaux/macro.h>
#include <kernaux/multiboot2.h>
2022-12-03 05:23:52 -05:00
#include <kernaux/macro/packing_start.run>
KERNAUX_ALIGNED(KERNAUX_MULTIBOOT2_HEADER_ALIGN)
2022-01-14 02:16:26 -05:00
static const struct {
struct KernAux_Multiboot2_Header multiboot2_header;
struct KernAux_Multiboot2_HTag_Flags tag_flags1;
uint8_t _align1[4];
struct KernAux_Multiboot2_HTag_Flags tag_flags2;
uint8_t _align2[4];
struct KernAux_Multiboot2_HTag_Flags tag_flags3;
uint8_t _align3[4];
struct KernAux_Multiboot2_HTag_Flags tag_flags4;
uint8_t _align4[4];
struct {
struct KernAux_Multiboot2_HTag_InfoReq tag;
uint32_t mbi_tag_types[1];
} tag_info_req;
uint8_t _align5[4];
2022-01-14 02:16:26 -05:00
struct KernAux_Multiboot2_HTag_None tag_none;
2022-12-03 05:23:52 -05:00
}
KERNAUX_PACKED
multiboot2_header_example1 = {
2022-01-14 02:16:26 -05:00
.multiboot2_header = {
.magic = KERNAUX_MULTIBOOT2_HEADER_MAGIC,
.arch = KERNAUX_MULTIBOOT2_HEADER_ARCH_MIPS32,
.total_size = sizeof(multiboot2_header_example1),
.checksum = KERNAUX_MULTIBOOT2_HEADER_CHECKSUM(
KERNAUX_MULTIBOOT2_HEADER_ARCH_MIPS32,
sizeof(multiboot2_header_example1)
),
},
.tag_flags1 = {
.base = {
.type = KERNAUX_MULTIBOOT2_HTAG_FLAGS,
.flags = 0,
.size = sizeof(multiboot2_header_example1.tag_flags1),
},
.console_flags = 0,
},
.tag_flags2 = {
.base = {
.type = KERNAUX_MULTIBOOT2_HTAG_FLAGS,
.flags = 0,
.size = sizeof(multiboot2_header_example1.tag_flags2),
},
.console_flags = KERNAUX_MULTIBOOT2_HTAG_FLAGS_REQUIRE_CONSOLE,
},
.tag_flags3 = {
.base = {
.type = KERNAUX_MULTIBOOT2_HTAG_FLAGS,
.flags = 0,
.size = sizeof(multiboot2_header_example1.tag_flags3),
},
.console_flags = KERNAUX_MULTIBOOT2_HTAG_FLAGS_EGA_SUPPORT,
},
.tag_flags4 = {
.base = {
.type = KERNAUX_MULTIBOOT2_HTAG_FLAGS,
.flags = 0,
.size = sizeof(multiboot2_header_example1.tag_flags4),
},
.console_flags =
KERNAUX_MULTIBOOT2_HTAG_FLAGS_REQUIRE_CONSOLE |
KERNAUX_MULTIBOOT2_HTAG_FLAGS_EGA_SUPPORT,
},
.tag_info_req = {
.tag = {
.base = {
.type = KERNAUX_MULTIBOOT2_HTAG_INFO_REQ,
2022-12-16 20:05:48 -05:00
.flags = KERNAUX_MULTIBOOT2_HTAG_BASE_FLAG_OPTIONAL,
.size = sizeof(multiboot2_header_example1.tag_info_req),
},
},
.mbi_tag_types = {
KERNAUX_MULTIBOOT2_ITAG_NONE,
},
},
2022-01-14 02:16:26 -05:00
.tag_none = {
.base = {
.type = KERNAUX_MULTIBOOT2_HTAG_NONE,
.flags = 0,
.size = sizeof(multiboot2_header_example1.tag_none),
},
},
2022-01-14 01:35:20 -05:00
};
2022-12-03 05:23:52 -05:00
#include <kernaux/macro/packing_end.run>