Angel Pons | 4b42983 | 2020-04-02 23:48:50 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Damien Zammit | 43a1f78 | 2015-08-19 15:16:59 +1000 | [diff] [blame] | 3 | |
| 4 | #include <types.h> |
Damien Zammit | 43a1f78 | 2015-08-19 15:16:59 +1000 | [diff] [blame] | 5 | #include <console/console.h> |
| 6 | #include <arch/acpi.h> |
| 7 | #include <arch/acpigen.h> |
| 8 | #include <device/device.h> |
Damien Zammit | 43a1f78 | 2015-08-19 15:16:59 +1000 | [diff] [blame] | 9 | #include "x4x.h" |
| 10 | |
| 11 | unsigned long acpi_fill_mcfg(unsigned long current) |
| 12 | { |
Damien Zammit | 43a1f78 | 2015-08-19 15:16:59 +1000 | [diff] [blame] | 13 | u32 pciexbar = 0; |
| 14 | u32 length = 0; |
| 15 | |
Damien Zammit | 43a1f78 | 2015-08-19 15:16:59 +1000 | [diff] [blame] | 16 | if (!decode_pciebar(&pciexbar, &length)) |
| 17 | return current; |
| 18 | |
| 19 | current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *) current, |
| 20 | pciexbar, 0x0, 0x0, (length >> 20) - 1); |
| 21 | |
| 22 | return current; |
| 23 | } |
| 24 | |
Furquan Shaikh | 0f007d8 | 2020-04-24 06:41:18 -0700 | [diff] [blame] | 25 | unsigned long northbridge_write_acpi_tables(const struct device *device, |
Damien Zammit | 43a1f78 | 2015-08-19 15:16:59 +1000 | [diff] [blame] | 26 | unsigned long start, |
| 27 | struct acpi_rsdp *rsdp) |
| 28 | { |
| 29 | unsigned long current; |
| 30 | current = acpi_align_current(start); |
| 31 | |
| 32 | printk(BIOS_DEBUG, "current = %lx\n", current); |
| 33 | |
| 34 | return current; |
| 35 | } |