TianoCore EDK2 master
Loading...
Searching...
No Matches
MmSaveState.h
Go to the documentation of this file.
1
10#ifndef MM_SAVESTATE_H_
11#define MM_SAVESTATE_H_
12
13#include <Uefi/UefiBaseType.h>
14#include <Protocol/MmCpu.h>
15#include <Library/DebugLib.h>
19
20// Macro used to simplify the lookup table entries of type CPU_MM_SAVE_STATE_REGISTER_RANGE
21#define MM_REGISTER_RANGE(Start, End) { Start, End, End - Start + 1 }
22
23// Structure used to describe a range of registers
24typedef struct {
27 UINTN Length;
29
30// Structure used to build a lookup table to retrieve the widths and offsets
31// associated with each supported EFI_MM_SAVE_STATE_REGISTER value
32
33typedef struct {
34 UINT8 Width32;
35 UINT8 Width64;
36 UINT16 Offset32;
37 UINT16 Offset64Lo;
38 UINT16 Offset64Hi;
39 BOOLEAN Writeable;
41
47UINT8
49 VOID
50 );
51
65 IN UINTN RegOffset
66 );
67
88 IN UINTN CpuIndex,
89 IN UINTN RegisterIndex,
90 IN UINTN Width,
91 OUT VOID *Buffer
92 );
93
94#endif
UINT64 UINTN
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
EFI_MM_SAVE_STATE_REGISTER
Definition: MmCpu.h:25
UINTN MmSaveStateGetRegisterIndex(IN EFI_MM_SAVE_STATE_REGISTER Register, IN UINTN RegOffset)
UINT8 MmSaveStateGetRegisterLma(VOID)
EFI_STATUS MmSaveStateReadRegisterByIndex(IN UINTN CpuIndex, IN UINTN RegisterIndex, IN UINTN Width, OUT VOID *Buffer)
EFI_STATUS EFIAPI Register(IN EFI_PEI_RSC_HANDLER_CALLBACK Callback)
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29