OpenCore
1.0.4
OpenCore Bootloader
|
#include <Base.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcAppleKernelLib.h>
#include <Library/OcMachoLib.h>
#include <Library/OcStringLib.h>
#include <Library/OcXmlLib.h>
#include "PrelinkedInternal.h"
Go to the source code of this file.
Copyright (C) 2019, 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 PrelinkedKext.c.
PRELINKED_KEXT * InternalCachedPrelinkedKernel | ( | IN OUT PRELINKED_CONTEXT * | Prelinked | ) |
Gets cached kernel PRELINKED_KEXT from PRELINKED_CONTEXT.
Definition at line 797 of file PrelinkedKext.c.
PRELINKED_KEXT * InternalCachedPrelinkedKext | ( | IN OUT PRELINKED_CONTEXT * | Prelinked, |
IN CONST CHAR8 * | Identifier ) |
Gets cached PRELINKED_KEXT from PRELINKED_CONTEXT.
Definition at line 700 of file PrelinkedKext.c.
STATIC PRELINKED_KEXT * InternalCreatePrelinkedKext | ( | IN OUT PRELINKED_CONTEXT *Prelinked | OPTIONAL, |
IN XML_NODE * | KextPlist, | ||
IN CONST CHAR8 *Identifier | OPTIONAL, | ||
IN BOOLEAN | Is32Bit ) |
Creates new uncached PRELINKED_KEXT from pool.
[in] | Prelinked | Initialises PRELINKED_KEXT from prelinked buffer. |
[in] | KextPlist | Plist root node with Kext Information. |
[in] | Identifier | Abort on CFBundleIdentifier mismatch. |
Definition at line 39 of file PrelinkedKext.c.
EFI_STATUS InternalDropCachedPrelinkedKext | ( | IN OUT PRELINKED_CONTEXT * | Prelinked, |
IN CONST CHAR8 * | Identifier ) |
Drops cached PRELINKED_KEXT from PRELINKED_CONTEXT.
Definition at line 751 of file PrelinkedKext.c.
VOID InternalFreePrelinkedKext | ( | IN PRELINKED_KEXT * | Kext | ) |
Frees PRELINKED_KEXT.
Definition at line 682 of file PrelinkedKext.c.
STATIC UINT32 InternalGetLinkBufferSize | ( | IN OUT PRELINKED_KEXT * | Kext | ) |
Definition at line 575 of file PrelinkedKext.c.
PRELINKED_KEXT * InternalGetQuirkDependencyKext | ( | IN CONST CHAR8 * | DependencyId, |
IN OUT PRELINKED_CONTEXT * | Context ) |
Definition at line 946 of file PrelinkedKext.c.
STATIC EFI_STATUS InternalInsertPrelinkedKextDependency | ( | IN OUT PRELINKED_KEXT * | Kext, |
IN OUT PRELINKED_CONTEXT * | Context, | ||
IN UINT32 | DependencyIndex, | ||
IN OUT PRELINKED_KEXT * | DependencyKext ) |
Definition at line 640 of file PrelinkedKext.c.
PRELINKED_KEXT * InternalLinkPrelinkedKext | ( | IN OUT PRELINKED_CONTEXT * | Context, |
IN OUT OC_MACHO_CONTEXT * | Executable, | ||
IN XML_NODE * | PlistRoot, | ||
IN UINT64 | LoadAddress, | ||
IN UINT64 | KmodAddress, | ||
IN UINT64 | FileOffset ) |
Link executable within current prelink context.
[in,out] | Context | Prelinked context. |
[in,out] | Executable | Kext executable copied to prelinked. |
[in] | PlistRoot | Current kext info.plist. |
[in] | LoadAddress | Kext load address. |
[in] | KmodAddress | Kext kmod address. |
[in] | FileOffset | The file offset of the first segment. |
Definition at line 1146 of file PrelinkedKext.c.
PRELINKED_KEXT * InternalNewPrelinkedKext | ( | IN OC_MACHO_CONTEXT * | Context, |
IN XML_NODE * | KextPlist ) |
Creates new PRELINKED_KEXT from OC_MACHO_CONTEXT.
Definition at line 665 of file PrelinkedKext.c.
STATIC EFI_STATUS InternalScanBuildLinkedSymbolTable | ( | IN OUT PRELINKED_KEXT * | Kext, |
IN PRELINKED_CONTEXT * | Context ) |
Definition at line 342 of file PrelinkedKext.c.
STATIC EFI_STATUS InternalScanBuildLinkedVtables | ( | IN OUT PRELINKED_KEXT * | Kext, |
IN PRELINKED_CONTEXT * | Context ) |
Definition at line 480 of file PrelinkedKext.c.
STATIC VOID InternalScanCurrentPrelinkedKextLinkInfo | ( | IN OUT PRELINKED_KEXT * | Kext, |
IN PRELINKED_CONTEXT * | Context ) |
Definition at line 288 of file PrelinkedKext.c.
EFI_STATUS InternalScanPrelinkedKext | ( | IN OUT PRELINKED_KEXT * | Kext, |
IN OUT PRELINKED_CONTEXT * | Context, | ||
IN BOOLEAN | Dependency ) |
Scan PRELINKED_KEXT for dependencies.
Definition at line 978 of file PrelinkedKext.c.
VOID InternalUnlockContextKexts | ( | IN PRELINKED_CONTEXT * | Context | ) |
Unlock all context dependency kexts by unsetting Processed flag.
[in] | Context | Prelinked context. |
Definition at line 1132 of file PrelinkedKext.c.
STATIC EFI_STATUS InternalUpdateLinkBuffer | ( | IN OUT PRELINKED_KEXT * | Kext, |
IN OUT PRELINKED_CONTEXT * | Context ) |
Definition at line 600 of file PrelinkedKext.c.