blob: acbdb3091cfcf6a3c755fae4ebb8ffa4ae172be8 [file] [log] [blame]
Julien Viard de Galbert4f136402018-02-16 14:40:53 +01001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2012 The Chromium OS Authors. All rights reserved.
5 * Copyright (C) 2014 - 2017 Intel Corporation.
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.
15 *
16 */
17
18#include <types.h>
19#include <string.h>
20#include <cbmem.h>
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>
31
32#include <soc/acpi.h>
33#include <soc/nvs.h>
34
35extern const unsigned char AmlCode[];
36
37void acpi_create_gnvs(global_nvs_t *gnvs)
38{
39 acpi_init_gnvs(gnvs);
40
41 /* Disable USB ports in S5 */
42 gnvs->s5u0 = 0;
43 gnvs->s5u1 = 0;
44
45 /* TPM Present */
46 gnvs->tpmp = 0;
47}
48
49unsigned long acpi_fill_madt(unsigned long current)
50{
51 /* Local APICs */
52 current = acpi_create_madt_lapics(current);
53
54 /* IOAPIC */
55 current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *)current, 2,
56 IO_APIC_ADDR, 0);
57
58 current = acpi_madt_irq_overrides(current);
59
60 return current;
61}