Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions uefi/core_header_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,14 @@ static err_t fill_disk_pci(void) {
}

/**
* According to the UEFI specs (table 7.6 in section 7.2), all of the following memory types can be used
* by the OS as RAM after full initialization.
* A whitelist of memory descriptor types which will be stored and switched by core.
* They represent descriptors that the OS uses. These either include descriptor types that the OS can freely use as
* memory (see table 7.6 in section 7.2 of the UEFI specs), or descriptor types which the OS uses implicitly (such as
* runtime services).
*/
static const EFI_MEMORY_TYPE g_usable_memory_types[] = {
EfiLoaderCode, EfiLoaderData, EfiBootServicesCode, EfiBootServicesData,
EfiConventionalMemory, EfiACPIReclaimMemory, EfiPersistentMemory,
};
EfiLoaderCode, EfiLoaderData, EfiBootServicesCode, EfiBootServicesData, EfiConventionalMemory,
EfiACPIReclaimMemory, EfiPersistentMemory, EfiRuntimeServicesCode, EfiRuntimeServicesData};

/**
* Returns whether a given memory descriptor can be used by the OS as RAM.
Expand Down