summaryrefslogtreecommitdiff
path: root/src/soc/amd/stoneyridge/bootblock
diff options
context:
space:
mode:
authorMichał Żygowski <michal.zygowski@3mdeb.com>2019-12-06 12:07:52 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-12-10 11:18:00 +0000
commit200d213d1bae614fcd35913c1d46fec7e495717f (patch)
treeb8fd2bb816c2938f99d53002a3a54e349c7ff6dc /src/soc/amd/stoneyridge/bootblock
parenta244d5edd4f45fd9e21db3d97ed0a32eaf089e7b (diff)
amdblocks/pci: add common implementation of MMCONF enabling
Add common function to enable PCI MMCONF base address. Use the common function in stoneyridge bootblock. Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Change-Id: I1bb8b22b282584c421a9fffa3322b2a8e406d037 Reviewed-on: https://review.coreboot.org/c/coreboot/+/37552 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/soc/amd/stoneyridge/bootblock')
-rw-r--r--src/soc/amd/stoneyridge/bootblock/bootblock.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/soc/amd/stoneyridge/bootblock/bootblock.c b/src/soc/amd/stoneyridge/bootblock/bootblock.c
index d92535ac31..9920aff082 100644
--- a/src/soc/amd/stoneyridge/bootblock/bootblock.c
+++ b/src/soc/amd/stoneyridge/bootblock/bootblock.c
@@ -24,6 +24,7 @@
#include <bootblock_common.h>
#include <amdblocks/agesawrapper.h>
#include <amdblocks/agesawrapper_call.h>
+#include <amdblocks/amd_pci_mmconf.h>
#include <amdblocks/biosram.h>
#include <soc/pci_devs.h>
#include <soc/cpu.h>
@@ -42,15 +43,9 @@
/* Set the MMIO Configuration Base Address, Bus Range, and misc MTRRs. */
static void amd_initmmio(void)
{
- msr_t mmconf;
msr_t mtrr_cap = rdmsr(MTRR_CAP_MSR);
int mtrr;
- mmconf.hi = 0;
- mmconf.lo = CONFIG_MMCONF_BASE_ADDRESS | MMIO_RANGE_EN
- | fms(CONFIG_MMCONF_BUS_NUMBER) << MMIO_BUS_RANGE_SHIFT;
- wrmsr(MMIO_CONF_BASE, mmconf);
-
/*
* todo: AGESA currently writes variable MTRRs. Once that is
* corrected, un-hardcode this MTRR.
@@ -75,6 +70,7 @@ static void amd_initmmio(void)
asmlinkage void bootblock_c_entry(uint64_t base_timestamp)
{
+ enable_pci_mmconf();
amd_initmmio();
/*
* Call lib/bootblock.c main with BSP, shortcut for APs