mirror of https://github.com/acidanthera/audk.git
70 lines
2.7 KiB
C
70 lines
2.7 KiB
C
/** @file
|
|
CPU MP Initialize Library header file for Td guest.
|
|
|
|
Copyright (c) 2020 - 2022, Intel Corporation. All rights reserved.<BR>
|
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
|
|
|
**/
|
|
|
|
#ifndef MP_INTEL_TDX_H_
|
|
#define MP_INTEL_TDX_H_
|
|
|
|
#include <PiPei.h>
|
|
#include <Library/BaseLib.h>
|
|
#include <Library/DebugLib.h>
|
|
#include <Uefi/UefiBaseType.h>
|
|
#include <Protocol/MpService.h>
|
|
|
|
/**
|
|
Gets detailed MP-related information on the requested processor at the
|
|
instant this call is made. This service may only be called from the BSP.
|
|
|
|
@param[in] ProcessorNumber The handle number of processor.
|
|
@param[out] ProcessorInfoBuffer A pointer to the buffer where information for
|
|
the requested processor is deposited.
|
|
@param[out] HealthData Return processor health data.
|
|
|
|
@retval EFI_SUCCESS Processor information was returned.
|
|
@retval EFI_DEVICE_ERROR The calling processor is an AP.
|
|
@retval EFI_INVALID_PARAMETER ProcessorInfoBuffer is NULL.
|
|
@retval EFI_NOT_FOUND The processor with the handle specified by
|
|
ProcessorNumber does not exist in the platform.
|
|
@retval EFI_NOT_READY MP Initialize Library is not initialized.
|
|
|
|
**/
|
|
EFI_STATUS
|
|
TdxMpInitLibGetProcessorInfo (
|
|
IN UINTN ProcessorNumber,
|
|
OUT EFI_PROCESSOR_INFORMATION *ProcessorInfoBuffer,
|
|
OUT EFI_HEALTH_FLAGS *HealthData OPTIONAL
|
|
);
|
|
|
|
/**
|
|
Retrieves the number of logical processor in the platform and the number of
|
|
those logical processors that are enabled on this boot. This service may only
|
|
be called from the BSP.
|
|
|
|
@param[out] NumberOfProcessors Pointer to the total number of logical
|
|
processors in the system, including the BSP
|
|
and disabled APs.
|
|
@param[out] NumberOfEnabledProcessors Pointer to the number of enabled logical
|
|
processors that exist in system, including
|
|
the BSP.
|
|
|
|
@retval EFI_SUCCESS The number of logical processors and enabled
|
|
logical processors was retrieved.
|
|
@retval EFI_DEVICE_ERROR The calling processor is an AP.
|
|
@retval EFI_INVALID_PARAMETER NumberOfProcessors is NULL and NumberOfEnabledProcessors
|
|
is NULL.
|
|
@retval EFI_NOT_READY MP Initialize Library is not initialized.
|
|
|
|
**/
|
|
EFI_STATUS
|
|
TdxMpInitLibGetNumberOfProcessors (
|
|
OUT UINTN *NumberOfProcessors, OPTIONAL
|
|
OUT UINTN *NumberOfEnabledProcessors OPTIONAL
|
|
);
|
|
|
|
#endif
|