summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-11 07:48:50 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-13 14:00:30 +0000
commit670856620def0de51a5b62b2dcdd7ba08c2a8335 (patch)
treea6fe6f654e159eb49dfc8e5dd4da197785cc328d /src
parent1ef039bb4965213c87b844ca30482853fb86b418 (diff)
downloadcoreboot-670856620def0de51a5b62b2dcdd7ba08c2a8335.tar.xz
cpu/x86: Hide smm_save_state_area_t typedef
We mostly discourage typedefs for structs. Hide smm_save_state_area_t in the single file that still uses it. Change-Id: I163322deab58126cc66d416987eaf7dca9ce8220 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34823 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src')
-rw-r--r--src/cpu/x86/smm/smihandler.c22
-rw-r--r--src/include/cpu/x86/smi_deprecated.h23
2 files changed, 22 insertions, 23 deletions
diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c
index 7e8a9ca9de..063e9a5ffb 100644
--- a/src/cpu/x86/smm/smihandler.c
+++ b/src/cpu/x86/smm/smihandler.c
@@ -19,11 +19,33 @@
#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/em64t_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,
+ EM64T,
+ EM64T101,
+ LEGACY
+} save_state_type_t;
+
+typedef struct {
+ save_state_type_t type;
+ union {
+ amd64_smm_state_save_area_t *amd64_state_save;
+ em64t_smm_state_save_area_t *em64t_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;
diff --git a/src/include/cpu/x86/smi_deprecated.h b/src/include/cpu/x86/smi_deprecated.h
index fe73d386c9..2812bb0eab 100644
--- a/src/include/cpu/x86/smi_deprecated.h
+++ b/src/include/cpu/x86/smi_deprecated.h
@@ -14,29 +14,6 @@
#ifndef __X86_SMI_DEPRECATED_H__
#define __X86_SMI_DEPRECATED_H__
-#include <cpu/amd/amd64_save_state.h>
-#include <cpu/intel/em64t_save_state.h>
-#include <cpu/intel/em64t100_save_state.h>
-#include <cpu/intel/em64t101_save_state.h>
-#include <cpu/x86/legacy_save_state.h>
-
-typedef enum {
- AMD64,
- EM64T,
- EM64T101,
- LEGACY
-} save_state_type_t;
-
-typedef struct {
- save_state_type_t type;
- union {
- amd64_smm_state_save_area_t *amd64_state_save;
- em64t_smm_state_save_area_t *em64t_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;
-
#if CONFIG(PARALLEL_MP) || !CONFIG(HAVE_SMI_HANDLER)
/* Empty stubs for platforms without SMI handlers. */
static inline void smm_init(void) { }