OpenCore  1.0.4
OpenCore Bootloader
Loading...
Searching...
No Matches
OcMacInfoLib.h File Reference

Go to the source code of this file.

Data Structures

struct  MAC_INFO_DATA_SMBIOS_
 
struct  MAC_INFO_DATA_DATAHUB_
 
struct  MAC_INFO_DATA_OEM_
 
struct  MAC_INFO_DATA_
 

Macros

#define OC_OEM_NAME_MAX   48
 
#define OC_OEM_SERIAL_MAX   24
 
#define OC_OEM_ROM_MAX   6
 

Typedefs

typedef struct MAC_INFO_DATA_SMBIOS_ MAC_INFO_DATA_SMBIOS
 
typedef struct MAC_INFO_DATA_DATAHUB_ MAC_INFO_DATA_DATAHUB
 
typedef struct MAC_INFO_DATA_OEM_ MAC_INFO_DATA_OEM
 
typedef struct MAC_INFO_DATA_ MAC_INFO_DATA
 

Functions

VOID GetMacInfo (IN CONST CHAR8 *ProductName, OUT MAC_INFO_DATA *MacInfo)
 
CONST CHAR8 * GetSecureBootModel (IN CONST CHAR8 *ProductName)
 
CONST CHAR8 * GetSecureBootModelFromBoardId (IN CONST CHAR8 *BoardId)
 
BOOLEAN HasMacInfo (IN CONST CHAR8 *ProductName)
 
BOOLEAN IsMacModel64BitCompatible (IN CONST CHAR8 *ProductName, IN UINT32 KernelVersion)
 

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 OcMacInfoLib.h.

Macro Definition Documentation

◆ OC_OEM_NAME_MAX

#define OC_OEM_NAME_MAX   48

Definition at line 21 of file OcMacInfoLib.h.

◆ OC_OEM_ROM_MAX

#define OC_OEM_ROM_MAX   6

Definition at line 31 of file OcMacInfoLib.h.

◆ OC_OEM_SERIAL_MAX

#define OC_OEM_SERIAL_MAX   24

Definition at line 26 of file OcMacInfoLib.h.

Typedef Documentation

◆ MAC_INFO_DATA

typedef struct MAC_INFO_DATA_ MAC_INFO_DATA

◆ MAC_INFO_DATA_DATAHUB

◆ MAC_INFO_DATA_OEM

◆ MAC_INFO_DATA_SMBIOS

Function Documentation

◆ GetMacInfo()

VOID GetMacInfo ( IN CONST CHAR8 * ProductName,
OUT MAC_INFO_DATA * MacInfo )

Obtain Mac info based on product name. When exact match is not possible, sane fallback will be returned.

Parameters
[in]ProductNameProduct to get information for.
[out]MacInfoInformation data to fill.

Definition at line 95 of file OcMacInfoLib.c.

◆ GetSecureBootModel()

CONST CHAR8 * GetSecureBootModel ( IN CONST CHAR8 * ProductName)

Obtain Mac secure boot model based on product name. When exact match is not possible, sane fallback will be returned.

Parameters
[in]ProductNameProduct to get information for.
Return values
x86legacyFor models that do not support secure boot.
Returns
Secure boot model name.

Definition at line 157 of file OcMacInfoLib.c.

◆ GetSecureBootModelFromBoardId()

CONST CHAR8 * GetSecureBootModelFromBoardId ( IN CONST CHAR8 * BoardId)

Obtain Mac secure boot model based on board id. When exact match is not possible, sane fallback will be returned.

Parameters
[in]BoardIdBoard identifer to get information for.
Return values
x86legacyFor models that do not support secure boot.
Returns
Secure boot model name.

Definition at line 179 of file OcMacInfoLib.c.

◆ HasMacInfo()

BOOLEAN HasMacInfo ( IN CONST CHAR8 * ProductName)

Determine if specified product name is a real Mac model.

Parameters
[in]ProductNameProduct to check information for.
Return values
TRUEif ProductName is a real Mac model.

Definition at line 203 of file OcMacInfoLib.c.

◆ IsMacModel64BitCompatible()

BOOLEAN IsMacModel64BitCompatible ( IN CONST CHAR8 * ProductName,
IN UINT32 KernelVersion )

Determine if specified model and kernel version can run in 64-bit kernel mode.

Parameters
[in]ProductNameProduct to get information for.
[in]KernelVersionKernel version.
Return values
TRUEif supported.

Definition at line 215 of file OcMacInfoLib.c.