diff options
Diffstat (limited to 'src/cpu/intel/haswell/haswell.h')
-rw-r--r-- | src/cpu/intel/haswell/haswell.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h index 3a5ebe65ae..a1c6f39ec2 100644 --- a/src/cpu/intel/haswell/haswell.h +++ b/src/cpu/intel/haswell/haswell.h @@ -174,6 +174,23 @@ int setup_ap_init(struct bus *cpu_bus, int *max_cpus, int start_aps(struct bus *cpu_bus, int max_cpus); void release_aps_for_smm_relocation(int do_parallel_relocation); #endif + +/* This structure is saved along with the relocated ramstage program in SMM + * space. It is used to protect the integrity of the ramstage program on S3 + * resume by saving a copy of the relocated ramstage in SMM space with the + * assumption that the SMM region cannot be altered from the OS. The magic + * value just serves as a quick sanity check. */ + +#define RAMSTAGE_CACHE_MAGIC 0xf3c3a02a + +struct ramstage_cache { + uint32_t magic; + uint32_t entry_point; + uint32_t load_address; + uint32_t size; + char program[0]; +} __attribute__((packed)); + #endif #endif |