TianoCore EDK2 master
Loading...
Searching...
No Matches
SmmStmSupport.c
Go to the documentation of this file.
1
9#include <PiMm.h>
10#include <Library/DebugLib.h>
11
12#include "SmmStm.h"
13
17#define IA32_PG_P BIT0
18#define IA32_PG_RW BIT1
19#define IA32_PG_PS BIT7
20
29VOID
31 IN UINTN PageTableBase
32 )
33{
34 UINTN Index;
35 UINT32 *Pte;
36 UINT32 Address;
37
38 Pte = (UINT32 *)(UINTN)PageTableBase;
39
40 Address = 0;
41 for (Index = 0; Index < SIZE_4KB / sizeof (*Pte); Index++) {
42 *Pte = Address | IA32_PG_PS | IA32_PG_RW | IA32_PG_P;
43 Pte++;
44 Address += SIZE_4MB;
45 }
46}
47
63UINT32
64EFIAPI
67 )
68{
69 // TBD - SmmStmExceptionHandler, record information
70 DEBUG ((DEBUG_ERROR, "SmmStmExceptionHandler ...\n"));
71 //
72 // Skip this instruction and continue;
73 //
74 Context.Ia32StackFrame->Rip += Context.Ia32StackFrame->VmcsExitInstructionLength;
75
76 return 0;
77}
UINT64 UINTN
#define IA32_PG_P
Definition: SmmStmSupport.c:17
VOID StmGen4GPageTable(IN UINTN PageTableBase)
Definition: SmmStmSupport.c:30
UINT32 EFIAPI SmmStmExceptionHandler(IN OUT STM_PROTECTION_EXCEPTION_STACK_FRAME Context)
Definition: SmmStmSupport.c:65
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
#define DEBUG(Expression)
Definition: DebugLib.h:434