Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34855 )
Change subject: intel/smm: Define struct ied_header just once ......................................................................
intel/smm: Define struct ied_header just once
Change-Id: I6fc083aa30d05c11c1b6db7b3facacf5ae857c92 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/include/cpu/intel/smm_reloc.h M src/northbridge/intel/haswell/haswell.h M src/soc/intel/broadwell/include/soc/smm.h M src/soc/intel/cannonlake/include/soc/smm.h M src/soc/intel/fsp_broadwell_de/include/soc/smm.h M src/soc/intel/icelake/include/soc/smm.h M src/soc/intel/skylake/include/soc/smm.h 7 files changed, 6 insertions(+), 30 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/34855/1
diff --git a/src/include/cpu/intel/smm_reloc.h b/src/include/cpu/intel/smm_reloc.h index 9b6473b..e8917ee 100644 --- a/src/include/cpu/intel/smm_reloc.h +++ b/src/include/cpu/intel/smm_reloc.h @@ -37,6 +37,12 @@
extern struct smm_relocation_params smm_reloc_params;
+struct ied_header { + char signature[10]; + u32 size; + u8 reserved[34]; +} __packed; + #define MSR_PRMRR_PHYS_BASE 0x1f4 #define MSR_PRMRR_PHYS_MASK 0x1f5 #define MSR_UNCORE_PRMRR_PHYS_BASE 0x2f4 diff --git a/src/northbridge/intel/haswell/haswell.h b/src/northbridge/intel/haswell/haswell.h index dc0e5db..e02a2a1 100644 --- a/src/northbridge/intel/haswell/haswell.h +++ b/src/northbridge/intel/haswell/haswell.h @@ -208,11 +208,6 @@ #ifndef __ASSEMBLER__ static inline void barrier(void) { asm("" ::: "memory"); }
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
#ifdef __SMM__ void intel_northbridge_haswell_finalize_smm(void); diff --git a/src/soc/intel/broadwell/include/soc/smm.h b/src/soc/intel/broadwell/include/soc/smm.h index 08c1ad8..515ab18 100644 --- a/src/soc/intel/broadwell/include/soc/smm.h +++ b/src/soc/intel/broadwell/include/soc/smm.h @@ -19,11 +19,6 @@ #include <stdint.h> #include <cpu/x86/msr.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
void smm_relocation_handler(int cpu, uintptr_t curr_smbase, diff --git a/src/soc/intel/cannonlake/include/soc/smm.h b/src/soc/intel/cannonlake/include/soc/smm.h index f371286..88f8e7c 100644 --- a/src/soc/intel/cannonlake/include/soc/smm.h +++ b/src/soc/intel/cannonlake/include/soc/smm.h @@ -22,11 +22,6 @@ #include <cpu/x86/smm.h> #include <soc/gpio.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
void smm_relocation_handler(int cpu, uintptr_t curr_smbase, diff --git a/src/soc/intel/fsp_broadwell_de/include/soc/smm.h b/src/soc/intel/fsp_broadwell_de/include/soc/smm.h index 3040688..990259f 100644 --- a/src/soc/intel/fsp_broadwell_de/include/soc/smm.h +++ b/src/soc/intel/fsp_broadwell_de/include/soc/smm.h @@ -20,11 +20,6 @@ #include <stdint.h> #include <cpu/x86/msr.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
void smm_relocation_handler(int cpu, uintptr_t curr_smbase, diff --git a/src/soc/intel/icelake/include/soc/smm.h b/src/soc/intel/icelake/include/soc/smm.h index e75193d..1091ff6 100644 --- a/src/soc/intel/icelake/include/soc/smm.h +++ b/src/soc/intel/icelake/include/soc/smm.h @@ -21,11 +21,6 @@ #include <cpu/x86/smm.h> #include <soc/gpio.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
void smm_relocation_handler(int cpu, uintptr_t curr_smbase, diff --git a/src/soc/intel/skylake/include/soc/smm.h b/src/soc/intel/skylake/include/soc/smm.h index 8fa415c..a01ba14 100644 --- a/src/soc/intel/skylake/include/soc/smm.h +++ b/src/soc/intel/skylake/include/soc/smm.h @@ -23,11 +23,6 @@ #include <intelblocks/smihandler.h> #include <soc/gpio.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
void smm_relocation_handler(int cpu, uintptr_t curr_smbase,
Hello Patrick Rudolph, Philipp Deppenwiese, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34855
to look at the new patch set (#2).
Change subject: intel/smm: Define struct ied_header just once ......................................................................
intel/smm: Define struct ied_header just once
Change-Id: I6fc083aa30d05c11c1b6db7b3facacf5ae857c92 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/cpu/intel/smm/gen1/smmrelocate.c M src/include/cpu/intel/smm_reloc.h M src/northbridge/intel/haswell/haswell.h M src/soc/intel/broadwell/include/soc/smm.h M src/soc/intel/cannonlake/include/soc/smm.h M src/soc/intel/fsp_broadwell_de/include/soc/smm.h M src/soc/intel/icelake/include/soc/smm.h M src/soc/intel/skylake/include/soc/smm.h 8 files changed, 6 insertions(+), 37 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/34855/2
Hello Patrick Rudolph, Philipp Deppenwiese, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34855
to look at the new patch set (#4).
Change subject: intel/smm: Define struct ied_header just once ......................................................................
intel/smm: Define struct ied_header just once
Change-Id: I6fc083aa30d05c11c1b6db7b3facacf5ae857c92 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/cpu/intel/haswell/smmrelocate.c M src/cpu/intel/smm/gen1/smmrelocate.c M src/include/cpu/intel/smm_reloc.h M src/northbridge/intel/haswell/haswell.h M src/soc/intel/broadwell/include/soc/smm.h M src/soc/intel/broadwell/smmrelocate.c M src/soc/intel/cannonlake/include/soc/smm.h M src/soc/intel/cannonlake/smmrelocate.c M src/soc/intel/fsp_broadwell_de/include/soc/smm.h M src/soc/intel/fsp_broadwell_de/smmrelocate.c M src/soc/intel/icelake/include/soc/smm.h M src/soc/intel/icelake/smmrelocate.c M src/soc/intel/skylake/include/soc/smm.h M src/soc/intel/skylake/smmrelocate.c 14 files changed, 13 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/34855/4
Hello Patrick Rudolph, Philipp Deppenwiese, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34855
to look at the new patch set (#5).
Change subject: intel/smm: Define struct ied_header just once ......................................................................
intel/smm: Define struct ied_header just once
Change-Id: I6fc083aa30d05c11c1b6db7b3facacf5ae857c92 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/cpu/intel/smm/gen1/smmrelocate.c M src/include/cpu/intel/smm_reloc.h M src/northbridge/intel/haswell/haswell.h M src/soc/intel/broadwell/include/soc/smm.h M src/soc/intel/cannonlake/include/soc/smm.h M src/soc/intel/fsp_broadwell_de/include/soc/smm.h M src/soc/intel/icelake/include/soc/smm.h M src/soc/intel/skylake/include/soc/smm.h 8 files changed, 6 insertions(+), 36 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/55/34855/5
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34855 )
Change subject: intel/smm: Define struct ied_header just once ......................................................................
Patch Set 5: Code-Review+2
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34855 )
Change subject: intel/smm: Define struct ied_header just once ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/34855/6/src/include/cpu/intel/smm_r... File src/include/cpu/intel/smm_reloc.h:
https://review.coreboot.org/c/coreboot/+/34855/6/src/include/cpu/intel/smm_r... PS6, Line 19: struct ied_header { Admittedly, this may not be the final location for this header. But it came out from smm.h files so at least it's not worse than before.
Kyösti Mälkki has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34855 )
Change subject: intel/smm: Define struct ied_header just once ......................................................................
intel/smm: Define struct ied_header just once
Change-Id: I6fc083aa30d05c11c1b6db7b3facacf5ae857c92 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/34855 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/cpu/intel/smm/gen1/smmrelocate.c M src/include/cpu/intel/smm_reloc.h M src/northbridge/intel/haswell/haswell.h M src/soc/intel/broadwell/include/soc/smm.h M src/soc/intel/cannonlake/include/soc/smm.h M src/soc/intel/fsp_broadwell_de/include/soc/smm.h M src/soc/intel/icelake/include/soc/smm.h M src/soc/intel/skylake/include/soc/smm.h 8 files changed, 6 insertions(+), 36 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/cpu/intel/smm/gen1/smmrelocate.c b/src/cpu/intel/smm/gen1/smmrelocate.c index a26fefa..9b0175d 100644 --- a/src/cpu/intel/smm/gen1/smmrelocate.c +++ b/src/cpu/intel/smm/gen1/smmrelocate.c @@ -40,11 +40,6 @@ #define G_SMRAME (1 << 3) #define C_BASE_SEG ((0 << 2) | (1 << 1) | (0 << 0))
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
struct smm_relocation_params { diff --git a/src/include/cpu/intel/smm_reloc.h b/src/include/cpu/intel/smm_reloc.h index 007f20d..5213bc90 100644 --- a/src/include/cpu/intel/smm_reloc.h +++ b/src/include/cpu/intel/smm_reloc.h @@ -16,6 +16,12 @@
#include <types.h>
+struct ied_header { + char signature[10]; + u32 size; + u8 reserved[34]; +} __packed; + /* These helpers are for performing SMM relocation. */ u32 northbridge_get_tseg_base(void); u32 northbridge_get_tseg_size(void); diff --git a/src/northbridge/intel/haswell/haswell.h b/src/northbridge/intel/haswell/haswell.h index dc0e5db..55c0b4b 100644 --- a/src/northbridge/intel/haswell/haswell.h +++ b/src/northbridge/intel/haswell/haswell.h @@ -208,12 +208,6 @@ #ifndef __ASSEMBLER__ static inline void barrier(void) { asm("" ::: "memory"); }
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed; - #ifdef __SMM__ void intel_northbridge_haswell_finalize_smm(void); #else /* !__SMM__ */ diff --git a/src/soc/intel/broadwell/include/soc/smm.h b/src/soc/intel/broadwell/include/soc/smm.h index 29857b7..fece06d 100644 --- a/src/soc/intel/broadwell/include/soc/smm.h +++ b/src/soc/intel/broadwell/include/soc/smm.h @@ -19,11 +19,6 @@ #include <stdint.h> #include <cpu/x86/msr.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
struct smm_relocation_params { u32 smram_base; diff --git a/src/soc/intel/cannonlake/include/soc/smm.h b/src/soc/intel/cannonlake/include/soc/smm.h index 430cca4..95c1abd 100644 --- a/src/soc/intel/cannonlake/include/soc/smm.h +++ b/src/soc/intel/cannonlake/include/soc/smm.h @@ -22,11 +22,6 @@ #include <cpu/x86/smm.h> #include <soc/gpio.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
struct smm_relocation_params { uintptr_t ied_base; diff --git a/src/soc/intel/fsp_broadwell_de/include/soc/smm.h b/src/soc/intel/fsp_broadwell_de/include/soc/smm.h index 76b1774..ae3b839 100644 --- a/src/soc/intel/fsp_broadwell_de/include/soc/smm.h +++ b/src/soc/intel/fsp_broadwell_de/include/soc/smm.h @@ -20,11 +20,6 @@ #include <stdint.h> #include <cpu/x86/msr.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
struct smm_relocation_params { u32 smram_base; diff --git a/src/soc/intel/icelake/include/soc/smm.h b/src/soc/intel/icelake/include/soc/smm.h index 8c1e4d8..4393167 100644 --- a/src/soc/intel/icelake/include/soc/smm.h +++ b/src/soc/intel/icelake/include/soc/smm.h @@ -21,11 +21,6 @@ #include <cpu/x86/smm.h> #include <soc/gpio.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
struct smm_relocation_params { uintptr_t ied_base; diff --git a/src/soc/intel/skylake/include/soc/smm.h b/src/soc/intel/skylake/include/soc/smm.h index 20ddd5c..88ce9e3 100644 --- a/src/soc/intel/skylake/include/soc/smm.h +++ b/src/soc/intel/skylake/include/soc/smm.h @@ -23,11 +23,6 @@ #include <intelblocks/smihandler.h> #include <soc/gpio.h>
-struct ied_header { - char signature[10]; - u32 size; - u8 reserved[34]; -} __packed;
struct smm_relocation_params { uintptr_t ied_base;