OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcAfterBootCompatLib.c File Reference
#include <Uefi.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/OcDebugLogLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/OcAfterBootCompatLib.h>
#include <Library/OcDevicePathLib.h>
#include <Library/OcMiscLib.h>
#include <Library/PrintLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/OcAfterBootCompat.h>
#include "BootCompatInternal.h"

Go to the source code of this file.

Functions

STATIC EFI_STATUS InstallAbcProtocol (VOID)
 
BOOT_COMPAT_CONTEXTGetBootCompatContext (VOID)
 
EFI_STATUS OcAbcInitialize (IN OC_ABC_SETTINGS *Settings, IN OC_CPU_INFO *CpuInfo)
 

Variables

STATIC OC_AFTER_BOOT_COMPAT_PROTOCOL mOcAfterBootCompatProtocol
 
STATIC BOOT_COMPAT_CONTEXT mOcAfterBootCompatContext
 

Detailed Description

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 OcAfterBootCompatLib.c.

Function Documentation

◆ GetBootCompatContext()

BOOT_COMPAT_CONTEXT * GetBootCompatContext ( VOID )

Obtain Apple Boot Compatibility context. This function must only be called from wrapped services, where passing context arguments is not possible.

Return values
AppleBoot Compatibility context (not null).

Definition at line 90 of file OcAfterBootCompatLib.c.

◆ InstallAbcProtocol()

STATIC EFI_STATUS InstallAbcProtocol ( VOID )

Definition at line 50 of file OcAfterBootCompatLib.c.

◆ OcAbcInitialize()

EFI_STATUS OcAbcInitialize ( IN OC_ABC_SETTINGS * Settings,
IN OC_CPU_INFO * CpuInfo )

Initialize Apple Boot Compatibility layer. This layer is needed on partially incompatible firmware to prevent boot failure and UEFI services breakage.

Parameters
[in]SettingsCompatibility layer configuration.
[in]CpuInfoCPU information.
Return values
EFI_SUCCESSon success.

Definition at line 98 of file OcAfterBootCompatLib.c.

Variable Documentation

◆ mOcAfterBootCompatContext

STATIC BOOT_COMPAT_CONTEXT mOcAfterBootCompatContext

Apple Boot Compatibility context. This context is used throughout the library. Must be accessed through GetBootCompatContext ().

Definition at line 46 of file OcAfterBootCompatLib.c.

◆ mOcAfterBootCompatProtocol

STATIC OC_AFTER_BOOT_COMPAT_PROTOCOL mOcAfterBootCompatProtocol
Initial value:

Apple Boot Compatibility protocol instance. Its GUID matches with legacy AptioMemoryFix protocol, allowing us to avoid conflicts between the two.

Definition at line 38 of file OcAfterBootCompatLib.c.