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 MP_INFORMATION_HOB_DATA
*mMpInformationHobData
;
34 extern EFI_MM_CONFIGURATION_PROTOCOL mMmConfig
;
37 The PI Standalone MM entry point for the TF-A CPU driver.
39 @param [in] EventId The event Id.
40 @param [in] CpuNumber The CPU number.
41 @param [in] NsCommBufferAddr Address of the NS common buffer.
43 @retval EFI_SUCCESS Success.
44 @retval EFI_INVALID_PARAMETER A parameter was invalid.
45 @retval EFI_ACCESS_DENIED Access not permitted.
46 @retval EFI_OUT_OF_RESOURCES Out of resources.
47 @retval EFI_UNSUPPORTED Operation not supported.
50 PiMmStandaloneArmTfCpuDriverEntry (
53 IN UINTN NsCommBufferAddr
57 This function is the main entry point for an MM handler dispatch
58 or communicate-based callback.
60 @param DispatchHandle The unique handle assigned to this handler by
62 @param Context Points to an optional handler context which was
63 specified when the handler was registered.
64 @param CommBuffer A pointer to a collection of data in memory that will
65 be conveyed from a non-MM environment into an
67 @param CommBufferSize The size of the CommBuffer.
74 PiMmCpuTpFwRootMmiHandler (
75 IN EFI_HANDLE DispatchHandle
,
76 IN CONST VOID
*Context
, OPTIONAL
77 IN OUT VOID
*CommBuffer
, OPTIONAL
78 IN OUT UINTN
*CommBufferSize OPTIONAL