What is EFI_MEMORY_TYPE?

Quick note explaining EFI_MEMORY_TYPE for BIOS/UEFI and embedded firmware readers.

2 min read
Đọc bằng English Tiếng Việt 日本語
Security / SMM / Memory / Firmware Image Terms cover

EFI_MEMORY_TYPE is a UEFI memory-management concept used around memory maps, runtime mapping, and the OS handoff.

Why it matters

  • Explains memory ownership around the firmware-to-OS transition.
  • Helps debug ExitBootServices(), runtime mapping, and memory-type issues.
  • Useful when reading UEFI memory maps.

Practical example

Example: ExitBootServices() can fail if the memory map changes after GetMemoryMap(). In that case, retrieve the map again and use the new key.

Quick checklist

Quick takeaway

EFI_MEMORY_TYPE is about memory ownership during the handoff from firmware to the OS.

How I usually read it

I try not to treat EFI_MEMORY_TYPE as a dictionary entry. I read it as part of a firmware path: who produces it, who consumes it, and what symptom appears when it is wrong. That habit makes the note useful during debugging, not only during study.

Where it shows up

Firmware memory bugs can appear far away from the code that caused them. With EFI_MEMORY_TYPE, I would check ownership, lifetime, memory type, and whether the OS receives a consistent memory map before ExitBootServices().

In a real debugging session

Do not memorize EFI_MEMORY_TYPE as a standalone definition. Tie it to a concrete flow: who creates the data, who reads it, whether it lives in RAM, NVRAM, flash, or a protocol, and what symptom the user sees when it goes wrong.

This way of learning is slower at first, but it gives you real anchors when debugging BIOS or firmware.

Public references

Found this useful?

Save it or share it with someone learning firmware, BIOS/UEFI, and embedded systems.

Biến note thành bài viết hoàn chỉnh

Notes là nơi ghi nhanh khái niệm.