summaryrefslogtreecommitdiff
path: root/src/soc/amd/cezanne/root_complex.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/amd/cezanne/root_complex.c')
-rw-r--r--src/soc/amd/cezanne/root_complex.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/soc/amd/cezanne/root_complex.c b/src/soc/amd/cezanne/root_complex.c
index ba846810c8..5d021baa5b 100644
--- a/src/soc/amd/cezanne/root_complex.c
+++ b/src/soc/amd/cezanne/root_complex.c
@@ -1,7 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <amdblocks/acpi.h>
+#include <amdblocks/ioapic.h>
#include <amdblocks/memmap.h>
+#include <arch/ioapic.h>
#include <cbmem.h>
#include <console/console.h>
#include <cpu/amd/msr.h>
@@ -9,6 +11,7 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <fsp/util.h>
+#include <soc/iomap.h>
#include <stdint.h>
/*
@@ -70,6 +73,7 @@ static void read_resources(struct device *dev)
unsigned int idx = 0;
const struct hob_header *hob = fsp_get_hob_list();
const struct hob_resource *res;
+ struct resource *gnb_apic;
uintptr_t early_reserved_dram_start, early_reserved_dram_end;
const struct memmap_early_dram *e = memmap_get_early_dram_usage();
@@ -129,6 +133,17 @@ static void read_resources(struct device *dev)
printk(BIOS_ERR, "Error: failed to set resources for type %d\n",
res->type);
}
+
+ /* GNB IOAPIC resource */
+ gnb_apic = new_resource(dev, GNB_IO_APIC_ADDR);
+ gnb_apic->base = GNB_IO_APIC_ADDR;
+ gnb_apic->size = 0x00001000;
+ gnb_apic->flags = IORESOURCE_MEM | IORESOURCE_ASSIGNED | IORESOURCE_FIXED;
+}
+
+static void root_complex_init(struct device *dev)
+{
+ setup_ioapic((u8 *)GNB_IO_APIC_ADDR, GNB_IOAPIC_ID);
}
static void root_complex_fill_ssdt(const struct device *device)
@@ -145,6 +160,7 @@ static struct device_operations root_complex_operations = {
.read_resources = read_resources,
.set_resources = noop_set_resources,
.enable_resources = pci_dev_enable_resources,
+ .init = root_complex_init,
.acpi_name = gnb_acpi_name,
.acpi_fill_ssdt = root_complex_fill_ssdt,
};