\r
STATIC EFI_MM_ENTRY_POINT mMmEntryPoint = NULL;\r
\r
+/**\r
+ The PI Standalone MM entry point for the TF-A CPU driver.\r
+\r
+ @param [in] EventId The event Id.\r
+ @param [in] CpuNumber The CPU number.\r
+ @param [in] NsCommBufferAddr Address of the NS common buffer.\r
+\r
+ @retval EFI_SUCCESS Success.\r
+ @retval EFI_INVALID_PARAMETER A parameter was invalid.\r
+ @retval EFI_ACCESS_DENIED Access not permitted.\r
+ @retval EFI_OUT_OF_RESOURCES Out of resources.\r
+ @retval EFI_UNSUPPORTED Operation not supported.\r
+**/\r
EFI_STATUS\r
PiMmStandaloneArmTfCpuDriverEntry (\r
IN UINTN EventId,\r
IN UINTN NsCommBufferAddr\r
)\r
{\r
- EFI_MM_COMMUNICATE_HEADER *GuidedEventContext = NULL;\r
- EFI_MM_ENTRY_CONTEXT MmEntryPointContext = {0};\r
+ EFI_MM_COMMUNICATE_HEADER *GuidedEventContext;\r
+ EFI_MM_ENTRY_CONTEXT MmEntryPointContext;\r
EFI_STATUS Status;\r
UINTN NsCommBufferSize;\r
\r
return EFI_ACCESS_DENIED;\r
}\r
\r
+ GuidedEventContext = NULL;\r
// Now that the secure world can see the normal world buffer, allocate\r
// memory to copy the communication buffer to the secure world.\r
Status = mMmst->MmAllocatePool (\r
// Stash the pointer to the allocated Event Context for this CPU\r
PerCpuGuidedEventContext[CpuNumber] = GuidedEventContext;\r
\r
+ ZeroMem (&MmEntryPointContext, sizeof (EFI_MM_ENTRY_CONTEXT));\r
+\r
MmEntryPointContext.CurrentlyExecutingCpu = CpuNumber;\r
MmEntryPointContext.NumberOfCpus = mMpInformationHobData->NumberOfProcessors;\r
\r
return Status;\r
}\r
\r
+/**\r
+ Registers the MM foundation entry point.\r
+\r
+ @param [in] This Pointer to the MM Configuration protocol.\r
+ @param [in] MmEntryPoint Function pointer to the MM Entry point.\r
+\r
+ @retval EFI_SUCCESS Success.\r
+**/\r
EFI_STATUS\r
EFIAPI\r
MmFoundationEntryRegister (\r
This function is the main entry point for an MM handler dispatch\r
or communicate-based callback.\r
\r
- @param DispatchHandle The unique handle assigned to this handler by MmiHandlerRegister().\r
- @param Context Points to an optional handler context which was specified when the handler was registered.\r
+ @param DispatchHandle The unique handle assigned to this handler by\r
+ MmiHandlerRegister().\r
+ @param Context Points to an optional handler context which was\r
+ specified when the handler was registered.\r
@param CommBuffer A pointer to a collection of data in memory that will\r
- be conveyed from a non-MM environment into an MM environment.\r
+ be conveyed from a non-MM environment into an\r
+ MM environment.\r
@param CommBufferSize The size of the CommBuffer.\r
\r
@return Status Code\r