coreboot-kgpe-d16/Documentation/arch/x86/pae.md
Patrick Rudolph c1b7e8a60b cpu/x86/pae/pgtbl: Add memset with PAE
To clear all DRAM on x86_32, add a new method that uses PAE to access
more than 32bit of address space.
Add Documentation as well.

Required for clearing all system memory as part of security API.

Tested on wedge100s:
 Takes less than 2 seconds to clear 8GiB of DRAM.
Tested on P8H61M-Pro:
 Takes less than 1 second to clear 4GiB of DRAM.

Change-Id: I00f7ecf87b5c9227a9d58a0b61eecc38007e1a57
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31549
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-07-02 08:45:50 +00:00

15 lines
629 B
Markdown

# x86_32 PAE documentation
Due to missing x86_64 support it's required to use PAE enabled x86_32 code.
The corresponding functions can be found in ``src/cpu/x86/pae/``.
## Memory clearing helper functions
To clear all DRAM on request of the
[Security API](../../security/memory_clearing.md), a helper function can be used
called `memset_pae`.
The function has additional requirements in contrast to `memset`, and has more
overhead as it uses virtual memory to access memory above 4GiB.
Memory is cleared in 2MiB chunks, which might take a while.
Make sure to enable caches through MTRRs, otherwise `memset_pae` will be slow!