TianoCore EDK2 master
|
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/CpuExceptionHandlerLib.h>
#include <Library/DebugAgentLib.h>
#include "CommonHeader.h"
Go to the source code of this file.
Data Structures | |
struct | _PAGE_FAULT_CONTEXT |
struct | _PAGE_FAULT_IDT_TABLE |
Macros | |
#define | EXCEPTION_VECTOR_NUMBER 0x22 |
#define | IA32_PG_P BIT0 |
#define | IA32_PG_RW BIT1 |
#define | IA32_PG_PS BIT7 |
Typedefs | |
typedef struct _PAGE_FAULT_CONTEXT | PAGE_FAULT_CONTEXT |
typedef struct _PAGE_FAULT_IDT_TABLE | PAGE_FAULT_IDT_TABLE |
Functions | |
VOID EFIAPI | PageFaultHandlerHook (VOID) |
VOID | HookPageFaultHandler (IN OUT IA32_IDT_GATE_DESCRIPTOR *IdtEntry, IN OUT PAGE_FAULT_CONTEXT *PageFaultContext) |
VOID | AcquirePage (IN OUT PAGE_FAULT_CONTEXT *PageFaultContext, IN OUT UINT64 *Uplink) |
VOID *EFIAPI | PageFaultHandler (VOID) |
EFI_STATUS EFIAPI | _ModuleEntryPoint (SWITCH_32_TO_64_CONTEXT *EntrypointContext, SWITCH_64_TO_32_CONTEXT *ReturnContext) |
The X64 entrypoint is used to process capsule in long mode.
Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file X64Entry.c.
#define EXCEPTION_VECTOR_NUMBER 0x22 |
Definition at line 17 of file X64Entry.c.
#define IA32_PG_P BIT0 |
Definition at line 19 of file X64Entry.c.
#define IA32_PG_PS BIT7 |
Definition at line 21 of file X64Entry.c.
#define IA32_PG_RW BIT1 |
Definition at line 20 of file X64Entry.c.
EFI_STATUS EFIAPI _ModuleEntryPoint | ( | SWITCH_32_TO_64_CONTEXT * | EntrypointContext, |
SWITCH_64_TO_32_CONTEXT * | ReturnContext | ||
) |
The X64 entrypoint is used to process capsule in long mode then return to 32-bit protected mode.
EntrypointContext | Pointer to the context of long mode. |
ReturnContext | Pointer to the context of 32-bit protected mode. |
This | function should never return actually. |
Definition at line 221 of file X64Entry.c.
VOID AcquirePage | ( | IN OUT PAGE_FAULT_CONTEXT * | PageFaultContext, |
IN OUT UINT64 * | Uplink | ||
) |
Acquire page for page fault.
[in,out] | PageFaultContext | Pointer to page fault context. |
[in,out] | Uplink | Pointer to up page table entry. |
Definition at line 110 of file X64Entry.c.
VOID HookPageFaultHandler | ( | IN OUT IA32_IDT_GATE_DESCRIPTOR * | IdtEntry, |
IN OUT PAGE_FAULT_CONTEXT * | PageFaultContext | ||
) |
Hook IDT with our page fault handler so that the on-demand paging works on page fault.
[in,out] | IdtEntry | Pointer to IDT entry. |
[in,out] | PageFaultContext | Pointer to page fault context. |
Definition at line 59 of file X64Entry.c.
VOID *EFIAPI PageFaultHandler | ( | VOID | ) |
The page fault handler that on-demand read >4G memory/MMIO.
NULL | The page fault is correctly handled. |
OriginalHandler | The page fault is not handled and is passed through to original handler. |
Definition at line 150 of file X64Entry.c.
VOID EFIAPI PageFaultHandlerHook | ( | VOID | ) |
Page fault handler.