diff options
author | Stefan Reinauer <stepan@coresystems.de> | 2009-03-06 19:52:36 +0000 |
---|---|---|
committer | Stefan Reinauer <stepan@openbios.org> | 2009-03-06 19:52:36 +0000 |
commit | 3b387458b57f369056b0a45bf4f17e5e074c13ce (patch) | |
tree | 092d45baf4adf7d1be4a86cc7d34429c83495f15 /src/mainboard/kontron/986lcd-m/mainboard_smi.c | |
parent | 43b29cf891c78a2cd01d22a2731c7da828d79e0a (diff) |
* 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/986lcd-m/mainboard_smi.c')
-rw-r--r-- | src/mainboard/kontron/986lcd-m/mainboard_smi.c | 50 |
1 files changed, 50 insertions, 0 deletions
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; +} + + |