Damien Zammit | 43a1f78 | 2015-08-19 15:16:59 +1000 | [diff] [blame^] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2007-2009 coresystems GmbH |
| 5 | * Copyright (C) 2015 Damien Zammit <damien@zamaudio.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or |
| 8 | * modify it under the terms of the GNU General Public License as |
| 9 | * published by the Free Software Foundation; version 2 of |
| 10 | * the License. |
| 11 | * |
| 12 | * This program is distributed in the hope that it will be useful, |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | * GNU General Public License for more details. |
| 16 | */ |
| 17 | |
| 18 | #include <types.h> |
| 19 | #include <string.h> |
| 20 | #include <console/console.h> |
| 21 | #include <arch/acpi.h> |
| 22 | #include <arch/acpigen.h> |
| 23 | #include <device/device.h> |
| 24 | #include <device/pci.h> |
| 25 | #include <device/pci_ids.h> |
| 26 | #include <cbmem.h> |
| 27 | #include <arch/acpigen.h> |
| 28 | #include <cpu/cpu.h> |
| 29 | #include "x4x.h" |
| 30 | |
| 31 | unsigned long acpi_fill_mcfg(unsigned long current) |
| 32 | { |
| 33 | device_t dev; |
| 34 | u32 pciexbar = 0; |
| 35 | u32 length = 0; |
| 36 | |
| 37 | dev = dev_find_slot(0, PCI_DEVFN(0,0)); |
| 38 | if (!decode_pciebar(&pciexbar, &length)) |
| 39 | return current; |
| 40 | |
| 41 | current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *) current, |
| 42 | pciexbar, 0x0, 0x0, (length >> 20) - 1); |
| 43 | |
| 44 | return current; |
| 45 | } |
| 46 | |
| 47 | unsigned long northbridge_write_acpi_tables(device_t device, |
| 48 | unsigned long start, |
| 49 | struct acpi_rsdp *rsdp) |
| 50 | { |
| 51 | unsigned long current; |
| 52 | current = acpi_align_current(start); |
| 53 | |
| 54 | printk(BIOS_DEBUG, "current = %lx\n", current); |
| 55 | |
| 56 | return current; |
| 57 | } |