Attention is currently required from: Furquan Shaikh, Maulik V Vaghela, Tim Wawrzynczak, Subrata Banik, Meera Ravindranath, Ronak Kanabar, Patrick Rudolph. Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/51849 )
Change subject: soc/intel/alderlake: Enable VT-d ......................................................................
Patch Set 7:
(4 comments)
File src/soc/intel/alderlake/romstage/fsp_params.c:
https://review.coreboot.org/c/coreboot/+/51849/comment/1be0f867_c9b6c53a PS5, Line 204: #if (GFXVT_BASE_ADDRESS == 0) : #error "Error: GFXVT_BASE_ADDRESS should be non-zero for enabling VT-d!" : #endif
perfect Tim. […]
I would do this as follows:
m_cfg->VtdBaseAddress[0] = GFXVT_BASE_ADDRESS; m_cfg->VtdBaseAddress[1] = IPUVT_BASE_ADDRESS; m_cfg->VtdBaseAddress[2] = VTVC0_BASE_ADDRESS;
m_cfg->VtdDisable = 0; m_cfg->VtdIgdEnable = m_cfg->InternalGfx; m_cfg->VtdIpuEnable = m_cfg->SaIpuEnable;
if (m_cfg->VtdIgdEnable && m_cfg->VtdBaseAddress[0] == 0) { m_cfg->VtdIgdEnable = 0; printk(BIOS_ERR, "ERROR: Requested IGD VT-d, but GFXVT_BASE_ADDRESS is 0\n"); } if (m_cfg->VtdIpuEnable && m_cfg->VtdBaseAddress[1] == 0) { m_cfg->VtdIpuEnable = 0; printk(BIOS_ERR, "ERROR: Requested IPU VT-d, but IPUVT_BASE_ADDRESS is 0\n"); } if (!m_cfg->VtdDisable && m_cfg->VtdBaseAddress[2] == 0) { m_cfg->VtdDisable = 1; printk(BIOS_ERR, "ERROR: Requested VT-d, but VTVCO_BASE_ADDRESS is 0\n"); } m_cfg->VtdIopEnable = !m_cfg->VtdDisable;
Aside, it would be good to define an enum to index the `VtdBaseAddress` array.
File src/soc/intel/alderlake/romstage/fsp_params.c:
https://review.coreboot.org/c/coreboot/+/51849/comment/e9e7dbe2_519b46d3 PS7, Line 201: GFXVT_BASE_ADDRESS == 0 What does this check achieve? This value is a #define and is not zero.
https://review.coreboot.org/c/coreboot/+/51849/comment/2757072d_bd270ff1 PS7, Line 209: IPUVT_BASE_ADDRESS == 0 What does this check achieve? This value is a #define and is not zero.
https://review.coreboot.org/c/coreboot/+/51849/comment/0b9537f2_a9e18de7 PS7, Line 217: VTVC0_BASE_ADDRESS == 0 What does this check achieve? This value is a #define and is not zero.