OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OpenCorePlatform.c File Reference
#include <Library/OcMainLib.h>
#include <Protocol/DataHub.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/OcMacInfoLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/PrintLib.h>
#include <Library/OcCpuLib.h>
#include <Library/OcDataHubLib.h>
#include <Library/OcSmbiosLib.h>
#include <Library/OcStringLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <IndustryStandard/AppleSmBios.h>
#include <IndustryStandard/AppleFeatures.h>
#include <Guid/AppleVariable.h>

Go to the source code of this file.

Functions

STATIC VOID OcPlatformUpdateDataHub (IN OC_GLOBAL_CONFIG *Config, IN OC_CPU_INFO *CpuInfo, IN MAC_INFO_DATA *MacInfo)
 
STATIC VOID OcPlatformUpdateSmbios (IN OC_GLOBAL_CONFIG *Config, IN OC_CPU_INFO *CpuInfo, IN MAC_INFO_DATA *MacInfo, IN OUT OC_SMBIOS_TABLE *SmbiosTable, IN OC_SMBIOS_UPDATE_MODE UpdateMode)
 
STATIC VOID OcPlatformUpdateNvram (IN OC_GLOBAL_CONFIG *Config, IN MAC_INFO_DATA *MacInfo)
 
VOID OcLoadPlatformSupport (IN OC_GLOBAL_CONFIG *Config, IN OC_CPU_INFO *CpuInfo)
 
VOID OcGetLegacySecureBootECID (IN OC_GLOBAL_CONFIG *Config, OUT UINT64 *ApECID)
 
CONST CHAR8 * OcGetDefaultSecureBootModel (IN OC_GLOBAL_CONFIG *Config, IN OC_CPU_INFO *CpuInfo)
 
BOOLEAN OcPlatformIs64BitSupported (IN UINT32 KernelVersion)
 

Variables

STATIC CHAR8 mCurrentSmbiosProductName [OC_OEM_NAME_MAX]
 

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

Function Documentation

◆ OcGetDefaultSecureBootModel()

CONST CHAR8 * OcGetDefaultSecureBootModel ( IN OC_GLOBAL_CONFIG * Config,
IN OC_CPU_INFO * CpuInfo )

Obtain default Secure Boot hardware model.

Parameters
[in]ConfigConfiguration.
[in]CpuInfoCPU information.
Returns
Apple Secure Boot model.

Definition at line 958 of file OpenCorePlatform.c.

◆ OcGetLegacySecureBootECID()

VOID OcGetLegacySecureBootECID ( IN OC_GLOBAL_CONFIG * Config,
OUT UINT64 * ApECID )

Obtain Legacy Secure Boot ECID (system-id).

Parameters
[in]ConfigConfiguration.
[out]ApECIDLegacy Secure Boot ECID.

Definition at line 873 of file OpenCorePlatform.c.

◆ OcLoadPlatformSupport()

VOID OcLoadPlatformSupport ( IN OC_GLOBAL_CONFIG * Config,
IN OC_CPU_INFO * CpuInfo )

Load platform compatibility support like DataHub or SMBIOS.

Parameters
[in]ConfigOpenCore configuration.
[in]CpuInfoCPU information.

Definition at line 757 of file OpenCorePlatform.c.

◆ OcPlatformIs64BitSupported()

BOOLEAN OcPlatformIs64BitSupported ( IN UINT32 KernelVersion)

Determine platform support for 64-bit kernel mode based on kernel version.

Parameters
[in]KernelVersionKernel version.

Definition at line 1022 of file OpenCorePlatform.c.

◆ OcPlatformUpdateDataHub()

STATIC VOID OcPlatformUpdateDataHub ( IN OC_GLOBAL_CONFIG * Config,
IN OC_CPU_INFO * CpuInfo,
IN MAC_INFO_DATA * MacInfo )

Definition at line 40 of file OpenCorePlatform.c.

◆ OcPlatformUpdateNvram()

STATIC VOID OcPlatformUpdateNvram ( IN OC_GLOBAL_CONFIG * Config,
IN MAC_INFO_DATA * MacInfo )

Definition at line 489 of file OpenCorePlatform.c.

◆ OcPlatformUpdateSmbios()

STATIC VOID OcPlatformUpdateSmbios ( IN OC_GLOBAL_CONFIG * Config,
IN OC_CPU_INFO * CpuInfo,
IN MAC_INFO_DATA * MacInfo,
IN OUT OC_SMBIOS_TABLE * SmbiosTable,
IN OC_SMBIOS_UPDATE_MODE UpdateMode )

Definition at line 171 of file OpenCorePlatform.c.

Variable Documentation

◆ mCurrentSmbiosProductName

STATIC CHAR8 mCurrentSmbiosProductName[OC_OEM_NAME_MAX]

Definition at line 36 of file OpenCorePlatform.c.