TianoCore EDK2 master
|
#include <PiPei.h>
#include <Register/Cpuid.h>
#include <Ppi/MpServices2.h>
#include <Protocol/MpService.h>
#include <Library/BaseLib.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/CpuCacheInfoLib.h>
Go to the source code of this file.
Data Structures | |
union | CPU_CACHE_INFO_COMPARATOR |
struct | CPUID_PROCESSOR_INFO |
struct | CPUID_CACHE_DATA |
union | MP_SERVICES |
struct | COLLECT_CPUID_CACHE_DATA_CONTEXT |
Macros | |
#define | MAX_NUM_OF_CACHE_PARAMS_LEAF 6 |
#define | MAX_NUM_OF_PACKAGE 100 |
Functions | |
EFI_STATUS | CpuCacheInfoGetMpServices (OUT MP_SERVICES *MpServices) |
VOID | CpuCacheInfoStartupAllCPUs (IN MP_SERVICES MpServices, IN EFI_AP_PROCEDURE Procedure, IN VOID *ProcedureArgument) |
VOID | CpuCacheInfoGetProcessorInfo (IN MP_SERVICES MpServices, IN UINTN ProcessorNum, OUT EFI_PROCESSOR_INFORMATION *ProcessorInfo) |
UINT32 | CpuCacheInfoWhoAmI (IN MP_SERVICES MpServices) |
UINT32 | CpuCacheInfoGetNumberOfProcessors (IN MP_SERVICES MpServices) |
Internal header file for CPU Cache info Library.
Copyright (c) 2020 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file InternalCpuCacheInfoLib.h.
#define MAX_NUM_OF_CACHE_PARAMS_LEAF 6 |
Definition at line 123 of file InternalCpuCacheInfoLib.h.
#define MAX_NUM_OF_PACKAGE 100 |
Definition at line 128 of file InternalCpuCacheInfoLib.h.
EFI_STATUS CpuCacheInfoGetMpServices | ( | OUT MP_SERVICES * | MpServices | ) |
Get EDKII_PEI_MP_SERVICES2_PPI or EFI_MP_SERVICES_PROTOCOL pointer.
[out] | MpServices | A pointer to the buffer where EDKII_PEI_MP_SERVICES2_PPI or EFI_MP_SERVICES_PROTOCOL is stored |
EFI_SUCCESS | EDKII_PEI_MP_SERVICES2_PPI or EFI_MP_SERVICES_PROTOCOL interface is returned |
EFI_NOT_FOUND | EDKII_PEI_MP_SERVICES2_PPI or EFI_MP_SERVICES_PROTOCOL interface is not found |
Get EFI_MP_SERVICES_PROTOCOL pointer.
[out] | MpServices | A pointer to the buffer where EFI_MP_SERVICES_PROTOCOL is stored |
EFI_SUCCESS | EFI_MP_SERVICES_PROTOCOL interface is returned |
EFI_NOT_FOUND | EFI_MP_SERVICES_PROTOCOL interface is not found |
Get EDKII_PEI_MP_SERVICES2_PPI pointer.
[out] | MpServices | A pointer to the buffer where EDKII_PEI_MP_SERVICES2_PPI is stored |
EFI_SUCCESS | EDKII_PEI_MP_SERVICES2_PPI interface is returned |
EFI_NOT_FOUND | EDKII_PEI_MP_SERVICES2_PPI interface is not found |
Definition at line 25 of file DxeCpuCacheInfoLib.c.
UINT32 CpuCacheInfoGetNumberOfProcessors | ( | IN MP_SERVICES | MpServices | ) |
Get the total number of logical processors in the platform.
[in] | MpServices | MP_SERVICES structure. |
Return | the total number of logical processors. |
Definition at line 116 of file DxeCpuCacheInfoLib.c.
VOID CpuCacheInfoGetProcessorInfo | ( | IN MP_SERVICES | MpServices, |
IN UINTN | ProcessorNum, | ||
OUT EFI_PROCESSOR_INFORMATION * | ProcessorInfo | ||
) |
Get detailed information of the requested logical processor.
[in] | MpServices | MP_SERVICES structure. |
[in] | ProcessorNum | The requested logical processor number. |
[out] | ProcessorInfo | A pointer to the buffer where the processor information is stored |
Definition at line 75 of file DxeCpuCacheInfoLib.c.
VOID CpuCacheInfoStartupAllCPUs | ( | IN MP_SERVICES | MpServices, |
IN EFI_AP_PROCEDURE | Procedure, | ||
IN VOID * | ProcedureArgument | ||
) |
Activate all of the logical processors.
[in] | MpServices | MP_SERVICES structure. |
[in] | Procedure | A pointer to the function to be run on enabled logical processors. |
[in] | ProcedureArgument | The parameter passed into Procedure for all enabled logical processors. |
Definition at line 45 of file DxeCpuCacheInfoLib.c.
UINT32 CpuCacheInfoWhoAmI | ( | IN MP_SERVICES | MpServices | ) |
Get the logical processor number.
[in] | MpServices | MP_SERVICES structure. |
Return | the logical processor number. |
Definition at line 95 of file DxeCpuCacheInfoLib.c.