cpu/x86: Change old-style SMI handler prototypes

Change-Id: Ic1e3cae5298997b552020b78e6ff56d60cf22036
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34821
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2019-08-10 15:32:03 +03:00
parent c4fdb7b923
commit 1ef039bb49
7 changed files with 5 additions and 33 deletions

View File

@ -194,9 +194,7 @@ void smi_handler(u32 smm_revision)
} }
/* Call chipset specific SMI handlers. */ /* Call chipset specific SMI handlers. */
cpu_smi_handler(node, &state_save); southbridge_smi_handler();
northbridge_smi_handler(node, &state_save);
southbridge_smi_handler(node, &state_save);
smi_restore_pci_address(); smi_restore_pci_address();
@ -211,12 +209,7 @@ void smi_handler(u32 smm_revision)
* weak relocations w/o a symbol have a 0 address which is where the modules * weak relocations w/o a symbol have a 0 address which is where the modules
* are linked at. */ * are linked at. */
int __weak mainboard_io_trap_handler(int smif) { return 0; } int __weak mainboard_io_trap_handler(int smif) { return 0; }
void __weak cpu_smi_handler(unsigned int node, void __weak southbridge_smi_handler(void) {}
smm_state_save_area_t *state_save) {}
void __weak northbridge_smi_handler(unsigned int node,
smm_state_save_area_t *state_save) {}
void __weak southbridge_smi_handler(unsigned int node,
smm_state_save_area_t *state_save) {}
void __weak mainboard_smi_gpi(u32 gpi_sts) {} void __weak mainboard_smi_gpi(u32 gpi_sts) {}
int __weak mainboard_smi_apmc(u8 data) { return 0; } int __weak mainboard_smi_apmc(u8 data) { return 0; }
void __weak mainboard_smi_sleep(u8 slp_typ) {} void __weak mainboard_smi_sleep(u8 slp_typ) {}

View File

@ -37,12 +37,6 @@ typedef struct {
}; };
} smm_state_save_area_t; } smm_state_save_area_t;
#if !CONFIG(SMM_TSEG)
void cpu_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
void northbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
void southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save);
#endif
#if CONFIG(PARALLEL_MP) || !CONFIG(HAVE_SMI_HANDLER) #if CONFIG(PARALLEL_MP) || !CONFIG(HAVE_SMI_HANDLER)
/* Empty stubs for platforms without SMI handlers. */ /* Empty stubs for platforms without SMI handlers. */
static inline void smm_init(void) { } static inline void smm_init(void) { }

View File

@ -47,11 +47,9 @@ int mainboard_io_trap_handler(int smif);
void southbridge_smi_set_eos(void); void southbridge_smi_set_eos(void);
#if CONFIG(SMM_TSEG)
void cpu_smi_handler(void); void cpu_smi_handler(void);
void northbridge_smi_handler(void); void northbridge_smi_handler(void);
void southbridge_smi_handler(void); void southbridge_smi_handler(void);
#endif
void smm_setup_structures(void *gnvs, void *tcg, void *smi1); void smm_setup_structures(void *gnvs, void *tcg, void *smi1);

View File

@ -20,7 +20,6 @@
#include <arch/io.h> #include <arch/io.h>
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <cpu/x86/smi_deprecated.h>
#include "hudson.h" #include "hudson.h"
#include "smi.h" #include "smi.h"
@ -121,7 +120,7 @@ static void process_smi_0x90(void)
smi_write32(0x90, status); smi_write32(0x90, status);
} }
void southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save) void southbridge_smi_handler(void)
{ {
const uint16_t smi_src = smi_read16(0x94); const uint16_t smi_src = smi_read16(0x94);

View File

@ -20,7 +20,6 @@
#include <arch/io.h> #include <arch/io.h>
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <cpu/x86/smi_deprecated.h>
#include "hudson.h" #include "hudson.h"
#include "smi.h" #include "smi.h"
@ -121,7 +120,7 @@ static void process_smi_0x90(void)
smi_write32(0x90, status); smi_write32(0x90, status);
} }
void southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save) void southbridge_smi_handler(void)
{ {
const uint16_t smi_src = smi_read16(0x94); const uint16_t smi_src = smi_read16(0x94);

View File

@ -23,7 +23,6 @@
#include <device/pci_def.h> #include <device/pci_def.h>
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <cpu/intel/em64t101_save_state.h> #include <cpu/intel/em64t101_save_state.h>
#include <cpu/x86/smi_deprecated.h>
#include <elog.h> #include <elog.h>
#include <halt.h> #include <halt.h>
#include <pc80/mc146818rtc.h> #include <pc80/mc146818rtc.h>
@ -477,14 +476,8 @@ static smi_handler_t southbridge_smi[32] = {
/** /**
* @brief Interrupt handler for SMI# * @brief Interrupt handler for SMI#
* @param node
* @param state_save
*/ */
#if CONFIG(SMM_TSEG)
void southbridge_smi_handler(void) void southbridge_smi_handler(void)
#else
void cpu_smi_handler(unsigned int node, smm_state_save_area_t *state_save)
#endif
{ {
int i, dump = 0; int i, dump = 0;
u32 smi_sts; u32 smi_sts;

View File

@ -20,7 +20,6 @@
#include <console/console.h> #include <console/console.h>
#include <cpu/x86/cache.h> #include <cpu/x86/cache.h>
#include <cpu/x86/smm.h> #include <cpu/x86/smm.h>
#include <cpu/x86/smi_deprecated.h>
#include <device/pci_def.h> #include <device/pci_def.h>
#include "i82801dx.h" #include "i82801dx.h"
@ -604,10 +603,8 @@ smi_handler_t southbridge_smi[32] = {
/** /**
* @brief Interrupt handler for SMI# * @brief Interrupt handler for SMI#
* @param node
* @param state_save
*/ */
void southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_save) void southbridge_smi_handler(void)
{ {
int i, dump = 0; int i, dump = 0;
u32 smi_sts; u32 smi_sts;
@ -640,5 +637,4 @@ void southbridge_smi_handler(unsigned int node, smm_state_save_area_t *state_sav
if (dump) { if (dump) {
dump_smi_status(smi_sts); dump_smi_status(smi_sts);
} }
} }