mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-20 11:34:20 +00:00

Currently, the IDs used in PLM CMD header are mixed with SMC IDs in TF-A which is restricting the range of IDs that can be used by PLM. Also, the SMC call from firmware driver is passing all 7 32-bit words in request but TF-A is not passing all of them to firmware and TF-A passes only 4 32-bit words from firmware to Linux in response. So, update TF-A to passthrough all PLM commands by having a single fixed SMC ID for all PLM commands and keep the PLM header in subsequent SMC arguments. Also, enhance size of payload argument count to support maximum payloads in request and response buffers to transmit all the IPI command properly. Signed-off-by: Jay Buddhabhatti <jay.buddhabhatti@amd.com> Change-Id: I2601caba849bce3f294177b63baa1ad688e3c5bb
44 lines
1.4 KiB
C
44 lines
1.4 KiB
C
/*
|
|
* Copyright (c) 2019-2022, Xilinx, Inc. All rights reserved.
|
|
* Copyright (c) 2022-2024, Advanced Micro Devices, Inc. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef PM_SVC_MAIN_H
|
|
#define PM_SVC_MAIN_H
|
|
|
|
#include <pm_common.h>
|
|
|
|
extern bool pwrdwn_req_received;
|
|
|
|
#define PASS_THROUGH_FW_CMD_ID U(0xfff)
|
|
|
|
/******************************************************************************/
|
|
/**
|
|
* SECURE_REDUNDANT_CALL() - Adds redundancy to the function call. This is to
|
|
* avoid glitches which can skip a function call
|
|
* and cause altering of the code flow in security
|
|
* critical functions.
|
|
* @status: Variable which holds the return value of function executed
|
|
* @status_tmp: Variable which holds the return value of redundant function
|
|
* call executed
|
|
* @function: Function to be executed
|
|
*
|
|
* Return: None
|
|
*
|
|
******************************************************************************/
|
|
#define SECURE_REDUNDANT_CALL(status, status_tmp, function, ...) \
|
|
{ \
|
|
status = function(__VA_ARGS__); \
|
|
status_tmp = function(__VA_ARGS__); \
|
|
}
|
|
|
|
void request_cpu_pwrdwn(void);
|
|
int32_t pm_setup(void);
|
|
uint64_t pm_smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
|
|
uint64_t x4, const void *cookie, void *handle,
|
|
uint64_t flags);
|
|
|
|
int32_t pm_register_sgi(uint32_t sgi_num, uint32_t reset);
|
|
#endif /* PM_SVC_MAIN_H */
|