20#include <Library/BaseLib.h>
21#include <Library/BaseMemoryLib.h>
22#include <Library/DebugLib.h>
30#include <Library/PrintLib.h>
31#include <Library/UefiBootServicesTableLib.h>
32#include <Library/UefiLib.h>
33#include <Library/UefiRuntimeServicesTableLib.h>
38 IN EFI_PHYSICAL_ADDRESS CallGate,
47 if ( !BootCompat->Settings.AvoidRuntimeDefrag
48 && !BootCompat->Settings.DiscardHibernateMap
49 && !BootCompat->Settings.AllowRelocationBlock
50 && !BootCompat->Settings.DisableSingleUser
51 && !BootCompat->Settings.ForceBooterSignature)
60 RUNTIME_DEBUG ((DEBUG_ERROR,
"OCABC: Failed to find call gate address\n"));
64 CallGateJump = (VOID *)(UINTN)CallGate;
130 return CallGate (*Arg1, Arg2);
136 IN UINTN SystemTable,
143 KcgArguments->EntryPoint,
UINTN(EFIAPI * KERNEL_CALL_GATE)(IN UINTN Arg1, IN UINTN Arg2)
BOOT_COMPAT_CONTEXT * GetBootCompatContext(VOID)
VOID AppleMapPrepareForHibernateWake(IN OUT BOOT_COMPAT_CONTEXT *BootCompat, IN UINTN ImageHeaderPage)
VOID AppleRelocationCallGate64(IN OUT UINTN *Args, IN BOOT_COMPAT_CONTEXT *BootCompat, IN KERNEL_CALL_GATE CallGate, IN UINTN *KcgArg1, IN UINTN KcgArg2)
VOID AppleMapPrepareForBooting(IN OUT BOOT_COMPAT_CONTEXT *BootCompat, IN OUT VOID *BootArgs)
#define ESTIMATED_CALL_GATE_SIZE
EFI_STATUS EFIAPI AppleMapPrepareKernelStateNew64(IN UINTN SystemTable, IN OUT APPLE_EFI_BOOT_RT_KCG_ARGS *KcgArguments, IN KERNEL_CALL_GATE CallGate)
STATIC UINTN EFIAPI AppleMapPrepareKernelStateWorker64(IN UINTN *Args, IN UINTN EntryPoint, IN KERNEL_CALL_GATE CallGate, IN UINTN *Arg1, IN UINTN Arg2)
UINTN EFIAPI AppleMapPrepareKernelStateOld64(IN UINTN Args, IN UINTN EntryPoint, IN KERNEL_CALL_GATE CallGate)
VOID AppleMapPrepareKernelJump64(IN OUT BOOT_COMPAT_CONTEXT *BootCompat, IN EFI_PHYSICAL_ADDRESS CallGate, IN UINTN HookAddress)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
SERVICES_OVERRIDE_STATE ServiceState
KERNEL_SUPPORT_STATE KernelState
struct CALL_GATE_JUMP_::@79 Jmp
struct CALL_GATE_JUMP_::@78 LeaRip
EFI_PHYSICAL_ADDRESS RelocationBlock
BOOLEAN AppleHibernateWake