2 Private header with declarations and definitions specific to the MM Standalone
5 Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
10 #ifndef _ARM_TF_CPU_DRIVER_H_
11 #define _ARM_TF_CPU_DRIVER_H_
13 #include <Protocol/MmCommunication2.h>
14 #include <Protocol/MmConfiguration.h>
15 #include <Protocol/MmCpu.h>
16 #include <Guid/MpInformation.h>
19 // CPU driver initialization specific declarations
21 extern EFI_MM_SYSTEM_TABLE
*mMmst
;
24 // CPU State Save protocol specific declarations
26 extern EFI_MM_CPU_PROTOCOL mMmCpuState
;
29 // MM event handling specific declarations
31 extern EFI_MM_COMMUNICATE_HEADER
**PerCpuGuidedEventContext
;
32 extern EFI_MMRAM_DESCRIPTOR mNsCommBuffer
;
33 extern EFI_MMRAM_DESCRIPTOR mSCommBuffer
;
34 extern MP_INFORMATION_HOB_DATA
*mMpInformationHobData
;
35 extern EFI_MM_CONFIGURATION_PROTOCOL mMmConfig
;
38 The PI Standalone MM entry point for the TF-A CPU driver.
40 @param [in] EventId The event Id.
41 @param [in] CpuNumber The CPU number.
42 @param [in] NsCommBufferAddr Address of the NS common buffer.
44 @retval EFI_SUCCESS Success.
45 @retval EFI_INVALID_PARAMETER A parameter was invalid.
46 @retval EFI_ACCESS_DENIED Access not permitted.
47 @retval EFI_OUT_OF_RESOURCES Out of resources.
48 @retval EFI_UNSUPPORTED Operation not supported.
51 PiMmStandaloneArmTfCpuDriverEntry (
54 IN UINTN NsCommBufferAddr
58 This function is the main entry point for an MM handler dispatch
59 or communicate-based callback.
61 @param DispatchHandle The unique handle assigned to this handler by
63 @param Context Points to an optional handler context which was
64 specified when the handler was registered.
65 @param CommBuffer A pointer to a collection of data in memory that will
66 be conveyed from a non-MM environment into an
68 @param CommBufferSize The size of the CommBuffer.
75 PiMmCpuTpFwRootMmiHandler (
76 IN EFI_HANDLE DispatchHandle
,
77 IN CONST VOID
*Context OPTIONAL
,
78 IN OUT VOID
*CommBuffer OPTIONAL
,
79 IN OUT UINTN
*CommBufferSize OPTIONAL