Here is a patch to add limited acpi support to the epia board. This is
purely for testing purposes. I can't guarantee it will work, however on
my 500Mhz Epia board it seems to be ok. There are changes to the
mainboard Config/Options.lb so you will need to rebuild the target,
before compiling.
This patch allows Linux to poweroff the mainboard correctly.
A shutdown -r also works, however, it should be noted that this will not
be the same a a physical
reset as I don't think the chipset supports it, at least I can't find
any references to a reset register.
There are some differences from my original BIOS. It reports only 2 CPU
throttling states, however mine reports 16 as I believe this is correct.
I have not been able to test this. Not even sure how to go about it.
Hopefully the ACPI supports S1 and S4 states (not tested) however as
there are currently no ACPI wakeup devices, if you suspend the board it
probably won't wakeup.
My main aim was to get power down working. I may have a go at including
some wakeup functionality when I get time and get my head around the
ACPI spec a little better.
best of luck
Ben
Index: src/mainboard/via/epia/Config.lb
===================================================================
--- src/mainboard/via/epia/Config.lb (revision 2638)
+++ src/mainboard/via/epia/Config.lb (working copy)
@@ -43,7 +43,16 @@
##
driver mainboard.o
-if HAVE_PIRQ_TABLE object irq_tables.o end
+if HAVE_ACPI_TABLES
+ object fadt.o
+ object dsdt.o
+ object acpi_tables.o
+end
+
+
+if HAVE_PIRQ_TABLE
+ object irq_tables.o
+end
#object reset.o
##
@@ -174,12 +183,12 @@
end
end
device pci 11.1 on end # Ide
- device pci 11.2 off end # Usb port 0-1
- device pci 11.3 off end # Usb port 2-3
- device pci 11.4 off end # ACPI
+ device pci 11.2 on end # Usb port 0-1
+ device pci 11.3 on end # Usb port 2-3
+ device pci 11.4 on end # ACPI
device pci 11.5 off end # AC97 Audio
device pci 11.6 on end # AC97 Modem
- device pci 12.0 on end # Ethernet
+ device pci 12.0 on end # Ethernet
end
end
Index: src/mainboard/via/epia/Options.lb
===================================================================
--- src/mainboard/via/epia/Options.lb (revision 2638)
+++ src/mainboard/via/epia/Options.lb (working copy)
@@ -36,6 +36,7 @@
uses XIP_ROM_SIZE
uses XIP_ROM_BASE
uses HAVE_MP_TABLE
+uses HAVE_ACPI_TABLES
uses CROSS_COMPILE
uses CC
uses HOSTCC
@@ -96,6 +97,11 @@
#object irq_tables.o
##
+## Build code to load acpi tables
+##
+default HAVE_ACPI_TABLES=1
+
+##
## Build code to export a CMOS option table
##
default HAVE_OPTION_TABLE=1
Index: src/mainboard/via/epia/acpi_tables.c
===================================================================
--- src/mainboard/via/epia/acpi_tables.c (revision 0)
+++ src/mainboard/via/epia/acpi_tables.c (revision 0)
@@ -0,0 +1,82 @@
+/*
+ * LinuxBIOS ACPI Table support
+ * written by Stefan Reinauer <stepan(a)openbios.org>
+ * ACPI FADT, FACS, and DSDT table support added by
+ * Nick Barker <nick.barker9(a)btinternet.com>, and those portions
+ * (C) Copyright 2004 Nick Barker
+ * (C) Copyright 2005 Stefan Reinauer
+ *
+ * this is a direct copy of the EPIA-M acpi-tables.c
+ */
+
+#include <console/console.h>
+#include <string.h>
+#include <arch/acpi.h>
+
+extern unsigned char AmlCode[];
+
+unsigned long acpi_fill_madt(unsigned long current)
+{
+ /* Nothing to do */
+}
+
+unsigned long acpi_fill_srat(unsigned long current)
+{
+ /* No NUMA, no SRAT */
+}
+
+unsigned long write_acpi_tables(unsigned long start)
+{
+ unsigned long current;
+ acpi_rsdp_t *rsdp;
+ acpi_rsdt_t *rsdt;
+ acpi_hpet_t *hpet;
+ acpi_madt_t *madt;
+ acpi_fadt_t *fadt;
+ acpi_facs_t *facs;
+ acpi_header_t *dsdt;
+
+ /* Align ACPI tables to 16byte */
+ start = ( start + 0x0f ) & -0x10;
+ current = start;
+
+ printk_info("ACPI: Writing ACPI tables at %lx...\n", start);
+
+ /* We need at least an RSDP and an RSDT Table */
+ rsdp = (acpi_rsdp_t *) current;
+ current += sizeof(acpi_rsdp_t);
+ rsdt = (acpi_rsdt_t *) current;
+ current += sizeof(acpi_rsdt_t);
+
+ /* clear all table memory */
+ memset((void *)start, 0, current - start);
+
+ acpi_write_rsdp(rsdp, rsdt);
+ acpi_write_rsdt(rsdt);
+
+ /*
+ * We explicitly add these tables later on:
+ */
+ printk_debug("ACPI: * FACS\n");
+ facs = (acpi_facs_t *) current;
+ current += sizeof(acpi_facs_t);
+ acpi_create_facs(facs);
+
+ dsdt = (acpi_header_t *)current;
+ current += ((acpi_header_t *)AmlCode)->length;
+ memcpy((void *)dsdt,(void *)AmlCode, ((acpi_header_t *)AmlCode)->length);
+ dsdt->checksum = 0; // don't trust intel iasl compiler to get this right
+ dsdt->checksum = acpi_checksum(dsdt,dsdt->length);
+ printk_debug("ACPI: * DSDT @ %08x Length %x\n",dsdt,dsdt->length);
+ printk_debug("ACPI: * FADT\n");
+
+ fadt = (acpi_fadt_t *) current;
+ current += sizeof(acpi_fadt_t);
+
+ acpi_create_fadt(fadt,facs,dsdt);
+ acpi_add_table(rsdt,fadt);
+
+ printk_info("ACPI: done.\n");
+ return current;
+}
+
Index: src/mainboard/via/epia/dsdt.asl
===================================================================
--- src/mainboard/via/epia/dsdt.asl (revision 0)
+++ src/mainboard/via/epia/dsdt.asl (revision 0)
@@ -0,0 +1,434 @@
+/*
+ * Cut down ACPI DSDT table for EPIA
+ * (C) Copyright 2004 Ben Hewson <ben(a)hewson-venieri.com>
+ *
+ */
+
+DefinitionBlock ("DSDT.aml", "DSDT", 1, "LXBIOS", "LXB-DSDT", 1)
+{
+ Scope (\_PR)
+ {
+ Processor (\_PR.CPU0, 0x00, 0x00004010, 0x06) {}
+ }
+
+
+ Name (\_S0, Package () {0x00, 0x00, 0x00, 0x00 })
+ Name (\_S1, Package () {0x04, 0x04, 0x04, 0x04 })
+ Name (\_S4, Package () {0x02, 0x02, 0x02, 0x02 })
+ Name (\_S5, Package () {0x02, 0x02, 0x00, 0x00 })
+
+
+ Scope (\_SB)
+ {
+
+ Device (LNKA)
+ {
+ Name (_HID, EisaId ("PNP0C0F"))
+ Name (_UID, 0x01)
+
+ Method (_STA, 0, NotSerialized)
+ {
+ And (PIAN, 0xF0 , Local0)
+ If (LEqual (Local0, 0x00))
+ {
+ Return (0x09)
+ }
+ Else
+ {
+ Return (0x0B)
+ }
+ }
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ Name (BUFF, ResourceTemplate ()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateByteField (BUFF, 0x01, TMP1)
+ CreateByteField (BUFF, 0x02, TMP2)
+ Store (0x00, Local3)
+ Store (0x00, Local4)
+ And (PIAN, 0xF0, Local1)
+ ShiftRight (Local1, 0x04, Local1)
+ If (LNotEqual (Local1, 0x00))
+ {
+ If (LGreater (Local1, 0x07))
+ {
+ Subtract (Local1, 0x08, Local2)
+ ShiftLeft (One, Local2, Local4)
+ }
+ Else
+ {
+ If (LGreater (Local1, 0x00))
+ {
+ ShiftLeft (One, Local1, Local3)
+ }
+ }
+
+ Store (Local3, TMP1)
+ Store (Local4, TMP2)
+ }
+
+ Return (BUFF)
+ }
+
+ Method (_PRS, 0, NotSerialized)
+ {
+ Name (BUFF, ResourceTemplate ()
+ {
+ IRQ (Level, ActiveLow, Shared) {11,5,10,12}
+ })
+ Return (BUFF)
+ }
+
+ Method (_SRS, 1, NotSerialized )
+ {
+ CreateByteField (Arg0, 0x01, TMP1)
+ CreateByteField (Arg0, 0x02, TMP2)
+ ShiftLeft (TMP2, 0x08, Local0)
+ Or (Local0, TMP1, Local0)
+ Store (0x00, Local1)
+ ShiftRight (Local0, 0x01, Local0)
+ While (LGreater(Local0,0x00))
+ {
+ ShiftRight (Local0, 0x01, Local0)
+ Increment (Local1)
+ }
+
+ ShiftLeft (Local1, 0x04, Local1)
+ And (PIAN, 0x0F, PIAN)
+ Or (PIAN, Local1, PIAN)
+ }
+
+ Method (_DIS, 0, NotSerialized )
+ {
+ And (PIAN, 0xF0, PIAN)
+ }
+
+ } // End of LNKA
+
+
+ Device (LNKB)
+ {
+ Name (_HID, EisaId ("PNP0C0F"))
+ Name (_UID, 0x02)
+
+ Method (_STA, 0, NotSerialized)
+ {
+ And (PICB, 0x0F, Local0)
+ If (LEqual (Local0, 0x00))
+ {
+ Return (0x09)
+ }
+ Else
+ {
+ Return (0x0B)
+ }
+ }
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ Name (BUFF, ResourceTemplate ()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateByteField (BUFF, 0x01, TMP1)
+ CreateByteField (BUFF, 0x02, TMP2)
+ Store (0x00, Local3)
+ Store (0x00, Local4)
+ And (PICB, 0x0F, Local1)
+ If (LNotEqual (Local1, 0x00))
+ {
+ If (LGreater (Local1, 0x07))
+ {
+ Subtract (Local1, 0x08, Local2)
+ ShiftLeft (One, Local2, Local4)
+ }
+ Else
+ {
+ If (LGreater (Local1, 0x00))
+ {
+ ShiftLeft (One, Local1, Local3)
+ }
+ }
+
+ Store (Local3, TMP1)
+ Store (Local4, TMP2)
+ }
+
+ Return (BUFF)
+ }
+
+ Method (_PRS, 0, NotSerialized)
+ {
+ Name (BUFF, ResourceTemplate ()
+ {
+ IRQ (Level, ActiveLow, Shared) {11,5,10,12}
+ })
+ Return (BUFF)
+ }
+
+ Method (_SRS, 1, NotSerialized )
+ {
+ CreateByteField (Arg0, 0x01, TMP1)
+ CreateByteField (Arg0, 0x02, TMP2)
+ ShiftLeft (TMP2, 0x08, Local0)
+ Or (Local0, TMP1, Local0)
+ Store (0x00, Local1)
+ ShiftRight (Local0, 0x01, Local0)
+ While (LGreater(Local0,0x00))
+ {
+ ShiftRight (Local0, 0x01, Local0)
+ Increment (Local1)
+ }
+
+ And (PICB, 0xF0, PICB)
+ Or (PICB, Local1, PICB)
+ }
+
+ Method (_DIS, 0, NotSerialized )
+ {
+ And (PICB, 0xF0, PICB)
+ }
+
+ } // End of LNKB
+
+ Device (LNKC)
+ {
+ Name (_HID, EisaId ("PNP0C0F"))
+ Name (_UID, 0x03)
+
+ Method (_STA, 0, NotSerialized)
+ {
+ And (PICB, 0xF0, Local0)
+ If (LEqual (Local0, 0x00))
+ {
+ Return (0x09)
+ }
+ Else
+ {
+ Return (0x0B)
+ }
+ }
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ Name (BUFF, ResourceTemplate ()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateByteField (BUFF, 0x01, TMP1)
+ CreateByteField (BUFF, 0x02, TMP2)
+ Store (0x00, Local3)
+ Store (0x00, Local4)
+ And (PICB, 0xF0, Local1)
+ ShiftRight (Local1, 0x04, Local1)
+ If (LNotEqual (Local1, 0x00))
+ {
+ If (LGreater (Local1, 0x07))
+ {
+ Subtract (Local1, 0x08, Local2)
+ ShiftLeft (One, Local2, Local4)
+ }
+ Else
+ {
+ If (LGreater (Local1, 0x00))
+ {
+ ShiftLeft (One, Local1, Local3)
+ }
+ }
+
+ Store (Local3, TMP1)
+ Store (Local4, TMP2)
+ }
+
+ Return (BUFF)
+ }
+
+ Method (_PRS, 0, NotSerialized)
+ {
+ Name (BUFF, ResourceTemplate ()
+ {
+ IRQ (Level, ActiveLow, Shared) {11,5,10,12}
+ })
+ Return (BUFF)
+ }
+
+ Method (_SRS, 1, NotSerialized )
+ {
+ CreateByteField (Arg0, 0x01, TMP1)
+ CreateByteField (Arg0, 0x02, TMP2)
+ ShiftLeft (TMP2, 0x08, Local0)
+ Or (Local0, TMP1, Local0)
+ Store (0x00, Local1)
+ ShiftRight (Local0, 0x01, Local0)
+ While (LGreater(Local0,0x00))
+ {
+ ShiftRight (Local0, 0x01, Local0)
+ Increment (Local1)
+ }
+
+ ShiftLeft (Local1, 0x04, Local1)
+ And (PICB, 0x0F, PICB)
+ Or (PICB, Local1, PICB)
+ }
+
+ Method (_DIS, 0, NotSerialized )
+ {
+ And (PICB, 0x0F, PICB)
+ }
+
+ } // End of LNKC
+
+
+ Device (LNKD)
+ {
+ Name (_HID, EisaId ("PNP0C0F"))
+ Name (_UID, 0x04)
+
+ Method (_STA, 0, NotSerialized)
+ {
+ And (PIDN, 0xF0, Local0)
+ If (LEqual (Local0, 0x00))
+ {
+ Return (0x09)
+ }
+ Else
+ {
+ Return (0x0B)
+ }
+ }
+
+ Method (_CRS, 0, NotSerialized)
+ {
+ Name (BUFF, ResourceTemplate ()
+ {
+ IRQ (Level, ActiveLow, Shared) {}
+ })
+ CreateByteField (BUFF, 0x01, TMP1)
+ CreateByteField (BUFF, 0x02, TMP2)
+ Store (0x00, Local3)
+ Store (0x00, Local4)
+ And (PIDN, 0xF0, Local1)
+ ShiftRight (Local1, 0x04, Local1)
+ If (LNotEqual (Local1, 0x00))
+ {
+ If (LGreater (Local1, 0x07))
+ {
+ Subtract (Local1, 0x08, Local2)
+ ShiftLeft (One, Local2, Local4)
+ }
+ Else
+ {
+ If (LGreater (Local1, 0x00))
+ {
+ ShiftLeft (One, Local1, Local3)
+ }
+ }
+
+ Store (Local3, TMP1)
+ Store (Local4, TMP2)
+ }
+
+ Return (BUFF)
+ }
+
+ Method (_PRS, 0, NotSerialized)
+ {
+ Name (BUFF, ResourceTemplate ()
+ {
+ IRQ (Level, ActiveLow, Shared) {11,5,10,12}
+ })
+ Return (BUFF)
+ }
+
+ Method (_SRS, 1, NotSerialized )
+ {
+ CreateByteField (Arg0, 0x01, TMP1)
+ CreateByteField (Arg0, 0x02, TMP2)
+ ShiftLeft (TMP2, 0x08, Local0)
+ Or (Local0, TMP1, Local0)
+ Store (0x00, Local1)
+ ShiftRight (Local0, 0x01, Local0)
+ While (LGreater(Local0,0x00))
+ {
+ ShiftRight (Local0, 0x01, Local0)
+ Increment (Local1)
+ }
+
+ ShiftLeft (Local1, 0x04, Local1)
+ And (PIDN, 0x0F, PIDN)
+ Or (PIDN, Local1, PIDN)
+ }
+
+ Method (_DIS, 0, NotSerialized )
+ {
+ And (PIDN, 0x0F, PIDN)
+ }
+
+ } // End of LNKD
+
+
+ /* top PCI device */
+ Device (PCI0)
+ {
+ Name (_HID, EisaId ("PNP0A03"))
+ Name (_ADR, 0x00)
+ Name (_UID, 0x00)
+ Name (_BBN, 0x00)
+
+ /* PCI Routing Table */
+ Name (_PRT, Package ()
+ {
+
+ Package () {0x000AFFFF, 0x00, LNKD, 0x00},
+ Package () {0x000AFFFF, 0x01, LNKC, 0x00},
+ Package () {0x000AFFFF, 0x02, LNKB, 0x00},
+ Package () {0x000AFFFF, 0x03, LNKA, 0x00},
+
+ Package () {0x0011FFFF, 0x00, LNKB, 0x00},
+ Package () {0x0011FFFF, 0x01, LNKC, 0x00},
+ Package () {0x0011FFFF, 0x02, LNKD, 0x00},
+ Package () {0x0011FFFF, 0x03, LNKA, 0x00},
+
+ Package () {0x0012FFFF, 0x00, LNKA, 0x00},
+ Package () {0x0012FFFF, 0x01, LNKB, 0x00},
+ Package () {0x0012FFFF, 0x02, LNKC, 0x00},
+ Package () {0x0012FFFF, 0x03, LNKD, 0x00},
+
+ Package () {0x0013FFFF, 0x00, LNKD, 0x00},
+ Package () {0x0013FFFF, 0x01, LNKC, 0x00},
+ Package () {0x0013FFFF, 0x02, LNKB, 0x00},
+ Package () {0x0013FFFF, 0x03, LNKA, 0x00},
+
+ Package () {0x0014FFFF, 0x00, LNKC, 0x00},
+ Package () {0x0014FFFF, 0x01, LNKD, 0x00},
+ Package () {0x0014FFFF, 0x02, LNKA, 0x00},
+ Package () {0x0014FFFF, 0x03, LNKB, 0x00},
+ })
+
+ Device (PNPR)
+ {
+ Name (_ADR, 0x00110000)
+ OperationRegion (PIRQ, PCI_Config, 0x55, 0x03)
+ Scope (\)
+ {
+ Field (\_SB.PCI0.PNPR.PIRQ, ByteAcc, NoLock, Preserve)
+ {
+ PIAN, 8,
+ PICB, 8,
+ PIDN, 8
+ }
+ }
+ }
+
+
+
+
+ } // End of PCI0
+
+ } // End of _SB
+
+} // End of Definition Block
+
Index: src/mainboard/via/epia/dsdt.c
===================================================================
--- src/mainboard/via/epia/dsdt.c (revision 0)
+++ src/mainboard/via/epia/dsdt.c (revision 0)
@@ -0,0 +1,226 @@
+/*
+ *
+ * Intel ACPI Component Architecture
+ * ASL Optimizing Compiler version 20061109 [May 27 2007]
+ * Copyright (C) 2000 - 2006 Intel Corporation
+ * Supports ACPI Specification Revision 3.0a
+ *
+ * Compilation of "dsdt.asl" - Tue Jun 5 20:29:25 2007
+ *
+ * C source code output
+ *
+ */
+unsigned char AmlCode[] =
+{
+ 0x44,0x53,0x44,0x54,0x93,0x06,0x00,0x00, /* 00000000 "DSDT...." */
+ 0x01,0xAD,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" */
+ 0x09,0x11,0x06,0x20,0x10,0x12,0x5F,0x50, /* 00000020 "... .._P" */
+ 0x52,0x5F,0x5B,0x83,0x0B,0x43,0x50,0x55, /* 00000028 "R_[..CPU" */
+ 0x30,0x00,0x10,0x40,0x00,0x00,0x06,0x08, /* 00000030 "0..@...." */
+ 0x5F,0x53,0x30,0x5F,0x12,0x06,0x04,0x00, /* 00000038 "_S0_...." */
+ 0x00,0x00,0x00,0x08,0x5F,0x53,0x31,0x5F, /* 00000040 "...._S1_" */
+ 0x12,0x0A,0x04,0x0A,0x04,0x0A,0x04,0x0A, /* 00000048 "........" */
+ 0x04,0x0A,0x04,0x08,0x5F,0x53,0x34,0x5F, /* 00000050 "...._S4_" */
+ 0x12,0x0A,0x04,0x0A,0x02,0x0A,0x02,0x0A, /* 00000058 "........" */
+ 0x02,0x0A,0x02,0x08,0x5F,0x53,0x35,0x5F, /* 00000060 "...._S5_" */
+ 0x12,0x08,0x04,0x0A,0x02,0x0A,0x02,0x00, /* 00000068 "........" */
+ 0x00,0x10,0x41,0x62,0x5F,0x53,0x42,0x5F, /* 00000070 "..Ab_SB_" */
+ 0x5B,0x82,0x41,0x12,0x4C,0x4E,0x4B,0x41, /* 00000078 "[.A.LNKA" */
+ 0x08,0x5F,0x48,0x49,0x44,0x0C,0x41,0xD0, /* 00000080 "._HID.A." */
+ 0x0C,0x0F,0x08,0x5F,0x55,0x49,0x44,0x01, /* 00000088 "..._UID." */
+ 0x14,0x1B,0x5F,0x53,0x54,0x41,0x00,0x7B, /* 00000090 ".._STA.{" */
+ 0x50,0x49,0x41,0x4E,0x0A,0xF0,0x60,0xA0, /* 00000098 "PIAN..`." */
+ 0x07,0x93,0x60,0x00,0xA4,0x0A,0x09,0xA1, /* 000000A0 "..`....." */
+ 0x04,0xA4,0x0A,0x0B,0x14,0x4F,0x06,0x5F, /* 000000A8 ".....O._" */
+ 0x43,0x52,0x53,0x00,0x08,0x42,0x55,0x46, /* 000000B0 "CRS..BUF" */
+ 0x46,0x11,0x09,0x0A,0x06,0x23,0x00,0x00, /* 000000B8 "F....#.." */
+ 0x18,0x79,0x00,0x8C,0x42,0x55,0x46,0x46, /* 000000C0 ".y..BUFF" */
+ 0x01,0x54,0x4D,0x50,0x31,0x8C,0x42,0x55, /* 000000C8 ".TMP1.BU" */
+ 0x46,0x46,0x0A,0x02,0x54,0x4D,0x50,0x32, /* 000000D0 "FF..TMP2" */
+ 0x70,0x00,0x63,0x70,0x00,0x64,0x7B,0x50, /* 000000D8 "p.cp.d{P" */
+ 0x49,0x41,0x4E,0x0A,0xF0,0x61,0x7A,0x61, /* 000000E0 "IAN..aza" */
+ 0x0A,0x04,0x61,0xA0,0x2B,0x92,0x93,0x61, /* 000000E8 "..a.+..a" */
+ 0x00,0xA0,0x0E,0x94,0x61,0x0A,0x07,0x74, /* 000000F0 "....a..t" */
+ 0x61,0x0A,0x08,0x62,0x79,0x01,0x62,0x64, /* 000000F8 "a..by.bd" */
+ 0xA1,0x0A,0xA0,0x08,0x94,0x61,0x00,0x79, /* 00000100 ".....a.y" */
+ 0x01,0x61,0x63,0x70,0x63,0x54,0x4D,0x50, /* 00000108 ".acpcTMP" */
+ 0x31,0x70,0x64,0x54,0x4D,0x50,0x32,0xA4, /* 00000110 "1pdTMP2." */
+ 0x42,0x55,0x46,0x46,0x14,0x1A,0x5F,0x50, /* 00000118 "BUFF.._P" */
+ 0x52,0x53,0x00,0x08,0x42,0x55,0x46,0x46, /* 00000120 "RS..BUFF" */
+ 0x11,0x09,0x0A,0x06,0x23,0x20,0x1C,0x18, /* 00000128 "....# .." */
+ 0x79,0x00,0xA4,0x42,0x55,0x46,0x46,0x14, /* 00000130 "y..BUFF." */
+ 0x41,0x05,0x5F,0x53,0x52,0x53,0x01,0x8C, /* 00000138 "A._SRS.." */
+ 0x68,0x01,0x54,0x4D,0x50,0x31,0x8C,0x68, /* 00000140 "h.TMP1.h" */
+ 0x0A,0x02,0x54,0x4D,0x50,0x32,0x79,0x54, /* 00000148 "..TMP2yT" */
+ 0x4D,0x50,0x32,0x0A,0x08,0x60,0x7D,0x60, /* 00000150 "MP2..`}`" */
+ 0x54,0x4D,0x50,0x31,0x60,0x70,0x00,0x61, /* 00000158 "TMP1`p.a" */
+ 0x7A,0x60,0x01,0x60,0xA2,0x0A,0x94,0x60, /* 00000160 "z`.`...`" */
+ 0x00,0x7A,0x60,0x01,0x60,0x75,0x61,0x79, /* 00000168 ".z`.`uay" */
+ 0x61,0x0A,0x04,0x61,0x7B,0x50,0x49,0x41, /* 00000170 "a..a{PIA" */
+ 0x4E,0x0A,0x0F,0x50,0x49,0x41,0x4E,0x7D, /* 00000178 "N..PIAN}" */
+ 0x50,0x49,0x41,0x4E,0x61,0x50,0x49,0x41, /* 00000180 "PIANaPIA" */
+ 0x4E,0x14,0x11,0x5F,0x44,0x49,0x53,0x00, /* 00000188 "N.._DIS." */
+ 0x7B,0x50,0x49,0x41,0x4E,0x0A,0xF0,0x50, /* 00000190 "{PIAN..P" */
+ 0x49,0x41,0x4E,0x5B,0x82,0x48,0x11,0x4C, /* 00000198 "IAN[.H.L" */
+ 0x4E,0x4B,0x42,0x08,0x5F,0x48,0x49,0x44, /* 000001A0 "NKB._HID" */
+ 0x0C,0x41,0xD0,0x0C,0x0F,0x08,0x5F,0x55, /* 000001A8 ".A...._U" */
+ 0x49,0x44,0x0A,0x02,0x14,0x1B,0x5F,0x53, /* 000001B0 "ID...._S" */
+ 0x54,0x41,0x00,0x7B,0x50,0x49,0x43,0x42, /* 000001B8 "TA.{PICB" */
+ 0x0A,0x0F,0x60,0xA0,0x07,0x93,0x60,0x00, /* 000001C0 "..`...`." */
+ 0xA4,0x0A,0x09,0xA1,0x04,0xA4,0x0A,0x0B, /* 000001C8 "........" */
+ 0x14,0x4A,0x06,0x5F,0x43,0x52,0x53,0x00, /* 000001D0 ".J._CRS." */
+ 0x08,0x42,0x55,0x46,0x46,0x11,0x09,0x0A, /* 000001D8 ".BUFF..." */
+ 0x06,0x23,0x00,0x00,0x18,0x79,0x00,0x8C, /* 000001E0 ".#...y.." */
+ 0x42,0x55,0x46,0x46,0x01,0x54,0x4D,0x50, /* 000001E8 "BUFF.TMP" */
+ 0x31,0x8C,0x42,0x55,0x46,0x46,0x0A,0x02, /* 000001F0 "1.BUFF.." */
+ 0x54,0x4D,0x50,0x32,0x70,0x00,0x63,0x70, /* 000001F8 "TMP2p.cp" */
+ 0x00,0x64,0x7B,0x50,0x49,0x43,0x42,0x0A, /* 00000200 ".d{PICB." */
+ 0x0F,0x61,0xA0,0x2B,0x92,0x93,0x61,0x00, /* 00000208 ".a.+..a." */
+ 0xA0,0x0E,0x94,0x61,0x0A,0x07,0x74,0x61, /* 00000210 "...a..ta" */
+ 0x0A,0x08,0x62,0x79,0x01,0x62,0x64,0xA1, /* 00000218 "..by.bd." */
+ 0x0A,0xA0,0x08,0x94,0x61,0x00,0x79,0x01, /* 00000220 "....a.y." */
+ 0x61,0x63,0x70,0x63,0x54,0x4D,0x50,0x31, /* 00000228 "acpcTMP1" */
+ 0x70,0x64,0x54,0x4D,0x50,0x32,0xA4,0x42, /* 00000230 "pdTMP2.B" */
+ 0x55,0x46,0x46,0x14,0x1A,0x5F,0x50,0x52, /* 00000238 "UFF.._PR" */
+ 0x53,0x00,0x08,0x42,0x55,0x46,0x46,0x11, /* 00000240 "S..BUFF." */
+ 0x09,0x0A,0x06,0x23,0x20,0x1C,0x18,0x79, /* 00000248 "...# ..y" */
+ 0x00,0xA4,0x42,0x55,0x46,0x46,0x14,0x4C, /* 00000250 "..BUFF.L" */
+ 0x04,0x5F,0x53,0x52,0x53,0x01,0x8C,0x68, /* 00000258 "._SRS..h" */
+ 0x01,0x54,0x4D,0x50,0x31,0x8C,0x68,0x0A, /* 00000260 ".TMP1.h." */
+ 0x02,0x54,0x4D,0x50,0x32,0x79,0x54,0x4D, /* 00000268 ".TMP2yTM" */
+ 0x50,0x32,0x0A,0x08,0x60,0x7D,0x60,0x54, /* 00000270 "P2..`}`T" */
+ 0x4D,0x50,0x31,0x60,0x70,0x00,0x61,0x7A, /* 00000278 "MP1`p.az" */
+ 0x60,0x01,0x60,0xA2,0x0A,0x94,0x60,0x00, /* 00000280 "`.`...`." */
+ 0x7A,0x60,0x01,0x60,0x75,0x61,0x7B,0x50, /* 00000288 "z`.`ua{P" */
+ 0x49,0x43,0x42,0x0A,0xF0,0x50,0x49,0x43, /* 00000290 "ICB..PIC" */
+ 0x42,0x7D,0x50,0x49,0x43,0x42,0x61,0x50, /* 00000298 "B}PICBaP" */
+ 0x49,0x43,0x42,0x14,0x11,0x5F,0x44,0x49, /* 000002A0 "ICB.._DI" */
+ 0x53,0x00,0x7B,0x50,0x49,0x43,0x42,0x0A, /* 000002A8 "S.{PICB." */
+ 0xF0,0x50,0x49,0x43,0x42,0x5B,0x82,0x42, /* 000002B0 ".PICB[.B" */
+ 0x12,0x4C,0x4E,0x4B,0x43,0x08,0x5F,0x48, /* 000002B8 ".LNKC._H" */
+ 0x49,0x44,0x0C,0x41,0xD0,0x0C,0x0F,0x08, /* 000002C0 "ID.A...." */
+ 0x5F,0x55,0x49,0x44,0x0A,0x03,0x14,0x1B, /* 000002C8 "_UID...." */
+ 0x5F,0x53,0x54,0x41,0x00,0x7B,0x50,0x49, /* 000002D0 "_STA.{PI" */
+ 0x43,0x42,0x0A,0xF0,0x60,0xA0,0x07,0x93, /* 000002D8 "CB..`..." */
+ 0x60,0x00,0xA4,0x0A,0x09,0xA1,0x04,0xA4, /* 000002E0 "`......." */
+ 0x0A,0x0B,0x14,0x4F,0x06,0x5F,0x43,0x52, /* 000002E8 "...O._CR" */
+ 0x53,0x00,0x08,0x42,0x55,0x46,0x46,0x11, /* 000002F0 "S..BUFF." */
+ 0x09,0x0A,0x06,0x23,0x00,0x00,0x18,0x79, /* 000002F8 "...#...y" */
+ 0x00,0x8C,0x42,0x55,0x46,0x46,0x01,0x54, /* 00000300 "..BUFF.T" */
+ 0x4D,0x50,0x31,0x8C,0x42,0x55,0x46,0x46, /* 00000308 "MP1.BUFF" */
+ 0x0A,0x02,0x54,0x4D,0x50,0x32,0x70,0x00, /* 00000310 "..TMP2p." */
+ 0x63,0x70,0x00,0x64,0x7B,0x50,0x49,0x43, /* 00000318 "cp.d{PIC" */
+ 0x42,0x0A,0xF0,0x61,0x7A,0x61,0x0A,0x04, /* 00000320 "B..aza.." */
+ 0x61,0xA0,0x2B,0x92,0x93,0x61,0x00,0xA0, /* 00000328 "a.+..a.." */
+ 0x0E,0x94,0x61,0x0A,0x07,0x74,0x61,0x0A, /* 00000330 "..a..ta." */
+ 0x08,0x62,0x79,0x01,0x62,0x64,0xA1,0x0A, /* 00000338 ".by.bd.." */
+ 0xA0,0x08,0x94,0x61,0x00,0x79,0x01,0x61, /* 00000340 "...a.y.a" */
+ 0x63,0x70,0x63,0x54,0x4D,0x50,0x31,0x70, /* 00000348 "cpcTMP1p" */
+ 0x64,0x54,0x4D,0x50,0x32,0xA4,0x42,0x55, /* 00000350 "dTMP2.BU" */
+ 0x46,0x46,0x14,0x1A,0x5F,0x50,0x52,0x53, /* 00000358 "FF.._PRS" */
+ 0x00,0x08,0x42,0x55,0x46,0x46,0x11,0x09, /* 00000360 "..BUFF.." */
+ 0x0A,0x06,0x23,0x20,0x1C,0x18,0x79,0x00, /* 00000368 "..# ..y." */
+ 0xA4,0x42,0x55,0x46,0x46,0x14,0x41,0x05, /* 00000370 ".BUFF.A." */
+ 0x5F,0x53,0x52,0x53,0x01,0x8C,0x68,0x01, /* 00000378 "_SRS..h." */
+ 0x54,0x4D,0x50,0x31,0x8C,0x68,0x0A,0x02, /* 00000380 "TMP1.h.." */
+ 0x54,0x4D,0x50,0x32,0x79,0x54,0x4D,0x50, /* 00000388 "TMP2yTMP" */
+ 0x32,0x0A,0x08,0x60,0x7D,0x60,0x54,0x4D, /* 00000390 "2..`}`TM" */
+ 0x50,0x31,0x60,0x70,0x00,0x61,0x7A,0x60, /* 00000398 "P1`p.az`" */
+ 0x01,0x60,0xA2,0x0A,0x94,0x60,0x00,0x7A, /* 000003A0 ".`...`.z" */
+ 0x60,0x01,0x60,0x75,0x61,0x79,0x61,0x0A, /* 000003A8 "`.`uaya." */
+ 0x04,0x61,0x7B,0x50,0x49,0x43,0x42,0x0A, /* 000003B0 ".a{PICB." */
+ 0x0F,0x50,0x49,0x43,0x42,0x7D,0x50,0x49, /* 000003B8 ".PICB}PI" */
+ 0x43,0x42,0x61,0x50,0x49,0x43,0x42,0x14, /* 000003C0 "CBaPICB." */
+ 0x11,0x5F,0x44,0x49,0x53,0x00,0x7B,0x50, /* 000003C8 "._DIS.{P" */
+ 0x49,0x43,0x42,0x0A,0x0F,0x50,0x49,0x43, /* 000003D0 "ICB..PIC" */
+ 0x42,0x5B,0x82,0x42,0x12,0x4C,0x4E,0x4B, /* 000003D8 "B[.B.LNK" */
+ 0x44,0x08,0x5F,0x48,0x49,0x44,0x0C,0x41, /* 000003E0 "D._HID.A" */
+ 0xD0,0x0C,0x0F,0x08,0x5F,0x55,0x49,0x44, /* 000003E8 "...._UID" */
+ 0x0A,0x04,0x14,0x1B,0x5F,0x53,0x54,0x41, /* 000003F0 "...._STA" */
+ 0x00,0x7B,0x50,0x49,0x44,0x4E,0x0A,0xF0, /* 000003F8 ".{PIDN.." */
+ 0x60,0xA0,0x07,0x93,0x60,0x00,0xA4,0x0A, /* 00000400 "`...`..." */
+ 0x09,0xA1,0x04,0xA4,0x0A,0x0B,0x14,0x4F, /* 00000408 ".......O" */
+ 0x06,0x5F,0x43,0x52,0x53,0x00,0x08,0x42, /* 00000410 "._CRS..B" */
+ 0x55,0x46,0x46,0x11,0x09,0x0A,0x06,0x23, /* 00000418 "UFF....#" */
+ 0x00,0x00,0x18,0x79,0x00,0x8C,0x42,0x55, /* 00000420 "...y..BU" */
+ 0x46,0x46,0x01,0x54,0x4D,0x50,0x31,0x8C, /* 00000428 "FF.TMP1." */
+ 0x42,0x55,0x46,0x46,0x0A,0x02,0x54,0x4D, /* 00000430 "BUFF..TM" */
+ 0x50,0x32,0x70,0x00,0x63,0x70,0x00,0x64, /* 00000438 "P2p.cp.d" */
+ 0x7B,0x50,0x49,0x44,0x4E,0x0A,0xF0,0x61, /* 00000440 "{PIDN..a" */
+ 0x7A,0x61,0x0A,0x04,0x61,0xA0,0x2B,0x92, /* 00000448 "za..a.+." */
+ 0x93,0x61,0x00,0xA0,0x0E,0x94,0x61,0x0A, /* 00000450 ".a....a." */
+ 0x07,0x74,0x61,0x0A,0x08,0x62,0x79,0x01, /* 00000458 ".ta..by." */
+ 0x62,0x64,0xA1,0x0A,0xA0,0x08,0x94,0x61, /* 00000460 "bd.....a" */
+ 0x00,0x79,0x01,0x61,0x63,0x70,0x63,0x54, /* 00000468 ".y.acpcT" */
+ 0x4D,0x50,0x31,0x70,0x64,0x54,0x4D,0x50, /* 00000470 "MP1pdTMP" */
+ 0x32,0xA4,0x42,0x55,0x46,0x46,0x14,0x1A, /* 00000478 "2.BUFF.." */
+ 0x5F,0x50,0x52,0x53,0x00,0x08,0x42,0x55, /* 00000480 "_PRS..BU" */
+ 0x46,0x46,0x11,0x09,0x0A,0x06,0x23,0x20, /* 00000488 "FF....# " */
+ 0x1C,0x18,0x79,0x00,0xA4,0x42,0x55,0x46, /* 00000490 "..y..BUF" */
+ 0x46,0x14,0x41,0x05,0x5F,0x53,0x52,0x53, /* 00000498 "F.A._SRS" */
+ 0x01,0x8C,0x68,0x01,0x54,0x4D,0x50,0x31, /* 000004A0 "..h.TMP1" */
+ 0x8C,0x68,0x0A,0x02,0x54,0x4D,0x50,0x32, /* 000004A8 ".h..TMP2" */
+ 0x79,0x54,0x4D,0x50,0x32,0x0A,0x08,0x60, /* 000004B0 "yTMP2..`" */
+ 0x7D,0x60,0x54,0x4D,0x50,0x31,0x60,0x70, /* 000004B8 "}`TMP1`p" */
+ 0x00,0x61,0x7A,0x60,0x01,0x60,0xA2,0x0A, /* 000004C0 ".az`.`.." */
+ 0x94,0x60,0x00,0x7A,0x60,0x01,0x60,0x75, /* 000004C8 ".`.z`.`u" */
+ 0x61,0x79,0x61,0x0A,0x04,0x61,0x7B,0x50, /* 000004D0 "aya..a{P" */
+ 0x49,0x44,0x4E,0x0A,0x0F,0x50,0x49,0x44, /* 000004D8 "IDN..PID" */
+ 0x4E,0x7D,0x50,0x49,0x44,0x4E,0x61,0x50, /* 000004E0 "N}PIDNaP" */
+ 0x49,0x44,0x4E,0x14,0x11,0x5F,0x44,0x49, /* 000004E8 "IDN.._DI" */
+ 0x53,0x00,0x7B,0x50,0x49,0x44,0x4E,0x0A, /* 000004F0 "S.{PIDN." */
+ 0x0F,0x50,0x49,0x44,0x4E,0x5B,0x82,0x44, /* 000004F8 ".PIDN[.D" */
+ 0x19,0x50,0x43,0x49,0x30,0x08,0x5F,0x48, /* 00000500 ".PCI0._H" */
+ 0x49,0x44,0x0C,0x41,0xD0,0x0A,0x03,0x08, /* 00000508 "ID.A...." */
+ 0x5F,0x41,0x44,0x52,0x00,0x08,0x5F,0x55, /* 00000510 "_ADR.._U" */
+ 0x49,0x44,0x00,0x08,0x5F,0x42,0x42,0x4E, /* 00000518 "ID.._BBN" */
+ 0x00,0x08,0x5F,0x50,0x52,0x54,0x12,0x45, /* 00000520 ".._PRT.E" */
+ 0x12,0x14,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000528 "........" */
+ 0x0A,0x00,0x00,0x4C,0x4E,0x4B,0x44,0x00, /* 00000530 "...LNKD." */
+ 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x0A,0x00, /* 00000538 "........" */
+ 0x01,0x4C,0x4E,0x4B,0x43,0x00,0x12,0x0E, /* 00000540 ".LNKC..." */
+ 0x04,0x0C,0xFF,0xFF,0x0A,0x00,0x0A,0x02, /* 00000548 "........" */
+ 0x4C,0x4E,0x4B,0x42,0x00,0x12,0x0E,0x04, /* 00000550 "LNKB...." */
+ 0x0C,0xFF,0xFF,0x0A,0x00,0x0A,0x03,0x4C, /* 00000558 ".......L" */
+ 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 00000560 "NKA....." */
+ 0xFF,0xFF,0x11,0x00,0x00,0x4C,0x4E,0x4B, /* 00000568 ".....LNK" */
+ 0x42,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000570 "B......." */
+ 0x11,0x00,0x01,0x4C,0x4E,0x4B,0x43,0x00, /* 00000578 "...LNKC." */
+ 0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x11,0x00, /* 00000580 "........" */
+ 0x0A,0x02,0x4C,0x4E,0x4B,0x44,0x00,0x12, /* 00000588 "..LNKD.." */
+ 0x0E,0x04,0x0C,0xFF,0xFF,0x11,0x00,0x0A, /* 00000590 "........" */
+ 0x03,0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0D, /* 00000598 ".LNKA..." */
+ 0x04,0x0C,0xFF,0xFF,0x12,0x00,0x00,0x4C, /* 000005A0 ".......L" */
+ 0x4E,0x4B,0x41,0x00,0x12,0x0D,0x04,0x0C, /* 000005A8 "NKA....." */
+ 0xFF,0xFF,0x12,0x00,0x01,0x4C,0x4E,0x4B, /* 000005B0 ".....LNK" */
+ 0x42,0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF, /* 000005B8 "B......." */
+ 0x12,0x00,0x0A,0x02,0x4C,0x4E,0x4B,0x43, /* 000005C0 "....LNKC" */
+ 0x00,0x12,0x0E,0x04,0x0C,0xFF,0xFF,0x12, /* 000005C8 "........" */
+ 0x00,0x0A,0x03,0x4C,0x4E,0x4B,0x44,0x00, /* 000005D0 "...LNKD." */
+ 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x13,0x00, /* 000005D8 "........" */
+ 0x00,0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0D, /* 000005E0 ".LNKD..." */
+ 0x04,0x0C,0xFF,0xFF,0x13,0x00,0x01,0x4C, /* 000005E8 ".......L" */
+ 0x4E,0x4B,0x43,0x00,0x12,0x0E,0x04,0x0C, /* 000005F0 "NKC....." */
+ 0xFF,0xFF,0x13,0x00,0x0A,0x02,0x4C,0x4E, /* 000005F8 "......LN" */
+ 0x4B,0x42,0x00,0x12,0x0E,0x04,0x0C,0xFF, /* 00000600 "KB......" */
+ 0xFF,0x13,0x00,0x0A,0x03,0x4C,0x4E,0x4B, /* 00000608 ".....LNK" */
+ 0x41,0x00,0x12,0x0D,0x04,0x0C,0xFF,0xFF, /* 00000610 "A......." */
+ 0x14,0x00,0x00,0x4C,0x4E,0x4B,0x43,0x00, /* 00000618 "...LNKC." */
+ 0x12,0x0D,0x04,0x0C,0xFF,0xFF,0x14,0x00, /* 00000620 "........" */
+ 0x01,0x4C,0x4E,0x4B,0x44,0x00,0x12,0x0E, /* 00000628 ".LNKD..." */
+ 0x04,0x0C,0xFF,0xFF,0x14,0x00,0x0A,0x02, /* 00000630 "........" */
+ 0x4C,0x4E,0x4B,0x41,0x00,0x12,0x0E,0x04, /* 00000638 "LNKA...." */
+ 0x0C,0xFF,0xFF,0x14,0x00,0x0A,0x03,0x4C, /* 00000640 ".......L" */
+ 0x4E,0x4B,0x42,0x00,0x5B,0x82,0x45,0x04, /* 00000648 "NKB.[.E." */
+ 0x50,0x4E,0x50,0x52,0x08,0x5F,0x41,0x44, /* 00000650 "PNPR._AD" */
+ 0x52,0x0C,0x00,0x00,0x11,0x00,0x5B,0x80, /* 00000658 "R.....[." */
+ 0x50,0x49,0x52,0x51,0x02,0x0A,0x55,0x0A, /* 00000660 "PIRQ..U." */
+ 0x03,0x10,0x29,0x5C,0x00,0x5B,0x81,0x24, /* 00000668 "..)\.[.$" */
+ 0x5C,0x2F,0x04,0x5F,0x53,0x42,0x5F,0x50, /* 00000670 "\/._SB_P" */
+ 0x43,0x49,0x30,0x50,0x4E,0x50,0x52,0x50, /* 00000678 "CI0PNPRP" */
+ 0x49,0x52,0x51,0x01,0x50,0x49,0x41,0x4E, /* 00000680 "IRQ.PIAN" */
+ 0x08,0x50,0x49,0x43,0x42,0x08,0x50,0x49, /* 00000688 ".PICB.PI" */
+ 0x44,0x4E,0x08,
+};
Index: src/mainboard/via/epia/fadt.c
===================================================================
--- src/mainboard/via/epia/fadt.c (revision 0)
+++ src/mainboard/via/epia/fadt.c (revision 0)
@@ -0,0 +1,191 @@
+/*
+ * ACPI - create the Fixed ACPI Description Tables (FADT)
+ * (C) Copyright 2007 Ben Hewson <ben(a)hewson-venieri.com>
+ *
+ *
+ * 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
+ */
+
+
+#include <string.h>
+#include <console/console.h>
+#include <arch/acpi.h>
+
+/* these are set in southbridge/via/vt8231/vt8231_apic.c */
+extern unsigned int acpi_iobase;
+extern unsigned char acpi_sci_int;
+
+void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs,void *dsdt){
+ acpi_header_t *header=&(fadt->header);
+
+ printk_debug("acpi @ 0x%04x - irq %d\r\n", acpi_iobase,acpi_sci_int);
+
+
+ memset((void *)fadt,0,sizeof(acpi_fadt_t));
+ memcpy(header->signature,"FACP",4);
+ header->length = 244;
+ header->revision = 1;
+ memcpy(header->oem_id,"LXBIOS",6);
+ memcpy(header->oem_table_id,"LXBACPI ",8);
+ memcpy(header->asl_compiler_id,"LXB",8);
+ header->asl_compiler_revision=0;
+
+ fadt->firmware_ctrl=facs;
+ fadt->dsdt= dsdt;
+
+ /* pm profile
+ * 0–Unspecified, 1–Desktop, 2–Mobile, 3–Workstation,
+ * 4–Enterprise Server, 5–SOHO Server, 6–Appliance PC
+ * */
+ fadt->preferred_pm_profile=0;
+ fadt->sci_int=acpi_sci_int;
+ fadt->smi_cmd = 0;
+ fadt->acpi_enable = 0;
+ fadt->acpi_disable = 0;
+ fadt->s4bios_req = 0x0;
+ fadt->pstate_cnt = 0x0;
+
+ fadt->pm1a_evt_blk = acpi_iobase;
+ fadt->pm1_evt_len = 4;
+ fadt->pm1a_cnt_blk = acpi_iobase + 0x04;
+ fadt->pm1_cnt_len = 2;
+
+ fadt->pm_tmr_blk = acpi_iobase + 0x08;
+ fadt->pm_tmr_len = 4;
+
+ fadt->gpe0_blk = acpi_iobase + 0x20;
+ fadt->gpe0_blk_len = 4;
+
+
+ /* not used, must be 0 */
+ fadt->pm1b_evt_blk = 0x0;
+ fadt->pm1b_cnt_blk = 0x0;
+
+ fadt->pm2_cnt_blk = 0x0;
+ fadt->pm2_cnt_len = 0;
+
+ fadt->gpe1_blk = 0x0;
+ fadt->gpe1_blk_len = 0;
+ fadt->gpe1_base = 0;
+ /* end 0 */
+
+
+
+ fadt->cst_cnt = 0;
+
+ /* not sure about these, kept them the same as epia-m */
+ fadt->p_lvl2_lat = 90;
+ fadt->p_lvl3_lat = 900;
+
+ fadt->flush_size = 0;
+ fadt->flush_stride = 0;
+ fadt->duty_offset = 0;
+ fadt->duty_width = 4;
+
+ /* examples say these need to be added to cmos table.
+ * but they are probably not need, so can be set to 0
+ * fadt->day_alrm = 0x7d;
+ * fadt->mon_alrm = 0x7e;
+ * fadt->century = 0x7f;
+ */
+ fadt->day_alrm = 0;
+ fadt->mon_alrm = 0;
+ fadt->century = 0;
+
+ fadt->iapc_boot_arch = 0x1;
+ fadt->flags = 0x4a5;
+
+ /* don't have this, or can't find it so set to 0 */
+ fadt->reset_reg.space_id = 0;
+ fadt->reset_reg.bit_width = 0;
+ fadt->reset_reg.bit_offset = 0;
+ fadt->reset_reg.resv = 0;
+ fadt->reset_reg.addrl = 0x0;
+ fadt->reset_reg.addrh = 0x0;
+ fadt->reset_value = 0;
+ /* end 0 */
+
+
+ fadt->x_firmware_ctl_l = facs;
+ fadt->x_firmware_ctl_h = 0;
+ fadt->x_dsdt_l = dsdt;
+ fadt->x_dsdt_h = 0;
+
+
+ fadt->x_pm1a_evt_blk.space_id = 1;
+ fadt->x_pm1a_evt_blk.bit_width = 32;
+ fadt->x_pm1a_evt_blk.bit_offset = 0;
+ fadt->x_pm1a_evt_blk.resv = 0;
+ fadt->x_pm1a_evt_blk.addrl = acpi_iobase;
+ fadt->x_pm1a_evt_blk.addrh = 0x0;
+
+ fadt->x_pm1a_cnt_blk.space_id = 1;
+ fadt->x_pm1a_cnt_blk.bit_width = 16;
+ fadt->x_pm1a_cnt_blk.bit_offset = 0;
+ fadt->x_pm1a_cnt_blk.resv = 0;
+ fadt->x_pm1a_cnt_blk.addrl = acpi_iobase + 0x04;
+ fadt->x_pm1a_cnt_blk.addrh = 0x0;
+
+ fadt->x_pm_tmr_blk.space_id = 1;
+ fadt->x_pm_tmr_blk.bit_width = 32;
+ fadt->x_pm_tmr_blk.bit_offset = 0;
+ fadt->x_pm_tmr_blk.resv = 0;
+ fadt->x_pm_tmr_blk.addrl = acpi_iobase + 0x08;
+ fadt->x_pm_tmr_blk.addrh = 0x0;
+
+ fadt->x_gpe0_blk.space_id = 1;
+ fadt->x_gpe0_blk.bit_width = 32;
+ fadt->x_gpe0_blk.bit_offset = 0;
+ fadt->x_gpe0_blk.resv = 0;
+ fadt->x_gpe0_blk.addrl = acpi_iobase + 0x20;
+ fadt->x_gpe0_blk.addrh = 0x0;
+
+
+ /* not used, must be 0 */
+ fadt->x_pm1b_evt_blk.space_id = 0;
+ fadt->x_pm1b_evt_blk.bit_width = 0;
+ fadt->x_pm1b_evt_blk.bit_offset = 0;
+ fadt->x_pm1b_evt_blk.resv = 0;
+ fadt->x_pm1b_evt_blk.addrl = 0x0;
+ fadt->x_pm1b_evt_blk.addrh = 0x0;
+
+ fadt->x_pm1b_cnt_blk.space_id = 0;
+ fadt->x_pm1b_cnt_blk.bit_width = 0;
+ fadt->x_pm1b_cnt_blk.bit_offset = 0;
+ fadt->x_pm1b_cnt_blk.resv = 0;
+ fadt->x_pm1b_cnt_blk.addrl = 0x0;
+ fadt->x_pm1b_cnt_blk.addrh = 0x0;
+
+ fadt->x_pm2_cnt_blk.space_id = 0;
+ fadt->x_pm2_cnt_blk.bit_width = 0;
+ fadt->x_pm2_cnt_blk.bit_offset = 0;
+ fadt->x_pm2_cnt_blk.resv = 0;
+ fadt->x_pm2_cnt_blk.addrl = 0x0;
+ fadt->x_pm2_cnt_blk.addrh = 0x0;
+
+ fadt->x_gpe1_blk.space_id = 0;
+ fadt->x_gpe1_blk.bit_width = 0;
+ fadt->x_gpe1_blk.bit_offset = 0;
+ fadt->x_gpe1_blk.resv = 0;
+ fadt->x_gpe1_blk.addrl = 0x0;
+ fadt->x_gpe1_blk.addrh = 0x0;
+
+ /* end of 0 */
+
+
+ header->checksum = acpi_checksum((void *)fadt, sizeof(acpi_fadt_t));
+
+}
Index: src/southbridge/via/vt8231/vt8231_acpi.c
===================================================================
--- src/southbridge/via/vt8231/vt8231_acpi.c (revision 2638)
+++ src/southbridge/via/vt8231/vt8231_acpi.c (working copy)
@@ -5,18 +5,34 @@
#include <device/pci_ids.h>
#include "vt8231.h"
+unsigned int acpi_iobase;
+unsigned char acpi_sci_int;
+
+
static void acpi_init(struct device *dev)
{
+ unsigned char reg;
+
printk_debug("Configuring VIA ACPI\n");
- // Set ACPI base address to IO 0x4000
- pci_write_config32(dev, 0x48, 0x4001);
+ // Set ACPI base address to IO 0x4000 as original bios
+ acpi_iobase = 0x4000;
+ pci_write_config32(dev, 0x48, acpi_iobase|1);
// Enable ACPI access (and setup like award)
pci_write_config8(dev, 0x41, 0x84);
+
+ // set SCI int
+ reg = pci_read_config8(dev, 0x42);
+ acpi_sci_int = 0x05;
+ reg &= 0xf0;
+ reg |= acpi_sci_int;
+ pci_write_config8(dev, 0x42,reg );
- // Set hardware monitor base address to IO 0x6000
- pci_write_config32(dev, 0x70, 0x6001);
+ pci_write_config16(dev, 0x44,0x30fa);
+
+ // Set hardware monitor base address to IO 0x6000 as original bios
+ pci_write_config32(dev, 0x70, 0x6000 |1);
// Enable hardware monitor (and setup like award)
pci_write_config8(dev, 0x74, 0x01);
@@ -21,11 +37,6 @@
// Enable hardware monitor (and setup like award)
pci_write_config8(dev, 0x74, 0x01);
- // set IO base address to 0x5000
- pci_write_config32(dev, 0x90, 0x5001);
-
- // Enable SMBus
- pci_write_config8(dev, 0xd2, 0x01);
}
static struct device_operations acpi_ops = {
@@ -32,7 +43,7 @@
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
- .init = acpi_init,
+ .init = acpi_init,
.enable = 0,
.ops_pci = 0,
};