TianoCore EDK2 master
Loading...
Searching...
No Matches
OemMiscLib.c File Reference
#include <Uefi.h>
#include <Guid/ZeroGuid.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/HiiLib.h>
#include <Library/OemMiscLib.h>
#include <Library/PcdLib.h>

Go to the source code of this file.

Functions

UINTN EFIAPI OemGetCpuFreq (IN UINT8 ProcessorIndex)
 
BOOLEAN EFIAPI OemGetProcessorInformation (IN UINTN ProcessorIndex, IN OUT PROCESSOR_STATUS_DATA *ProcessorStatus, IN OUT PROCESSOR_CHARACTERISTIC_FLAGS *ProcessorCharacteristics, IN OUT OEM_MISC_PROCESSOR_DATA *MiscProcessorData)
 
BOOLEAN EFIAPI OemGetCacheInformation (IN UINT8 ProcessorIndex, IN UINT8 CacheLevel, IN BOOLEAN DataCache, IN BOOLEAN UnifiedCache, IN OUT SMBIOS_TABLE_TYPE7 *SmbiosCacheTable)
 
UINT8 EFIAPI OemGetMaxProcessors (VOID)
 
MISC_CHASSIS_TYPE EFIAPI OemGetChassisType (VOID)
 
BOOLEAN EFIAPI OemIsProcessorPresent (IN UINTN ProcessorIndex)
 
VOID EFIAPI OemUpdateSmbiosInfo (IN EFI_HII_HANDLE HiiHandle, IN EFI_STRING_ID TokenToUpdate, IN OEM_MISC_SMBIOS_HII_STRING_FIELD Field)
 
MISC_BOOT_INFORMATION_STATUS_DATA_TYPE EFIAPI OemGetBootStatus (VOID)
 
MISC_CHASSIS_STATE EFIAPI OemGetChassisBootupState (VOID)
 
MISC_CHASSIS_STATE EFIAPI OemGetChassisPowerSupplyState (VOID)
 
MISC_CHASSIS_STATE EFIAPI OemGetChassisThermalState (VOID)
 
MISC_CHASSIS_SECURITY_STATE EFIAPI OemGetChassisSecurityStatus (VOID)
 
UINT8 EFIAPI OemGetChassisHeight (VOID)
 
UINT8 EFIAPI OemGetChassisNumPowerCords (VOID)
 
VOID EFIAPI OemGetSystemUuid (OUT GUID *SystemUuid)
 
UINT16 EFIAPI OemGetBiosRelease (VOID)
 
UINT16 EFIAPI OemGetEmbeddedControllerFirmwareRelease (VOID)
 

Detailed Description

OemMiscLib.c

Copyright (c) 2022, Ampere Computing LLC. All rights reserved. Copyright (c) 2021, NUVIA Inc. All rights reserved. Copyright (c) 2018, Hisilicon Limited. All rights reserved. Copyright (c) 2018, Linaro Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file OemMiscLib.c.

Function Documentation

◆ OemGetBiosRelease()

UINT16 EFIAPI OemGetBiosRelease ( VOID  )

Fetches the BIOS release.

Returns
The BIOS release.

Definition at line 265 of file OemMiscLib.c.

◆ OemGetBootStatus()

MISC_BOOT_INFORMATION_STATUS_DATA_TYPE EFIAPI OemGetBootStatus ( VOID  )

Fetches the Type 32 boot information status.

Returns
Boot status.

Definition at line 151 of file OemMiscLib.c.

◆ OemGetCacheInformation()

BOOLEAN EFIAPI OemGetCacheInformation ( IN UINT8  ProcessorIndex,
IN UINT8  CacheLevel,
IN BOOLEAN  DataCache,
IN BOOLEAN  UnifiedCache,
IN OUT SMBIOS_TABLE_TYPE7 SmbiosCacheTable 
)

Gets information about the cache at the specified cache level.

Parameters
ProcessorIndexThe processor to get information for.
CacheLevelThe cache level to get information for.
DataCacheWhether the cache is a data cache.
UnifiedCacheWhether the cache is a unified cache.
SmbiosCacheTableThe SMBIOS Type7 cache information structure.
Returns
TRUE on success, FALSE on failure.

Definition at line 72 of file OemMiscLib.c.

◆ OemGetChassisBootupState()

MISC_CHASSIS_STATE EFIAPI OemGetChassisBootupState ( VOID  )

Fetches the chassis status when it was last booted.

Returns
Chassis status.

Definition at line 165 of file OemMiscLib.c.

