diff options
author | Jon Harrison <bothlyn@blueyonder.co.uk> | 2009-08-17 17:09:46 +0000 |
---|---|---|
committer | Myles Watson <mylesgw@gmail.com> | 2009-08-17 17:09:46 +0000 |
commit | 1825be291f49f892fa8c048974239aa0daa4de56 (patch) | |
tree | 0451175aed9b7d9f8d5a1cffc0a69ade799c36aa /src/mainboard/via | |
parent | b5f4e77bff5247dc155873f668a0ccf35400cd11 (diff) |
Get the Via EPIA-N(L)/CN400 to a reasonable level of maturity::
Tested on Via EPIA-NL8000EG with FILO payload booting FC9 (2.6.25
kernel) from SATA HDD.
ACPI is working for PCI interrupt routing, some memory stuff and
Soft-Off.
USB/SATA Working
VGA Console Working
X Working via Onboard AGP
Removed dsdt.c, fixed some whitespace.
Signed-off-by: Jon Harrison <bothlyn@blueyonder.co.uk>
Acked-by: Myles Watson <mylesgw@gmail.com>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@4549 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/via')
-rw-r--r-- | src/mainboard/via/epia-n/Config.lb | 14 | ||||
-rw-r--r-- | src/mainboard/via/epia-n/Options.lb | 13 | ||||
-rw-r--r-- | src/mainboard/via/epia-n/acpi_tables.c | 97 | ||||
-rw-r--r-- | src/mainboard/via/epia-n/auto.c | 11 | ||||
-rw-r--r-- | src/mainboard/via/epia-n/dsdt.asl | 545 | ||||
-rw-r--r-- | src/mainboard/via/epia-n/dsdt.c | 142 | ||||
-rw-r--r-- | src/mainboard/via/epia-n/fadt.c | 4 | ||||
-rw-r--r-- | src/mainboard/via/epia-n/irq_tables.c | 68 | ||||
-rw-r--r-- | src/mainboard/via/epia-n/mainboard.c | 17 |
9 files changed, 487 insertions, 424 deletions
diff --git a/src/mainboard/via/epia-n/Config.lb b/src/mainboard/via/epia-n/Config.lb index d524c88281..473b0d4dc8 100644 --- a/src/mainboard/via/epia-n/Config.lb +++ b/src/mainboard/via/epia-n/Config.lb @@ -42,7 +42,12 @@ if CONFIG_HAVE_MP_TABLE object mptable.o end if CONFIG_HAVE_ACPI_TABLES #acpi_create_fadt is located in VT8237R code - object dsdt.o + makerule dsdt.c + depends "$(CONFIG_MAINBOARD)/dsdt.asl" + action "iasl -p $(CURDIR)/dsdt -tc $(CONFIG_MAINBOARD)/dsdt.asl" + action "mv dsdt.hex dsdt.c" + end + object ./dsdt.o object acpi_tables.o end makerule ./failover.E @@ -141,13 +146,14 @@ chip northbridge/via/cn400 # Northbridge register "ide1_80pin_cable" = "0" device pci f.0 on end # IDE/SATA device pci f.1 on end # IDE - register "fn_ctrl_lo" = "0x80" - register "fn_ctrl_hi" = "0x1d" + register "fn_ctrl_lo" = "0xC0" # Disable AC/MC97 + register "fn_ctrl_hi" = "0x9d" # Disable USB Direct & LAN Gating device pci 10.0 on end # OHCI device pci 10.1 on end # OHCI device pci 10.2 on end # OHCI device pci 10.3 on end # OHCI device pci 10.4 on end # EHCI + device pci 10.5 off end # USB Direct device pci 11.0 on # Southbridge LPC chip superio/winbond/w83697hf # Super I/O device pnp 2e.0 off # Floppy @@ -190,7 +196,7 @@ chip northbridge/via/cn400 # Northbridge end end device pci 11.5 off end # AC'97 audio - # device pci 11.6 off end # AC'97 Modem + device pci 11.6 off end # AC'97 Modem device pci 12.0 on end # Ethernet end end diff --git a/src/mainboard/via/epia-n/Options.lb b/src/mainboard/via/epia-n/Options.lb index 64e0349028..21b751811e 100644 --- a/src/mainboard/via/epia-n/Options.lb +++ b/src/mainboard/via/epia-n/Options.lb @@ -19,7 +19,6 @@ ## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ## -uses CONFIG_HAVE_MP_TABLE uses CONFIG_CBFS uses CONFIG_HAVE_PIRQ_TABLE uses CONFIG_HAVE_FAILOVER_BOOT @@ -53,6 +52,7 @@ uses CONFIG_ROMBASE uses CONFIG_RAMBASE uses CONFIG_XIP_ROM_SIZE uses CONFIG_XIP_ROM_BASE +uses CONFIG_SMP uses CONFIG_HAVE_MP_TABLE uses CONFIG_HAVE_ACPI_TABLES uses CONFIG_HAVE_ACPI_RESUME @@ -73,12 +73,13 @@ uses CONFIG_VIDEO_MB uses CONFIG_IOAPIC uses CONFIG_COMPRESS uses CONFIG_EPIA_VT8237R_INIT +uses CONFIG_HAVE_MAINBOARD_RESOURCES default CONFIG_EPIA_VT8237R_INIT = 1 #default CONFIG_LB_MEM_TOPK = 4 * 1024 default CONFIG_ROM_SIZE = 512 * 1024 default CONFIG_COMPRESS = 1 -default CONFIG_IOAPIC = 0 +default CONFIG_IOAPIC = 1 default CONFIG_VIDEO_MB = 64 default CONFIG_CONSOLE_SERIAL8250 = 1 default CONFIG_PCI_ROM_RUN = 0 @@ -86,13 +87,14 @@ default CONFIG_CONSOLE_VGA = 0 default CONFIG_HAVE_FAILOVER_BOOT = 0 default CONFIG_USE_FAILOVER_IMAGE = 0 default CONFIG_HAVE_FALLBACK_BOOT = 1 -default CONFIG_HAVE_MP_TABLE = 0 +default CONFIG_SMP = 1 +default CONFIG_HAVE_MP_TABLE = 1 default CONFIG_UDELAY_TSC = 1 default CONFIG_TSC_X86RDTSC_CALIBRATE_WITH_TIMER2 = 1 default CONFIG_HAVE_HARD_RESET = 0 default CONFIG_HAVE_PIRQ_TABLE = 1 -default CONFIG_IRQ_SLOT_COUNT = 9 -default CONFIG_HAVE_ACPI_TABLES = 0 +default CONFIG_IRQ_SLOT_COUNT = 7 +default CONFIG_HAVE_ACPI_TABLES = 1 default CONFIG_HAVE_OPTION_TABLE = 1 #default CONFIG_ROM_IMAGE_SIZE = 67 * 1024 #default CONFIG_PAYLOAD_SIZE = 125 * 1024 @@ -110,6 +112,7 @@ default CONFIG_CROSS_COMPILE = "" default CC = "$(CROSS_COMPILE)gcc -m32 -fno-stack-protector" default HOSTCC = "gcc" #default CONFIG_MAINBOARD = "EPIA-N" +default CONFIG_HAVE_MAINBOARD_RESOURCES = 1 ## ## Set this to the max PCI bus number you would ever use for PCI config I/O. diff --git a/src/mainboard/via/epia-n/acpi_tables.c b/src/mainboard/via/epia-n/acpi_tables.c index 3f58d66824..57e648f3eb 100644 --- a/src/mainboard/via/epia-n/acpi_tables.c +++ b/src/mainboard/via/epia-n/acpi_tables.c @@ -5,14 +5,54 @@ * Nick Barker <nick.barker9@btinternet.com>, and those portions * (C) Copyright 2004 Nick Barker * (C) Copyright 2005 Stefan Reinauer + * (C) Copyright 2009 Jon Harrison <bothlyn@blueyonder.co.uk> + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +/* + * Most parts of this file copied from via\epia-m\acpi_tables.c, + * and via\epia-m700\acpi_tables.c */ #include <console/console.h> #include <string.h> #include <arch/acpi.h> +#include <device/device.h> +#include <device/pci.h> +#include <device/pci_ids.h> +#include "../../../southbridge/via/vt8237r/vt8237r.h" extern unsigned char AmlCode[]; +/* + * These four macros are copied from <arch/smp/mpspec.h>, I have to do this + * since the "default CONFIG_HAVE_MP_TABLE = 0" in Options.lb, and also since + * mainboard/via/... have no mptable.c (so that I can not set + * CONFIG_HAVE_MP_TABLE = 1) as many other mainboards. + * So I have to copy these four to here. acpi_fill_madt() needs this. + */ +#define MP_IRQ_POLARITY_DEFAULT 0x0 +#define MP_IRQ_POLARITY_HIGH 0x1 +#define MP_IRQ_POLARITY_LOW 0x3 +#define MP_IRQ_POLARITY_MASK 0x3 +#define MP_IRQ_TRIGGER_DEFAULT 0x0 +#define MP_IRQ_TRIGGER_EDGE 0x4 +#define MP_IRQ_TRIGGER_LEVEL 0xc +#define MP_IRQ_TRIGGER_MASK 0xc + unsigned long acpi_fill_mcfg(unsigned long current) { /* Nothing to do */ @@ -25,9 +65,49 @@ unsigned long acpi_fill_slit(unsigned long current) return current; } +unsigned long acpi_create_madt_lapic_nmis(unsigned long current, u16 flags, + u8 lint) +{ + device_t cpu; + int cpu_index = 0; + + for (cpu = all_devices; cpu; cpu = cpu->next) { + if ((cpu->path.type != DEVICE_PATH_APIC) || + (cpu->bus->dev->path.type != DEVICE_PATH_APIC_CLUSTER)) { + continue; + } + if (!cpu->enabled) + continue; + current += acpi_create_madt_lapic_nmi((acpi_madt_lapic_nmi_t *) + current, cpu_index, flags, lint); + cpu_index++; + } + return current; +} + unsigned long acpi_fill_madt(unsigned long current) { - /* Nothing to do */ + unsigned int gsi_base = 0x00; + + /* Create all subtables for processors. */ + current = acpi_create_madt_lapics(current); + + /* Write SB IOAPIC. */ + current += acpi_create_madt_ioapic((acpi_madt_ioapic_t *) current, + VT8237R_APIC_ID, VT8237R_APIC_BASE, gsi_base); + + /* IRQ0 -> APIC IRQ2. */ + current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) + current, 0, 0, 2, 0x0); + + /* IRQ9 ACPI active low. */ + current += acpi_create_madt_irqoverride((acpi_madt_irqoverride_t *) + current, 0, 9, 9, MP_IRQ_TRIGGER_LEVEL | MP_IRQ_POLARITY_LOW); + + /* Create all subtables for processors. */ + current = acpi_create_madt_lapic_nmis(current, + MP_IRQ_TRIGGER_EDGE | MP_IRQ_POLARITY_HIGH, 1); + return current; } @@ -37,12 +117,16 @@ unsigned long acpi_fill_srat(unsigned long current) return current; } +#define ALIGN(x,a) __ALIGN_MASK(x,(typeof(x))(a)-1) +#define __ALIGN_MASK(x,mask) (((x)+(mask))&~(mask)) +#define ALIGN_CURRENT current = ((current + 0x0f) & -0x10) + unsigned long write_acpi_tables(unsigned long start) { unsigned long current; acpi_rsdp_t *rsdp; acpi_rsdt_t *rsdt; - acpi_hpet_t *hpet; + acpi_xsdt_t *xsdt; acpi_madt_t *madt; acpi_fadt_t *fadt; acpi_facs_t *facs; @@ -70,10 +154,12 @@ unsigned long write_acpi_tables(unsigned long start) * We explicitly add these tables later on: */ printk_debug("ACPI: * FACS\n"); + current = ALIGN(current, 64); facs = (acpi_facs_t *) current; current += sizeof(acpi_facs_t); acpi_create_facs(facs); + printk_debug("ACPI: * DSDT\n"); dsdt = (acpi_header_t *)current; current += ((acpi_header_t *)AmlCode)->length; memcpy((void *)dsdt,(void *)AmlCode, ((acpi_header_t *)AmlCode)->length); @@ -88,6 +174,13 @@ unsigned long write_acpi_tables(unsigned long start) acpi_create_fadt(fadt,facs,dsdt); acpi_add_table(rsdp,fadt); + /* If we want IOAPIC Support Linux wants it in MADT. */ + printk_debug("ACPI: * MADT\n"); + madt = (acpi_madt_t *) current; + acpi_create_madt(madt); + current += madt->header.length; + acpi_add_table(rsdp, madt); + printk_info("ACPI: done.\n"); return current; } diff --git a/src/mainboard/via/epia-n/auto.c b/src/mainboard/via/epia-n/auto.c index 031400e160..d914ee2dbc 100644 --- a/src/mainboard/via/epia-n/auto.c +++ b/src/mainboard/via/epia-n/auto.c @@ -73,13 +73,6 @@ static void enable_mainboard_devices(void) device_t dev; u8 reg; - dev = pci_locate_device(PCI_ID(0x1106, 0x7259), 0); - if (dev == PCI_DEV_INVALID) - die("Northbridge V-Link not found!!!\n"); - pci_write_config8(dev, 0x4F, 0x01); - pci_write_config8(dev, 0x48, 0x13); - - dev = pci_locate_device(PCI_ID(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_VT8237R_LPC), 0); if (dev == PCI_DEV_INVALID) die("Southbridge not found!!!\n"); @@ -93,7 +86,7 @@ static void enable_mainboard_devices(void) * 2 16.2 USB 3 * 1 16.4 USB EHCI */ - pci_write_config8(dev, 0x50, 0x80); + pci_write_config8(dev, 0x50, 0xC0); /*bit=0 means enable internal function (per VT8237R datasheet) * 7 USB Device Mode @@ -106,7 +99,7 @@ static void enable_mainboard_devices(void) * 1 Internal KBC Configuration * 0 Internal Keyboard Controller */ - pci_write_config8(dev, 0x51, 0x1d); + pci_write_config8(dev, 0x51, 0x9d); } static void enable_shadow_ram(void) diff --git a/src/mainboard/via/epia-n/dsdt.asl b/src/mainboard/via/epia-n/dsdt.asl index b1b791d5f2..50d18131fd 100644 --- a/src/mainboard/via/epia-n/dsdt.asl +++ b/src/mainboard/via/epia-n/dsdt.asl @@ -1,255 +1,352 @@ /* - * Minimalist ACPI DSDT table for EPIA-M / MII + * Minimalist ACPI DSDT table for EPIA-N / NL + * (C) Copyright 2009 Jon Harrison <jon.harrison@blueyonder.co.uk> + * Heavily based on EPIA-M dstd.asl * (C) Copyright 2004 Nick Barker <Nick.Barker9@btinternet.com> - * * */ - -DefinitionBlock ("DSDT.aml", "DSDT", 1, "LXBIOS", "LXB-DSDT", 1) +DefinitionBlock ("dsdt.aml", "DSDT", 1, "CBT-V2", "CBT-DSDT", 1) { - /* - * Define the main processor - */ - Scope (\_PR) - { - Processor (\_PR.CPU0, 0x00, 0x00000410, 0x06) {} - } + Scope (\_PR) + { + Processor (\_PR.CPU0, 0x00, 0x00000000, 0x00) {} + } /* For now only define 2 power states: * - S0 which is fully on * - S5 which is soft off * any others would involve declaring the wake up methods */ - Name (\_S0, Package () {0x00, 0x00, 0x00, 0x00 }) - Name (\_S5, Package () {0x02, 0x02, 0x00, 0x00 }) + Name (\_S0, Package (0x04) + { + 0x00, + 0x00, + 0x00, + 0x00 + }) + Name (\_S5, Package (0x04) + { + 0x02, + 0x02, + 0x02, + 0x02 + }) + + /* Global Flag Used to Indicate State of */ + /* ATA Interface */ + Name (ATFL, 0x00) /* Root of the bus hierarchy */ Scope (\_SB) - { - /* Define how interrupt Link A is plumbed in */ - Device (LNKA) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x01) - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0B) - } - /* Current Resources - return irq set up in BIOS */ - Method (_CRS, 0, NotSerialized) - { - Name (BUFF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared) {5} - }) - Return (BUFF) - } - /* Possible Resources - return the range of irqs - * we are using for PCI - only here to keep Linux ACPI - * happy - */ - Method (_PRS, 0, NotSerialized) - { - Name (BUFF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared) {5,9,10} - }) - Return (BUFF) - } - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized ) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - } // End of LNKA + { + + Device (PCI0) + { + Name (_HID, EisaId ("PNP0A03")) + Name (_ADR, 0x00) + Name (_UID, 0x01) + Name (_BBN, 0x00) + + /* PCI Routing Table */ + Name (_PRT, Package () { + + Package (0x04) {0x000FFFFF, 0x00, ATAI, 0x00}, // SATA Link A + Package (0x04) {0x000FFFFF, 0x01, ATAI, 0x00}, // SATA Link B + Package (0x04) {0x000FFFFF, 0x02, ATAI, 0x00}, // SATA Link C + Package (0x04) {0x000FFFFF, 0x03, ATAI, 0x00}, // SATA Link D + + Package (0x04) {0x0010FFFF, 0x00, USBI, 0x00}, // USB Link A + Package (0x04) {0x0010FFFF, 0x01, USBI, 0x00}, // USB Link B + Package (0x04) {0x0010FFFF, 0x02, USBI, 0x00}, // USB Link C + Package (0x04) {0x0010FFFF, 0x03, USBI, 0x00}, // USB Link D + + Package (0x04) {0x0011FFFF, 0x00, VT8I, 0x00}, // VT8237 Link A + Package (0x04) {0x0011FFFF, 0x01, VT8I, 0x00}, // VT8237 Link B + Package (0x04) {0x0011FFFF, 0x02, VT8I, 0x00}, // VT8237 Link C + Package (0x04) {0x0011FFFF, 0x03, VT8I, 0x00}, // VT8237 Link D + + Package (0x04) {0x0012FFFF, 0x00, NICI, 0x00}, // LAN Link A + Package (0x04) {0x0012FFFF, 0x01, NICI, 0x00}, // LAN Link B + Package (0x04) {0x0012FFFF, 0x02, NICI, 0x00}, // LAN Link C + Package (0x04) {0x0012FFFF, 0x03, NICI, 0x00}, // LAN Link D + + Package (0x04) {0x0001FFFF, 0x00, 0, 0x10}, // VGA Link A (GSI) + Package (0x04) {0x0001FFFF, 0x01, 0, 0x11}, // VGA Link B (GSI) + Package (0x04) {0x0001FFFF, 0x02, 0, 0x12}, // VGA Link C (GSI) + Package (0x04) {0x0001FFFF, 0x03, 0, 0x13}, // VGA Link D (GSI) + + Package (0x04) {0x0014FFFF, 0x00, 0, 0x12}, // Slot 1 Link C (GSI) + Package (0x04) {0x0014FFFF, 0x01, 0, 0x13}, // Slot 1 Link D (GSI) + Package (0x04) {0x0014FFFF, 0x02, 0, 0x10}, // Slot 1 Link A (GSI) + Package (0x04) {0x0014FFFF, 0x03, 0, 0x11}, // Slot 1 Link B (GSI) + + Package (0x04) {0x0013FFFF, 0x00, 0, 0x13}, // Riser Slot Link D (GSI) + Package (0x04) {0x0013FFFF, 0x01, 0, 0x12}, // Riser Slot Link C (GSI) + Package (0x04) {0x0013FFFF, 0x02, 0, 0x11}, // Riser Slot Link B (GSI) + Package (0x04) {0x0013FFFF, 0x03, 0, 0x10} // Riser Slot Link A (GSI) + + }) + + /* PCI Devices Included Here */ + Include("sb_physical.asl") - /* Define how interrupt Link B is plumbed in */ - Device (LNKB) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x02) - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0B) - } - /* Current Resources - return irq set up in BIOS */ - Method (_CRS, 0, NotSerialized) - { - Name (BUFF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared) {9} - }) - Return (BUFF) - } - /* Possible Resources - return the range of irqs - * we are using for PCI - only here to keep Linux ACPI - * happy - */ - Method (_PRS, 0, NotSerialized) - { - Name (BUFF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared) {5,9,10} - }) - Return (BUFF) - } - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized ) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - } // End of LNKB + /* Legacy PNP Devices Defined Here */ - /* Define how interrupt Link C is plumbed in */ - Device (LNKC) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x03) - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0B) - } - /* Current Resources - return irq set up in BIOS */ - Method (_CRS, 0, NotSerialized) - { - Name (BUFF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared) {9} - }) - Return (BUFF) - } - /* Possible Resources - return the range of irqs - * we are using for PCI - only here to keep Linux ACPI - * happy - */ - Method (_PRS, 0, NotSerialized) - { - Name (BUFF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared) {5,9,10} - }) - Return (BUFF) - } - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized ) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - } // End of LNKC + /* Disable PS2 Mouse Support */ + Device (PS2M) + { + Name (_HID, EisaId ("PNP0F13")) + Method (_STA, 0, NotSerialized) + { + Return (0x09) + } - /* Define how interrupt Link D is plumbed in */ - Device (LNKD) - { - Name (_HID, EisaId ("PNP0C0F")) - Name (_UID, 0x04) - /* Status - always return ready */ - Method (_STA, 0, NotSerialized) - { - Return (0x0B) - } - /* Current Resources - return irq set up in BIOS */ - Method (_CRS, 0, NotSerialized) - { - Name (BUFF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared) {5} - }) - Return (BUFF) - } - /* Possible Resources - return the range of irqs - * we are using for PCI - only here to keep Linux ACPI - * happy - */ - Method (_PRS, 0, NotSerialized) - { - Name (BUFF, ResourceTemplate () - { - IRQ (Level, ActiveLow, Shared) {5,9,10} - }) - Return (BUFF) - } - /* Set Resources - dummy function to keep Linux ACPI happy - * Linux is more than happy not to tinker with irq - * assignments as long as the CRS and STA functions - * return good values - */ - Method (_SRS, 1, NotSerialized ) {} - /* Disable - dummy function to keep Linux ACPI happy */ - Method (_DIS, 0, NotSerialized ) {} - - } // End of LNKD + Method (_CRS, 0, NotSerialized) + { + Name (BUF1, ResourceTemplate () + { + IRQNoFlags () + {12} + }) + Return (BUF1) + } + } - - /* top PCI device */ - Device (PCI0) - { - Name (_HID, EisaId ("PNP0A03")) - Name (_ADR, 0x00) - Name (_UID, 0x00) - Name (_BBN, 0x00) + /* Disable Legacy PS2 Keyboard Support */ + Device (PS2K) + { + Name (_HID, EisaId ("PNP0303")) + Name (_CID, 0x0B03D041) + Method (_STA, 0, NotSerialized) + { + Return (0x09) + } - /* PCI Routing Table */ - Name (_PRT, Package () { - /* Epia-MII 6000e cardbus: */ - Package () {0x000AFFFF, 0x00, LNKA, 0x00}, // Cardbus Link A - Package () {0x000AFFFF, 0x01, LNKB, 0x00}, // Cardbus Link B - Package () {0x000AFFFF, 0x02, LNKC, 0x00}, // Cardbus Link C - Package () {0x000AFFFF, 0x03, LNKD, 0x00}, // Cardbus Link D + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0060, // Range Minimum + 0x0060, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IO (Decode16, + 0x0064, // Range Minimum + 0x0064, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + IRQNoFlags () + {1} + }) + } - Package () {0x000DFFFF, 0x00, LNKB, 0x00}, // Firewire Link B - Package () {0x000DFFFF, 0x01, LNKC, 0x00}, // Firewire Link C - Package () {0x000DFFFF, 0x02, LNKD, 0x00}, // Firewire Linc D - Package () {0x000DFFFF, 0x03, LNKA, 0x00}, // Firewire Link A + /* Legacy PIC Description */ + Device (PIC) + { + Name (_HID, EisaId ("PNP0000")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0020, // Range Minimum + 0x0020, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x00A0, // Range Minimum + 0x00A0, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IRQNoFlags () + {2} + }) + } - Package () {0x0010FFFF, 0x00, LNKA, 0x00}, // USB Link A - Package () {0x0010FFFF, 0x01, LNKB, 0x00}, // USB Link B - Package () {0x0010FFFF, 0x02, LNKC, 0x00}, // USB Link C - Package () {0x0010FFFF, 0x03, LNKD, 0x00}, // USB Link D + /* Legacy DMA Description */ + Device (DMA1) + { + Name (_HID, EisaId ("PNP0200")) + Name (_CRS, ResourceTemplate () + { + DMA (Compatibility, BusMaster, Transfer8, ) + {4} + IO (Decode16, + 0x0000, // Range Minimum + 0x0000, // Range Maximum + 0x01, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x0080, // Range Minimum + 0x0080, // Range Maximum + 0x01, // Alignment + 0x11, // Length + ) + IO (Decode16, + 0x0094, // Range Minimum + 0x0094, // Range Maximum + 0x01, // Alignment + 0x0C, // Length + ) + IO (Decode16, + 0x00C0, // Range Minimum + 0x00C0, // Range Maximum + 0x01, // Alignment + 0x20, // Length + ) + }) + } - Package () {0x0011FFFF, 0x00, LNKA, 0x00}, // vt8623 Link A - Package () {0x0011FFFF, 0x01, LNKB, 0x00}, // vt8623 Link B - Package () {0x0011FFFF, 0x02, LNKC, 0x00}, // vt8623 Link C - Package () {0x0011FFFF, 0x03, LNKD, 0x00}, // vt8623 Link D + /* Legacy Timer Description */ + Device (TMR) + { + Name (_HID, EisaId ("PNP0100")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0040, // Range Minimum + 0x0040, // Range Maximum + 0x01, // Alignment + 0x04, // Length + ) + IRQNoFlags () + {0} + }) + } - Package () {0x0012FFFF, 0x00, LNKA, 0x00}, // LAN Link A - Package () {0x0012FFFF, 0x01, LNKB, 0x00}, // LAN Link B - Package () {0x0012FFFF, 0x02, LNKC, 0x00}, // LAN Link C - Package () {0x0012FFFF, 0x03, LNKD, 0x00}, // LAN Link D + /* Legacy RTC Description */ + Device (RTC) + { + Name (_HID, EisaId ("PNP0B00")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0070, // Range Minimum + 0x0070, // Range Maximum + 0x04, // Alignment + 0x04, // Length + ) + IRQNoFlags () + {8} + }) + } - Package () {0x0013FFFF, 0x00, LNKA, 0x00}, // Riser slot LinkA - Package () {0x0013FFFF, 0x01, LNKB, 0x00}, // Riser slot LinkB - Package () {0x0013FFFF, 0x02, LNKC, 0x00}, // Riser slot LinkC - Package () {0x0013FFFF, 0x03, LNKD, 0x00}, // Riser slot LinkD + /* Legacy Speaker Description */ + Device (SPKR) + { + Name (_HID, EisaId ("PNP0800")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0061, // Range Minimum + 0x0061, // Range Maximum + 0x01, // Alignment + 0x01, // Length + ) + }) + } - Package () {0x0014FFFF, 0x00, LNKB, 0x00}, // Slot 1, Link B - Package () {0x0014FFFF, 0x01, LNKC, 0x00}, // Slot 1, Link C - Package () {0x0014FFFF, 0x02, LNKD, 0x00}, // Slot 1, Link D - Package () {0x0014FFFF, 0x03, LNKA, 0x00}, // Slot 1, Link A - - Package () {0x0001FFFF, 0x00, LNKA, 0x00}, // VGA Link A - Package () {0x0001FFFF, 0x01, LNKB, 0x00}, // VGA Link B - Package () {0x0001FFFF, 0x02, LNKC, 0x00}, // VGA Link C - Package () {0x0001FFFF, 0x03, LNKD, 0x00} // VGA Link D + /* Legacy Math Co-Processor Description */ + Device (COPR) + { + Name (_HID, EisaId ("PNP0C04")) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x00F0, // Range Minimum + 0x00F0, // Range Maximum + 0x01, // Alignment + 0x10, // Length + ) + IRQNoFlags () + {13} + }) + } - }) + /* General Legacy IO Reservations */ + /* Covering items that are not explicitly reserved */ + /* from coreboot. */ + Device (SYSR) + { + Name (_HID, EisaId ("PNP0C02")) + Name (_UID, 0x01) + Name (_CRS, ResourceTemplate () + { + IO (Decode16, + 0x0010, // Range Minimum + 0x0010, // Range Maximum + 0x01, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x0022, // Range Minimum + 0x0022, // Range Maximum + 0x01, // Alignment + 0x1E, // Length + ) + IO (Decode16, + 0x0044, // Range Minimum + 0x0044, // Range Maximum + 0x01, // Alignment + 0x1C, // Length + ) + IO (Decode16, + 0x0062, // Range Minimum + 0x0062, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0065, // Range Minimum + 0x0065, // Range Maximum + 0x01, // Alignment + 0x0B, // Length + ) + IO (Decode16, + 0x0074, // Range Minimum + 0x0074, // Range Maximum + 0x01, // Alignment + 0x0C, // Length + ) + IO (Decode16, + 0x0091, // Range Minimum + 0x0091, // Range Maximum + 0x01, // Alignment + 0x03, // Length + ) + IO (Decode16, + 0x00A2, // Range Minimum + 0x00A2, // Range Maximum + 0x01, // Alignment + 0x1E, // Length + ) + IO (Decode16, + 0x00E0, // Range Minimum + 0x00E0, // Range Maximum + 0x01, // Alignment + 0x10, // Length + ) + IO (Decode16, + 0x04D0, // Range Minimum + 0x04D0, // Range Maximum + 0x01, // Alignment + 0x02, // Length + ) + IO (Decode16, + 0x0294, // Range Minimum + 0x0294, // Range Maximum + 0x01, // Alignment + 0x04, // Length + ) + }) + } + Include("irq_links.asl") + Include("pci_init.asl") - } // End of PCI0 + } //End of PCI0 } // End of _SB diff --git a/src/mainboard/via/epia-n/dsdt.c b/src/mainboard/via/epia-n/dsdt.c deleted file mode 100644 index fa878250f5..0000000000 --- a/src/mainboard/via/epia-n/dsdt.c +++ /dev/null @@ -1,142 +0,0 @@ -/* - * - * Intel ACPI Component Architecture - * ASL Optimizing Compiler version 20060127 [Apr 23 2006] - * Copyright (C) 2000 - 2006 Intel Corporation - * Supports ACPI Specification Revision 3.0a - * - * Compilation of "dsdt.asl" - Wed Sep 6 11:36:08 2006 - * - * C source code output - * - */ -unsigned char AmlCode[] = -{ - 0x44,0x53,0x44,0x54,0xF0,0x03,0x00,0x00, /* 00000000 "DSDT...." */ - 0x01,0x03,0x4C,0x58,0x42,0x49,0x4F,0x53, /* 00000008 "..LXBIOS" */ - 0x4C,0x58,0x42,0x2D,0x44,0x53,0x44,0x54, /* 00000010 "LXB-DSDT" */ - 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x27,0x01,0x06,0x20,0x10,0x12,0x5F,0x50, /* 00000020 "'.. .._P" */ - 0x52,0x5F,0x5B,0x83,0x0B,0x43,0x50,0x55, /* 00000028 "R_[..CPU" */ - 0x30,0x00,0x10,0x04,0x00,0x00,0x06,0x08, /* 00000030 "0......." */ - 0x5F,0x53,0x30,0x5F,0x12,0x06,0x04,0x00, /* 00000038 "_S0_...." */ - 0x00,0x00,0x00,0x08,0x5F,0x53,0x35,0x5F, /* 00000040 "...._S5_" */ - 0x12,0x08,0x04,0x0A,0x02,0x0A,0x02,0x00, /* 00000048 "........" */ - 0x00,0x10,0x4E,0x39,0x5F,0x53,0x42,0x5F, /* 00000050 "..N9_SB_" */ - 0x5B,0x82,0x44,0x06,0x4C,0x4E,0x4B,0x41, /* 00000058 "[.D.LNKA" */ - 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000060 "._HID.A." */ - 0x0C,0x0F,0x08,0x5F,0x55,0x49,0x44,0x01, /* 00000068 "..._UID." */ - 0x14,0x09,0x5F,0x53,0x54,0x41,0x00,0xA4, /* 00000070 ".._STA.." */ - 0x0A,0x0B,0x14,0x1A,0x5F,0x43,0x52,0x53, /* 00000078 "...._CRS" */ - 0x00,0x08,0x42,0x55,0x46,0x46,0x11,0x09, /* 00000080 "..BUFF.." */ - 0x0A,0x06,0x23,0x20,0x00,0x18,0x79,0x00, /* 00000088 "..# ..y." */ - 0xA4,0x42,0x55,0x46,0x46,0x14,0x1A,0x5F, /* 00000090 ".BUFF.._" */ - 0x50,0x52,0x53,0x00,0x08,0x42,0x55,0x46, /* 00000098 "PRS..BUF" */ - 0x46,0x11,0x09,0x0A,0x06,0x23,0x20,0x06, /* 000000A0 "F....# ." */ - 0x18,0x79,0x00,0xA4,0x42,0x55,0x46,0x46, /* 000000A8 ".y..BUFF" */ - 0x14,0x06,0x5F,0x53,0x52,0x53,0x01,0x14, /* 000000B0 ".._SRS.." */ - 0x06,0x5F,0x44,0x49,0x53,0x00,0x5B,0x82, /* 000000B8 "._DIS.[." */ - 0x45,0x06,0x4C,0x4E,0x4B,0x42,0x08,0x5F, /* 000000C0 "E.LNKB._" */ - 0x48,0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0F, /* 000000C8 "HID.A..." */ - 0x08,0x5F,0x55,0x49,0x44,0x0A,0x02,0x14, /* 000000D0 "._UID..." */ - 0x09,0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A, /* 000000D8 "._STA..." */ - 0x0B,0x14,0x1A,0x5F,0x43,0x52,0x53,0x00, /* 000000E0 "..._CRS." */ - 0x08,0x42,0x55,0x46,0x46,0x11,0x09,0x0A, /* 000000E8 ".BUFF..." */ - 0x06,0x23,0x00,0x02,0x18,0x79,0x00,0xA4, /* 000000F0 ".#...y.." */ - 0x42,0x55,0x46,0x46,0x14,0x1A,0x5F,0x50, /* 000000F8 "BUFF.._P" */ - 0x52,0x53,0x00,0x08,0x42,0x55,0x46,0x46, /* 00000100 "RS..BUFF" */ - 0x11,0x09,0x0A,0x06,0x23,0x20,0x06,0x18, /* 00000108 "....# .." */ - 0x79,0x00,0xA4,0x42,0x55,0x46,0x46,0x14, /* 00000110 "y..BUFF." */ - 0x06,0x5F,0x53,0x52,0x53,0x01,0x14,0x06, /* 00000118 "._SRS..." */ - 0x5F,0x44,0x49,0x53,0x00,0x5B,0x82,0x45, /* 00000120 "_DIS.[.E" */ - 0x06,0x4C,0x4E,0x4B,0x43,0x08,0x5F,0x48, /* 00000128 ".LNKC._H" */ - 0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0F,0x08, /* 00000130 "ID.A...." */ - 0x5F,0x55,0x49,0x44,0x0A,0x03,0x14,0x09, /* 00000138 "_UID...." */ - 0x5F,0x53,0x54,0x41,0x00,0xA4,0x0A,0x0B, /* 00000140 "_STA...." */ - 0x14,0x1A,0x5F,0x43,0x52,0x53,0x00,0x08, /* 00000148 ".._CRS.." */ - 0x42,0x55,0x46,0x46,0x11,0x09,0x0A,0x06, /* 00000150 "BUFF...." */ - 0x23,0x00,0x02,0x18,0x79,0x00,0xA4,0x42, /* 00000158 "#...y..B" */ - 0x55,0x46,0x46,0x14,0x1A,0x5F,0x50,0x52, /* 00000160 "UFF.._PR" */ - 0x53,0x00,0x08,0x42,0x55,0x46,0x46,0x11, /* 00000168 "S..BUFF." */ - 0x09,0x0A,0x06,0x23,0x20,0x06,0x18,0x79, /* 00000170 "...# ..y" */ - 0x00,0xA4,0x42,0x55,0x46,0x46,0x14,0x06, /* 00000178 "..BUFF.." */ - 0x5F,0x53,0x52,0x53,0x01,0x14,0x06,0x5F, /* 00000180 "_SRS..._" */ - 0x44,0x49,0x53,0x00,0x5B,0x82,0x45,0x06, /* 00000188 "DIS.[.E." */ - 0x4C,0x4E,0x4B,0x44,0x08,0x5F,0x48,0x49, /* 00000190 "LNKD._HI" */ - 0x44,0x0C,0x41,0xD0,0x0C,0x0F,0x08,0x5F, /* 00000198 "D.A...._" */ - 0x55,0x49,0x44,0x0A,0x04,0x14,0x09,0x5F, /* 000001A0 "UID...._" */ - 0x53,0x54,0x41,0x00,0xA4,0x0A,0x0B,0x14, /* 000001A8 "STA....." */ - 0x1A,0x5F,0x43,0x52,0x53,0x00,0x08,0x42, /* 000001B0 "._CRS..B" */ - 0x55,0x46,0x46,0x11,0x09,0x0A,0x06,0x23, /* 000001B8 "UFF....#" */ - 0x20,0x00,0x18,0x79,0x00,0xA4,0x42,0x55, /* 000001C0 " ..y..BU" */ - 0x46,0x46,0x14,0x1A,0x5F,0x50,0x52,0x53, /* 000001C8 "FF.._PRS" */ - 0x00,0x08,0x42,0x55,0x46,0x46,0x11,0x09, /* 000001D0 "..BUFF.." */ - 0x0A,0x06,0x23,0x20,0x06,0x18,0x79,0x00, /* 000001D8 "..# ..y." */ - 0xA4,0x42,0x55,0x46,0x46,0x14,0x06,0x5F, /* 000001E0 ".BUFF.._" */ - 0x53,0x52,0x53,0x01,0x14,0x06,0x5F,0x44, /* 000001E8 "SRS..._D" */ - 0x49,0x53,0x00,0x5B,0x82,0x4B,0x1F,0x50, /* 000001F0 "IS.[.K.P" */ - 0x43,0x49,0x30,0x08,0x5F,0x48,0x49,0x44, /* 000001F8 "CI0._HID" */ - 0x0C,0x41,0xD0,0x0A,0x03,0x08,0x5F,0x41, /* 00000200 ".A...._A" */ - 0x44,0x52,0x00,0x08,0x5F,0x55,0x49,0x44, /* 00000208 "DR.._UID" */ - 0x00,0x08,0x5F,0x42,0x42,0x4E,0x00,0x08, /* 00000210 ".._BBN.." */ - 0x5F,0x50,0x52,0x54,0x12,0x43,0x1D,0x20, /* 00000218 "_PRT.C. " */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x0A,0x00, /* 00000220 "........" */ - 0x00,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D, /* 00000228 ".LNKA..." */ - 0x04,0x0C,0xFF,0xFF,0x0A,0x00,0x01,0x4C, /* 00000230 ".......L" */ - 0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C, /* 00000238 "NKB....." */ - 0xFF,0xFF,0x0A,0x00,0x0A,0x02,0x4C,0x4E, /* 00000240 "......LN" */ - 0x4B,0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000248 "KC......" */ - 0xFF,0x0A,0x00,0x0A,0x03,0x4C,0x4E,0x4B, /* 00000250 ".....LNK" */ - 0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000258 "D......." */ - 0x0D,0x00,0x00,0x4C,0x4E,0x4B,0x42,0x00, /* 00000260 "...LNKB." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x0D,0x00, /* 00000268 "........" */ - 0x01,0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E, /* 00000270 ".LNKC..." */ - 0x04,0x0C,0xFF,0xFF,0x0D,0x00,0x0A,0x02, /* 00000278 "........" */ - 0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0E,0x04, /* 00000280 "LNKD...." */ - 0x0C,0xFF,0xFF,0x0D,0x00,0x0A,0x03,0x4C, /* 00000288 ".......L" */ - 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 00000290 "NKA....." */ - 0xFF,0xFF,0x10,0x00,0x00,0x4C,0x4E,0x4B, /* 00000298 ".....LNK" */ - 0x41,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 000002A0 "A......." */ - 0x10,0x00,0x01,0x4C,0x4E,0x4B,0x42,0x00, /* 000002A8 "...LNKB." */ - 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x10,0x00, /* 000002B0 "........" */ - 0x0A,0x02,0x4C,0x4E,0x4B,0x43,0x00,0x12, /* 000002B8 "..LNKC.." */ - 0x0E,0x04,0x0C,0xFF,0xFF,0x10,0x00,0x0A, /* 000002C0 "........" */ - 0x03,0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0D, /* 000002C8 ".LNKD..." */ - 0x04,0x0C,0xFF,0xFF,0x11,0x00,0x00,0x4C, /* 000002D0 ".......L" */ - 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 000002D8 "NKA....." */ - 0xFF,0xFF,0x11,0x00,0x01,0x4C,0x4E,0x4B, /* 000002E0 ".....LNK" */ - 0x42,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 000002E8 "B......." */ - 0x11,0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x43, /* 000002F0 "....LNKC" */ - 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x11, /* 000002F8 "........" */ - 0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x44,0x00, /* 00000300 "...LNKD." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x12,0x00, /* 00000308 "........" */ - 0x00,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D, /* 00000310 ".LNKA..." */ - 0x04,0x0C,0xFF,0xFF,0x12,0x00,0x01,0x4C, /* 00000318 ".......L" */ - 0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C, /* 00000320 "NKB....." */ - 0xFF,0xFF,0x12,0x00,0x0A,0x02,0x4C,0x4E, /* 00000328 "......LN" */ - 0x4B,0x43,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000330 "KC......" */ - 0xFF,0x12,0x00,0x0A,0x03,0x4C,0x4E,0x4B, /* 00000338 ".....LNK" */ - 0x44,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000340 "D......." */ - 0x13,0x00,0x00,0x4C,0x4E,0x4B,0x41,0x00, /* 00000348 "...LNKA." */ - 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x13,0x00, /* 00000350 "........" */ - 0x01,0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0E, /* 00000358 ".LNKB..." */ - 0x04,0x0C,0xFF,0xFF,0x13,0x00,0x0A,0x02, /* 00000360 "........" */ - 0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E,0x04, /* 00000368 "LNKC...." */ - 0x0C,0xFF,0xFF,0x13,0x00,0x0A,0x03,0x4C, /* 00000370 ".......L" */ - 0x4E,0x4B,0x44,0x00,0x12,0x0D,0x04,0x0C, /* 00000378 "NKD....." */ - 0xFF,0xFF,0x14,0x00,0x00,0x4C,0x4E,0x4B, /* 00000380 ".....LNK" */ - 0x42,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000388 "B......." */ - 0x14,0x00,0x01,0x4C,0x4E,0x4B,0x43,0x00, /* 00000390 "...LNKC." */ - 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x14,0x00, /* 00000398 "........" */ - 0x0A,0x02,0x4C,0x4E,0x4B,0x44,0x00,0x12, /* 000003A0 "..LNKD.." */ - 0x0E,0x04,0x0C,0xFF,0xFF,0x14,0x00,0x0A, /* 000003A8 "........" */ - 0x03,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D, /* 000003B0 ".LNKA..." */ - 0x04,0x0C,0xFF,0xFF,0x01,0x00,0x00,0x4C, /* 000003B8 ".......L" */ - 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 000003C0 "NKA....." */ - 0xFF,0xFF,0x01,0x00,0x01,0x4C,0x4E,0x4B, /* 000003C8 ".....LNK" */ - 0x42,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 000003D0 "B......." */ - 0x01,0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x43, /* 000003D8 "....LNKC" */ - 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x01, /* 000003E0 "........" */ - 0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x44,0x00, /* 000003E8 "...LNKD." */ - -}; diff --git a/src/mainboard/via/epia-n/fadt.c b/src/mainboard/via/epia-n/fadt.c index 38da9976f3..f9e2871d80 100644 --- a/src/mainboard/via/epia-n/fadt.c +++ b/src/mainboard/via/epia-n/fadt.c @@ -1,6 +1,7 @@ /* * ACPI - create the Fixed ACPI Description Tables (FADT) * (C) Copyright 2004 Nick Barker <nick.barker9@btinternet.com> + * (C) Copyright 2009 Jon Harrison <bothlyn@blueyonder.co.uk> * * * This program is free software; you can redistribute it and/or @@ -22,6 +23,7 @@ #include <string.h> #include <arch/acpi.h> +#include "../../../southbridge/via/vt8237r/vt8237r.h" void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs,void *dsdt){ acpi_header_t *header=&(fadt->header); @@ -38,7 +40,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs,void *dsdt){ fadt->firmware_ctrl=facs; fadt->dsdt= dsdt; fadt->preferred_pm_profile=0; - fadt->sci_int=5; + fadt->sci_int=VT8237R_ACPI_IRQ; fadt->smi_cmd = 0; fadt->acpi_enable = 0; fadt->acpi_disable = 0; diff --git a/src/mainboard/via/epia-n/irq_tables.c b/src/mainboard/via/epia-n/irq_tables.c index 7ad72758c1..c099f1aae5 100644 --- a/src/mainboard/via/epia-n/irq_tables.c +++ b/src/mainboard/via/epia-n/irq_tables.c @@ -1,53 +1,47 @@ -/* - * This file is part of the coreboot project. +/* This file was generated by getpir.c, do not modify! + * (but if you do, please run checkpir on it to verify) * - * Copyright (C) 2009 Jon Harrison <bothlyn@blueyonder.co.uk> + * Contains the IRQ Routing Table dumped directly from your + * memory, which BIOS sets up. * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * Documentation at: http://www.microsoft.com/whdc/archive/pciirq.mspx */ +#ifdef GETPIR +#include "pirq_routing.h" +#else #include <arch/pirq_routing.h> +#endif const struct irq_routing_table intel_irq_routing_table = { - PIRQ_SIGNATURE, /* u32 signature */ - PIRQ_VERSION, /* u16 version */ - 32 + 16 * 7, /* Max. number of devices on the bus */ - 0x00, /* Interrupt router bus */ - (0x11 << 3) | 0x0, /* Interrupt router dev */ - 0x1c00, /* IRQs devoted exclusively to PCI usage */ - 0x1106, /* Vendor */ - 0x596, /* Device */ - 0, /* Miniport */ + PIRQ_SIGNATURE, /* u32 signature */ + PIRQ_VERSION, /* u16 version */ + 32+16*7, /* There can be total 7 devices on the bus */ + 0x00, /* Where the interrupt router lies (bus) */ + (0x11<<3)|0x0, /* Where the interrupt router lies (dev) */ + 0x1c00, /* IRQs devoted exclusively to PCI usage */ + 0x1106, /* Vendor */ + 0x3227, /* Device */ + 0, /* Miniport */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* u8 rfu[11] */ - 0xf, /* Checksum (has to be set to some value that - * would give 0 after the sum of all bytes - * for this structure (including checksum). - */ + 0xf, /* u8 checksum. This has to be set to some + value that would give 0 after the sum of all + bytes for this structure (including checksum) */ { - /* bus, dev | fn, {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap}, slot, rfu */ - {0x00, (0x14 << 3) | 0x0, {{0x03, 0xdeb8}, {0x05, 0xdeb8}, {0x01, 0xdeb8}, {0x02, 0xdeb8}}, 0x1, 0x0}, - {0x00, (0x13 << 3) | 0x0, {{0x05, 0xdeb8}, {0x03, 0xdeb8}, {0x02, 0xdeb8}, {0x01, 0xdeb8}}, 0x2, 0x0}, - {0x00, (0x11 << 3) | 0x0, {{0x00, 0xdeb8}, {0x00, 0xdeb8}, {0x03, 0xdeb8}, {0x05, 0xdeb8}}, 0x0, 0x0}, - {0x00, (0x0f << 3) | 0x0, {{0x01, 0xdeb8}, {0x02, 0xdeb8}, {0x03, 0xdeb8}, {0x05, 0xdeb8}}, 0x0, 0x0}, - {0x00, (0x01 << 3) | 0x0, {{0x01, 0xdeb8}, {0x02, 0xdeb8}, {0x03, 0xdeb8}, {0x05, 0xdeb8}}, 0x0, 0x0}, - {0x00, (0x10 << 3) | 0x0, {{0x01, 0xdeb8}, {0x02, 0xdeb8}, {0x03, 0xdeb8}, {0x05, 0xdeb8}}, 0x0, 0x0}, - {0x00, (0x12 << 3) | 0x0, {{0x01, 0xdeb8}, {0x00, 0xdeb8}, {0x00, 0xdeb8}, {0x00, 0xdeb8}}, 0x0, 0x0}, + /* bus, dev|fn, {link, bitmap}, {link, bitmap}, {link, bitmap}, {link, bitmap}, slot, rfu */ + {0x00,(0x14<<3)|0x0, {{0x03, 0xdeb8}, {0x05, 0xdeb8}, {0x01, 0xdeb8}, {0x02, 0xdeb8}}, 0x1, 0x0}, + {0x00,(0x13<<3)|0x0, {{0x05, 0xdeb8}, {0x03, 0xdeb8}, {0x02, 0xdeb8}, {0x01, 0xdeb8}}, 0x2, 0x0}, + {0x00,(0x11<<3)|0x0, {{0x00, 0xdeb8}, {0x00, 0xdeb8}, {0x03, 0xdeb8}, {0x05, 0xdeb8}}, 0x0, 0x0}, + {0x00,(0x0f<<3)|0x0, {{0x01, 0xdeb8}, {0x02, 0xdeb8}, {0x03, 0xdeb8}, {0x05, 0xdeb8}}, 0x0, 0x0}, + {0x00,(0x01<<3)|0x0, {{0x01, 0xdeb8}, {0x02, 0xdeb8}, {0x03, 0xdeb8}, {0x05, 0xdeb8}}, 0x0, 0x0}, + {0x00,(0x10<<3)|0x0, {{0x01, 0xdeb8}, {0x02, 0xdeb8}, {0x03, 0xdeb8}, {0x05, 0xdeb8}}, 0x0, 0x0}, + {0x00,(0x12<<3)|0x0, {{0x01, 0xdeb8}, {0x00, 0xdeb8}, {0x00, 0xdeb8}, {0x00, 0xdeb8}}, 0x0, 0x0}, } }; +#ifndef GETPIR unsigned long write_pirq_routing_table(unsigned long addr) { return copy_pirq_routing_table(addr); } +#endif diff --git a/src/mainboard/via/epia-n/mainboard.c b/src/mainboard/via/epia-n/mainboard.c index 6b83607ff6..660c559020 100644 --- a/src/mainboard/via/epia-n/mainboard.c +++ b/src/mainboard/via/epia-n/mainboard.c @@ -20,7 +20,24 @@ */ #include <device/device.h> +#include <device/pci.h> +#include <device/pci_ids.h> +#include <boot/tables.h> #include "chip.h" +#include "../../../southbridge/via/vt8237r/vt8237r.h" + +int add_mainboard_resources(struct lb_memory *mem) +{ +#if CONFIG_IOAPIC == 1 + lb_add_memory_range(mem, LB_MEM_RESERVED, + VT8237R_APIC_BASE, 0x1000); + lb_add_memory_range(mem, LB_MEM_RESERVED, + 0xFEE00000ULL, 0x1000); + lb_add_memory_range(mem, LB_MEM_RESERVED, + 0xFFFF0000ULL, 0x10000); +#endif + return 0; +} struct chip_operations mainboard_ops = { CHIP_NAME("VIA EPIA-N Mainboard") |