summaryrefslogtreecommitdiff
path: root/src/mainboard/kontron
diff options
context:
space:
mode:
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;
+}
+
+