multiboot2: Pass actual size of all tags rather than allocated size

This commit is contained in:
mintsuki 2022-01-10 13:37:44 +01:00
parent ff63edc71d
commit 96bcbfde46

View File

@ -281,12 +281,9 @@ bool multiboot2_load(char *config, char* cmdline) {
size_t info_idx = 0;
uint8_t *mb2_info = conv_mem_alloc(mb2_info_size);
struct multiboot2_start_tag* mbi_start = (struct multiboot2_start_tag *)mb2_info;
struct multiboot2_start_tag *mbi_start = (struct multiboot2_start_tag *)mb2_info;
info_idx += sizeof(struct multiboot2_start_tag);
mbi_start->size = mb2_info_size;
mbi_start->reserved = 0x00;
//////////////////////////////////////////////
// Create modules tag
//////////////////////////////////////////////
@ -664,6 +661,9 @@ bool multiboot2_load(char *config, char* cmdline) {
append_tag(info_idx, end_tag);
}
mbi_start->size = info_idx;
mbi_start->reserved = 0x00;
irq_flush_type = IRQ_PIC_ONLY_FLUSH;
common_spinup(multiboot2_spinup_32, 2,