From f091f4daf7e76cff3cdf9b7a19bb77281fb6af9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Wed, 14 Aug 2019 03:49:21 +0300 Subject: [PATCH] intel/smm/gen1: Rename header file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I258fccc5e1db0bedb641c8af8cb9727954d4d7c1 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34869 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/cpu/intel/model_1067x/model_1067x_init.c | 2 +- src/cpu/intel/model_1067x/mp_init.c | 2 +- src/cpu/intel/model_2065x/model_2065x_init.c | 2 +- src/cpu/intel/model_206ax/model_206ax_init.c | 2 +- src/cpu/intel/smm/gen1/smmrelocate.c | 2 +- .../smi.h => include/cpu/intel/smm_reloc.h} | 24 ++++++++++++------- src/northbridge/intel/gm45/memmap.c | 2 +- src/northbridge/intel/gm45/northbridge.c | 2 +- src/northbridge/intel/i945/memmap.c | 2 +- src/northbridge/intel/i945/northbridge.c | 2 +- src/northbridge/intel/nehalem/memmap.c | 2 +- src/northbridge/intel/nehalem/northbridge.c | 2 +- src/northbridge/intel/nehalem/smi.c | 2 +- src/northbridge/intel/pineview/memmap.c | 2 +- src/northbridge/intel/pineview/northbridge.c | 2 +- src/northbridge/intel/sandybridge/memmap.c | 2 +- .../intel/sandybridge/northbridge.c | 2 +- src/northbridge/intel/x4x/memmap.c | 2 +- src/northbridge/intel/x4x/northbridge.c | 2 +- src/southbridge/intel/common/smi.c | 2 +- 20 files changed, 34 insertions(+), 28 deletions(-) rename src/{cpu/intel/smm/gen1/smi.h => include/cpu/intel/smm_reloc.h} (75%) diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c index e47712c020..ce2b9e552f 100644 --- a/src/cpu/intel/model_1067x/model_1067x_init.c +++ b/src/cpu/intel/model_1067x/model_1067x_init.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include "chip.h" diff --git a/src/cpu/intel/model_1067x/mp_init.c b/src/cpu/intel/model_1067x/mp_init.c index 73c9a4788e..312660b0c3 100644 --- a/src/cpu/intel/model_1067x/mp_init.c +++ b/src/cpu/intel/model_1067x/mp_init.c @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c index 2f10945c3b..b588095bf1 100644 --- a/src/cpu/intel/model_2065x/model_2065x_init.c +++ b/src/cpu/intel/model_2065x/model_2065x_init.c @@ -31,7 +31,7 @@ #include #include "model_2065x.h" #include "chip.h" -#include +#include #include /* diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c index d3aa52cf5d..4dbe4d91d2 100644 --- a/src/cpu/intel/model_206ax/model_206ax_init.c +++ b/src/cpu/intel/model_206ax/model_206ax_init.c @@ -32,7 +32,7 @@ #include #include "model_206ax.h" #include "chip.h" -#include +#include #include /* diff --git a/src/cpu/intel/smm/gen1/smmrelocate.c b/src/cpu/intel/smm/gen1/smmrelocate.c index f196706a36..8401611613 100644 --- a/src/cpu/intel/smm/gen1/smmrelocate.c +++ b/src/cpu/intel/smm/gen1/smmrelocate.c @@ -28,9 +28,9 @@ #include #include #include +#include #include #include -#include "smi.h" #define SMRR_SUPPORTED (1 << 11) diff --git a/src/cpu/intel/smm/gen1/smi.h b/src/include/cpu/intel/smm_reloc.h similarity index 75% rename from src/cpu/intel/smm/gen1/smi.h rename to src/include/cpu/intel/smm_reloc.h index 6623bcc7cf..80094e73fc 100644 --- a/src/cpu/intel/smm/gen1/smi.h +++ b/src/include/cpu/intel/smm_reloc.h @@ -11,7 +11,10 @@ * GNU General Public License for more details. */ -#include +#ifndef __INTEL_SMM_RELOC_H__ +#define __INTEL_SMM_RELOC_H__ + +#include /* These helpers are for performing SMM relocation. */ void southbridge_smm_init(void); @@ -19,14 +22,17 @@ u32 northbridge_get_tseg_base(void); u32 northbridge_get_tseg_size(void); void northbridge_write_smram(u8 smram); -bool cpu_has_alternative_smrr(void); +void smm_lock(void); +void smm_relocate(void); /* parallel MP helper functions */ -void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, - size_t *smm_save_state_size); -void smm_initialize(void); void southbridge_smm_clear_state(void); -void smm_relocation_handler(int cpu, uintptr_t curr_smbase, - uintptr_t staggered_smbase); -void smm_relocate(void); -void smm_lock(void); + +/* To be removed. */ +void smm_initialize(void); +void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize, size_t *smm_save_state_size); +void smm_relocation_handler(int cpu, uintptr_t curr_smbase, uintptr_t staggered_smbase); + +bool cpu_has_alternative_smrr(void); + +#endif diff --git a/src/northbridge/intel/gm45/memmap.c b/src/northbridge/intel/gm45/memmap.c index 71037aedd0..ceb6476f5f 100644 --- a/src/northbridge/intel/gm45/memmap.c +++ b/src/northbridge/intel/gm45/memmap.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "gm45.h" /* diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c index 1c01d307b2..384d98a54e 100644 --- a/src/northbridge/intel/gm45/northbridge.c +++ b/src/northbridge/intel/gm45/northbridge.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "chip.h" #include "gm45.h" diff --git a/src/northbridge/intel/i945/memmap.c b/src/northbridge/intel/i945/memmap.c index 6092c25770..f2518f45c9 100644 --- a/src/northbridge/intel/i945/memmap.c +++ b/src/northbridge/intel/i945/memmap.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c index cd16958670..dd4e8ac125 100644 --- a/src/northbridge/intel/i945/northbridge.c +++ b/src/northbridge/intel/i945/northbridge.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include "i945.h" static int get_pcie_bar(u32 *base) diff --git a/src/northbridge/intel/nehalem/memmap.c b/src/northbridge/intel/nehalem/memmap.c index 031240c2f3..d592aea0b3 100644 --- a/src/northbridge/intel/nehalem/memmap.c +++ b/src/northbridge/intel/nehalem/memmap.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include "nehalem.h" static uintptr_t smm_region_start(void) diff --git a/src/northbridge/intel/nehalem/northbridge.c b/src/northbridge/intel/nehalem/northbridge.c index b6741a88fa..4ab89ad054 100644 --- a/src/northbridge/intel/nehalem/northbridge.c +++ b/src/northbridge/intel/nehalem/northbridge.c @@ -29,7 +29,7 @@ #include #include "chip.h" #include "nehalem.h" -#include +#include static int bridge_revision_id = -1; diff --git a/src/northbridge/intel/nehalem/smi.c b/src/northbridge/intel/nehalem/smi.c index 5bfc934e04..8c19852043 100644 --- a/src/northbridge/intel/nehalem/smi.c +++ b/src/northbridge/intel/nehalem/smi.c @@ -19,7 +19,7 @@ #include #include "nehalem.h" -#include +#include void northbridge_write_smram(u8 smram) { diff --git a/src/northbridge/intel/pineview/memmap.c b/src/northbridge/intel/pineview/memmap.c index 2e028892e3..8be63ef80e 100644 --- a/src/northbridge/intel/pineview/memmap.c +++ b/src/northbridge/intel/pineview/memmap.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c index 5a4eec6989..34cb583c49 100644 --- a/src/northbridge/intel/pineview/northbridge.c +++ b/src/northbridge/intel/pineview/northbridge.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include /* Reserve everything between A segment and 1MB: * diff --git a/src/northbridge/intel/sandybridge/memmap.c b/src/northbridge/intel/sandybridge/memmap.c index 83a67abeb8..9e2e3333fe 100644 --- a/src/northbridge/intel/sandybridge/memmap.c +++ b/src/northbridge/intel/sandybridge/memmap.c @@ -20,7 +20,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c index 32b7a4cc2b..58f4a6812d 100644 --- a/src/northbridge/intel/sandybridge/northbridge.c +++ b/src/northbridge/intel/sandybridge/northbridge.c @@ -28,7 +28,7 @@ #include #include "chip.h" #include "sandybridge.h" -#include +#include static int bridge_revision_id = -1; diff --git a/src/northbridge/intel/x4x/memmap.c b/src/northbridge/intel/x4x/memmap.c index a61d64e61d..9480fc05b0 100644 --- a/src/northbridge/intel/x4x/memmap.c +++ b/src/northbridge/intel/x4x/memmap.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include /** Decodes used Graphics Mode Select (GMS) to kilobytes. */ diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c index f541e3ad48..ee705277cb 100644 --- a/src/northbridge/intel/x4x/northbridge.c +++ b/src/northbridge/intel/x4x/northbridge.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include static const int legacy_hole_base_k = 0xa0000 / 1024; diff --git a/src/southbridge/intel/common/smi.c b/src/southbridge/intel/common/smi.c index 398c6804e0..dafb732d79 100644 --- a/src/southbridge/intel/common/smi.c +++ b/src/southbridge/intel/common/smi.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include