soc/amd/stoneyridge: Set IOMMU support to follow device setting
Instead of forcing the IOMMU to be enabled, change it to only be enabled if the device is enabled in devicetree. BUG=b:118612241 TEST=Verify that IOMMU is disabled. Change-Id: I6cfd6c81f47de23c54a49ec7cf87b219215ced5e Signed-off-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/29343 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Daniel Kurtz <djkurtz@google.com>
This commit is contained in:
@ -29,6 +29,7 @@
|
|||||||
#include <amdblocks/agesawrapper.h>
|
#include <amdblocks/agesawrapper.h>
|
||||||
#include <amdblocks/image.h>
|
#include <amdblocks/image.h>
|
||||||
#include <amdblocks/BiosCallOuts.h>
|
#include <amdblocks/BiosCallOuts.h>
|
||||||
|
#include <soc/pci_devs.h>
|
||||||
#include <soc/southbridge.h>
|
#include <soc/southbridge.h>
|
||||||
#include <soc/northbridge.h>
|
#include <soc/northbridge.h>
|
||||||
#include <soc/cpu.h>
|
#include <soc/cpu.h>
|
||||||
@ -323,8 +324,11 @@ AGESA_STATUS agesawrapper_amdinitlate(void)
|
|||||||
*/
|
*/
|
||||||
AMD_LATE_PARAMS *LateParams = create_struct(&AmdParamStruct);
|
AMD_LATE_PARAMS *LateParams = create_struct(&AmdParamStruct);
|
||||||
|
|
||||||
LateParams->GnbLateConfiguration.GnbIoapicId = CONFIG_MAX_CPUS + 1;
|
const struct device *dev = dev_find_slot(0, IOMMU_DEVFN);
|
||||||
LateParams->GnbLateConfiguration.FchIoapicId = CONFIG_MAX_CPUS;
|
if (dev && dev->enabled) {
|
||||||
|
LateParams->GnbLateConfiguration.GnbIoapicId = CONFIG_MAX_CPUS + 1;
|
||||||
|
LateParams->GnbLateConfiguration.FchIoapicId = CONFIG_MAX_CPUS;
|
||||||
|
}
|
||||||
|
|
||||||
timestamp_add_now(TS_AGESA_INIT_LATE_START);
|
timestamp_add_now(TS_AGESA_INIT_LATE_START);
|
||||||
Status = AmdInitLate(LateParams);
|
Status = AmdInitLate(LateParams);
|
||||||
|
@ -506,7 +506,8 @@ __weak void set_board_env_params(GNB_ENV_CONFIGURATION *params) { }
|
|||||||
|
|
||||||
void SetNbEnvParams(GNB_ENV_CONFIGURATION *params)
|
void SetNbEnvParams(GNB_ENV_CONFIGURATION *params)
|
||||||
{
|
{
|
||||||
params->IommuSupport = TRUE;
|
const struct device *dev = SOC_IOMMU_DEV;
|
||||||
|
params->IommuSupport = dev && dev->enabled;
|
||||||
set_board_env_params(params);
|
set_board_env_params(params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user