StandaloneMmCpu.h 2.5 KB

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