OpenCore
1.0.4
OpenCore Bootloader
|
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcTemplateLib.h>
#include <Library/OcSerializeLib.h>
#include <Library/OcMiscLib.h>
#include <Library/OcAppleKernelLib.h>
#include <Library/OcConfigurationLib.h>
#include <Library/OcMainLib.h>
#include <UserFile.h>
Go to the source code of this file.
Macros | |
#define | OC_USER_FULL_PATH_MAX_SIZE 256 |
Functions | |
STATIC BOOLEAN | UserSetRootPath (IN CONST CHAR8 *RootPath) |
STATIC UINT8 * | UserReadFileFromRoot (IN CONST CHAR8 *FileName, OUT UINT32 *Size) |
STATIC VOID | AsciiHostSlashes (IN OUT CHAR8 *String) |
STATIC EFI_STATUS | UserOcKernelLoadAndReserveKext (IN OC_KERNEL_ADD_ENTRY *Kext, IN UINT32 Index, IN OC_GLOBAL_CONFIG *Config, IN BOOLEAN Is32Bit, IN OUT UINT32 *ReservedExeSize, IN OUT UINT32 *ReservedInfoSize, IN OUT UINT32 *NumReservedKexts) |
EFI_STATUS | OcGetFileData (IN EFI_FILE_PROTOCOL *File, IN UINT32 Position, IN UINT32 Size, OUT UINT8 *Buffer) |
EFI_STATUS | OcGetFileSize (IN EFI_FILE_PROTOCOL *File, OUT UINT32 *Size) |
int | WrapMain (int argc, char *argv[]) |
int | main (int argc, char *argv[]) |
Variables | |
STATIC CHAR8 | mFullPath [OC_USER_FULL_PATH_MAX_SIZE] = { 0 } |
STATIC UINTN | mRootPathLen = 0 |
STATIC BOOLEAN | FailedToProcess = FALSE |
STATIC UINT32 | KernelVersion = 0 |
STATIC EFI_FILE_PROTOCOL | NilFileProtocol |
STATIC UINT8 * | mPrelinked = NULL |
STATIC UINT32 | mPrelinkedSize = 0 |
Copyright (C) 2022, Marvin Haeuser. All rights reserved. Copyright (C) 2022, PMheart. 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 ProcessKernel.c.
#define OC_USER_FULL_PATH_MAX_SIZE 256 |
Definition at line 28 of file ProcessKernel.c.
STATIC VOID AsciiHostSlashes | ( | IN OUT CHAR8 * | String | ) |
Definition at line 91 of file ProcessKernel.c.
int main | ( | int | argc, |
char * | argv[] ) |
Definition at line 501 of file ProcessKernel.c.
EFI_STATUS OcGetFileData | ( | IN EFI_FILE_PROTOCOL * | File, |
IN UINT32 | Position, | ||
IN UINT32 | Size, | ||
OUT UINT8 * | Buffer ) |
Read exact amount of bytes from EFI_FILE_PROTOCOL at specified position.
[in] | File | A pointer to the file protocol. |
[in] | Position | Position to read data from. |
[in] | Size | The size of the data read. |
[out] | Buffer | A pointer to previously allocated buffer to read data to. |
EFI_SUCCESS | on success. |
Definition at line 282 of file ProcessKernel.c.
EFI_STATUS OcGetFileSize | ( | IN EFI_FILE_PROTOCOL * | File, |
OUT UINT32 * | Size ) |
Determine file size if it is less than 4 GB.
[in] | File | A pointer to the file protocol. |
[out] | Size | 32-bit file size. |
EFI_SUCCESS | on success. |
Definition at line 300 of file ProcessKernel.c.
STATIC EFI_STATUS UserOcKernelLoadAndReserveKext | ( | IN OC_KERNEL_ADD_ENTRY * | Kext, |
IN UINT32 | Index, | ||
IN OC_GLOBAL_CONFIG * | Config, | ||
IN BOOLEAN | Is32Bit, | ||
IN OUT UINT32 * | ReservedExeSize, | ||
IN OUT UINT32 * | ReservedInfoSize, | ||
IN OUT UINT32 * | NumReservedKexts ) |
Definition at line 105 of file ProcessKernel.c.
STATIC UINT8 * UserReadFileFromRoot | ( | IN CONST CHAR8 * | FileName, |
OUT UINT32 * | Size ) |
Definition at line 68 of file ProcessKernel.c.
STATIC BOOLEAN UserSetRootPath | ( | IN CONST CHAR8 * | RootPath | ) |
Definition at line 35 of file ProcessKernel.c.
int WrapMain | ( | int | argc, |
char * | argv[] ) |
Definition at line 312 of file ProcessKernel.c.
STATIC BOOLEAN FailedToProcess = FALSE |
Definition at line 78 of file ProcessKernel.c.
STATIC UINT32 KernelVersion = 0 |
Definition at line 79 of file ProcessKernel.c.
STATIC CHAR8 mFullPath[OC_USER_FULL_PATH_MAX_SIZE] = { 0 } |
Definition at line 30 of file ProcessKernel.c.
STATIC UINT8* mPrelinked = NULL |
Definition at line 83 of file ProcessKernel.c.
STATIC UINT32 mPrelinkedSize = 0 |
Definition at line 84 of file ProcessKernel.c.
STATIC UINTN mRootPathLen = 0 |
Definition at line 31 of file ProcessKernel.c.
STATIC EFI_FILE_PROTOCOL NilFileProtocol |
Definition at line 81 of file ProcessKernel.c.