2018-07-13 17:05:29 +02:00
|
|
|
/** @file
|
|
|
|
Private header with declarations and definitions specific to the MM Standalone
|
|
|
|
CPU driver
|
|
|
|
|
2020-12-07 13:55:48 +01:00
|
|
|
Copyright (c) 2017 - 2021, Arm Limited. All rights reserved.
|
2019-04-04 01:07:12 +02:00
|
|
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
2018-07-13 17:05:29 +02:00
|
|
|
|
|
|
|
**/
|
|
|
|
|
|
|
|
#ifndef _ARM_TF_CPU_DRIVER_H_
|
|
|
|
#define _ARM_TF_CPU_DRIVER_H_
|
|
|
|
|
2020-04-18 18:45:40 +02:00
|
|
|
#include <Protocol/MmCommunication2.h>
|
2018-07-13 17:05:29 +02:00
|
|
|
#include <Protocol/MmConfiguration.h>
|
|
|
|
#include <Protocol/MmCpu.h>
|
|
|
|
#include <Guid/MpInformation.h>
|
|
|
|
|
|
|
|
//
|
|
|
|
// CPU driver initialization specific declarations
|
|
|
|
//
|
2021-12-05 23:54:16 +01:00
|
|
|
extern EFI_MM_SYSTEM_TABLE *mMmst;
|
2018-07-13 17:05:29 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// CPU State Save protocol specific declarations
|
|
|
|
//
|
2021-12-05 23:54:16 +01:00
|
|
|
extern EFI_MM_CPU_PROTOCOL mMmCpuState;
|
2018-07-13 17:05:29 +02:00
|
|
|
|
|
|
|
//
|
|
|
|
// MM event handling specific declarations
|
|
|
|
//
|
2021-12-05 23:54:16 +01:00
|
|
|
extern EFI_MM_COMMUNICATE_HEADER **PerCpuGuidedEventContext;
|
|
|
|
extern EFI_MMRAM_DESCRIPTOR mNsCommBuffer;
|
2021-12-31 12:06:23 +01:00
|
|
|
extern EFI_MMRAM_DESCRIPTOR mSCommBuffer;
|
2021-12-05 23:54:16 +01:00
|
|
|
extern MP_INFORMATION_HOB_DATA *mMpInformationHobData;
|
|
|
|
extern EFI_MM_CONFIGURATION_PROTOCOL mMmConfig;
|
2018-07-13 17:05:29 +02:00
|
|
|
|
2020-12-07 13:55:48 +01:00
|
|
|
/**
|
|
|
|
The PI Standalone MM entry point for the TF-A CPU driver.
|
|
|
|
|
|
|
|
@param [in] EventId The event Id.
|
|
|
|
@param [in] CpuNumber The CPU number.
|
|
|
|
@param [in] NsCommBufferAddr Address of the NS common buffer.
|
|
|
|
|
|
|
|
@retval EFI_SUCCESS Success.
|
|
|
|
@retval EFI_INVALID_PARAMETER A parameter was invalid.
|
|
|
|
@retval EFI_ACCESS_DENIED Access not permitted.
|
|
|
|
@retval EFI_OUT_OF_RESOURCES Out of resources.
|
|
|
|
@retval EFI_UNSUPPORTED Operation not supported.
|
|
|
|
**/
|
2018-07-13 17:05:29 +02:00
|
|
|
EFI_STATUS
|
2019-01-16 21:22:29 +01:00
|
|
|
PiMmStandaloneArmTfCpuDriverEntry (
|
2021-12-05 23:54:16 +01:00
|
|
|
IN UINTN EventId,
|
|
|
|
IN UINTN CpuNumber,
|
|
|
|
IN UINTN NsCommBufferAddr
|
2018-07-13 17:05:29 +02:00
|
|
|
);
|
|
|
|
|
2020-12-07 13:55:48 +01:00
|
|
|
/**
|
|
|
|
This function is the main entry point for an MM handler dispatch
|
|
|
|
or communicate-based callback.
|
|
|
|
|
|
|
|
@param DispatchHandle The unique handle assigned to this handler by
|
|
|
|
MmiHandlerRegister().
|
|
|
|
@param Context Points to an optional handler context which was
|
|
|
|
specified when the handler was registered.
|
|
|
|
@param CommBuffer A pointer to a collection of data in memory that will
|
|
|
|
be conveyed from a non-MM environment into an
|
|
|
|
MM environment.
|
|
|
|
@param CommBufferSize The size of the CommBuffer.
|
|
|
|
|
|
|
|
@return Status Code
|
|
|
|
|
|
|
|
**/
|
2018-07-13 17:05:29 +02:00
|
|
|
EFI_STATUS
|
|
|
|
EFIAPI
|
|
|
|
PiMmCpuTpFwRootMmiHandler (
|
2021-12-05 23:54:16 +01:00
|
|
|
IN EFI_HANDLE DispatchHandle,
|
|
|
|
IN CONST VOID *Context OPTIONAL,
|
|
|
|
IN OUT VOID *CommBuffer OPTIONAL,
|
|
|
|
IN OUT UINTN *CommBufferSize OPTIONAL
|
2018-07-13 17:05:29 +02:00
|
|
|
);
|
|
|
|
|
|
|
|
#endif
|