summaryrefslogtreecommitdiff
path: root/src/southbridge/nvidia/ck804/ht.c
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-09-21 14:31:19 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-10-16 13:35:53 +0200
commit6985d4ee075ff884315d566853be701e238faac6 (patch)
tree394856f4a05cd2e063edfe6fb69458f5473d027b /src/southbridge/nvidia/ck804/ht.c
parent822bc65b0e8cb9c17721b8b776ec7ecf6ac4129e (diff)
downloadcoreboot-6985d4ee075ff884315d566853be701e238faac6.tar.xz
amdk8: Move to per-device ACPI
Change-Id: I485791015aa7eaabba53813945c216f5725554b1 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6948 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/southbridge/nvidia/ck804/ht.c')
-rw-r--r--src/southbridge/nvidia/ck804/ht.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/southbridge/nvidia/ck804/ht.c b/src/southbridge/nvidia/ck804/ht.c
index a2ba2957be..6ef39e3e27 100644
--- a/src/southbridge/nvidia/ck804/ht.c
+++ b/src/southbridge/nvidia/ck804/ht.c
@@ -24,6 +24,33 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include "ck804.h"
+#include <arch/acpi.h>
+
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES)
+
+unsigned long acpi_fill_mcfg(unsigned long current)
+{
+ device_t dev;
+ unsigned long mcfg_base;
+
+ dev = dev_find_slot(0x0, PCI_DEVFN(0x0,0));
+ if (!dev)
+ return current;
+
+ mcfg_base = pci_read_config16(dev, 0x90);
+ if ((mcfg_base & 0x1000) == 0)
+ return current;
+
+ mcfg_base = (mcfg_base & 0xf) << 28;
+
+ printk(BIOS_INFO, "mcfg_base %lx.\n", mcfg_base);
+
+ current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *)
+ current, mcfg_base, 0x0, 0x0, 0xff);
+ return current;
+}
+
+#endif
static struct device_operations ht_ops = {
.read_resources = pci_dev_read_resources,