From 5b672d595411a50012d3d232db6d886818d44893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Mon, 25 Nov 2019 21:23:37 +0200 Subject: soc/amd/common: Access ACPIMMIO via proper symbols MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using proper symbols for base addresses, it is possible to only define the symbols for base addresses implemented for the specific platform and executing stage. Change-Id: Ib8599ee93bfb1c2d6d9b4accfca1ebbefe758e09 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/37324 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel Reviewed-by: Furquan Shaikh --- src/soc/amd/picasso/psp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/soc/amd/picasso') diff --git a/src/soc/amd/picasso/psp.c b/src/soc/amd/picasso/psp.c index 02291393d1..e40d395637 100644 --- a/src/soc/amd/picasso/psp.c +++ b/src/soc/amd/picasso/psp.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #define PSP_MAILBOX_OFFSET 0x10570 @@ -27,7 +27,7 @@ void soc_fill_smm_trig_info(struct smm_trigger_info *trig) if (!trig) return; - trig->address = 0xfed802a8; + trig->address = (uintptr_t)acpimmio_smi + SMI_REG_CONTROL2; trig->address_type = SMM_TRIGGER_MEM; trig->value_width = SMM_TRIGGER_DWORD; trig->value_and_mask = 0xfdffffff; @@ -39,19 +39,19 @@ void soc_fill_smm_reg_info(struct smm_register_info *reg) if (!reg) return; - reg->smi_enb.address = ACPIMMIO_SMI_BASE + SMI_REG_SMITRIG0; + reg->smi_enb.address = (uintptr_t)acpimmio_smi + SMI_REG_SMITRIG0; reg->smi_enb.address_type = SMM_TRIGGER_MEM; reg->smi_enb.value_width = SMM_TRIGGER_DWORD; reg->smi_enb.reg_bit_mask = SMITRG0_SMIENB; reg->smi_enb.expect_value = 0; - reg->eos.address = ACPIMMIO_SMI_BASE + SMI_REG_SMITRIG0; + reg->eos.address = (uintptr_t)acpimmio_smi + SMI_REG_SMITRIG0; reg->eos.address_type = SMM_TRIGGER_MEM; reg->eos.value_width = SMM_TRIGGER_DWORD; reg->eos.reg_bit_mask = SMITRG0_EOS; reg->eos.expect_value = SMITRG0_EOS; - reg->psp_smi_en.address = ACPIMMIO_SMI_BASE + SMI_REG_CONTROL0; + reg->psp_smi_en.address = (uintptr_t)acpimmio_smi + SMI_REG_CONTROL0; reg->psp_smi_en.address += sizeof(uint32_t) * SMITYPE_PSP / 16; reg->psp_smi_en.address_type = SMM_TRIGGER_MEM; reg->psp_smi_en.value_width = SMM_TRIGGER_DWORD; -- cgit v1.2.3