diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2015-05-16 13:48:10 +0200 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2015-05-20 15:46:56 +0200 |
commit | 4141b47b070cbaf3cd83445259067cd38599cc94 (patch) | |
tree | 9b5bade1b67b483b4c54abb4a6d9ada572924d98 /src/southbridge | |
parent | eec8dfb5e7eec7d837005ce97eb09d18386fabdd (diff) |
bd82x6x: Merge common apmc finalize procedure.
Change-Id: I9c938b8a69479fae6b0eb99d1135f1caaf26d0e2
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/10227
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins)
Reviewed-by: Nicolas Reinecke <nr@das-labor.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/southbridge')
-rw-r--r-- | src/southbridge/intel/bd82x6x/smihandler.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/southbridge/intel/bd82x6x/smihandler.c b/src/southbridge/intel/bd82x6x/smihandler.c index 7ecbd81e92..fbe08728ea 100644 --- a/src/southbridge/intel/bd82x6x/smihandler.c +++ b/src/southbridge/intel/bd82x6x/smihandler.c @@ -38,6 +38,8 @@ */ #include <northbridge/intel/sandybridge/sandybridge.h> #include <arch/pci_mmio_cfg.h> +#include <southbridge/intel/bd82x6x/me.h> +#include <cpu/intel/model_206ax/model_206ax.h> /* While we read PMBASE dynamically in case it changed, let's * initialize it with a sane value @@ -584,6 +586,8 @@ static void southbridge_smi_gsmi(void) } #endif +static int mainboard_finalized = 0; + static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state_save) { u32 pmctrl; @@ -634,6 +638,19 @@ static void southbridge_smi_apmc(unsigned int node, smm_state_save_area_t *state printk(BIOS_DEBUG, "SMI#: Setting GNVS to %p\n", gnvs); } break; + case APM_CNT_FINALIZE: + if (mainboard_finalized) { + printk(BIOS_DEBUG, "SMI#: Already finalized\n"); + return; + } + + intel_me_finalize_smm(); + intel_pch_finalize_smm(); + intel_sandybridge_finalize_smm(); + intel_model_206ax_finalize_smm(); + + mainboard_finalized = 1; + break; #if CONFIG_ELOG_GSMI case ELOG_GSMI_APM_CNT: southbridge_smi_gsmi(); |