blob: b8979f495a75623dec78ffe61d41844a52a2aa16 [file] [log] [blame]
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +01001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 * Copyright (C) 2013 Vladimir Serbinenko <phcoder@gmail.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 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20 * MA 02110-1301 USA
21 */
22
23#include <string.h>
24#include <console/console.h>
25#include <arch/io.h>
26#include <arch/ioapic.h>
27#include <arch/acpi.h>
28#include <arch/acpigen.h>
29#include <arch/smp/mpspec.h>
30#include <device/device.h>
31#include <device/pci.h>
32#include <device/pci_ids.h>
33#include "southbridge/intel/ibexpeak/nvs.h"
34
Vladimir Serbinenko35c0f432014-09-02 22:25:36 +020035void acpi_create_gnvs(global_nvs_t * gnvs)
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +010036{
37 memset((void *)gnvs, 0, sizeof(*gnvs));
38 gnvs->apic = 1;
39 gnvs->mpen = 1; /* Enable Multi Processing */
Vladimir Serbinenko24356dd2014-01-02 11:08:29 +010040 gnvs->pcnt = dev_count_cpu();
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +010041
42 /* IGD Displays */
43 gnvs->ndid = 3;
44 gnvs->did[0] = 0x80000100;
45 gnvs->did[1] = 0x80000240;
46 gnvs->did[2] = 0x80000410;
47 gnvs->did[3] = 0x80000410;
48 gnvs->did[4] = 0x00000005;
49}
50
51unsigned long acpi_fill_madt(unsigned long current)
52{
53 /* Local APICs */
54 current = acpi_create_madt_lapics(current);
55
56 /* IOAPIC */
57 current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
58 1, IO_APIC_ADDR, 0);
59
60 /* INT_SRC_OVR */
61 current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
62 current, 0, 0, 2,
63 MP_IRQ_POLARITY_DEFAULT |
64 MP_IRQ_TRIGGER_DEFAULT);
65 current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
66 current, 0, 9, 9,
67 MP_IRQ_POLARITY_HIGH |
68 MP_IRQ_TRIGGER_LEVEL);
69
70 /* LAPIC_NMI */
71 current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)
72 current, 0,
73 MP_IRQ_POLARITY_HIGH |
74 MP_IRQ_TRIGGER_EDGE, 0x01);
75 current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)
76 current, 1, MP_IRQ_POLARITY_HIGH |
77 MP_IRQ_TRIGGER_EDGE, 0x01);
78 current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)
79 current, 2, MP_IRQ_POLARITY_HIGH |
80 MP_IRQ_TRIGGER_EDGE, 0x01);
81 current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)
82 current, 3, MP_IRQ_POLARITY_HIGH |
83 MP_IRQ_TRIGGER_EDGE, 0x01);
84 return current;
85}
86
Vladimir Serbinenko9bf05de2013-11-14 19:11:19 +010087unsigned long acpi_fill_slit(unsigned long current)
88{
89 /* Not implemented */
90 return current;
91}
92
93unsigned long acpi_fill_srat(unsigned long current)
94{
95 /* No NUMA, no SRAT */
96 return current;
97}