mirror of
https://github.com/limine-bootloader/limine
synced 2025-01-04 03:54:24 +03:00
protos/linux_risc: Install memory reservation configuration table
This gets rid of some warnings when booting Linux on systems with a GIC v3 interrupt controller.
This commit is contained in:
parent
f3247cb530
commit
5cc85aa66f
@ -36,6 +36,12 @@ struct linux_header {
|
||||
uint32_t res4;
|
||||
} __attribute__((packed));
|
||||
|
||||
struct linux_efi_memreserve {
|
||||
int size;
|
||||
int count;
|
||||
uint64_t next;
|
||||
};
|
||||
|
||||
// End of Linux code
|
||||
|
||||
#if defined(__riscv64)
|
||||
@ -154,6 +160,21 @@ void *prepare_device_tree_blob(char *config, char *cmdline) {
|
||||
panic(true, "linux: failed to set bootargs: '%s'", fdt_strerror(ret));
|
||||
}
|
||||
|
||||
{
|
||||
struct linux_efi_memreserve *rsv = ext_mem_alloc(sizeof(struct linux_efi_memreserve));
|
||||
|
||||
rsv->size = 0;
|
||||
rsv->count = 0;
|
||||
rsv->next = 0;
|
||||
|
||||
EFI_GUID memreserve_table_guid = {0x888eb0c6, 0x8ede, 0x4ff5, {0xa8, 0xf0, 0x9a, 0xee, 0x5c, 0xb9, 0x77, 0xc2}};
|
||||
EFI_STATUS ret = gBS->InstallConfigurationTable(&memreserve_table_guid, rsv);
|
||||
|
||||
if (ret != EFI_SUCCESS) {
|
||||
panic(true, "linux: failed to install memory reservation configuration table: '%x'", ret);
|
||||
}
|
||||
}
|
||||
|
||||
efi_exit_boot_services();
|
||||
|
||||
// Tell Linux about the UEFI memory map and system table.
|
||||
|
Loading…
Reference in New Issue
Block a user