Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37009 )
Change subject: cpu/x86/smm/smihandler.c: Clean up unused save state handler ......................................................................
cpu/x86/smm/smihandler.c: Clean up unused save state handler
This was only used to print out the save state which is now done by the common save state handler.
Change-Id: I98b17ab370ff58e0444cda1f8bfc05ea38ec6b71 Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/cpu/x86/smm/smihandler.c 1 file changed, 0 insertions(+), 65 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/09/37009/1
diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c index 0adf591..da1cd7b 100644 --- a/src/cpu/x86/smm/smihandler.c +++ b/src/cpu/x86/smm/smihandler.c @@ -17,32 +17,11 @@ #include <cpu/x86/cache.h> #include <cpu/x86/smm.h> #include <cpu/x86/smi_deprecated.h> -#include <cpu/amd/amd64_save_state.h> -#include <cpu/intel/em64t100_save_state.h> -#include <cpu/intel/em64t101_save_state.h> -#include <cpu/x86/legacy_save_state.h>
#if CONFIG(SPI_FLASH_SMM) #include <spi-generic.h> #endif
-typedef enum { - AMD64, - EM64T100, - EM64T101, - LEGACY -} save_state_type_t; - -typedef struct { - save_state_type_t type; - union { - amd64_smm_state_save_area_t *amd64_state_save; - em64t100_smm_state_save_area_t *em64t100_state_save; - em64t101_smm_state_save_area_t *em64t101_state_save; - legacy_smm_state_save_area_t *legacy_state_save; - }; -} smm_state_save_area_t; - static int do_driver_init = 1;
typedef enum { SMI_LOCKED, SMI_UNLOCKED } smi_semaphore; @@ -126,12 +105,6 @@ outl(pci_orig, 0xcf8); }
-static inline void *smm_save_state(uintptr_t base, int arch_offset, int node) -{ - base += SMM_SAVE_STATE_BEGIN(arch_offset) - (node * 0x400); - return (void *)base; -} - uint8_t *smm_get_save_state_top(int cpu) { const uint32_t smm_base = 0xa0000; @@ -148,8 +121,6 @@ void smi_handler(u32 smm_revision) { unsigned int node; - smm_state_save_area_t state_save; - u32 smm_base = 0xa0000; /* ASEG */
/* Are we ok to execute the handler? */ if (!smi_obtain_lock()) { @@ -177,42 +148,6 @@
smm_save_state_ops_init();
- switch (smm_revision) { - case 0x00030002: - case 0x00030007: - state_save.type = LEGACY; - state_save.legacy_state_save = - smm_save_state(smm_base, - SMM_LEGACY_ARCH_OFFSET, node); - break; - case 0x00030100: - state_save.type = EM64T100; - state_save.em64t100_state_save = - smm_save_state(smm_base, - SMM_EM64T100_ARCH_OFFSET, node); - break; - case 0x00030101: /* SandyBridge, IvyBridge, and Haswell */ - state_save.type = EM64T101; - state_save.em64t101_state_save = - smm_save_state(smm_base, - SMM_EM64T101_ARCH_OFFSET, node); - break; - case 0x00020064: - case 0x00030064: - state_save.type = AMD64; - state_save.amd64_state_save = - smm_save_state(smm_base, - SMM_AMD64_ARCH_OFFSET, node); - break; - default: - printk(BIOS_DEBUG, "smm_revision: 0x%08x\n", smm_revision); - printk(BIOS_DEBUG, "SMI# not supported on your CPU\n"); - /* Don't release lock, so no further SMI will happen, - * if we don't handle it anyways. - */ - return; - } - /* Allow drivers to initialize variables in SMM context. */ if (do_driver_init) { #if CONFIG(SPI_FLASH_SMM)