diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-08-10 17:27:01 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-08-13 13:59:05 +0000 |
commit | e31ec299decd5a07e14fbd680eb88d34561c646d (patch) | |
tree | d0c0708fb5194ce7bdbae6345387533d1883bfba /src/include/cpu/x86/legacy_save_state.h | |
parent | 08456363f2e30980fa40556bea1c8b0d7e69f7ec (diff) |
cpu/x86: Separate save_state struct headers
Any platform should need just one of these.
Change-Id: Ia0ff8eff152cbd3d82e8b372ec662d3737078d35
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34820
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include/cpu/x86/legacy_save_state.h')
-rw-r--r-- | src/include/cpu/x86/legacy_save_state.h | 59 |
1 files changed, 59 insertions, 0 deletions
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 <types.h> + +/* 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 |