◆ OemGetChassisHeight()

UINT8 EFIAPI OemGetChassisHeight ( VOID  )

Fetches the chassis height in RMUs (Rack Mount Units).

Returns
The height of the chassis.

Definition at line 221 of file OemMiscLib.c.

◆ OemGetChassisNumPowerCords()

UINT8 EFIAPI OemGetChassisNumPowerCords ( VOID  )

Fetches the number of power cords.

Returns
The number of power cords.

Definition at line 235 of file OemMiscLib.c.

◆ OemGetChassisPowerSupplyState()

MISC_CHASSIS_STATE EFIAPI OemGetChassisPowerSupplyState ( VOID  )

Fetches the chassis power supply/supplies status when last booted.

Returns
Chassis power supply/supplies status.

Definition at line 179 of file OemMiscLib.c.

◆ OemGetChassisSecurityStatus()

MISC_CHASSIS_SECURITY_STATE EFIAPI OemGetChassisSecurityStatus ( VOID  )

Fetches the chassis security status when last booted.

Returns
Chassis security status.

Definition at line 207 of file OemMiscLib.c.

◆ OemGetChassisThermalState()

MISC_CHASSIS_STATE EFIAPI OemGetChassisThermalState ( VOID  )

Fetches the chassis thermal status when last booted.

Returns
Chassis thermal status.

Definition at line 193 of file OemMiscLib.c.

◆ OemGetChassisType()

MISC_CHASSIS_TYPE EFIAPI OemGetChassisType ( VOID  )

Gets the type of chassis for the system.

Return values
Thetype of the chassis.

Definition at line 104 of file OemMiscLib.c.

◆ OemGetCpuFreq()

UINTN EFIAPI OemGetCpuFreq ( IN UINT8  ProcessorIndex)

Gets the CPU frequency of the specified processor.

Parameters
ProcessorIndexIndex of the processor to get the frequency for.
Returns
CPU frequency in Hz

Definition at line 29 of file OemMiscLib.c.

◆ OemGetEmbeddedControllerFirmwareRelease()

UINT16 EFIAPI OemGetEmbeddedControllerFirmwareRelease ( VOID  )

Fetches the embedded controller firmware release.

Returns
The embedded controller firmware release.

Definition at line 279 of file OemMiscLib.c.

◆ OemGetMaxProcessors()

UINT8 EFIAPI OemGetMaxProcessors ( VOID  )

Gets the maximum number of processors supported by the platform.

Returns
The maximum number of processors.

Definition at line 90 of file OemMiscLib.c.

◆ OemGetProcessorInformation()

BOOLEAN EFIAPI OemGetProcessorInformation ( IN UINTN  ProcessorIndex,
IN OUT PROCESSOR_STATUS_DATA ProcessorStatus,
IN OUT PROCESSOR_CHARACTERISTIC_FLAGS ProcessorCharacteristics,
IN OUT OEM_MISC_PROCESSOR_DATA MiscProcessorData 
)

Gets information about the specified processor and stores it in the structures provided.

Parameters
ProcessorIndexIndex of the processor to get the information for.
ProcessorStatusProcessor status.
ProcessorCharacteristicsProcessor characteritics.
MiscProcessorDataMiscellaneous processor information.
Returns
TRUE on success, FALSE on failure.

Definition at line 49 of file OemMiscLib.c.

◆ OemGetSystemUuid()

VOID EFIAPI OemGetSystemUuid ( OUT GUID SystemUuid)

Fetches the system UUID.

Parameters
[out]SystemUuidThe pointer to the buffer to store the System UUID.

Definition at line 251 of file OemMiscLib.c.

◆ OemIsProcessorPresent()

BOOLEAN EFIAPI OemIsProcessorPresent ( IN UINTN  ProcessorIndex)

Returns whether the specified processor is present or not.

Parameters
ProcessIndexThe processor index to check.
Returns
TRUE is the processor is present, FALSE otherwise.

Definition at line 120 of file OemMiscLib.c.

◆ OemUpdateSmbiosInfo()

VOID EFIAPI OemUpdateSmbiosInfo ( IN EFI_HII_HANDLE  HiiHandle,
IN EFI_STRING_ID  TokenToUpdate,
IN OEM_MISC_SMBIOS_HII_STRING_FIELD  Field 
)

Updates the HII string for the specified field.

Parameters
HiiHandleThe HII handle.
TokenToUpdateThe string to update.
FieldThe field to get information about.

Definition at line 136 of file OemMiscLib.c.