From 4679c41db292b80ce51c7d923e2f22258145522b Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Sat, 16 May 2015 16:32:45 +0200 Subject: Move smi trap sample to documentation, don't keep it in every mobo. Sample code belongs to documentation, not copied 100x over prodcution code. Change-Id: I6bb318d76057d02bd6ac5641d12d56ab6d60b745 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/10229 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/mainboard/google/bolt/smihandler.c | 21 --------------------- src/mainboard/google/butterfly/mainboard_smi.c | 22 ---------------------- src/mainboard/google/falco/smihandler.c | 21 --------------------- src/mainboard/google/link/mainboard_smi.c | 21 --------------------- src/mainboard/google/panther/smihandler.c | 21 --------------------- src/mainboard/google/parrot/smihandler.c | 23 ----------------------- src/mainboard/google/peppy/smihandler.c | 21 --------------------- src/mainboard/google/rambi/mainboard_smi.c | 21 --------------------- src/mainboard/google/samus/smihandler.c | 21 --------------------- src/mainboard/google/slippy/smihandler.c | 21 --------------------- src/mainboard/google/stout/mainboard_smi.c | 21 --------------------- 11 files changed, 234 deletions(-) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/bolt/smihandler.c b/src/mainboard/google/bolt/smihandler.c index 7bc978e1e5..2f3877c1bd 100644 --- a/src/mainboard/google/bolt/smihandler.c +++ b/src/mainboard/google/bolt/smihandler.c @@ -33,27 +33,6 @@ #include #include "ec.h" -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - static u8 mainboard_smi_ec(void) { u8 cmd = google_chromeec_get_event(); diff --git a/src/mainboard/google/butterfly/mainboard_smi.c b/src/mainboard/google/butterfly/mainboard_smi.c index 1876f319ea..3171e9fe1e 100644 --- a/src/mainboard/google/butterfly/mainboard_smi.c +++ b/src/mainboard/google/butterfly/mainboard_smi.c @@ -30,28 +30,6 @@ #include #include "ec.h" -int mainboard_io_trap_handler(int smif) -{ - printk(BIOS_DEBUG, "mainboard_io_trap_handler: %x\n", smif); - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - void mainboard_smi_gpi(u32 gpi_sts) { printk(BIOS_DEBUG, "warn: unknown mainboard_smi_gpi: %x\n", gpi_sts); diff --git a/src/mainboard/google/falco/smihandler.c b/src/mainboard/google/falco/smihandler.c index e86787b227..64078ff7b0 100644 --- a/src/mainboard/google/falco/smihandler.c +++ b/src/mainboard/google/falco/smihandler.c @@ -36,27 +36,6 @@ #define GPIO_WLAN_DISABLE_L 46 #define GPIO_LTE_DISABLE_L 59 -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - static u8 mainboard_smi_ec(void) { u8 cmd = google_chromeec_get_event(); diff --git a/src/mainboard/google/link/mainboard_smi.c b/src/mainboard/google/link/mainboard_smi.c index d60d319a4c..fb35377d10 100644 --- a/src/mainboard/google/link/mainboard_smi.c +++ b/src/mainboard/google/link/mainboard_smi.c @@ -31,27 +31,6 @@ #include #include "ec.h" -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - static u8 mainboard_smi_ec(void) { u8 cmd = google_chromeec_get_event(); diff --git a/src/mainboard/google/panther/smihandler.c b/src/mainboard/google/panther/smihandler.c index a551b49f7d..410c300fec 100644 --- a/src/mainboard/google/panther/smihandler.c +++ b/src/mainboard/google/panther/smihandler.c @@ -32,27 +32,6 @@ #define GPIO_WLAN_DISABLE_L 46 #define GPIO_LTE_DISABLE_L 59 -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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. - */ - return 1; -} - - static int mainboard_finalized = 0; int mainboard_smi_apmc(u8 apmc) diff --git a/src/mainboard/google/parrot/smihandler.c b/src/mainboard/google/parrot/smihandler.c index 99fabfccbf..7426bc04c1 100644 --- a/src/mainboard/google/parrot/smihandler.c +++ b/src/mainboard/google/parrot/smihandler.c @@ -29,29 +29,6 @@ #include #include "ec.h" -int mainboard_io_trap_handler(int smif) -{ - printk(BIOS_DEBUG, "mainboard_io_trap_handler: %x\n", smif); - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - - static u8 mainboard_smi_ec(void) { u8 src; diff --git a/src/mainboard/google/peppy/smihandler.c b/src/mainboard/google/peppy/smihandler.c index 6bbfe5fe9d..810f15c951 100644 --- a/src/mainboard/google/peppy/smihandler.c +++ b/src/mainboard/google/peppy/smihandler.c @@ -37,27 +37,6 @@ /* WLAN / BT enable: GPIO46 */ #define GPIO_WLAN_DISABLE_L 46 -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - static u8 mainboard_smi_ec(void) { u8 cmd = google_chromeec_get_event(); diff --git a/src/mainboard/google/rambi/mainboard_smi.c b/src/mainboard/google/rambi/mainboard_smi.c index 7afdd2f1a5..cfefd76ae5 100644 --- a/src/mainboard/google/rambi/mainboard_smi.c +++ b/src/mainboard/google/rambi/mainboard_smi.c @@ -31,27 +31,6 @@ /* The wake gpio is SUS_GPIO[0]. */ #define WAKE_GPIO_EN SUS_GPIO_EN0 -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - static uint8_t mainboard_smi_ec(void) { uint8_t cmd = google_chromeec_get_event(); diff --git a/src/mainboard/google/samus/smihandler.c b/src/mainboard/google/samus/smihandler.c index faccbc130b..9a932df913 100644 --- a/src/mainboard/google/samus/smihandler.c +++ b/src/mainboard/google/samus/smihandler.c @@ -33,27 +33,6 @@ #include "ec.h" #include "gpio.h" -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - static u8 mainboard_smi_ec(void) { u8 cmd = google_chromeec_get_event(); diff --git a/src/mainboard/google/slippy/smihandler.c b/src/mainboard/google/slippy/smihandler.c index 7643fb1897..a09840bda3 100644 --- a/src/mainboard/google/slippy/smihandler.c +++ b/src/mainboard/google/slippy/smihandler.c @@ -32,27 +32,6 @@ #include #include "ec.h" -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - static u8 mainboard_smi_ec(void) { u8 cmd = google_chromeec_get_event(); diff --git a/src/mainboard/google/stout/mainboard_smi.c b/src/mainboard/google/stout/mainboard_smi.c index c44e9311e8..ee18ca7646 100644 --- a/src/mainboard/google/stout/mainboard_smi.c +++ b/src/mainboard/google/stout/mainboard_smi.c @@ -30,27 +30,6 @@ #include #include "ec.h" -int mainboard_io_trap_handler(int smif) -{ - switch (smif) { - case 0x99: - printk(BIOS_DEBUG, "Sample\n"); - smm_get_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; -} - static u8 mainboard_smi_ec(void) { u8 cmd = ec_it8518_get_event(); -- cgit v1.2.3