TianoCore EDK2 master
|
#include "ScriptExecute.h"
Go to the source code of this file.
Macros | |
#define | EXTRA_PAGE_TABLE_PAGES 8 |
#define | IA32_PG_P BIT0 |
#define | IA32_PG_RW BIT1 |
#define | IA32_PG_PS BIT7 |
Functions | |
VOID EFIAPI | PageFaultHandlerHook (VOID) |
VOID | HookPageFaultHandler (IN IA32_IDT_GATE_DESCRIPTOR *IdtEntry) |
BOOLEAN | IsLongModeWakingVector (IN ACPI_S3_CONTEXT *AcpiS3Context) |
VOID | SetIdtEntry (IN ACPI_S3_CONTEXT *AcpiS3Context) |
VOID | AcquirePage (IN OUT UINT64 *Uplink) |
BOOLEAN EFIAPI | PageFaultHandler (VOID) |
Variables | |
UINT64 | mPhyMask |
VOID * | mOriginalHandler |
UINTN | mPageFaultBuffer |
UINTN | mPageFaultIndex = 0 |
UINT64 * | mPageFaultUplink [EXTRA_PAGE_TABLE_PAGES] |
Set a IDT entry for debug purpose
Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform
Copyright (c) 2006 - 2022, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file SetIdtEntry.c.
#define EXTRA_PAGE_TABLE_PAGES 8 |
Definition at line 18 of file SetIdtEntry.c.
#define IA32_PG_P BIT0 |
Definition at line 20 of file SetIdtEntry.c.
#define IA32_PG_PS BIT7 |
Definition at line 22 of file SetIdtEntry.c.
#define IA32_PG_RW BIT1 |
Definition at line 21 of file SetIdtEntry.c.
Acquire page for page fault.
[in,out] | Uplink | Pointer to up page table entry. |
Definition at line 194 of file SetIdtEntry.c.
VOID HookPageFaultHandler | ( | IN IA32_IDT_GATE_DESCRIPTOR * | IdtEntry | ) |
Hook IDT with our page fault handler so that the on-demand paging works on page fault.
IdtEntry | a pointer to IDT entry |
Definition at line 50 of file SetIdtEntry.c.
BOOLEAN IsLongModeWakingVector | ( | IN ACPI_S3_CONTEXT * | AcpiS3Context | ) |
The function will check if current waking vector is long mode.
AcpiS3Context | a pointer to a structure of ACPI_S3_CONTEXT |
TRUE | Current context need long mode waking vector. |
FALSE | Current context need not long mode waking vector. |
Definition at line 100 of file SetIdtEntry.c.
BOOLEAN EFIAPI PageFaultHandler | ( | VOID | ) |
The page fault handler that on-demand read >4G memory/MMIO.
TRUE | The page fault is correctly handled. |
FALSE | The page fault is not handled and is passed through to original handler. |
Definition at line 230 of file SetIdtEntry.c.
VOID EFIAPI PageFaultHandlerHook | ( | VOID | ) |
Page fault handler.
VOID SetIdtEntry | ( | IN ACPI_S3_CONTEXT * | AcpiS3Context | ) |
Set a IDT entry for interrupt vector 3 for debug purpose.
AcpiS3Context | a pointer to a structure of ACPI_S3_CONTEXT |
Definition at line 137 of file SetIdtEntry.c.
VOID* mOriginalHandler |
Definition at line 25 of file SetIdtEntry.c.
UINTN mPageFaultBuffer |
Definition at line 26 of file SetIdtEntry.c.
UINTN mPageFaultIndex = 0 |
Definition at line 27 of file SetIdtEntry.c.
UINT64* mPageFaultUplink[EXTRA_PAGE_TABLE_PAGES] |
Definition at line 31 of file SetIdtEntry.c.
UINT64 mPhyMask |
Definition at line 24 of file SetIdtEntry.c.