]> git.proxmox.com Git - mirror_edk2.git/blob - StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.h
251765eddfa85650a8525da0756f4f7895d2348a
[mirror_edk2.git] / StandaloneMmPkg / Drivers / StandaloneMmCpu / StandaloneMmCpu.h
1 /** @file
2 Private header with declarations and definitions specific to the MM Standalone
3 CPU driver
4
5 Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef _ARM_TF_CPU_DRIVER_H_
11 #define _ARM_TF_CPU_DRIVER_H_
12
13 #include <Protocol/MmCommunication2.h>
14 #include <Protocol/MmConfiguration.h>
15 #include <Protocol/MmCpu.h>
16 #include <Guid/MpInformation.h>
17
18 //
19 // CPU driver initialization specific declarations
20 //
21 extern EFI_MM_SYSTEM_TABLE *mMmst;
22
23 //
24 // CPU State Save protocol specific declarations
25 //
26 extern EFI_MM_CPU_PROTOCOL mMmCpuState;
27
28 //
29 // MM event handling specific declarations
30 //
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;
35
36 /**
37 The PI Standalone MM entry point for the TF-A CPU driver.
38
39 @param [in] EventId The event Id.
40 @param [in] CpuNumber The CPU number.
41 @param [in] NsCommBufferAddr Address of the NS common buffer.
42
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.
48 **/
49 EFI_STATUS
50 PiMmStandaloneArmTfCpuDriverEntry (
51 IN UINTN EventId,
52 IN UINTN CpuNumber,
53 IN UINTN NsCommBufferAddr
54 );
55
56 /**
57 This function is the main entry point for an MM handler dispatch
58 or communicate-based callback.
59
60 @param DispatchHandle The unique handle assigned to this handler by
61 MmiHandlerRegister().
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
66 MM environment.
67 @param CommBufferSize The size of the CommBuffer.
68
69 @return Status Code
70
71 **/
72 EFI_STATUS
73 EFIAPI
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
79 );
80
81 #endif