diff options
author | Sami Mujawar <sami.mujawar@arm.com> | 2020-12-07 12:55:48 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-01-07 11:13:39 +0000 |
commit | 9a0f88b5fd7b0c87dfa6e725ffdeb84bbecd250f (patch) | |
tree | 2d366d091208465fa54221cd9329c0eb129ab598 /StandaloneMmPkg | |
parent | 0720bb7e4dd6efbfcbe563d619a4fd20e7d0aa5e (diff) | |
download | edk2-9a0f88b5fd7b0c87dfa6e725ffdeb84bbecd250f.tar.gz |
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>
Diffstat (limited to 'StandaloneMmPkg')
3 files changed, 58 insertions, 5 deletions
diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c index 03e887d777..d86d21bb01 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/EventHandle.c @@ -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
diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c index 9e49609601..6884095c49 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.c @@ -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
)
{
diff --git a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h index 47a020c27b..2c96439c15 100644 --- a/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h +++ b/StandaloneMmPkg/Drivers/StandaloneMmCpu/AArch64/StandaloneMmCpu.h @@ -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 (
|