StandaloneMmPkg: Fix ECC error 4002 in StandaloneMmCpu

Bugzilla: 3150 (https://bugzilla.tianocore.org/show_bug.cgi?id=3150)

Fix the ECC reported error "[4002] Function header doesn't exist".

Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Acked-by: Jiewen Yao <Jiewen.yao@intel.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
Sami Mujawar 2020-12-07 12:55:48 +00:00 committed by mergify[bot]
parent 0720bb7e4d
commit 9a0f88b5fd
3 changed files with 58 additions and 5 deletions

View File

@ -196,10 +196,13 @@ MmFoundationEntryRegister (
This function is the main entry point for an MM handler dispatch
or communicate-based callback.
@param DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister().
@param Context Points to an optional handler context which was specified when the handler was registered.
@param DispatchHandle The unique handle assigned to this handler by
MmiHandlerRegister().
@param Context Points to an optional handler context which was
specified when the handler was registered.
@param CommBuffer A pointer to a collection of data in memory that will
be conveyed from a non-MM environment into an MM environment.
be conveyed from a non-MM environment into an
MM environment.
@param CommBufferSize The size of the CommBuffer.
@return Status Code

View File

@ -44,6 +44,16 @@ EFI_MM_SYSTEM_TABLE *mMmst = NULL;
//
STATIC EFI_HANDLE mMmCpuHandle = NULL;
/** Returns the HOB data for the matching HOB GUID.
@param [in] HobList Pointer to the HOB list.
@param [in] HobGuid The GUID for the HOB.
@param [out] HobData Pointer to the HOB data.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@retval EFI_NOT_FOUND Could not find HOB with matching GUID.
**/
EFI_STATUS
GetGuidedHobData (
IN VOID *HobList,
@ -70,9 +80,20 @@ GetGuidedHobData (
return EFI_SUCCESS;
}
/** Entry point for the Standalone MM CPU driver.
@param [in] ImageHandle Unused. Not actual image handle.
@param [in] SystemTable Pointer to MM System table.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_INVALID_PARAMETER Invalid parameter.
@retval EFI_OUT_OF_RESOURCES Out of resources.
@retval EFI_NOT_FOUND Failed to find the HOB for the CPU
driver endpoint descriptor.
**/
EFI_STATUS
StandaloneMmCpuInitialize (
IN EFI_HANDLE ImageHandle, // not actual imagehandle
IN EFI_HANDLE ImageHandle, // not actual imagehandle
IN EFI_MM_SYSTEM_TABLE *SystemTable // not actual systemtable
)
{

View File

@ -2,7 +2,7 @@
Private header with declarations and definitions specific to the MM Standalone
CPU driver
Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.
Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
@ -33,6 +33,19 @@ extern EFI_MMRAM_DESCRIPTOR mNsCommBuffer;
extern MP_INFORMATION_HOB_DATA *mMpInformationHobData;
extern EFI_MM_CONFIGURATION_PROTOCOL mMmConfig;
/**
The PI Standalone MM entry point for the TF-A CPU driver.
@param [in] EventId The event Id.
@param [in] CpuNumber The CPU number.
@param [in] NsCommBufferAddr Address of the NS common buffer.
@retval EFI_SUCCESS Success.
@retval EFI_INVALID_PARAMETER A parameter was invalid.
@retval EFI_ACCESS_DENIED Access not permitted.
@retval EFI_OUT_OF_RESOURCES Out of resources.
@retval EFI_UNSUPPORTED Operation not supported.
**/
EFI_STATUS
PiMmStandaloneArmTfCpuDriverEntry (
IN UINTN EventId,
@ -40,6 +53,22 @@ PiMmStandaloneArmTfCpuDriverEntry (
IN UINTN NsCommBufferAddr
);
/**
This function is the main entry point for an MM handler dispatch
or communicate-based callback.
@param DispatchHandle The unique handle assigned to this handler by
MmiHandlerRegister().
@param Context Points to an optional handler context which was
specified when the handler was registered.
@param CommBuffer A pointer to a collection of data in memory that will
be conveyed from a non-MM environment into an
MM environment.
@param CommBufferSize The size of the CommBuffer.
@return Status Code
**/
EFI_STATUS
EFIAPI
PiMmCpuTpFwRootMmiHandler (