|
|
|
@ -13,6 +13,7 @@ struct multiboot2_tag
|
|
|
|
|
std::uint32_t data[1];
|
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
|
|
template<int N>
|
|
|
|
|
struct multiboot2
|
|
|
|
|
{
|
|
|
|
|
static constexpr std::uint32_t MAGIC = 0xE85250D6;
|
|
|
|
@ -21,20 +22,16 @@ struct multiboot2
|
|
|
|
|
static constexpr std::uint32_t CHECKSUM = -(MAGIC + FLAGS + LENGTH);
|
|
|
|
|
|
|
|
|
|
alignas(8)
|
|
|
|
|
std::uint32_t magic;
|
|
|
|
|
std::uint32_t flags;
|
|
|
|
|
std::uint32_t length;
|
|
|
|
|
std::uint32_t checksum;
|
|
|
|
|
std::uint32_t magic = MAGIC;
|
|
|
|
|
std::uint32_t flags = FLAGS;
|
|
|
|
|
std::uint32_t length = LENGTH;
|
|
|
|
|
std::uint32_t checksum = CHECKSUM;
|
|
|
|
|
|
|
|
|
|
multiboot2_tag tags[];
|
|
|
|
|
multiboot2_tag tags[N];
|
|
|
|
|
} __attribute__((packed));
|
|
|
|
|
|
|
|
|
|
__attribute__((section(".multiboot2")))
|
|
|
|
|
multiboot2 multibootHeader = {
|
|
|
|
|
.magic = multiboot2::MAGIC,
|
|
|
|
|
.flags = multiboot2::FLAGS,
|
|
|
|
|
.length = multiboot2::LENGTH,
|
|
|
|
|
.checksum = multiboot2::CHECKSUM,
|
|
|
|
|
.tags = {
|
|
|
|
|
{
|
|
|
|
|
1, 0, sizeof(multiboot2_tag) + sizeof(std::uint32_t),
|
|
|
|
|