TianoCore EDK2 master
|
#include "CpuExceptionHandlerTest.h"
#include <Library/UefiBootServicesTableLib.h>
#include <Protocol/Timer.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 | MpServicesUnitTestWhoAmI (IN MP_SERVICES MpServices, OUT UINTN *ProcessorNumber) |
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 | GetMpServices (OUT MP_SERVICES *MpServices) |
EFI_STATUS EFIAPI | CpuExceptionHandlerTestEntry (IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable) |
Unit tests of the CpuExceptionHandlerLib.
Copyright (c) 2022, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file DxeCpuExceptionHandlerUnitTest.c.
EFI_STATUS EFIAPI CpuExceptionHandlerTestEntry | ( | IN EFI_HANDLE | ImageHandle, |
IN EFI_SYSTEM_TABLE * | SystemTable | ||
) |
Entry for CpuExceptionHandlerDxeTest driver.
ImageHandle | Image handle this driver. |
SystemTable | Pointer to the System Table. |
EFI_SUCCESS | The driver executed normally. |
Definition at line 159 of file DxeCpuExceptionHandlerUnitTest.c.
EFI_STATUS GetMpServices | ( | OUT MP_SERVICES * | MpServices | ) |
Get EFI_MP_SERVICES_PROTOCOL pointer.
[out] | MpServices | 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 |
Definition at line 141 of file DxeCpuExceptionHandlerUnitTest.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 20 of file DxeCpuExceptionHandlerUnitTest.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 51 of file DxeCpuExceptionHandlerUnitTest.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 121 of file DxeCpuExceptionHandlerUnitTest.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 93 of file DxeCpuExceptionHandlerUnitTest.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 70 of file DxeCpuExceptionHandlerUnitTest.c.