| 1 |
|
| 2 |
|
| 3 |
#ifndef __X86_LEGACY_SAVE_STATE_H__ |
| 4 |
#define __X86_LEGACY_SAVE_STATE_H__ |
| 5 |
|
| 6 |
#include <types.h> |
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
#define SMM_LEGACY_ARCH_OFFSET 0x7e00 |
| 12 |
|
| 13 |
typedef struct { |
| 14 |
u8 reserved0[248]; |
| 15 |
u32 smbase; |
| 16 |
u32 smm_revision; |
| 17 |
u16 io_restart; |
| 18 |
u16 autohalt_restart; |
| 19 |
u8 reserved1[132]; |
| 20 |
u32 gdtbase; |
| 21 |
u8 reserved2[8]; |
| 22 |
u32 idtbase; |
| 23 |
u8 reserved3[16]; |
| 24 |
u32 es; |
| 25 |
u32 cs; |
| 26 |
u32 ss; |
| 27 |
u32 ds; |
| 28 |
u32 fs; |
| 29 |
u32 gs; |
| 30 |
u32 ldtbase; |
| 31 |
u32 tr; |
| 32 |
u32 dr7; |
| 33 |
u32 dr6; |
| 34 |
u32 eax; |
| 35 |
u32 ecx; |
| 36 |
u32 edx; |
| 37 |
u32 ebx; |
| 38 |
u32 esp; |
| 39 |
u32 ebp; |
| 40 |
u32 esi; |
| 41 |
u32 edi; |
| 42 |
u32 eip; |
| 43 |
u32 eflags; |
| 44 |
u32 cr3; |
| 45 |
u32 cr0; |
| 46 |
} __packed legacy_smm_state_save_area_t; |
| 47 |
|
| 48 |
#endif |