TianoCore EDK2 master
|
#include "CpuExceptionHandlerTest.h"
#include <Library/PeimEntryPoint.h>
#include <Library/PeiServicesLib.h>
#include <Library/PeiServicesTablePointerLib.h>
Go to the source code of this file.
Functions | |
VOID * | InitializeBspIdt (VOID) |
EFI_STATUS | MpServicesUnitTestGetNumberOfProcessors (IN MP_SERVICES MpServices, OUT UINTN *NumberOfProcessors, OUT UINTN *NumberOfEnabledProcessors) |
EFI_STATUS | MpServicesUnitTestStartupThisAP (IN MP_SERVICES MpServices, IN EFI_AP_PROCEDURE Procedure, IN UINTN ProcessorNumber, IN UINTN TimeoutInMicroSeconds, IN VOID *ProcedureArgument) |
EFI_STATUS | MpServicesUnitTestStartupAllAPs (IN MP_SERVICES MpServices, IN EFI_AP_PROCEDURE Procedure, IN BOOLEAN SingleThread, IN UINTN TimeoutInMicroSeconds, IN VOID *ProcedureArgument) |
EFI_STATUS | MpServicesUnitTestWhoAmI (IN MP_SERVICES MpServices, OUT UINTN *ProcessorNumber) |
EFI_STATUS | GetMpServices (OUT MP_SERVICES *MpServices) |
EFI_STATUS EFIAPI | PeiEntryPoint (IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices) |
Unit tests of the CpuExceptionHandlerLib.
Copyright (c) 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file PeiCpuExceptionHandlerUnitTest.c.
EFI_STATUS GetMpServices | ( | OUT MP_SERVICES * | MpServices | ) |
Get EDKII_PEI_MP_SERVICES2_PPI pointer.
[out] | MpServices | 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 148 of file PeiCpuExceptionHandlerUnitTest.c.
VOID * InitializeBspIdt | ( | VOID | ) |
Initialize Bsp Idt with a new Idt table and return the IA32_DESCRIPTOR buffer. In PEIM, store original PeiServicePointer before new Idt table.
Definition at line 21 of file PeiCpuExceptionHandlerUnitTest.c.
EFI_STATUS MpServicesUnitTestGetNumberOfProcessors | ( | IN MP_SERVICES | MpServices, |
OUT UINTN * | NumberOfProcessors, | ||
OUT UINTN * | NumberOfEnabledProcessors | ||
) |
Retrieve the number of logical processor in the platform and the number of those logical processors that are enabled on this boot.
[in] | MpServices | MP_SERVICES structure. |
[out] | NumberOfProcessors | Pointer to the total number of logical processors in the system, including the BSP and disabled APs. |
[out] | NumberOfEnabledProcessors | Pointer to the number of processors in the system that are enabled. |
EFI_SUCCESS | Retrieve the number of logical processor successfully |
Others | Retrieve the number of logical processor unsuccessfully |
Definition at line 58 of file PeiCpuExceptionHandlerUnitTest.c.
EFI_STATUS MpServicesUnitTestStartupAllAPs | ( | IN MP_SERVICES | MpServices, |
IN EFI_AP_PROCEDURE | Procedure, | ||
IN BOOLEAN | SingleThread, | ||
IN UINTN | TimeoutInMicroSeconds, | ||
IN VOID * | ProcedureArgument | ||
) |
Execute a caller provided function on all enabled APs.
[in] | MpServices | MP_SERVICES structure. |
[in] | Procedure | Pointer to the function to be run on enabled APs of the system. |
[in] | SingleThread | If TRUE, then all the enabled APs execute the function specified by Procedure one by one, in ascending order of processor handle number. If FALSE, then all the enabled APs execute the function specified by Procedure simultaneously. |
[in] | TimeoutInMicroSeconds | Indicates the time limit in microseconds for APs to return from Procedure, for blocking mode only. Zero means infinity. |
[in] | ProcedureArgument | The parameter passed into Procedure for all APs. |
EFI_SUCCESS | Execute a caller provided function on all enabled APs successfully |
Others | Execute a caller provided function on all enabled APs unsuccessfully |
Definition at line 110 of file PeiCpuExceptionHandlerUnitTest.c.
EFI_STATUS MpServicesUnitTestStartupThisAP | ( | IN MP_SERVICES | MpServices, |
IN EFI_AP_PROCEDURE | Procedure, | ||
IN UINTN | ProcessorNumber, | ||
IN UINTN | TimeoutInMicroSeconds, | ||
IN VOID * | ProcedureArgument | ||
) |
Caller gets one enabled AP to execute a caller-provided function.
[in] | MpServices | MP_SERVICES structure. |
[in] | Procedure | Pointer to the function to be run on enabled APs of the system. |
[in] | ProcessorNumber | The handle number of the AP. |
[in] | TimeoutInMicroSeconds | Indicates the time limit in microseconds for APs to return from Procedure, for blocking mode only. Zero means infinity. |
[in] | ProcedureArgument | The parameter passed into Procedure for all APs. |
EFI_SUCCESS | Caller gets one enabled AP to execute a caller-provided function successfully |
Others | Caller gets one enabled AP to execute a caller-provided function unsuccessfully |
Definition at line 82 of file PeiCpuExceptionHandlerUnitTest.c.
EFI_STATUS MpServicesUnitTestWhoAmI | ( | IN MP_SERVICES | MpServices, |
OUT UINTN * | ProcessorNumber | ||
) |
Get the handle number for the calling processor.
[in] | MpServices | MP_SERVICES structure. |
[out] | ProcessorNumber | The handle number for the calling processor. |
EFI_SUCCESS | Get the handle number for the calling processor successfully. |
Others | Get the handle number for the calling processor unsuccessfully. |
Definition at line 131 of file PeiCpuExceptionHandlerUnitTest.c.
EFI_STATUS EFIAPI PeiEntryPoint | ( | IN EFI_PEI_FILE_HANDLE | FileHandle, |
IN CONST EFI_PEI_SERVICES ** | PeiServices | ||
) |
Entry point of CpuExceptionHandlerPeiTest PEIM.
[in] | FileHandle | Handle of the file being invoked. |
[in] | PeiServices | Describes the list of possible PEI Services. |
EFI_SUCCESS | The PEIM executed normally. |
Definition at line 166 of file PeiCpuExceptionHandlerUnitTest.c.