Fix alignment issues with memmap and modules in stivale2

This commit is contained in:
mintsuki 2020-09-04 02:05:49 +02:00
parent 4ac886b2f7
commit ea62cf37c7
2 changed files with 2 additions and 2 deletions

Binary file not shown.

View File

@ -280,7 +280,7 @@ void stivale2_load(char *cmdline, int boot_drive) {
tag->module_count++;
struct stivale2_module *m = balloc(sizeof(struct stivale2_module));
struct stivale2_module *m = balloc_aligned(sizeof(struct stivale2_module), 1);
if (!config_get_value(m->string, i, 128, "MODULE_STRING")) {
m->string[0] = '\0';
@ -399,7 +399,7 @@ void stivale2_load(char *cmdline, int boot_drive) {
tag->entries = (uint64_t)memmap_entries;
void *tag_memmap = balloc(sizeof(struct e820_entry_t) * memmap_entries);
void *tag_memmap = balloc_aligned(sizeof(struct e820_entry_t) * memmap_entries, 1);
memcpy(tag_memmap, memmap, sizeof(struct e820_entry_t) * memmap_entries);
append_tag(&stivale2_struct, (struct stivale2_tag *)tag);