From 3b387458b57f369056b0a45bf4f17e5e074c13ce Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Fri, 6 Mar 2009 19:52:36 +0000 Subject: * 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 Acked-by: Peter Stuge git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3982 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/kontron/986lcd-m/Config.lb | 1 + src/mainboard/kontron/986lcd-m/mainboard_smi.c | 50 ++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/mainboard/kontron/986lcd-m/mainboard_smi.c (limited to 'src/mainboard/kontron') 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 +#include +#include +#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; +} + + -- cgit v1.2.3