blob: ada7d086bfd76d9048fe617d847e5aaf7fae21f3 [file] [log] [blame]
Sven Schnelled8129f92011-04-20 09:12:17 +00001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * 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 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
19 * MA 02110-1301 USA
20 */
21
22#include <string.h>
23#include <console/console.h>
24#include <arch/io.h>
25#include <arch/ioapic.h>
26#include <arch/acpi.h>
27#include <arch/acpigen.h>
28#include <arch/smp/mpspec.h>
29#include <device/device.h>
30#include <device/pci.h>
31#include <device/pci_ids.h>
Sven Schnelled8129f92011-04-20 09:12:17 +000032
Sven Schnelled8129f92011-04-20 09:12:17 +000033#include "southbridge/intel/i82801gx/nvs.h"
Vladimir Serbinenko0e646172014-08-31 00:27:05 +020034void acpi_create_gnvs(global_nvs_t *gnvs)
Sven Schnelled8129f92011-04-20 09:12:17 +000035{
36 memset((void *)gnvs, 0, sizeof(*gnvs));
37 gnvs->apic = 1;
38 gnvs->mpen = 1; /* Enable Multi Processing */
39
40 /* Enable both COM ports */
41 gnvs->cmap = 0x01;
42 gnvs->cmbp = 0x01;
43
44 /* IGD Displays */
45 gnvs->ndid = 3;
46 gnvs->did[0] = 0x80000100;
47 gnvs->did[1] = 0x80000240;
48 gnvs->did[2] = 0x80000410;
49 gnvs->did[3] = 0x80000410;
50 gnvs->did[4] = 0x00000005;
51}
52
Sven Schnelled8129f92011-04-20 09:12:17 +000053unsigned long acpi_fill_madt(unsigned long current)
54{
55 /* Local APICs */
56 current = acpi_create_madt_lapics(current);
57
58 /* IOAPIC */
59 current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current,
60 2, IO_APIC_ADDR, 0);
61
62 /* LAPIC_NMI */
63 current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)
64 current, 0,
65 MP_IRQ_POLARITY_HIGH |
66 MP_IRQ_TRIGGER_EDGE, 0x01);
67 current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *)
68 current, 1, MP_IRQ_POLARITY_HIGH |
69 MP_IRQ_TRIGGER_EDGE, 0x01);
70
71 /* INT_SRC_OVR */
72 current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
73 current, 0, 0, 2, MP_IRQ_POLARITY_HIGH | MP_IRQ_TRIGGER_EDGE);
74 current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *)
75 current, 0, 9, 9, MP_IRQ_POLARITY_HIGH | MP_IRQ_TRIGGER_LEVEL);
76
77
78 return current;
79}
80
Sven Schnelled8129f92011-04-20 09:12:17 +000081unsigned long acpi_fill_slit(unsigned long current)
82{
83 // Not implemented
84 return current;
85}
86
87unsigned long acpi_fill_srat(unsigned long current)
88{
89 /* No NUMA, no SRAT */
90 return current;
91}