mb/google/brya/var/omnigul: Modify NVMe and UFS Storage support
[coreboot.git] / src / mainboard / aopen / dxplplusu / acpi_tables.c
blob13ddb3e8f6ab4235d5dfb4b1694d19a0b1076e59
1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <acpi/acpi.h>
4 #include <device/pci_def.h>
6 unsigned long acpi_fill_madt(unsigned long current)
8 struct device *bdev, *dev = NULL;
9 struct resource *res = NULL;
11 current = acpi_create_madt_lapics_with_nmis(current);
13 /* Southbridge IOAPIC */
14 current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, 0xfec00000);
16 bdev = pcidev_on_root(2, 0);
17 /* P64H2 Bus B IOAPIC */
18 if (bdev)
19 dev = pcidev_path_behind(bdev->link_list, PCI_DEVFN(28, 0));
20 if (dev) {
21 res = find_resource(dev, PCI_BASE_ADDRESS_0);
22 current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, res->base);
25 /* P64H2 Bus A IOAPIC */
26 if (bdev)
27 dev = pcidev_path_behind(bdev->link_list, PCI_DEVFN(30, 0));
28 if (dev) {
29 res = find_resource(dev, PCI_BASE_ADDRESS_0);
30 current += acpi_create_madt_ioapic_from_hw((acpi_madt_ioapic_t *)current, res->base);
33 /* Map ISA IRQ 0 to IRQ 2 */
34 current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)current, 1, 0, 2, 0);
36 /* IRQ9 differs from ISA standard - ours is active high, level-triggered */
37 current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)current, 0, 9, 9, 0xD);
39 return current;