OpenCore
1.0.4
OpenCore Bootloader
|
#include "../BootCompatInternal.h"
#include <Guid/OcVariable.h>
#include <IndustryStandard/AppleHibernate.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/OcBootManagementLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/OcDeviceTreeLib.h>
#include <Library/OcMachoLib.h>
#include <Library/OcMemoryLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcStringLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
Go to the source code of this file.
Functions | |
VOID | AppleMapPrepareKernelJump64 (IN OUT BOOT_COMPAT_CONTEXT *BootCompat, IN EFI_PHYSICAL_ADDRESS CallGate, IN UINTN HookAddress) |
STATIC UINTN EFIAPI | AppleMapPrepareKernelStateWorker64 (IN UINTN *Args, IN UINTN EntryPoint, IN KERNEL_CALL_GATE CallGate, IN UINTN *Arg1, IN UINTN Arg2) |
EFI_STATUS EFIAPI | AppleMapPrepareKernelStateNew64 (IN UINTN SystemTable, IN OUT APPLE_EFI_BOOT_RT_KCG_ARGS *KcgArguments, IN KERNEL_CALL_GATE CallGate) |
UINTN EFIAPI | AppleMapPrepareKernelStateOld64 (IN UINTN Args, IN UINTN EntryPoint, IN KERNEL_CALL_GATE CallGate) |
Copyright (C) 2019-2024, vit9696. All rights reserved.
All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Definition in file KernelSupport64.c.
VOID AppleMapPrepareKernelJump64 | ( | IN OUT BOOT_COMPAT_CONTEXT * | BootCompat, |
IN EFI_PHYSICAL_ADDRESS | CallGate, | ||
IN UINTN | HookAddress ) |
Patch kernel entry point with KernelJump to later land in AppleMapPrepareKernelState.
[in,out] | BootCompat | Boot compatibility context. |
[in] | CallGate | Kernel call gate address. |
[in] | HookAddress | The function address to jump to when entering the kernel call gate. |
Definition at line 36 of file KernelSupport64.c.
EFI_STATUS EFIAPI AppleMapPrepareKernelStateNew64 | ( | IN UINTN | SystemTable, |
IN OUT APPLE_EFI_BOOT_RT_KCG_ARGS * | KcgArguments, | ||
IN KERNEL_CALL_GATE | CallGate ) |
Prepare environment for Apple kernel bootloader in boot or wake cases. This callback arrives when boot.efi jumps to kernel call gate. Should transfer control to kernel call gate + CALL_GATE_JUMP_SIZE with the same arguments.
This uses the new (as of macOS 13 Developer Beta 1) prototype. This is due to EfiBootRt wrapping the actual kernel call gate.
[in] | SystemTable | A pointer to the EFI System Table. |
[in,out] | KcgArguments | Arguments to the kernel call gate. |
[in] | CallGate | The kernel call gate. |
EFI_ABORTED | The kernel could not be started. |
other | On success, this function does not return. |
Definition at line 135 of file KernelSupport64.c.
UINTN EFIAPI AppleMapPrepareKernelStateOld64 | ( | IN UINTN | Args, |
IN UINTN | EntryPoint, | ||
IN KERNEL_CALL_GATE | CallGate ) |
Prepare environment for Apple kernel bootloader in boot or wake cases. This callback arrives when boot.efi jumps to kernel call gate. Should transfer control to kernel call gate + CALL_GATE_JUMP_SIZE with the same arguments.
This uses the old (prior to macOS 13 Developer Beta 1) prototype.
[in] | Args | Case-specific kernel argument handle. |
[in] | EntryPoint | Case-specific kernel entry point. |
[in] | CallGate | The kernel call gate. |
Definition at line 152 of file KernelSupport64.c.
STATIC UINTN EFIAPI AppleMapPrepareKernelStateWorker64 | ( | IN UINTN * | Args, |
IN UINTN | EntryPoint, | ||
IN KERNEL_CALL_GATE | CallGate, | ||
IN UINTN * | Arg1, | ||
IN UINTN | Arg2 ) |
Definition at line 93 of file KernelSupport64.c.