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

Go to the source code of this file.

Data Structures

struct  OC_DATA_HUB_DATA
 

Macros

#define OC_PLATFORM_NAME   L"name"
 
#define OC_SYSTEM_PRODUCT_NAME   L"Model"
 
#define OC_SYSTEM_SERIAL_NUMBER   L"SystemSerialNumber"
 
#define OC_SYSTEM_UUID   L"system-id"
 
#define OC_BOARD_PRODUCT   L"board-id"
 
#define OC_BOARD_REVISION   L"board-rev"
 
#define OC_STARTUP_POWER_EVENTS   L"StartupPowerEvents"
 
#define OC_INITIAL_TSC   L"InitialTSC"
 
#define OC_FSB_FREQUENCY   L"FSBFrequency"
 
#define OC_ART_FREQUENCY   L"ARTFrequency"
 
#define OC_DEVICE_PATHS_SUPPORTED   L"DevicePathsSupported"
 
#define OC_COPROCESSOR_VERSION   L"apple-coprocessor-version"
 
#define OC_SMC_REVISION   L"REV"
 
#define OC_SMC_BRANCH   L"RBr"
 
#define OC_SMC_PLATFORM   L"RPlt"
 
#define OC_SMC_REVISION_SIZE   6U
 
#define OC_SMC_BRANCH_SIZE   8U
 
#define OC_SMC_PLATFORM_SIZE   8U
 

Functions

EFI_DATA_HUB_PROTOCOLOcDataHubInstallProtocol (IN BOOLEAN Reinstall)
 
EFI_STATUS SetDataHubEntry (IN EFI_DATA_HUB_PROTOCOL *DataHub, IN EFI_GUID *DataRecordGuid, IN CONST CHAR16 *Key, IN CONST VOID *Data, IN UINT32 DataSize)
 
EFI_STATUS UpdateDataHub (IN EFI_DATA_HUB_PROTOCOL *DataHub, IN OC_DATA_HUB_DATA *Data, IN OC_CPU_INFO *CpuInfo)
 

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

Macro Definition Documentation

◆ OC_ART_FREQUENCY

#define OC_ART_FREQUENCY   L"ARTFrequency"

Definition at line 31 of file OcDataHubLib.h.

◆ OC_BOARD_PRODUCT

#define OC_BOARD_PRODUCT   L"board-id"

Definition at line 26 of file OcDataHubLib.h.

◆ OC_BOARD_REVISION

#define OC_BOARD_REVISION   L"board-rev"

Definition at line 27 of file OcDataHubLib.h.

◆ OC_COPROCESSOR_VERSION

#define OC_COPROCESSOR_VERSION   L"apple-coprocessor-version"

Definition at line 33 of file OcDataHubLib.h.

◆ OC_DEVICE_PATHS_SUPPORTED

#define OC_DEVICE_PATHS_SUPPORTED   L"DevicePathsSupported"

Definition at line 32 of file OcDataHubLib.h.

◆ OC_FSB_FREQUENCY

#define OC_FSB_FREQUENCY   L"FSBFrequency"

Definition at line 30 of file OcDataHubLib.h.

◆ OC_INITIAL_TSC

#define OC_INITIAL_TSC   L"InitialTSC"

Definition at line 29 of file OcDataHubLib.h.

◆ OC_PLATFORM_NAME

#define OC_PLATFORM_NAME   L"name"

Definition at line 22 of file OcDataHubLib.h.

◆ OC_SMC_BRANCH

#define OC_SMC_BRANCH   L"RBr"

Definition at line 39 of file OcDataHubLib.h.

◆ OC_SMC_BRANCH_SIZE

#define OC_SMC_BRANCH_SIZE   8U

Definition at line 43 of file OcDataHubLib.h.

◆ OC_SMC_PLATFORM

#define OC_SMC_PLATFORM   L"RPlt"

Definition at line 40 of file OcDataHubLib.h.

◆ OC_SMC_PLATFORM_SIZE

#define OC_SMC_PLATFORM_SIZE   8U

Definition at line 44 of file OcDataHubLib.h.

◆ OC_SMC_REVISION

#define OC_SMC_REVISION   L"REV"

Definition at line 38 of file OcDataHubLib.h.

◆ OC_SMC_REVISION_SIZE

#define OC_SMC_REVISION_SIZE   6U

Definition at line 42 of file OcDataHubLib.h.

◆ OC_STARTUP_POWER_EVENTS

#define OC_STARTUP_POWER_EVENTS   L"StartupPowerEvents"

Definition at line 28 of file OcDataHubLib.h.

◆ OC_SYSTEM_PRODUCT_NAME

#define OC_SYSTEM_PRODUCT_NAME   L"Model"

Definition at line 23 of file OcDataHubLib.h.

◆ OC_SYSTEM_SERIAL_NUMBER

#define OC_SYSTEM_SERIAL_NUMBER   L"SystemSerialNumber"

Definition at line 24 of file OcDataHubLib.h.

◆ OC_SYSTEM_UUID

#define OC_SYSTEM_UUID   L"system-id"

Definition at line 25 of file OcDataHubLib.h.

Function Documentation

◆ OcDataHubInstallProtocol()

EFI_DATA_HUB_PROTOCOL * OcDataHubInstallProtocol ( IN BOOLEAN Reinstall)

Locate Data Hub protocol.

Parameters
[in]ReinstallForce local Data Hub instance.
Return values
DataHub protocol instance or NULL.

Definition at line 48 of file OcDataHubLib.c.

◆ SetDataHubEntry()

EFI_STATUS SetDataHubEntry ( IN EFI_DATA_HUB_PROTOCOL * DataHub,
IN EFI_GUID * DataRecordGuid,
IN CONST CHAR16 * Key,
IN CONST VOID * Data,
IN UINT32 DataSize )

Set Data Hub entry.

Parameters
[in]DataHubData Hub protocol instance.
[in]DataRecordGuidThe guid of the record to use.
[in]KeyA pointer to the unicode key string.
[in]DataA pointer to the data to store.
[in]DataSizeThe length of the data to store.
Return values
EFI_SUCCESSThe datahub was updated successfully.

Definition at line 188 of file OcDataHubLib.c.

◆ UpdateDataHub()

EFI_STATUS UpdateDataHub ( IN EFI_DATA_HUB_PROTOCOL * DataHub,
IN OC_DATA_HUB_DATA * Data,
IN OC_CPU_INFO * CpuInfo )

Update DataHub entries.

Parameters
[in]DataData to be used for updating.
Return values
EFI_SUCCESSThe datahub was updated successfully.

Definition at line 254 of file OcDataHubLib.c.