OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OpenCore.c File Reference
#include <Uefi.h>
#include <Guid/OcVariable.h>
#include <Protocol/DevicePath.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/OcBootstrap.h>
#include <Protocol/SimpleFileSystem.h>
#include <Protocol/VMwareDebug.h>
#include <Library/OcMainLib.h>
#include <Library/DebugLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcAppleBootPolicyLib.h>
#include <Library/OcBootManagementLib.h>
#include <Library/OcConfigurationLib.h>
#include <Library/OcConsoleLib.h>
#include <Library/OcCpuLib.h>
#include <Library/OcDevicePathLib.h>
#include <Library/OcStorageLib.h>
#include <Library/OcVariableLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiLib.h>

Go to the source code of this file.

Functions

STATIC EFI_STATUS EFIAPI OcStartImage (IN OC_BOOT_ENTRY *Chosen, IN EFI_HANDLE ImageHandle, OUT UINTN *ExitDataSize, OUT CHAR16 **ExitData OPTIONAL, IN BOOLEAN LaunchInText)
 
STATIC VOID OcMain (IN OC_STORAGE_CONTEXT *Storage, IN EFI_DEVICE_PATH_PROTOCOL *LoadPath)
 
STATIC EFI_STATUS OcBootstrap (IN EFI_HANDLE DeviceHandle, IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL *FileSystem, IN EFI_DEVICE_PATH_PROTOCOL *LoadPath)
 
STATIC EFI_HANDLE EFIAPI OcGetLoadHandle (IN OC_BOOTSTRAP_PROTOCOL *This)
 
EFI_STATUS EFIAPI UefiMain (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable)
 

Variables

STATIC OC_GLOBAL_CONFIG mOpenCoreConfiguration
 
STATIC OC_STORAGE_CONTEXT mOpenCoreStorage
 
STATIC OC_CPU_INFO mOpenCoreCpuInfo
 
STATIC UINT8 mOpenCoreBooterHash [SHA1_DIGEST_SIZE]
 
STATIC OC_RSA_PUBLIC_KEYmOpenCoreVaultKey
 
STATIC OC_PRIVILEGE_CONTEXT mOpenCorePrivilege
 
STATIC EFI_HANDLE mStorageHandle
 
STATIC EFI_DEVICE_PATH_PROTOCOL * mStoragePath
 
STATIC CHAR16 * mStorageRoot
 
STATIC OC_BOOTSTRAP_PROTOCOL mOpenCoreBootStrap
 

Detailed Description

OpenCore driver.

Copyright (c) 2019, vit9696. 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 OpenCore.c.

Function Documentation

◆ OcBootstrap()

STATIC EFI_STATUS OcBootstrap ( IN EFI_HANDLE DeviceHandle,
IN EFI_SIMPLE_FILE_SYSTEM_PROTOCOL * FileSystem,
IN EFI_DEVICE_PATH_PROTOCOL * LoadPath )

< Should not return.

Definition at line 190 of file OpenCore.c.

◆ OcGetLoadHandle()

STATIC EFI_HANDLE EFIAPI OcGetLoadHandle ( IN OC_BOOTSTRAP_PROTOCOL * This)

Definition at line 264 of file OpenCore.c.

◆ OcMain()

STATIC VOID OcMain ( IN OC_STORAGE_CONTEXT * Storage,
IN EFI_DEVICE_PATH_PROTOCOL * LoadPath )

Definition at line 116 of file OpenCore.c.

◆ OcStartImage()

STATIC EFI_STATUS EFIAPI OcStartImage ( IN OC_BOOT_ENTRY * Chosen,
IN EFI_HANDLE ImageHandle,
OUT UINTN * ExitDataSize,
OUT CHAR16 **ExitData OPTIONAL,
IN BOOLEAN LaunchInText )

Definition at line 84 of file OpenCore.c.

◆ UefiMain()

EFI_STATUS EFIAPI UefiMain ( IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE * SystemTable )

Definition at line 280 of file OpenCore.c.

Variable Documentation

◆ mOpenCoreBooterHash

STATIC UINT8 mOpenCoreBooterHash[SHA1_DIGEST_SIZE]

Definition at line 59 of file OpenCore.c.

◆ mOpenCoreBootStrap

STATIC OC_BOOTSTRAP_PROTOCOL mOpenCoreBootStrap
Initial value:
= {
.GetLoadHandle = OcGetLoadHandle,
}
#define OC_BOOTSTRAP_PROTOCOL_REVISION
Definition OcBootstrap.h:33
STATIC EFI_HANDLE EFIAPI OcGetLoadHandle(IN OC_BOOTSTRAP_PROTOCOL *This)
Definition OpenCore.c:264

Definition at line 273 of file OpenCore.c.

◆ mOpenCoreConfiguration

STATIC OC_GLOBAL_CONFIG mOpenCoreConfiguration

Definition at line 47 of file OpenCore.c.

◆ mOpenCoreCpuInfo

STATIC OC_CPU_INFO mOpenCoreCpuInfo

Definition at line 55 of file OpenCore.c.

◆ mOpenCorePrivilege

STATIC OC_PRIVILEGE_CONTEXT mOpenCorePrivilege

Definition at line 67 of file OpenCore.c.

◆ mOpenCoreStorage

STATIC OC_STORAGE_CONTEXT mOpenCoreStorage

Definition at line 51 of file OpenCore.c.

◆ mOpenCoreVaultKey

STATIC OC_RSA_PUBLIC_KEY* mOpenCoreVaultKey

Definition at line 63 of file OpenCore.c.

◆ mStorageHandle

STATIC EFI_HANDLE mStorageHandle

Definition at line 71 of file OpenCore.c.

◆ mStoragePath

STATIC EFI_DEVICE_PATH_PROTOCOL* mStoragePath

Definition at line 75 of file OpenCore.c.

◆ mStorageRoot

STATIC CHAR16* mStorageRoot

Definition at line 79 of file OpenCore.c.