Detecting Memory (x86): Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
Fix placement
m Change header type of EFI section
Line 342: Line 342:
that does not exactly match your expectations.
that does not exactly match your expectations.


==== What about on UEFI? ====
=== What about on UEFI? ===
On UEFI, you BootServices->GetMemoryMap. This function is easier to use then E820 and is the solution on new UEFI machines. Basically, to use, first you call once to get the size of the memory map. Then you allocate a buffer of that size, and then call again to get the map itself. For example:
On UEFI, you BootServices->GetMemoryMap. This function is easier to use then E820 and is the solution on new UEFI machines. Basically, to use, first you call once to get the size of the memory map. Then you allocate a buffer of that size, and then call again to get the map itself. For example:
<source lang="c">
<source lang="c">