You've already forked slimbootloader
mirror of
https://github.com/Dasharo/slimbootloader.git
synced 2026-03-06 15:26:20 -08:00
0e1098d7b2
This patch added DMA memory type into memory allocation pool for payloads. This DMA memory buffer with PcdDmaBufferSize is located at address aligned at PcdDmaBufferAlignment after Payload reserved memory. Memory type EfiRuntimeServicesData is used to indicate DMA memory type. Stage1B calculates the DMA memory location using fixed PCDs so that platform can set up DMA protection as early as possible after memory is ready. In Stage1B or Stage2 platform code should use platform VTd information to setup PMR to protect all low memory except for the DMA buffer range. DMA memory will be added into memory pool at the entry point of the payload. Before transfering to OS, the DMA memory protection can be disabled, and the DMA memory pool can be reclaimed for OS usage. Currently only boot media device will utilize the DMA buffer range for block access operations. So it should only be required by payloads. GFX, when enabled, will also use DMA. It will be targeted to the system stolen memory which is not protected by PMR. Signed-off-by: Maurice Ma <maurice.ma@intel.com>