summaryrefslogtreecommitdiff
path: root/src/mainboard/kontron
diff options
context:
space:
mode:
authorStefan Reinauer <stepan@coresystems.de>2009-03-06 19:52:36 +0000
committerStefan Reinauer <stepan@openbios.org>2009-03-06 19:52:36 +0000
commit3b387458b57f369056b0a45bf4f17e5e074c13ce (patch)
tree092d45baf4adf7d1be4a86cc7d34429c83495f15 /src/mainboard/kontron
parent43b29cf891c78a2cd01d22a2731c7da828d79e0a (diff)
downloadcoreboot-3b387458b57f369056b0a45bf4f17e5e074c13ce.tar.xz
* fix a minor power state issue in the ich7 smm handler
* move mainboard dependent code into a mainboard SMI handler. Signed-off-by: Stefan Reinauer <stepan@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3982 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/mainboard/kontron')
-rw-r--r--src/mainboard/kontron/986lcd-m/Config.lb1
-rw-r--r--src/mainboard/kontron/986lcd-m/mainboard_smi.c50
2 files changed, 51 insertions, 0 deletions
diff --git a/src/mainboard/kontron/986lcd-m/Config.lb b/src/mainboard/kontron/986lcd-m/Config.lb
index 833478bb79..3e378273c2 100644
--- a/src/mainboard/kontron/986lcd-m/Config.lb
+++ b/src/mainboard/kontron/986lcd-m/Config.lb
@@ -76,6 +76,7 @@ driver mainboard.o
driver rtl8168.o
if HAVE_MP_TABLE object mptable.o end
if HAVE_PIRQ_TABLE object irq_tables.o end
+if HAVE_SMI_HANDLER smmobject mainboard_smi.o end
if HAVE_ACPI_TABLES
object fadt.o
diff --git a/src/mainboard/kontron/986lcd-m/mainboard_smi.c b/src/mainboard/kontron/986lcd-m/mainboard_smi.c
new file mode 100644
index 0000000000..8896d9fd47
--- /dev/null
+++ b/src/mainboard/kontron/986lcd-m/mainboard_smi.c
@@ -0,0 +1,50 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2008-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/io.h>
+#include <arch/romcc_io.h>
+#include <console/console.h>
+#include "../../../southbridge/intel/i82801gx/i82801gx_nvs.h"
+
+int mainboard_io_trap_handler(int smif)
+{
+ global_nvs_t *gnvs = (global_nvs_t *)0xc00;
+
+ switch (smif) {
+ case 0x99:
+ printk_debug("Sample\n");
+ gnvs->smif = 0;
+ break;
+ default:
+ return 0;
+ }
+
+ /* On success, the IO Trap Handler returns 0
+ * On failure, the IO Trap Handler returns a value != 0
+ *
+ * For now, we force the return value to 0 and log all traps to
+ * see what's going on.
+ */
+ //gnvs->smif = 0;
+ return 1;
+}
+
+