soc/intel/alderlake: Hook the VT-d DMA protection option
TEST=Enable DMA protection on MSI PRO Z690-A DDR4 and observe the I/O devices like USB and NVMe fail to enumerate in UEFI Payload (basically proving that DMA protection works). Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Change-Id: Iecaa3d04f1447b7e73507ca57a0d23d42e24d663 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68450 Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
a49945e4b7
commit
c7fee24887
|
@ -300,6 +300,8 @@ static void fill_fspm_vtd_params(FSP_M_CONFIG *m_cfg,
|
|||
m_cfg->VtdIgdEnable = m_cfg->InternalGfx;
|
||||
m_cfg->VtdIpuEnable = m_cfg->SaIpuEnable;
|
||||
|
||||
m_cfg->PreBootDmaMask = CONFIG(ENABLE_EARLY_DMA_PROTECTION);
|
||||
|
||||
if (m_cfg->VtdIgdEnable && m_cfg->VtdBaseAddress[VTD_GFX] == 0) {
|
||||
m_cfg->VtdIgdEnable = 0;
|
||||
printk(BIOS_ERR, "Requested IGD VT-d, but GFXVT_BASE_ADDRESS is 0\n");
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
#include <intelblocks/pmclib.h>
|
||||
#include <intelblocks/smbus.h>
|
||||
#include <intelblocks/thermal.h>
|
||||
#include <intelblocks/vtd.h>
|
||||
#include <intelbasecode/debug_feature.h>
|
||||
#include <memory_info.h>
|
||||
#include <soc/intel/common/smbios.h>
|
||||
|
@ -227,4 +228,7 @@ void mainboard_romstage_entry(void)
|
|||
* RUN_FSP_GOP is selected
|
||||
*/
|
||||
early_graphics_stop();
|
||||
|
||||
if (CONFIG(ENABLE_EARLY_DMA_PROTECTION))
|
||||
vtd_enable_dma_protection();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue