#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/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>
#include "RelocationCallGate.h"
Go to the source code of this file.
Functions | |
EFI_STATUS | AppleRelocationAllocatePages (IN OUT BOOT_COMPAT_CONTEXT *BootCompat, IN EFI_GET_MEMORY_MAP GetMemoryMap, IN EFI_ALLOCATE_PAGES AllocatePages, IN UINTN NumberOfPages, IN OUT EFI_PHYSICAL_ADDRESS *Memory) |
EFI_STATUS | AppleRelocationRelease (IN OUT BOOT_COMPAT_CONTEXT *BootCompat) |
EFI_STATUS | AppleRelocationVirtualize (IN OUT BOOT_COMPAT_CONTEXT *BootCompat, IN OUT OC_BOOT_ARGUMENTS *BA) |
VOID | AppleRelocationRebase (IN OUT BOOT_COMPAT_CONTEXT *BootCompat, IN OUT OC_BOOT_ARGUMENTS *BA) |
VOID | AppleRelocationCallGate64 (IN OUT UINTN *Args, IN BOOT_COMPAT_CONTEXT *BootCompat, IN KERNEL_CALL_GATE CallGate, IN UINTN *KcgArg1, IN UINTN KcgArg2) |
Variables | |
STATIC CONST UINT8 | mAsmRelocationCallGate [] |
Copyright (C) 2013, dmazar. All rights reserved. Copyright (C) 2020, 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 RelocationBlock.c.
EFI_STATUS AppleRelocationAllocatePages | ( | IN OUT BOOT_COMPAT_CONTEXT * | BootCompat, |
IN EFI_GET_MEMORY_MAP | GetMemoryMap, | ||
IN EFI_ALLOCATE_PAGES | AllocatePages, | ||
IN UINTN | NumberOfPages, | ||
IN OUT EFI_PHYSICAL_ADDRESS * | Memory ) |
Allocate memory from a relocation block when zero slide is unavailable. EfiLoaderData at address.
[in,out] | BootCompat | Boot compatibility context. |
[in] | GetMemoryMap | Unmodified GetMemoryMap pointer, optional. |
[in] | AllocatePages | Unmodified AllocatePages pointer. |
[in] | NumberOfPages | Number of pages to allocate. |
[in,out] | Memory | Memory address to allocate, may be updated. |
EFI_SUCCESS | on success. |
EFI_UNSUPPORTED | when zero slide is available. |
Definition at line 40 of file RelocationBlock.c.
VOID AppleRelocationCallGate64 | ( | IN OUT UINTN * | Args, |
IN BOOT_COMPAT_CONTEXT * | BootCompat, | ||
IN KERNEL_CALL_GATE | CallGate, | ||
IN UINTN * | KcgArg1, | ||
IN UINTN | KcgArg2 ) |
Boot Apple Kernel through relocation block.
[in,out] | Args | On input, the un-relocated kernel argument handle. On output, the relocated kernel argument handle. |
[in] | BootCompat | Boot compatibility context. |
[in] | CallGate | Kernel call gate address. |
[in] | KcgArg1 | Pointer to the first kernel call gate argument. |
[in] | KcgArg2 | Second kernel call gate argument. |
Definition at line 378 of file RelocationBlock.c.
VOID AppleRelocationRebase | ( | IN OUT BOOT_COMPAT_CONTEXT * | BootCompat, |
IN OUT OC_BOOT_ARGUMENTS * | BA ) |
Transition from relocation block address space to normal low memory address space in the relevant XNU areas.
[in,out] | BootCompat | Boot compatibility context. |
[in,out] | BootArgs | Apple kernel boot arguments. |
Definition at line 253 of file RelocationBlock.c.
EFI_STATUS AppleRelocationRelease | ( | IN OUT BOOT_COMPAT_CONTEXT * | BootCompat | ) |
Release relocation block if present.
[in,out] | BootCompat | Boot compatibility context. |
EFI_SUCCESS | on success. |
EFI_UNSUPPORTED | when zero slide is available. |
Definition at line 125 of file RelocationBlock.c.
EFI_STATUS AppleRelocationVirtualize | ( | IN OUT BOOT_COMPAT_CONTEXT * | BootCompat, |
IN OUT OC_BOOT_ARGUMENTS * | BA ) |
Transitions to virtual memory for the relocation block.
[in,out] | BootCompat | Boot compatibility context. |
[in,out] | BootArgs | Apple kernel boot arguments. |
Definition at line 154 of file RelocationBlock.c.
STATIC CONST UINT8 mAsmRelocationCallGate[] |
Definition at line 35 of file RelocationBlock.c.