4 * Copyright (c) 2021, NUVIA Inc. All rights reserved.
5 * Copyright (c) 2018, Hisilicon Limited. All rights reserved.
6 * Copyright (c) 2018, Linaro Limited. All rights reserved.
8 * SPDX-License-Identifier: BSD-2-Clause-Patent
13 #include <Library/BaseMemoryLib.h>
14 #include <Library/DebugLib.h>
15 #include <Library/HiiLib.h>
17 #include <Library/OemMiscLib.h>
20 /** Gets the CPU frequency of the specified processor.
22 @param ProcessorIndex Index of the processor to get the frequency for.
24 @return CPU frequency in Hz
29 IN UINT8 ProcessorIndex
36 /** Gets information about the specified processor and stores it in
37 the structures provided.
39 @param ProcessorIndex Index of the processor to get the information for.
40 @param ProcessorStatus Processor status.
41 @param ProcessorCharacteristics Processor characteritics.
42 @param MiscProcessorData Miscellaneous processor information.
44 @return TRUE on success, FALSE on failure.
48 OemGetProcessorInformation (
49 IN UINTN ProcessorIndex
,
50 IN OUT PROCESSOR_STATUS_DATA
*ProcessorStatus
,
51 IN OUT PROCESSOR_CHARACTERISTIC_FLAGS
*ProcessorCharacteristics
,
52 IN OUT OEM_MISC_PROCESSOR_DATA
*MiscProcessorData
59 /** Gets information about the cache at the specified cache level.
61 @param ProcessorIndex The processor to get information for.
62 @param CacheLevel The cache level to get information for.
63 @param DataCache Whether the cache is a data cache.
64 @param UnifiedCache Whether the cache is a unified cache.
65 @param SmbiosCacheTable The SMBIOS Type7 cache information structure.
67 @return TRUE on success, FALSE on failure.
71 OemGetCacheInformation (
72 IN UINT8 ProcessorIndex
,
75 IN BOOLEAN UnifiedCache
,
76 IN OUT SMBIOS_TABLE_TYPE7
*SmbiosCacheTable
83 /** Gets the maximum number of sockets supported by the platform.
85 @return The maximum number of sockets.
89 OemGetProcessorMaxSockets (
97 /** Gets the type of chassis for the system.
99 @param ChassisType The type of the chassis.
101 @retval EFI_SUCCESS The chassis type was fetched successfully.
110 *ChassisType
= MiscChassisTypeUnknown
;
114 /** Returns whether the specified processor is present or not.
116 @param ProcessIndex The processor index to check.
118 @return TRUE is the processor is present, FALSE otherwise.
123 IN UINTN ProcessorIndex
130 /** Updates the HII string for the specified field.
132 @param mHiiHandle The HII handle.
133 @param TokenToUpdate The string to update.
134 @param Offset The field to get information about.
138 OemUpdateSmbiosInfo (
139 IN EFI_HII_HANDLE mHiiHandle
,
140 IN EFI_STRING_ID TokenToUpdate
,
141 IN OEM_MISC_SMBIOS_HII_STRING_FIELD Offset