Martin Roth | e6df041 | 2014-07-28 14:22:32 -0600 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * Copyright (C) 2012 Google Inc. |
| 5 | * Copyright (C) 2013-2014 Sage Electronic Engineering, LLC. |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
Martin Roth | e6df041 | 2014-07-28 14:22:32 -0600 | [diff] [blame] | 15 | */ |
| 16 | |
| 17 | #include <types.h> |
| 18 | #include <string.h> |
| 19 | #include <cbmem.h> |
| 20 | #include <lib.h> // hexdump |
| 21 | #include <console/console.h> |
| 22 | #include <arch/acpi.h> |
| 23 | #include <arch/ioapic.h> |
| 24 | #include <arch/acpigen.h> |
| 25 | #include <arch/smp/mpspec.h> |
| 26 | #include <device/device.h> |
| 27 | #include <device/pci.h> |
| 28 | #include <device/pci_ids.h> |
| 29 | #include <cpu/cpu.h> |
| 30 | #include <cpu/x86/msr.h> |
Ben Gardner | fa6014a | 2015-12-08 21:20:25 -0600 | [diff] [blame] | 31 | #include <soc/acpi.h> |
| 32 | #include <soc/nvs.h> |
| 33 | #include <soc/iomap.h> |
Martin Roth | e6df041 | 2014-07-28 14:22:32 -0600 | [diff] [blame] | 34 | |
Vladimir Serbinenko | 7fb149d | 2014-10-08 22:56:27 +0200 | [diff] [blame] | 35 | void acpi_create_gnvs(global_nvs_t *gnvs) |
Martin Roth | e6df041 | 2014-07-28 14:22:32 -0600 | [diff] [blame] | 36 | { |
| 37 | acpi_init_gnvs(gnvs); |
| 38 | |
| 39 | /* No TPM Present */ |
| 40 | gnvs->tpmp = 0; |
| 41 | |
| 42 | } |
| 43 | |
| 44 | unsigned long acpi_fill_madt(unsigned long current) |
| 45 | { |
| 46 | /* Local APICs */ |
| 47 | current = acpi_create_madt_lapics(current); |
| 48 | |
| 49 | /* IOAPIC */ |
| 50 | current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, |
| 51 | 2, IO_APIC_ADDR, 0); |
| 52 | |
| 53 | current = acpi_madt_irq_overrides(current); |
| 54 | |
| 55 | return current; |
| 56 | } |