[lib][uefi] initialize uefi system table with zeroes

This commit is contained in:
Dmitrii Merkurev
2025-03-13 23:14:51 +00:00
committed by Travis Geiselbrecht
parent a74f9ebbd8
commit 5fa9649ad9

View File

@@ -104,6 +104,7 @@ int load_sections_and_execute(bdev_t *dev,
printf("Entry function located at %p\n", entry);
EfiSystemTable &table = *static_cast<EfiSystemTable *>(alloc_page(PAGE_SIZE));
memset(&table, 0, sizeof(EfiSystemTable));
EfiBootService boot_service{};
EfiRuntimeService runtime_service{};
fill(&runtime_service, 0);
@@ -118,6 +119,7 @@ int load_sections_and_execute(bdev_t *dev,
table.con_out = &console_out;
table.configuration_table =
reinterpret_cast<EfiConfigurationTable *>(alloc_page(PAGE_SIZE));
memset(table.configuration_table, 0, PAGE_SIZE);
setup_configuration_table(&table);
constexpr size_t kStackSize = 8 * 1024ul * 1024;