TianoCore EDK2 master
|
#include <PiPei.h>
#include <PiDxe.h>
#include <Ppi/MpServices2.h>
#include <Protocol/MpService.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/PcdLib.h>
#include <Library/RegisterCpuFeaturesLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/SynchronizationLib.h>
#include <Library/IoLib.h>
#include <Library/LocalApicLib.h>
#include <AcpiCpuData.h>
Go to the source code of this file.
Data Structures | |
struct | CPU_FEATURES_INIT_ORDER |
struct | CPU_FEATURES_ENTRY |
struct | PROGRAM_CPU_REGISTER_FLAGS |
union | MP_SERVICES |
struct | CPU_FEATURES_DATA |
Macros | |
#define | CPU_FEATURE_ENTRY_SIGNATURE SIGNATURE_32 ('C', 'F', 'E', 'S') |
#define | CPU_FEATURE_NAME_SIZE 128 |
#define | CPU_FEATURE_ENTRY_FROM_LINK(a) |
Functions | |
CPU_FEATURES_DATA * | GetCpuFeaturesData (VOID) |
UINTN | GetProcessorIndex (IN CPU_FEATURES_DATA *CpuFeaturesData) |
EFI_STATUS | GetProcessorInformation (IN UINTN ProcessorNumber, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer) |
VOID | StartupAllAPsWorker (IN EFI_AP_PROCEDURE Procedure, IN EFI_EVENT MpEvent) |
VOID | GetNumberOfProcessor (OUT UINTN *NumberOfCpus, OUT UINTN *NumberOfEnabledProcessors) |
VOID | SwitchNewBsp (IN UINTN ProcessorNumber) |
VOID | DumpCpuFeatureMask (IN UINT8 *FeatureMask, IN UINT32 BitMaskSize) |
VOID | DumpCpuFeature (IN CPU_FEATURES_ENTRY *CpuFeature, IN UINT32 BitMaskSize) |
CPU_FEATURE_DEPENDENCE_TYPE | DetectFeatureScope (IN CPU_FEATURES_ENTRY *CpuFeature, IN BOOLEAN Before, IN UINT8 *NextCpuFeatureMask) |
CPU_FEATURE_DEPENDENCE_TYPE | DetectNoneNeighborhoodFeatureScope (IN CPU_FEATURES_ENTRY *CpuFeature, IN BOOLEAN Before, IN LIST_ENTRY *FeatureList) |
VOID EFIAPI | SetProcessorRegister (IN OUT VOID *Buffer) |
ACPI_CPU_DATA * | GetAcpiCpuData (VOID) |
MP_SERVICES | GetMpService (VOID) |
CPU Register Table Library definitions.
Copyright (c) 2017 - 2020, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file RegisterCpuFeatures.h.
#define CPU_FEATURE_ENTRY_FROM_LINK | ( | a | ) |
Definition at line 92 of file RegisterCpuFeatures.h.
#define CPU_FEATURE_ENTRY_SIGNATURE SIGNATURE_32 ('C', 'F', 'E', 'S') |
Definition at line 28 of file RegisterCpuFeatures.h.
#define CPU_FEATURE_NAME_SIZE 128 |
Definition at line 30 of file RegisterCpuFeatures.h.
CPU_FEATURE_DEPENDENCE_TYPE DetectFeatureScope | ( | IN CPU_FEATURES_ENTRY * | CpuFeature, |
IN BOOLEAN | Before, | ||
IN UINT8 * | NextCpuFeatureMask | ||
) |
Return feature dependence result.
[in] | CpuFeature | Pointer to CPU feature. |
[in] | Before | Check before dependence or after. |
[in] | NextCpuFeatureMask | Pointer to next CPU feature Mask. |
return | the dependence result. |
Definition at line 168 of file RegisterCpuFeaturesLib.c.
CPU_FEATURE_DEPENDENCE_TYPE DetectNoneNeighborhoodFeatureScope | ( | IN CPU_FEATURES_ENTRY * | CpuFeature, |
IN BOOLEAN | Before, | ||
IN LIST_ENTRY * | FeatureList | ||
) |
Return feature dependence result.
[in] | CpuFeature | Pointer to CPU feature. |
[in] | Before | Check before dependence or after. |
[in] | FeatureList | Pointer to CPU feature list. |
return | the dependence result. |
Definition at line 240 of file RegisterCpuFeaturesLib.c.
VOID DumpCpuFeature | ( | IN CPU_FEATURES_ENTRY * | CpuFeature, |
IN UINT32 | BitMaskSize | ||
) |
Dump CPU feature name or CPU feature bit mask.
[in] | CpuFeature | Pointer to CPU_FEATURES_ENTRY |
[in] | BitMaskSize | CPU feature bits mask buffer size. |
Definition at line 43 of file RegisterCpuFeaturesLib.c.
Function that uses DEBUG() macros to display the contents of a a CPU feature bit mask.
[in] | FeatureMask | A pointer to the CPU feature bit mask. |
[in] | BitMaskSize | CPU feature bits mask buffer size. |
Definition at line 19 of file RegisterCpuFeaturesLib.c.
ACPI_CPU_DATA * GetAcpiCpuData | ( | VOID | ) |
Return ACPI_CPU_DATA data.
Return ACPI_CPU_DATA data.
Definition at line 973 of file RegisterCpuFeaturesLib.c.
CPU_FEATURES_DATA * GetCpuFeaturesData | ( | VOID | ) |
Worker function to get CPU_FEATURES_DATA pointer.
Definition at line 24 of file DxeRegisterCpuFeaturesLib.c.
MP_SERVICES GetMpService | ( | VOID | ) |
Worker function to get MP service pointer.
Worker function to get EFI_MP_SERVICES_PROTOCOL pointer.
Worker function to get MP PPI service pointer.
Definition at line 37 of file DxeRegisterCpuFeaturesLib.c.
Worker function to retrieve the number of logical processor in the platform.
[out] | NumberOfCpus | Pointer to the total number of logical processors in the system, including the BSP and disabled APs. |
[out] | NumberOfEnabledProcessors | Pointer to the number of enabled logical processors that exist in system, including the BSP. |
Definition at line 185 of file DxeRegisterCpuFeaturesLib.c.
UINTN GetProcessorIndex | ( | IN CPU_FEATURES_DATA * | CpuFeaturesData | ) |
Worker function to return processor index.
CpuFeaturesData | Cpu Feature Data structure. |
Definition at line 65 of file DxeRegisterCpuFeaturesLib.c.
EFI_STATUS GetProcessorInformation | ( | IN UINTN | ProcessorNumber, |
OUT EFI_PROCESSOR_INFORMATION * | ProcessorInfoBuffer | ||
) |
Gets detailed MP-related information on the requested processor at the instant this call is made.
[in] | ProcessorNumber | The handle number of processor. |
[out] | ProcessorInfoBuffer | A pointer to the buffer where information for the requested processor is deposited. |
Worker function to MP-related information on the requested processor at the instant this call is made.
[in] | ProcessorNumber | The handle number of processor. |
[out] | ProcessorInfoBuffer | A pointer to the buffer where information for the requested processor is deposited. |
Definition at line 90 of file DxeRegisterCpuFeaturesLib.c.
Programs registers for the calling processor.
[in,out] | Buffer | The pointer to private data buffer. |
Definition at line 1256 of file CpuFeaturesInitialize.c.
VOID StartupAllAPsWorker | ( | IN EFI_AP_PROCEDURE | Procedure, |
IN EFI_EVENT | MpEvent | ||
) |
Worker function to execute a caller provided function on all enabled APs.
[in] | Procedure | A pointer to the function to be run on enabled APs of the system. |
[in] | MpEvent | A pointer to the event to be used later to check whether procedure has done. |
Worker function to execute a caller provided function on all enabled APs.
[in] | Procedure | A pointer to the function to be run on enabled APs of the system. |
[in] | MpEvent | The Event used to sync the result. |
Definition at line 119 of file DxeRegisterCpuFeaturesLib.c.
Worker function to switch the requested AP to be the BSP from that point onward.
[in] | ProcessorNumber | The handle number of AP that is to become the new BSP. |
Definition at line 152 of file DxeRegisterCpuFeaturesLib.c.