Felix Held (felix-coreboot(a)felixheld.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6229
-gerrit
commit 8870e2b82b6c19826da0716b32292d4980b7f55f
Author: Felix Held <felix-coreboot(a)felixheld.de>
Date: Sat Jul 19 00:24:06 2014 +0200
superio/nuvoton: Add support for Nuvoton NCT5572D
Change-Id: I3b720cf879bf5326be885d2d3a3f9cfba0a27c7e
Signed-off-by: Felix Held <felix-coreboot(a)felixheld.de>
---
src/superio/nuvoton/Kconfig | 4 ++
src/superio/nuvoton/Makefile.inc | 1 +
src/superio/nuvoton/nct5572d/Makefile.inc | 22 +++++++++
src/superio/nuvoton/nct5572d/nct5572d.h | 47 ++++++++++++++++++
src/superio/nuvoton/nct5572d/superio.c | 81 +++++++++++++++++++++++++++++++
5 files changed, 155 insertions(+)
diff --git a/src/superio/nuvoton/Kconfig b/src/superio/nuvoton/Kconfig
index 350c8dd..4bdcd1e 100644
--- a/src/superio/nuvoton/Kconfig
+++ b/src/superio/nuvoton/Kconfig
@@ -28,3 +28,7 @@ config SUPERIO_NUVOTON_WPCM450
config SUPERIO_NUVOTON_NCT5104D
bool
select SUPERIO_NUVOTON_COMMON_ROMSTAGE
+
+config SUPERIO_NUVOTON_NCT5572D
+ bool
+ select SUPERIO_NUVOTON_COMMON_ROMSTAGE
diff --git a/src/superio/nuvoton/Makefile.inc b/src/superio/nuvoton/Makefile.inc
index 1ce6963..9ce04d3 100644
--- a/src/superio/nuvoton/Makefile.inc
+++ b/src/superio/nuvoton/Makefile.inc
@@ -22,3 +22,4 @@ romstage-$(CONFIG_SUPERIO_NUVOTON_COMMON_ROMSTAGE) += common/early_serial.c
subdirs-$(CONFIG_SUPERIO_NUVOTON_WPCM450) += wpcm450
subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5104D) += nct5104d
+subdirs-$(CONFIG_SUPERIO_NUVOTON_NCT5572D) += nct5572d
diff --git a/src/superio/nuvoton/nct5572d/Makefile.inc b/src/superio/nuvoton/nct5572d/Makefile.inc
new file mode 100644
index 0000000..9a4eefd
--- /dev/null
+++ b/src/superio/nuvoton/nct5572d/Makefile.inc
@@ -0,0 +1,22 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2011 - 2012 Advanced Micro Devices, Inc.
+## Copyright (C) 2014 Felix Held <felix-coreboot(a)felixheld.de>
+##
+## 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
+##
+
+ramstage-$(CONFIG_SUPERIO_NUVOTON_NCT5572D) += superio.c
diff --git a/src/superio/nuvoton/nct5572d/nct5572d.h b/src/superio/nuvoton/nct5572d/nct5572d.h
new file mode 100644
index 0000000..7f4f9b8
--- /dev/null
+++ b/src/superio/nuvoton/nct5572d/nct5572d.h
@@ -0,0 +1,47 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Felix Held <felix-coreboot(a)felixheld.de>
+ *
+ * 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
+ */
+
+#ifndef SUPERIO_NUVOTON_NCT5572D
+#define SUPERIO_NUVOTON_NCT5572D
+
+/* Logical Device Numbers (LDN). */
+#define NCT5572D_SP1 0x02 /* Com1 */
+#define NCT5572D_IR 0x03
+#define NCT5572D_KBC 0x05
+#define NCT5572D_CIR 0x06
+#define NCT5572D_GPIO689_V 0x07
+#define NCT5572D_WDT1 0x08
+#define NCT5572D_GPIO235_V 0x09
+#define NCT5572D_ACPI 0x0A
+#define NCT5572D_HWM_TSI_FPLED 0x0B /* HW monitor/SB-TSI/front LED/deep S5 */
+#define NCT5572D_PECI 0x0C
+#define NCT5572D_SUSLED 0x0D /* marked as reserved, but described */
+#define NCT5572D_CIRWKUP 0x0E /* CIR wakeup */
+#define NCT5572D_GPIO_PP_OD 0x0F /* GPIO Push-Pull/Open drain select */
+
+/* virtual LDN for GPIO */
+#define NCT5572D_GPIO2 ((0 << 8) | NCT5572D_GPIO235_V)
+#define NCT5572D_GPIO3 ((1 << 8) | NCT5572D_GPIO235_V)
+#define NCT5572D_GPIO5 ((3 << 8) | NCT5572D_GPIO235_V)
+#define NCT5572D_GPIO6 ((1 << 8) | NCT5572D_GPIO689_V)
+#define NCT5572D_GPIO8 ((3 << 8) | NCT5572D_GPIO689_V)
+#define NCT5572D_GPIO9 ((4 << 8) | NCT5572D_GPIO689_V)
+
+#endif /* SUPERIO_NUVOTON_NCT5572D */
diff --git a/src/superio/nuvoton/nct5572d/superio.c b/src/superio/nuvoton/nct5572d/superio.c
new file mode 100644
index 0000000..430d0d5
--- /dev/null
+++ b/src/superio/nuvoton/nct5572d/superio.c
@@ -0,0 +1,81 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2014 Felix Held <felix-coreboot(a)felixheld.de>
+ * Copyright (C) 2014 Edward O'Callaghan <eocallaghan(a)alterapraxis.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 <arch/io.h>
+#include <device/device.h>
+#include <device/pnp.h>
+#include <pc80/keyboard.h>
+#include <stdlib.h>
+#include <superio/conf_mode.h>
+
+#include "nct5572d.h"
+
+static void nct5572d_init(struct device *dev)
+{
+ if (!dev->enabled)
+ return;
+
+ switch(dev->path.pnp.device) {
+ /* TODO: Might potentially need code for HWM or FDC etc. */
+ case NCT5572D_KBC:
+ pc_keyboard_init();
+ break;
+ }
+}
+
+static struct device_operations ops = {
+ .read_resources = pnp_read_resources,
+ .set_resources = pnp_set_resources,
+ .enable_resources = pnp_enable_resources,
+ .enable = pnp_alt_enable,
+ .init = nct5572d_init,
+ .ops_pnp_mode = &pnp_conf_mode_8787_aa,
+};
+
+static struct pnp_info pnp_dev_info[] = {
+ { &ops, NCT5572D_SP1, PNP_IO0 | PNP_IRQ0, {0x0FF8, 0}, },
+ { &ops, NCT5572D_IR, PNP_IO0 | PNP_IRQ0, {0x0FF8, 0}, },
+ { &ops, NCT5572D_KBC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_IRQ1, {0x0FFF, 0}, {0x0FFF, 4}, },
+ { &ops, NCT5572D_CIR, PNP_IO0 | PNP_IRQ0, {0x0FF8, 0}, },
+ { &ops, NCT5572D_WDT1},
+ { &ops, NCT5572D_ACPI},
+ { &ops, NCT5572D_HWM_TSI_FPLED, PNP_IO0 | PNP_IO1 | PNP_IRQ0, {0x0FFE, 0}, {0x0FFE, 4}, },
+ { &ops, NCT5572D_PECI},
+ { &ops, NCT5572D_SUSLED},
+ { &ops, NCT5572D_CIRWKUP, PNP_IO0 | PNP_IRQ0, {0x0FF8, 0}, },
+ { &ops, NCT5572D_GPIO_PP_OD},
+ { &ops, NCT5572D_GPIO2},
+ { &ops, NCT5572D_GPIO3},
+ { &ops, NCT5572D_GPIO5},
+ { &ops, NCT5572D_GPIO6},
+ { &ops, NCT5572D_GPIO8},
+ { &ops, NCT5572D_GPIO9},
+};
+
+static void enable_dev(struct device *dev)
+{
+ pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+}
+
+struct chip_operations superio_nuvoton_nct5572d_ops = {
+ CHIP_NAME("NUVOTON NCT5572D Super I/O")
+ .enable_dev = enable_dev,
+};
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7199
-gerrit
commit 97716b60d86f8715cd0e065b2d38269d9cc04dc3
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Sat Oct 25 15:18:25 2014 +0200
i82801gx: Handle whole FADT in southbridge.
Do all the handling in SB code with few parameters from devicetree.cb
instead of having mobo callbacks.
Change-Id: I8fd02ff05553a3c51ea5f6ae66b8f5502509e2bc
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/arch/x86/boot/acpi.c | 5 ++--
src/arch/x86/include/arch/acpi.h | 3 +-
src/mainboard/apple/macbook21/devicetree.cb | 3 ++
src/mainboard/apple/macbook21/fadt.c | 27 -----------------
src/mainboard/getac/p470/devicetree.cb | 4 +++
src/mainboard/getac/p470/fadt.c | 28 -----------------
src/mainboard/ibase/mb899/devicetree.cb | 3 ++
src/mainboard/ibase/mb899/fadt.c | 32 --------------------
src/mainboard/intel/d945gclf/devicetree.cb | 2 ++
src/mainboard/intel/d945gclf/fadt.c | 28 -----------------
src/mainboard/kontron/986lcd-m/devicetree.cb | 2 ++
src/mainboard/kontron/986lcd-m/fadt.c | 33 --------------------
src/mainboard/lenovo/t60/devicetree.cb | 3 ++
src/mainboard/lenovo/t60/fadt.c | 28 -----------------
src/mainboard/lenovo/x60/devicetree.cb | 4 +++
src/mainboard/lenovo/x60/fadt.c | 28 -----------------
src/mainboard/roda/rk886ex/devicetree.cb | 4 +++
src/mainboard/roda/rk886ex/fadt.c | 28 -----------------
src/southbridge/intel/i82801gx/chip.h | 3 ++
src/southbridge/intel/i82801gx/lpc.c | 45 +++++++++++++++++-----------
20 files changed, 59 insertions(+), 254 deletions(-)
diff --git a/src/arch/x86/boot/acpi.c b/src/arch/x86/boot/acpi.c
index c3c946d..baea65c 100644
--- a/src/arch/x86/boot/acpi.c
+++ b/src/arch/x86/boot/acpi.c
@@ -660,7 +660,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs, void *dsdt)
memset((void *) fadt, 0, sizeof(acpi_fadt_t));
memcpy(header->signature, "FACP", 4);
header->length = sizeof(acpi_fadt_t);
- header->revision = 3;
+ header->revision = 4;
memcpy(header->oem_id, OEM_ID, 6);
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
memcpy(header->asl_compiler_id, ASLC, 4);
@@ -680,8 +680,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs, void *dsdt)
fadt->preferred_pm_profile = PM_DESKTOP;
}
- southbridge_fill_fadt(fadt);
- mainboard_fill_fadt(fadt);
+ acpi_fill_fadt(fadt);
header->checksum =
acpi_checksum((void *) fadt, header->length);
diff --git a/src/arch/x86/include/arch/acpi.h b/src/arch/x86/include/arch/acpi.h
index ff59a01..313bdf1 100644
--- a/src/arch/x86/include/arch/acpi.h
+++ b/src/arch/x86/include/arch/acpi.h
@@ -495,8 +495,7 @@ unsigned long acpi_fill_ssdt_generator(unsigned long current,
void acpi_create_ssdt_generator(acpi_header_t *ssdt, const char *oem_table_id);
void acpi_create_fadt(acpi_fadt_t *fadt,acpi_facs_t *facs, void *dsdt);
#if IS_ENABLED(CONFIG_COMMON_FADT)
-void southbridge_fill_fadt(acpi_fadt_t * fadt);
-void mainboard_fill_fadt(acpi_fadt_t * fadt);
+void acpi_fill_fadt(acpi_fadt_t * fadt);
#endif
void update_ssdt(void *ssdt);
diff --git a/src/mainboard/apple/macbook21/devicetree.cb b/src/mainboard/apple/macbook21/devicetree.cb
index 5b11b52..9509c81 100644
--- a/src/mainboard/apple/macbook21/devicetree.cb
+++ b/src/mainboard/apple/macbook21/devicetree.cb
@@ -69,6 +69,9 @@ chip northbridge/intel/i945
register "ide_enable_secondary" = "1"
register "c4onc3_enable" = "1"
+ register "c3_latency" = "0x23"
+ register "p_cnt_throttling_supported" = "1"
+
device pci 1b.0 on
ioapic_irq 2 INTA 0x16 # Audio Controller
subsystemid 0x8384 0x7680
diff --git a/src/mainboard/apple/macbook21/fadt.c b/src/mainboard/apple/macbook21/fadt.c
deleted file mode 100644
index 314153d..0000000
--- a/src/mainboard/apple/macbook21/fadt.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2008 coresystems GmbH
- *
- * 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
- */
-
-#include <arch/acpi.h>
-
-void mainboard_fill_fadt(acpi_fadt_t * fadt)
-{
- fadt->p_lvl3_lat = 0x23;
-}
diff --git a/src/mainboard/getac/p470/devicetree.cb b/src/mainboard/getac/p470/devicetree.cb
index fd97445..d88304e 100644
--- a/src/mainboard/getac/p470/devicetree.cb
+++ b/src/mainboard/getac/p470/devicetree.cb
@@ -60,6 +60,10 @@ chip northbridge/intel/i945
register "ide_enable_secondary" = "0x0"
register "sata_ahci" = "0x0"
+ register "c3_latency" = "85"
+ register "docking_supported" = "1"
+ register "p_cnt_throttling_supported" = "1"
+
device pci 1b.0 on # High Definition Audio
ioapic_irq 2 INTA 0x16
end
diff --git a/src/mainboard/getac/p470/fadt.c b/src/mainboard/getac/p470/fadt.c
deleted file mode 100644
index 8722743..0000000
--- a/src/mainboard/getac/p470/fadt.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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
- */
-
-#include <arch/acpi.h>
-
-void mainboard_fill_fadt(acpi_fadt_t * fadt)
-{
- fadt->p_lvl3_lat = 85;
- fadt->flags |= ACPI_FADT_DOCKING_SUPPORTED;
-}
diff --git a/src/mainboard/ibase/mb899/devicetree.cb b/src/mainboard/ibase/mb899/devicetree.cb
index af04398..ccf6405 100644
--- a/src/mainboard/ibase/mb899/devicetree.cb
+++ b/src/mainboard/ibase/mb899/devicetree.cb
@@ -32,6 +32,9 @@ chip northbridge/intel/i945
register "ide_enable_secondary" = "0x0"
register "sata_ahci" = "0x1"
+ register "c3_latency" = "85"
+ register "p_cnt_throttling_supported" = "0"
+
device pci 1b.0 on
ioapic_irq 2 INTA 0x16
end # High Definition Audio
diff --git a/src/mainboard/ibase/mb899/fadt.c b/src/mainboard/ibase/mb899/fadt.c
deleted file mode 100644
index f2770a5..0000000
--- a/src/mainboard/ibase/mb899/fadt.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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
- */
-
-#include <string.h>
-#include <device/pci.h>
-#include <arch/acpi.h>
-#include <cpu/x86/smm.h>
-
-void mainboard_fill_fadt(acpi_fadt_t * fadt)
-{
- fadt->p_lvl3_lat = 85;
- fadt->duty_width = 0;
- fadt->iapc_boot_arch = 0x03;
-
- fadt->flags |= ACPI_FADT_C2_MP_SUPPORTED | ACPI_FADT_PLATFORM_CLOCK;
-}
diff --git a/src/mainboard/intel/d945gclf/devicetree.cb b/src/mainboard/intel/d945gclf/devicetree.cb
index acbde2a..9f9afff 100644
--- a/src/mainboard/intel/d945gclf/devicetree.cb
+++ b/src/mainboard/intel/d945gclf/devicetree.cb
@@ -52,6 +52,8 @@ chip northbridge/intel/i945
register "ide_enable_primary" = "0x1"
register "ide_enable_secondary" = "0x0"
register "sata_ahci" = "0x0"
+ register "c3_latency" = "85"
+ register "p_cnt_throttling_supported" = "0"
device pci 1b.0 on
ioapic_irq 2 INTA 0x16 end # High Definition Audio
diff --git a/src/mainboard/intel/d945gclf/fadt.c b/src/mainboard/intel/d945gclf/fadt.c
deleted file mode 100644
index 74a0e7e..0000000
--- a/src/mainboard/intel/d945gclf/fadt.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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
- */
-
-#include <arch/acpi.h>
-
-void mainboard_fill_fadt(acpi_fadt_t * fadt)
-{
- fadt->p_lvl3_lat = 85;
- fadt->duty_width = 0;
- fadt->iapc_boot_arch = 0x03;
- fadt->flags |= ACPI_FADT_C2_MP_SUPPORTED | ACPI_FADT_PLATFORM_CLOCK;
-}
diff --git a/src/mainboard/kontron/986lcd-m/devicetree.cb b/src/mainboard/kontron/986lcd-m/devicetree.cb
index 069660c..b701f78 100644
--- a/src/mainboard/kontron/986lcd-m/devicetree.cb
+++ b/src/mainboard/kontron/986lcd-m/devicetree.cb
@@ -32,6 +32,8 @@ chip northbridge/intel/i945
register "ide_enable_primary" = "0x1"
register "ide_enable_secondary" = "0x1"
register "sata_ahci" = "0x0"
+ register "c3_latency" = "85"
+ register "p_cnt_throttling_supported" = "0"
device pci 1b.0 on
ioapic_irq 2 INTA 0x16
diff --git a/src/mainboard/kontron/986lcd-m/fadt.c b/src/mainboard/kontron/986lcd-m/fadt.c
deleted file mode 100644
index 92bf647..0000000
--- a/src/mainboard/kontron/986lcd-m/fadt.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2009 coresystems GmbH
- *
- * 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
- */
-
-#include <string.h>
-#include <device/pci.h>
-#include <arch/acpi.h>
-#include <cpu/x86/smm.h>
-
-void mainboard_fill_fadt(acpi_fadt_t * fadt)
-{
- fadt->p_lvl3_lat = 85;
- fadt->duty_width = 0;
- fadt->iapc_boot_arch = 0x03;
-
- fadt->flags |= ACPI_FADT_C2_MP_SUPPORTED
- | ACPI_FADT_RESET_REGISTER |ACPI_FADT_PLATFORM_CLOCK;
-}
diff --git a/src/mainboard/lenovo/t60/devicetree.cb b/src/mainboard/lenovo/t60/devicetree.cb
index 5e2a4fe..1d5f549 100644
--- a/src/mainboard/lenovo/t60/devicetree.cb
+++ b/src/mainboard/lenovo/t60/devicetree.cb
@@ -69,6 +69,9 @@ chip northbridge/intel/i945
register "alt_gp_smi_en" = "0x1000"
register "c4onc3_enable" = "1"
+ register "c3_latency" = "0x23"
+ register "docking_supported" = "1"
+ register "p_cnt_throttling_supported" = "1"
device pci 1b.0 on
ioapic_irq 2 INTA 0x16 # Audio Controller
diff --git a/src/mainboard/lenovo/t60/fadt.c b/src/mainboard/lenovo/t60/fadt.c
deleted file mode 100644
index 96767bd..0000000
--- a/src/mainboard/lenovo/t60/fadt.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2008 coresystems GmbH
- *
- * 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
- */
-
-#include <arch/acpi.h>
-
-void mainboard_fill_fadt(acpi_fadt_t * fadt)
-{
- fadt->p_lvl3_lat = 0x23;
- fadt->flags |= ACPI_FADT_DOCKING_SUPPORTED;
-}
diff --git a/src/mainboard/lenovo/x60/devicetree.cb b/src/mainboard/lenovo/x60/devicetree.cb
index a067f92..af3d10d 100644
--- a/src/mainboard/lenovo/x60/devicetree.cb
+++ b/src/mainboard/lenovo/x60/devicetree.cb
@@ -67,6 +67,10 @@ chip northbridge/intel/i945
register "alt_gp_smi_en" = "0x1000"
register "c4onc3_enable" = "1"
+ register "c3_latency" = "0x23"
+ register "docking_supported" = "1"
+ register "p_cnt_throttling_supported" = "1"
+
device pci 1b.0 on
ioapic_irq 2 INTA 0x16 # Audio Controller
subsystemid 0x17aa 0x2010
diff --git a/src/mainboard/lenovo/x60/fadt.c b/src/mainboard/lenovo/x60/fadt.c
deleted file mode 100644
index 96767bd..0000000
--- a/src/mainboard/lenovo/x60/fadt.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2008 coresystems GmbH
- *
- * 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
- */
-
-#include <arch/acpi.h>
-
-void mainboard_fill_fadt(acpi_fadt_t * fadt)
-{
- fadt->p_lvl3_lat = 0x23;
- fadt->flags |= ACPI_FADT_DOCKING_SUPPORTED;
-}
diff --git a/src/mainboard/roda/rk886ex/devicetree.cb b/src/mainboard/roda/rk886ex/devicetree.cb
index 6e34b6f..8e4a665 100644
--- a/src/mainboard/roda/rk886ex/devicetree.cb
+++ b/src/mainboard/roda/rk886ex/devicetree.cb
@@ -53,6 +53,10 @@ chip northbridge/intel/i945
register "gpi7_routing" = "2"
register "gpe0_en" = "0x20800007"
+ register "c3_latency" = "0x23"
+ register "docking_supported" = "1"
+ register "p_cnt_throttling_supported" = "1"
+
register "ide_legacy_combined" = "0x1"
register "ide_enable_primary" = "0x1"
register "ide_enable_secondary" = "0x0"
diff --git a/src/mainboard/roda/rk886ex/fadt.c b/src/mainboard/roda/rk886ex/fadt.c
deleted file mode 100644
index 96767bd..0000000
--- a/src/mainboard/roda/rk886ex/fadt.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2007-2008 coresystems GmbH
- *
- * 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
- */
-
-#include <arch/acpi.h>
-
-void mainboard_fill_fadt(acpi_fadt_t * fadt)
-{
- fadt->p_lvl3_lat = 0x23;
- fadt->flags |= ACPI_FADT_DOCKING_SUPPORTED;
-}
diff --git a/src/southbridge/intel/i82801gx/chip.h b/src/southbridge/intel/i82801gx/chip.h
index c61ec98..589c082 100644
--- a/src/southbridge/intel/i82801gx/chip.h
+++ b/src/southbridge/intel/i82801gx/chip.h
@@ -59,6 +59,9 @@ struct southbridge_intel_i82801gx_config {
uint32_t sata_ports_implemented;
int c4onc3_enable:1;
+ int docking_supported:1;
+ int p_cnt_throttling_supported:1;
+ int c3_latency;
};
#endif /* SOUTHBRIDGE_INTEL_I82801GX_CHIP_H */
diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c
index 085906f..21d61e3 100644
--- a/src/southbridge/intel/i82801gx/lpc.c
+++ b/src/southbridge/intel/i82801gx/lpc.c
@@ -138,7 +138,7 @@ static void i82801gx_pirq_init(device_t dev)
static void i82801gx_gpi_routing(device_t dev)
{
/* Get the chip configuration */
- config_t *config = dev->chip_info;
+ config_t *chip = dev->chip_info;
u32 reg32 = 0;
/* An array would be much nicer here, or some
@@ -486,9 +486,11 @@ unsigned long acpi_fill_madt(unsigned long current)
return current;
}
-void southbridge_fill_fadt(acpi_fadt_t * fadt)
+void acpi_fill_fadt(acpi_fadt_t * fadt)
{
- u16 pmbase = pci_read_config16(dev_find_slot(0, PCI_DEVFN(0x1f,0)), 0x40) & 0xfffe;
+ device_t dev = dev_find_slot(0, PCI_DEVFN(0x1f,0));
+ config_t *config = dev->chip_info;
+ u16 pmbase = pci_read_config16(dev, 0x40) & 0xfffe;
fadt->pm1a_evt_blk = pmbase;
fadt->pm1b_evt_blk = 0x0;
@@ -510,7 +512,7 @@ void southbridge_fill_fadt(acpi_fadt_t * fadt)
fadt->reset_reg.space_id = 1;
fadt->reset_reg.bit_width = 8;
fadt->reset_reg.bit_offset = 0;
- fadt->reset_reg.resv = 0;
+ fadt->reset_reg.access_size = ACPI_ACCESS_SIZE_BYTE_ACCESS;
fadt->reset_reg.addrl = 0xcf9;
fadt->reset_reg.addrh = 0;
@@ -519,56 +521,56 @@ void southbridge_fill_fadt(acpi_fadt_t * fadt)
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.access_size = ACPI_ACCESS_SIZE_DWORD_ACCESS;
fadt->x_pm1a_evt_blk.addrl = pmbase;
fadt->x_pm1a_evt_blk.addrh = 0x0;
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.access_size = 0;
fadt->x_pm1b_evt_blk.addrl = 0x0;
fadt->x_pm1b_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.access_size = ACPI_ACCESS_SIZE_WORD_ACCESS;
fadt->x_pm1a_cnt_blk.addrl = pmbase + 0x4;
fadt->x_pm1a_cnt_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.access_size = 0;
fadt->x_pm1b_cnt_blk.addrl = 0x0;
fadt->x_pm1b_cnt_blk.addrh = 0x0;
fadt->x_pm2_cnt_blk.space_id = 1;
fadt->x_pm2_cnt_blk.bit_width = 8;
fadt->x_pm2_cnt_blk.bit_offset = 0;
- fadt->x_pm2_cnt_blk.resv = 0;
+ fadt->x_pm2_cnt_blk.access_size = ACPI_ACCESS_SIZE_BYTE_ACCESS;
fadt->x_pm2_cnt_blk.addrl = pmbase + 0x20;
fadt->x_pm2_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.access_size = ACPI_ACCESS_SIZE_DWORD_ACCESS;
fadt->x_pm_tmr_blk.addrl = pmbase + 0x8;
fadt->x_pm_tmr_blk.addrh = 0x0;
fadt->x_gpe0_blk.space_id = 1;
fadt->x_gpe0_blk.bit_width = 64;
fadt->x_gpe0_blk.bit_offset = 0;
- fadt->x_gpe0_blk.resv = 0;
+ fadt->x_gpe0_blk.access_size = ACPI_ACCESS_SIZE_DWORD_ACCESS;
fadt->x_gpe0_blk.addrl = pmbase + 0x28;
fadt->x_gpe0_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.access_size = 0;
fadt->x_gpe1_blk.addrl = 0x0;
fadt->x_gpe1_blk.addrh = 0x0;
fadt->day_alrm = 0xd;
@@ -585,14 +587,23 @@ void southbridge_fill_fadt(acpi_fadt_t * fadt)
fadt->cst_cnt = APM_CNT_CST_CONTROL;
fadt->p_lvl2_lat = 1;
- fadt->p_lvl3_lat = 0x23;
+ fadt->p_lvl3_lat = chip->c3_latency;
fadt->flush_size = 0;
fadt->flush_stride = 0;
fadt->duty_offset = 1;
- fadt->duty_width = 3;
- fadt->iapc_boot_arch = 0x00;
- fadt->flags = ACPI_FADT_WBINVD | ACPI_FADT_C1_SUPPORTED |
- ACPI_FADT_SLEEP_BUTTON | ACPI_FADT_S4_RTC_WAKE;
+ if (chip->p_cnt_throttling_supported) {
+ fadt->duty_width = 3;
+ } else {
+ fadt->duty_width = 0;
+ }
+ fadt->iapc_boot_arch = 0x03;
+ fadt->flags = (ACPI_FADT_WBINVD | ACPI_FADT_C1_SUPPORTED
+ | ACPI_FADT_SLEEP_BUTTON | ACPI_FADT_S4_RTC_WAKE
+ | ACPI_FADT_PLATFORM_CLOCK | ACPI_FADT_RESET_REGISTER
+ | ACPI_FADT_C2_MP_SUPPORTED);
+ if (chip->docking_supported) {
+ fadt->flags |= ACPI_FADT_DOCKING_SUPPORTED;
+ }
}
static void i82801gx_lpc_read_resources(device_t dev)
Vladimir Serbinenko (phcoder(a)gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/7086
-gerrit
commit f39a3ee30635730b847d6e369a8d813df20685ff
Author: Vladimir Serbinenko <phcoder(a)gmail.com>
Date: Thu Oct 16 10:39:06 2014 +0200
i945: Consolidate acpi/platform.asl
Change-Id: Iccb2dda8a427e483c04693e46b00e0bc2452a26b
Signed-off-by: Vladimir Serbinenko <phcoder(a)gmail.com>
---
src/cpu/intel/model_6dx/acpi/cpu.asl | 37 +++++++
src/mainboard/apple/macbook21/acpi/platform.asl | 119 +---------------------
src/mainboard/apple/macbook21/dsdt.asl | 3 +
src/mainboard/getac/p470/acpi/ec.asl | 6 ++
src/mainboard/getac/p470/acpi/platform.asl | 123 +----------------------
src/mainboard/getac/p470/dsdt.asl | 4 +
src/mainboard/ibase/mb899/acpi/platform.asl | 38 -------
src/mainboard/ibase/mb899/dsdt.asl | 4 +
src/mainboard/intel/d945gclf/acpi/platform.asl | 38 -------
src/mainboard/intel/d945gclf/dsdt.asl | 3 +
src/mainboard/kontron/986lcd-m/acpi/platform.asl | 38 -------
src/mainboard/kontron/986lcd-m/dsdt.asl | 3 +
src/mainboard/lenovo/t60/acpi/platform.asl | 122 +---------------------
src/mainboard/lenovo/t60/dsdt.asl | 3 +
src/mainboard/lenovo/x60/acpi/platform.asl | 122 +---------------------
src/mainboard/lenovo/x60/dsdt.asl | 3 +
src/mainboard/roda/rk886ex/acpi/ec.asl | 3 +
src/mainboard/roda/rk886ex/acpi/platform.asl | 122 +---------------------
src/mainboard/roda/rk886ex/dsdt.asl | 3 +
src/southbridge/intel/i82801gx/acpi/platform.asl | 105 +++++++++++++++++++
20 files changed, 182 insertions(+), 717 deletions(-)
diff --git a/src/cpu/intel/model_6dx/acpi/cpu.asl b/src/cpu/intel/model_6dx/acpi/cpu.asl
new file mode 100644
index 0000000..8928c38
--- /dev/null
+++ b/src/cpu/intel/model_6dx/acpi/cpu.asl
@@ -0,0 +1,37 @@
+/* These come from the dynamically created CPU SSDT */
+External(PDC0)
+External(PDC1)
+
+// Power notification
+
+External (\_PR_.CPU0, DeviceObj)
+External (\_PR_.CPU1, DeviceObj)
+External (\_PR_.CPU0._PPC)
+External (\_PR_.CPU1._PPC)
+
+Method (PNOT)
+{
+ If (MPEN) {
+ If(And(PDC0, 0x08)) {
+ Notify (\_PR_.CPU0, 0x80) // _PPC
+
+ If (And(PDC0, 0x10)) {
+ Sleep(100)
+ Notify(\_PR_.CPU0, 0x81) // _CST
+ }
+ }
+
+ If(And(PDC1, 0x08)) {
+ Notify (\_PR_.CPU1, 0x80) // _PPC
+ If (And(PDC1, 0x10)) {
+ Sleep(100)
+ Notify(\_PR_.CPU1, 0x81) // _CST
+ }
+ }
+
+ } Else { // UP
+ Notify (\_PR_.CPU0, 0x80)
+ Sleep(0x64)
+ Notify(\_PR_.CPU0, 0x81)
+ }
+}
diff --git a/src/mainboard/apple/macbook21/acpi/platform.asl b/src/mainboard/apple/macbook21/acpi/platform.asl
index 1c6ac6e..99efbb3 100644
--- a/src/mainboard/apple/macbook21/acpi/platform.asl
+++ b/src/mainboard/apple/macbook21/acpi/platform.asl
@@ -19,48 +19,6 @@
* MA 02110-1301 USA
*/
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
-/* The APM port can be used for generating software SMIs */
-
-OperationRegion (APMP, SystemIO, 0xb2, 2)
-Field (APMP, ByteAcc, NoLock, Preserve)
-{
- APMC, 8, // APM command
- APMS, 8 // APM status
-}
-
-/* Port 80 POST */
-
-OperationRegion (POST, SystemIO, 0x80, 1)
-Field (POST, ByteAcc, Lock, Preserve)
-{
- DBG0, 8
-}
-
-/* SMI I/O Trap */
-Method(TRAP, 1, Serialized)
-{
- Store (Arg0, SMIF) // SMI Function
- Store (0, TRP0) // Generate trap
- Return (SMIF) // Return value of SMI handler
-}
-
-/* The _PIC method is called by the OS to choose between interrupt
- * routing via the i8259 interrupt controller or the APIC.
- *
- * _PIC is called with a parameter of 0 for i8259 configuration and
- * with a parameter of 1 for Local Apic/IOAPIC configuration.
- */
-
-Method(_PIC, 1)
-{
- // Remember the OS' IRQ routing choice.
- Store(Arg0, PICM)
-}
-
/* The _WAK method is called on system wakeup */
Method(_WAK,1)
@@ -85,38 +43,6 @@ Method(_WAK,1)
Return(Package(){0,0})
}
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-
-Method (PNOT)
-{
- If (MPEN) {
- If(And(PDC0, 0x08)) {
- Notify (\_PR_.CPU0, 0x80) // _PPC
-
- If (And(PDC0, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU0, 0x81) // _CST
- }
- }
-
- If(And(PDC1, 0x08)) {
- Notify (\_PR_.CPU1, 0x80) // _PPC
- If (And(PDC1, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU1, 0x81) // _CST
- }
- }
-
- } Else { // UP
- Notify (\_PR_.CPU0, 0x80)
- Sleep(0x64)
- Notify(\_PR_.CPU0, 0x81)
- }
-}
-
/* System Bus */
Scope(\_SB)
@@ -133,49 +59,7 @@ Scope(\_SB)
// TRAP(71) // TODO
- /* Determine the Operating System and save the value in OSYS.
- * We have to do this in order to be able to work around
- * certain windows bugs.
- *
- * OSYS value | Operating System
- * -----------+------------------
- * 2000 | Windows 2000
- * 2001 | Windows XP(+SP1)
- * 2002 | Windows XP SP2
- * 2006 | Windows Vista
- * ???? | Windows 7
- */
-
- /* Let's assume we're running at least Windows 2000 */
- Store (2000, OSYS)
-
- If (CondRefOf(_OSI, Local0)) {
- /* Linux answers _OSI with "True" for a couple of
- * Windows version queries. But unlike Windows it
- * needs a Video repost, so let's determine whether
- * we're running Linux.
- */
-
- If (_OSI("Linux")) {
- Store (1, LINX)
- }
-
- If (_OSI("Windows 2001")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP1")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP2")) {
- Store (2002, OSYS)
- }
-
- If (_OSI("Windows 2006")) {
- Store (2006, OSYS)
- }
- }
+ \GOS()
/* And the OS workarounds start right after we know what we're
* running: Windows XP SP1 needs to have C-State coordination
@@ -189,4 +73,3 @@ Scope(\_SB)
// TRAP(43) // TODO
}
}
-
diff --git a/src/mainboard/apple/macbook21/dsdt.asl b/src/mainboard/apple/macbook21/dsdt.asl
index fb0a34f..5bc25c9 100644
--- a/src/mainboard/apple/macbook21/dsdt.asl
+++ b/src/mainboard/apple/macbook21/dsdt.asl
@@ -37,6 +37,9 @@ DefinitionBlock(
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
+ #include <southbridge/intel/i82801gx/acpi/platform.asl>
+
+ #include <cpu/intel/model_6dx/acpi/cpu.asl>
Scope (\_SB) {
Device (PCI0)
diff --git a/src/mainboard/getac/p470/acpi/ec.asl b/src/mainboard/getac/p470/acpi/ec.asl
index b8e2954..1b1c157 100644
--- a/src/mainboard/getac/p470/acpi/ec.asl
+++ b/src/mainboard/getac/p470/acpi/ec.asl
@@ -120,6 +120,8 @@ Device(EC0)
}
PNOT()
+ Notify(\_SB.BAT0, 0x80) // Execute BAT0 _BST
+ Notify(\_SB.BAT1, 0x80) // Execute BAT1 _BST
}
Method (_Q02, 0)
@@ -133,12 +135,16 @@ Device(EC0)
}
PNOT()
+ Notify(\_SB.BAT0, 0x80) // Execute BAT0 _BST
+ Notify(\_SB.BAT1, 0x80) // Execute BAT1 _BST
}
Method (_Q05, 0)
{
Notify(SLPB, 0x80)
PNOT()
+ Notify(\_SB.BAT0, 0x80) // Execute BAT0 _BST
+ Notify(\_SB.BAT1, 0x80) // Execute BAT1 _BST
}
Method (_Q07, 0)
diff --git a/src/mainboard/getac/p470/acpi/platform.asl b/src/mainboard/getac/p470/acpi/platform.asl
index df9adc7..2b081e0 100644
--- a/src/mainboard/getac/p470/acpi/platform.asl
+++ b/src/mainboard/getac/p470/acpi/platform.asl
@@ -19,44 +19,6 @@
* MA 02110-1301 USA
*/
-/* The APM port can be used for generating software SMIs */
-
-OperationRegion (APMP, SystemIO, 0xb2, 2)
-Field (APMP, ByteAcc, NoLock, Preserve)
-{
- APMC, 8, // APM command
- APMS, 8 // APM status
-}
-
-/* Port 80 POST */
-
-OperationRegion (POST, SystemIO, 0x80, 1)
-Field (POST, ByteAcc, Lock, Preserve)
-{
- DBG0, 8
-}
-
-/* SMI I/O Trap */
-Method(TRAP, 1, Serialized)
-{
- Store (Arg0, SMIF) // SMI Function
- Store (0, TRP0) // Generate trap
- Return (SMIF) // Return value of SMI handler
-}
-
-/* The _PIC method is called by the OS to choose between interrupt
- * routing via the i8259 interrupt controller or the APIC.
- *
- * _PIC is called with a parameter of 0 for i8259 configuration and
- * with a parameter of 1 for Local Apic/IOAPIC configuration.
- */
-
-Method(_PIC, 1)
-{
- // Remember the OS' IRQ routing choice.
- Store(Arg0, PICM)
-}
-
/* The _PTS method (Prepare To Sleep) is called before the OS is
* entering a sleep state. The sleep state number is passed in Arg0
*/
@@ -149,47 +111,6 @@ Method(_WAK,1)
Return(Package(){0,0})
}
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-External (\_PR_.CPU0._PPC)
-External (\_PR_.CPU1._PPC)
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
-Method (PNOT)
-{
- If (MPEN) {
- If(And(PDC0, 0x08)) {
- Notify (\_PR_.CPU0, 0x80) // _PPC
-
- If (And(PDC0, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU0, 0x81) // _CST
- }
- }
-
- If(And(PDC1, 0x08)) {
- Notify (\_PR_.CPU1, 0x80) // _PPC
- If (And(PDC1, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU1, 0x81) // _CST
- }
- }
-
- } Else { // UP
- Notify (\_PR_.CPU0, 0x80)
- Sleep(0x64)
- Notify(\_PR_.CPU0, 0x81)
- }
-
- // Notify the Batteries
- Notify(\_SB.BAT0, 0x80) // Execute BAT0 _BST
- Notify(\_SB.BAT1, 0x80) // Execute BAT1 _BST
-}
-
// Hardcoded for now..
Name (CFGD, 0x113B69F1)
@@ -210,49 +131,7 @@ Scope(\_SB)
TRAP(0x47)
}
- /* Determine the Operating System and save the value in OSYS.
- * We have to do this in order to be able to work around
- * certain windows bugs.
- *
- * OSYS value | Operating System
- * -----------+------------------
- * 2000 | Windows 2000
- * 2001 | Windows XP(+SP1)
- * 2002 | Windows XP SP2
- * 2006 | Windows Vista
- * ???? | Windows 7
- */
-
- /* Let's assume we're running at least Windows 2000 */
- Store (2000, OSYS)
-
- If (CondRefOf(_OSI, Local0)) {
- /* Linux answers _OSI with "True" for a couple of
- * Windows version queries. But unlike Windows it
- * needs a Video repost, so let's determine whether
- * we're running Linux.
- */
-
- If (_OSI("Linux")) {
- Store (1, LINX)
- }
-
- If (_OSI("Windows 2001")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP1")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP2")) {
- Store (2002, OSYS)
- }
-
- If (_OSI("Windows 2006")) {
- Store (2006, OSYS)
- }
- }
+ \GOS()
/* And the OS workarounds start right after we know what we're
* running: Windows XP SP1 needs to have C-State coordination
diff --git a/src/mainboard/getac/p470/dsdt.asl b/src/mainboard/getac/p470/dsdt.asl
index d89f75e..6cdea54 100644
--- a/src/mainboard/getac/p470/dsdt.asl
+++ b/src/mainboard/getac/p470/dsdt.asl
@@ -31,6 +31,8 @@ DefinitionBlock(
0x20090419 // OEM revision
)
{
+ #include <southbridge/intel/i82801gx/acpi/platform.asl>
+
// Some generic macros
#include "acpi/platform.asl"
@@ -46,6 +48,8 @@ DefinitionBlock(
// Thermal Zone
#include "acpi/thermal.asl"
+ #include <cpu/intel/model_6dx/acpi/cpu.asl>
+
Scope (\_SB) {
Device (PCI0)
{
diff --git a/src/mainboard/ibase/mb899/acpi/platform.asl b/src/mainboard/ibase/mb899/acpi/platform.asl
index 6770348..9a7e62c 100644
--- a/src/mainboard/ibase/mb899/acpi/platform.asl
+++ b/src/mainboard/ibase/mb899/acpi/platform.asl
@@ -17,44 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* The APM port can be used for generating software SMIs */
-
-OperationRegion (APMP, SystemIO, 0xb2, 2)
-Field (APMP, ByteAcc, NoLock, Preserve)
-{
- APMC, 8, // APM command
- APMS, 8 // APM status
-}
-
-/* Port 80 POST */
-
-OperationRegion (POST, SystemIO, 0x80, 1)
-Field (POST, ByteAcc, Lock, Preserve)
-{
- DBG0, 8
-}
-
-/* SMI I/O Trap */
-Method(TRAP, 1, Serialized)
-{
- Store (Arg0, SMIF) // SMI Function
- Store (0, TRP0) // Generate trap
- Return (SMIF) // Return value of SMI handler
-}
-
-/* The _PIC method is called by the OS to choose between interrupt
- * routing via the i8259 interrupt controller or the APIC.
- *
- * _PIC is called with a parameter of 0 for i8259 configuration and
- * with a parameter of 1 for Local Apic/IOAPIC configuration.
- */
-
-Method(_PIC, 1)
-{
- // Remember the OS' IRQ routing choice.
- Store(Arg0, PICM)
-}
-
/* The _PTS method (Prepare To Sleep) is called before the OS is
* entering a sleep state. The sleep state number is passed in Arg0
*/
diff --git a/src/mainboard/ibase/mb899/dsdt.asl b/src/mainboard/ibase/mb899/dsdt.asl
index 80d586a..52290b3 100644
--- a/src/mainboard/ibase/mb899/dsdt.asl
+++ b/src/mainboard/ibase/mb899/dsdt.asl
@@ -32,11 +32,15 @@ DefinitionBlock(
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
+ #include <southbridge/intel/i82801gx/acpi/platform.asl>
+
// General Purpose Events
//#include "acpi/gpe.asl"
//#include "acpi/thermal.asl"
+ #include <cpu/intel/model_6dx/acpi/cpu.asl>
+
Scope (\_SB) {
Device (PCI0)
{
diff --git a/src/mainboard/intel/d945gclf/acpi/platform.asl b/src/mainboard/intel/d945gclf/acpi/platform.asl
index 0c7e8a6..3d20c4b 100644
--- a/src/mainboard/intel/d945gclf/acpi/platform.asl
+++ b/src/mainboard/intel/d945gclf/acpi/platform.asl
@@ -17,44 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* The APM port can be used for generating software SMIs */
-
-OperationRegion (APMP, SystemIO, 0xb2, 2)
-Field (APMP, ByteAcc, NoLock, Preserve)
-{
- APMC, 8, // APM command
- APMS, 8 // APM status
-}
-
-/* Port 80 POST */
-
-OperationRegion (POST, SystemIO, 0x80, 1)
-Field (POST, ByteAcc, Lock, Preserve)
-{
- DBG0, 8
-}
-
-/* SMI I/O Trap */
-Method(TRAP, 1, Serialized)
-{
- Store (Arg0, SMIF) // SMI Function
- Store (0, TRP0) // Generate trap
- Return (SMIF) // Return value of SMI handler
-}
-
-/* The _PIC method is called by the OS to choose between interrupt
- * routing via the i8259 interrupt controller or the APIC.
- *
- * _PIC is called with a parameter of 0 for i8259 configuration and
- * with a parameter of 1 for Local Apic/IOAPIC configuration.
- */
-
-Method(_PIC, 1)
-{
- // Remember the OS' IRQ routing choice.
- Store(Arg0, PICM)
-}
-
/* The _PTS method (Prepare To Sleep) is called before the OS is
* entering a sleep state. The sleep state number is passed in Arg0
*/
diff --git a/src/mainboard/intel/d945gclf/dsdt.asl b/src/mainboard/intel/d945gclf/dsdt.asl
index dd1f3a1..d4cdc3d 100644
--- a/src/mainboard/intel/d945gclf/dsdt.asl
+++ b/src/mainboard/intel/d945gclf/dsdt.asl
@@ -31,6 +31,7 @@ DefinitionBlock(
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
+ #include <southbridge/intel/i82801gx/acpi/platform.asl>
// General Purpose Events
//#include "acpi/gpe.asl"
@@ -41,6 +42,8 @@ DefinitionBlock(
// Thermal Zone
//#include "acpi/thermal.asl"
+ #include <cpu/intel/model_6dx/acpi/cpu.asl>
+
Scope (\_SB) {
Device (PCI0)
{
diff --git a/src/mainboard/kontron/986lcd-m/acpi/platform.asl b/src/mainboard/kontron/986lcd-m/acpi/platform.asl
index 6770348..9a7e62c 100644
--- a/src/mainboard/kontron/986lcd-m/acpi/platform.asl
+++ b/src/mainboard/kontron/986lcd-m/acpi/platform.asl
@@ -17,44 +17,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-/* The APM port can be used for generating software SMIs */
-
-OperationRegion (APMP, SystemIO, 0xb2, 2)
-Field (APMP, ByteAcc, NoLock, Preserve)
-{
- APMC, 8, // APM command
- APMS, 8 // APM status
-}
-
-/* Port 80 POST */
-
-OperationRegion (POST, SystemIO, 0x80, 1)
-Field (POST, ByteAcc, Lock, Preserve)
-{
- DBG0, 8
-}
-
-/* SMI I/O Trap */
-Method(TRAP, 1, Serialized)
-{
- Store (Arg0, SMIF) // SMI Function
- Store (0, TRP0) // Generate trap
- Return (SMIF) // Return value of SMI handler
-}
-
-/* The _PIC method is called by the OS to choose between interrupt
- * routing via the i8259 interrupt controller or the APIC.
- *
- * _PIC is called with a parameter of 0 for i8259 configuration and
- * with a parameter of 1 for Local Apic/IOAPIC configuration.
- */
-
-Method(_PIC, 1)
-{
- // Remember the OS' IRQ routing choice.
- Store(Arg0, PICM)
-}
-
/* The _PTS method (Prepare To Sleep) is called before the OS is
* entering a sleep state. The sleep state number is passed in Arg0
*/
diff --git a/src/mainboard/kontron/986lcd-m/dsdt.asl b/src/mainboard/kontron/986lcd-m/dsdt.asl
index 4e455cc..b83d28e 100644
--- a/src/mainboard/kontron/986lcd-m/dsdt.asl
+++ b/src/mainboard/kontron/986lcd-m/dsdt.asl
@@ -31,12 +31,15 @@ DefinitionBlock(
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
+ #include <southbridge/intel/i82801gx/acpi/platform.asl>
// General Purpose Events
//#include "acpi/gpe.asl"
//#include "acpi/thermal.asl"
+ #include <cpu/intel/model_6dx/acpi/cpu.asl>
+
Scope (\_SB) {
Device (PCI0)
{
diff --git a/src/mainboard/lenovo/t60/acpi/platform.asl b/src/mainboard/lenovo/t60/acpi/platform.asl
index ddb8ff3..59df530 100644
--- a/src/mainboard/lenovo/t60/acpi/platform.asl
+++ b/src/mainboard/lenovo/t60/acpi/platform.asl
@@ -19,48 +19,6 @@
* MA 02110-1301 USA
*/
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
-/* The APM port can be used for generating software SMIs */
-
-OperationRegion (APMP, SystemIO, 0xb2, 2)
-Field (APMP, ByteAcc, NoLock, Preserve)
-{
- APMC, 8, // APM command
- APMS, 8 // APM status
-}
-
-/* Port 80 POST */
-
-OperationRegion (POST, SystemIO, 0x80, 1)
-Field (POST, ByteAcc, Lock, Preserve)
-{
- DBG0, 8
-}
-
-/* SMI I/O Trap */
-Method(TRAP, 1, Serialized)
-{
- Store (Arg0, SMIF) // SMI Function
- Store (0, TRP0) // Generate trap
- Return (SMIF) // Return value of SMI handler
-}
-
-/* The _PIC method is called by the OS to choose between interrupt
- * routing via the i8259 interrupt controller or the APIC.
- *
- * _PIC is called with a parameter of 0 for i8259 configuration and
- * with a parameter of 1 for Local Apic/IOAPIC configuration.
- */
-
-Method(_PIC, 1)
-{
- // Remember the OS' IRQ routing choice.
- Store(Arg0, PICM)
-}
-
/* The _PTS method (Prepare To Sleep) is called before the OS is
* entering a sleep state. The sleep state number is passed in Arg0
*/
@@ -95,42 +53,6 @@ Method(_WAK,1)
Return(Package(){0,0})
}
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-
-Method (PNOT)
-{
- If (MPEN) {
- If(And(PDC0, 0x08)) {
- Notify (\_PR_.CPU0, 0x80) // _PPC
-
- If (And(PDC0, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU0, 0x81) // _CST
- }
- }
-
- If(And(PDC1, 0x08)) {
- Notify (\_PR_.CPU1, 0x80) // _PPC
- If (And(PDC1, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU1, 0x81) // _CST
- }
- }
-
- } Else { // UP
- Notify (\_PR_.CPU0, 0x80)
- Sleep(0x64)
- Notify(\_PR_.CPU0, 0x81)
- }
-
- // Notify the Batteries
- Notify(\_SB.PCI0.LPCB.EC.BAT0, 0x80) // Execute BAT1 _BST
- Notify(\_SB.PCI0.LPCB.EC.BAT1, 0x80) // Execute BAT2 _BST
-}
-
/* System Bus */
Scope(\_SB)
@@ -147,49 +69,7 @@ Scope(\_SB)
// TRAP(71) // TODO
- /* Determine the Operating System and save the value in OSYS.
- * We have to do this in order to be able to work around
- * certain windows bugs.
- *
- * OSYS value | Operating System
- * -----------+------------------
- * 2000 | Windows 2000
- * 2001 | Windows XP(+SP1)
- * 2002 | Windows XP SP2
- * 2006 | Windows Vista
- * ???? | Windows 7
- */
-
- /* Let's assume we're running at least Windows 2000 */
- Store (2000, OSYS)
-
- If (CondRefOf(_OSI, Local0)) {
- /* Linux answers _OSI with "True" for a couple of
- * Windows version queries. But unlike Windows it
- * needs a Video repost, so let's determine whether
- * we're running Linux.
- */
-
- If (_OSI("Linux")) {
- Store (1, LINX)
- }
-
- If (_OSI("Windows 2001")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP1")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP2")) {
- Store (2002, OSYS)
- }
-
- If (_OSI("Windows 2006")) {
- Store (2006, OSYS)
- }
- }
+ \GOS()
/* And the OS workarounds start right after we know what we're
* running: Windows XP SP1 needs to have C-State coordination
diff --git a/src/mainboard/lenovo/t60/dsdt.asl b/src/mainboard/lenovo/t60/dsdt.asl
index 4122917..7807687 100644
--- a/src/mainboard/lenovo/t60/dsdt.asl
+++ b/src/mainboard/lenovo/t60/dsdt.asl
@@ -38,6 +38,7 @@ DefinitionBlock(
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
+ #include <southbridge/intel/i82801gx/acpi/platform.asl>
// General Purpose Events
#include "acpi/gpe.asl"
@@ -45,6 +46,8 @@ DefinitionBlock(
// mainboard specific devices
#include "acpi/mainboard.asl"
+ #include <cpu/intel/model_6dx/acpi/cpu.asl>
+
Scope (\_SB) {
Device (PCI0)
{
diff --git a/src/mainboard/lenovo/x60/acpi/platform.asl b/src/mainboard/lenovo/x60/acpi/platform.asl
index ddb8ff3..59df530 100644
--- a/src/mainboard/lenovo/x60/acpi/platform.asl
+++ b/src/mainboard/lenovo/x60/acpi/platform.asl
@@ -19,48 +19,6 @@
* MA 02110-1301 USA
*/
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
-/* The APM port can be used for generating software SMIs */
-
-OperationRegion (APMP, SystemIO, 0xb2, 2)
-Field (APMP, ByteAcc, NoLock, Preserve)
-{
- APMC, 8, // APM command
- APMS, 8 // APM status
-}
-
-/* Port 80 POST */
-
-OperationRegion (POST, SystemIO, 0x80, 1)
-Field (POST, ByteAcc, Lock, Preserve)
-{
- DBG0, 8
-}
-
-/* SMI I/O Trap */
-Method(TRAP, 1, Serialized)
-{
- Store (Arg0, SMIF) // SMI Function
- Store (0, TRP0) // Generate trap
- Return (SMIF) // Return value of SMI handler
-}
-
-/* The _PIC method is called by the OS to choose between interrupt
- * routing via the i8259 interrupt controller or the APIC.
- *
- * _PIC is called with a parameter of 0 for i8259 configuration and
- * with a parameter of 1 for Local Apic/IOAPIC configuration.
- */
-
-Method(_PIC, 1)
-{
- // Remember the OS' IRQ routing choice.
- Store(Arg0, PICM)
-}
-
/* The _PTS method (Prepare To Sleep) is called before the OS is
* entering a sleep state. The sleep state number is passed in Arg0
*/
@@ -95,42 +53,6 @@ Method(_WAK,1)
Return(Package(){0,0})
}
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-
-Method (PNOT)
-{
- If (MPEN) {
- If(And(PDC0, 0x08)) {
- Notify (\_PR_.CPU0, 0x80) // _PPC
-
- If (And(PDC0, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU0, 0x81) // _CST
- }
- }
-
- If(And(PDC1, 0x08)) {
- Notify (\_PR_.CPU1, 0x80) // _PPC
- If (And(PDC1, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU1, 0x81) // _CST
- }
- }
-
- } Else { // UP
- Notify (\_PR_.CPU0, 0x80)
- Sleep(0x64)
- Notify(\_PR_.CPU0, 0x81)
- }
-
- // Notify the Batteries
- Notify(\_SB.PCI0.LPCB.EC.BAT0, 0x80) // Execute BAT1 _BST
- Notify(\_SB.PCI0.LPCB.EC.BAT1, 0x80) // Execute BAT2 _BST
-}
-
/* System Bus */
Scope(\_SB)
@@ -147,49 +69,7 @@ Scope(\_SB)
// TRAP(71) // TODO
- /* Determine the Operating System and save the value in OSYS.
- * We have to do this in order to be able to work around
- * certain windows bugs.
- *
- * OSYS value | Operating System
- * -----------+------------------
- * 2000 | Windows 2000
- * 2001 | Windows XP(+SP1)
- * 2002 | Windows XP SP2
- * 2006 | Windows Vista
- * ???? | Windows 7
- */
-
- /* Let's assume we're running at least Windows 2000 */
- Store (2000, OSYS)
-
- If (CondRefOf(_OSI, Local0)) {
- /* Linux answers _OSI with "True" for a couple of
- * Windows version queries. But unlike Windows it
- * needs a Video repost, so let's determine whether
- * we're running Linux.
- */
-
- If (_OSI("Linux")) {
- Store (1, LINX)
- }
-
- If (_OSI("Windows 2001")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP1")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP2")) {
- Store (2002, OSYS)
- }
-
- If (_OSI("Windows 2006")) {
- Store (2006, OSYS)
- }
- }
+ \GOS()
/* And the OS workarounds start right after we know what we're
* running: Windows XP SP1 needs to have C-State coordination
diff --git a/src/mainboard/lenovo/x60/dsdt.asl b/src/mainboard/lenovo/x60/dsdt.asl
index 4122917..7807687 100644
--- a/src/mainboard/lenovo/x60/dsdt.asl
+++ b/src/mainboard/lenovo/x60/dsdt.asl
@@ -38,6 +38,7 @@ DefinitionBlock(
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
+ #include <southbridge/intel/i82801gx/acpi/platform.asl>
// General Purpose Events
#include "acpi/gpe.asl"
@@ -45,6 +46,8 @@ DefinitionBlock(
// mainboard specific devices
#include "acpi/mainboard.asl"
+ #include <cpu/intel/model_6dx/acpi/cpu.asl>
+
Scope (\_SB) {
Device (PCI0)
{
diff --git a/src/mainboard/roda/rk886ex/acpi/ec.asl b/src/mainboard/roda/rk886ex/acpi/ec.asl
index fc0ae54..d174e98 100644
--- a/src/mainboard/roda/rk886ex/acpi/ec.asl
+++ b/src/mainboard/roda/rk886ex/acpi/ec.asl
@@ -107,6 +107,9 @@ Device(EC0)
Store("_Q30: AC In/Out", Debug)
Notify(ADP1, 0x80) // Tell the Power Adapter
PNOT() // and the CPU and Battery
+ // Notify the Batteries
+ Notify(BAT1, 0x80) // Execute BAT1 _BST
+ Notify(BAT2, 0x80) // Execute BAT2 _BST
}
Method (_Q31, 0)
diff --git a/src/mainboard/roda/rk886ex/acpi/platform.asl b/src/mainboard/roda/rk886ex/acpi/platform.asl
index 0e30c4e..dbafb04 100644
--- a/src/mainboard/roda/rk886ex/acpi/platform.asl
+++ b/src/mainboard/roda/rk886ex/acpi/platform.asl
@@ -19,48 +19,6 @@
* MA 02110-1301 USA
*/
-/* These come from the dynamically created CPU SSDT */
-External(PDC0)
-External(PDC1)
-
-/* The APM port can be used for generating software SMIs */
-
-OperationRegion (APMP, SystemIO, 0xb2, 2)
-Field (APMP, ByteAcc, NoLock, Preserve)
-{
- APMC, 8, // APM command
- APMS, 8 // APM status
-}
-
-/* Port 80 POST */
-
-OperationRegion (POST, SystemIO, 0x80, 1)
-Field (POST, ByteAcc, Lock, Preserve)
-{
- DBG0, 8
-}
-
-/* SMI I/O Trap */
-Method(TRAP, 1, Serialized)
-{
- Store (Arg0, SMIF) // SMI Function
- Store (0, TRP0) // Generate trap
- Return (SMIF) // Return value of SMI handler
-}
-
-/* The _PIC method is called by the OS to choose between interrupt
- * routing via the i8259 interrupt controller or the APIC.
- *
- * _PIC is called with a parameter of 0 for i8259 configuration and
- * with a parameter of 1 for Local Apic/IOAPIC configuration.
- */
-
-Method(_PIC, 1)
-{
- // Remember the OS' IRQ routing choice.
- Store(Arg0, PICM)
-}
-
/* The _PTS method (Prepare To Sleep) is called before the OS is
* entering a sleep state. The sleep state number is passed in Arg0
*/
@@ -95,42 +53,6 @@ Method(_WAK,1)
Return(Package(){0,0})
}
-// Power notification
-
-External (\_PR_.CPU0, DeviceObj)
-External (\_PR_.CPU1, DeviceObj)
-
-Method (PNOT)
-{
- If (MPEN) {
- If(And(PDC0, 0x08)) {
- Notify (\_PR_.CPU0, 0x80) // _PPC
-
- If (And(PDC0, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU0, 0x81) // _CST
- }
- }
-
- If(And(PDC1, 0x08)) {
- Notify (\_PR_.CPU1, 0x80) // _PPC
- If (And(PDC1, 0x10)) {
- Sleep(100)
- Notify(\_PR_.CPU1, 0x81) // _CST
- }
- }
-
- } Else { // UP
- Notify (\_PR_.CPU0, 0x80)
- Sleep(0x64)
- Notify(\_PR_.CPU0, 0x81)
- }
-
- // Notify the Batteries
- Notify(BAT1, 0x80) // Execute BAT1 _BST
- Notify(BAT2, 0x80) // Execute BAT2 _BST
-}
-
/* System Bus */
Scope(\_SB)
@@ -147,49 +69,7 @@ Scope(\_SB)
// TRAP(71) // TODO
- /* Determine the Operating System and save the value in OSYS.
- * We have to do this in order to be able to work around
- * certain windows bugs.
- *
- * OSYS value | Operating System
- * -----------+------------------
- * 2000 | Windows 2000
- * 2001 | Windows XP(+SP1)
- * 2002 | Windows XP SP2
- * 2006 | Windows Vista
- * ???? | Windows 7
- */
-
- /* Let's assume we're running at least Windows 2000 */
- Store (2000, OSYS)
-
- If (CondRefOf(_OSI, Local0)) {
- /* Linux answers _OSI with "True" for a couple of
- * Windows version queries. But unlike Windows it
- * needs a Video repost, so let's determine whether
- * we're running Linux.
- */
-
- If (_OSI("Linux")) {
- Store (1, LINX)
- }
-
- If (_OSI("Windows 2001")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP1")) {
- Store (2001, OSYS)
- }
-
- If (_OSI("Windows 2001 SP2")) {
- Store (2002, OSYS)
- }
-
- If (_OSI("Windows 2006")) {
- Store (2006, OSYS)
- }
- }
+ \GOS()
/* And the OS workarounds start right after we know what we're
* running: Windows XP SP1 needs to have C-State coordination
diff --git a/src/mainboard/roda/rk886ex/dsdt.asl b/src/mainboard/roda/rk886ex/dsdt.asl
index 43d1609..b23b568 100644
--- a/src/mainboard/roda/rk886ex/dsdt.asl
+++ b/src/mainboard/roda/rk886ex/dsdt.asl
@@ -33,6 +33,7 @@ DefinitionBlock(
// global NVS and variables
#include <southbridge/intel/i82801gx/acpi/globalnvs.asl>
+ #include <southbridge/intel/i82801gx/acpi/platform.asl>
// General Purpose Events
#include "acpi/gpe.asl"
@@ -43,6 +44,8 @@ DefinitionBlock(
// Thermal Zone
#include "acpi/thermal.asl"
+ #include <cpu/intel/model_6dx/acpi/cpu.asl>
+
Scope (\_SB) {
Device (PCI0)
{
diff --git a/src/southbridge/intel/i82801gx/acpi/platform.asl b/src/southbridge/intel/i82801gx/acpi/platform.asl
new file mode 100644
index 0000000..2b8a59e
--- /dev/null
+++ b/src/southbridge/intel/i82801gx/acpi/platform.asl
@@ -0,0 +1,105 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2007-2009 coresystems GmbH
+ *
+ * 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
+ */
+
+/* The APM port can be used for generating software SMIs */
+
+OperationRegion (APMP, SystemIO, 0xb2, 2)
+Field (APMP, ByteAcc, NoLock, Preserve)
+{
+ APMC, 8, // APM command
+ APMS, 8 // APM status
+}
+
+/* Port 80 POST */
+
+OperationRegion (POST, SystemIO, 0x80, 1)
+Field (POST, ByteAcc, Lock, Preserve)
+{
+ DBG0, 8
+}
+
+/* SMI I/O Trap */
+Method(TRAP, 1, Serialized)
+{
+ Store (Arg0, SMIF) // SMI Function
+ Store (0, TRP0) // Generate trap
+ Return (SMIF) // Return value of SMI handler
+}
+
+/* The _PIC method is called by the OS to choose between interrupt
+ * routing via the i8259 interrupt controller or the APIC.
+ *
+ * _PIC is called with a parameter of 0 for i8259 configuration and
+ * with a parameter of 1 for Local Apic/IOAPIC configuration.
+ */
+
+Method(_PIC, 1)
+{
+ // Remember the OS' IRQ routing choice.
+ Store(Arg0, PICM)
+}
+
+Method(GOS, 0)
+{
+ /* Determine the Operating System and save the value in OSYS.
+ * We have to do this in order to be able to work around
+ * certain windows bugs.
+ *
+ * OSYS value | Operating System
+ * -----------+------------------
+ * 2000 | Windows 2000
+ * 2001 | Windows XP(+SP1)
+ * 2002 | Windows XP SP2
+ * 2006 | Windows Vista
+ * ???? | Windows 7
+ */
+
+ /* Let's assume we're running at least Windows 2000 */
+ Store (2000, OSYS)
+
+ If (CondRefOf(_OSI, Local0)) {
+ /* Linux answers _OSI with "True" for a couple of
+ * Windows version queries. But unlike Windows it
+ * needs a Video repost, so let's determine whether
+ * we're running Linux.
+ */
+
+ If (_OSI("Linux")) {
+ Store (1, LINX)
+ }
+
+ If (_OSI("Windows 2001")) {
+ Store (2001, OSYS)
+ }
+
+ If (_OSI("Windows 2001 SP1")) {
+ Store (2001, OSYS)
+ }
+
+ If (_OSI("Windows 2001 SP2")) {
+ Store (2002, OSYS)
+ }
+
+ If (_OSI("Windows 2006")) {
+ Store (2006, OSYS)
+ }
+ }
+}