From e31ec299decd5a07e14fbd680eb88d34561c646d Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Sat, 10 Aug 2019 17:27:01 +0300 Subject: cpu/x86: Separate save_state struct headers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Any platform should need just one of these. Change-Id: Ia0ff8eff152cbd3d82e8b372ec662d3737078d35 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34820 Reviewed-by: Aaron Durbin Reviewed-by: Angel Pons Tested-by: build bot (Jenkins) --- src/include/cpu/x86/legacy_save_state.h | 59 +++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 src/include/cpu/x86/legacy_save_state.h (limited to 'src/include/cpu/x86/legacy_save_state.h') diff --git a/src/include/cpu/x86/legacy_save_state.h b/src/include/cpu/x86/legacy_save_state.h new file mode 100644 index 0000000000..7803db77de --- /dev/null +++ b/src/include/cpu/x86/legacy_save_state.h @@ -0,0 +1,59 @@ +/* + * This file is part of the coreboot project. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __X86_LEGACY_SAVE_STATE_H__ +#define __X86_LEGACY_SAVE_STATE_H__ + +#include + +/* Legacy x86 SMM State-Save Area + * starts @ 0x7e00 + */ +#define SMM_LEGACY_ARCH_OFFSET 0x7e00 + +typedef struct { + u8 reserved0[248]; + u32 smbase; + u32 smm_revision; + u16 io_restart; + u16 autohalt_restart; + u8 reserved1[132]; + u32 gdtbase; + u8 reserved2[8]; + u32 idtbase; + u8 reserved3[16]; + u32 es; + u32 cs; + u32 ss; + u32 ds; + u32 fs; + u32 gs; + u32 ldtbase; + u32 tr; + u32 dr7; + u32 dr6; + u32 eax; + u32 ecx; + u32 edx; + u32 ebx; + u32 esp; + u32 ebp; + u32 esi; + u32 edi; + u32 eip; + u32 eflags; + u32 cr3; + u32 cr0; +} __packed legacy_smm_state_save_area_t; + +#endif -- cgit v1.2.3