diff options
author | Ambroise Vincent <ambroise.vincent@arm.com> | 2019-07-12 13:47:03 +0100 |
---|---|---|
committer | Olivier Deprez <olivier.deprez@arm.com> | 2019-12-18 09:59:12 +0100 |
commit | 992f091b5de3b0837c95a338a4e739f6ca2f254f (patch) | |
tree | 59bd4557e49cc2dcd57aee496356c7e8cb55f040 /include | |
parent | d310239d775c34d237b8c4b81baa6f6a12207824 (diff) | |
download | arm-trusted-firmware-992f091b5de3b0837c95a338a4e739f6ca2f254f.tar.gz |
debugfs: add SMC channel
Provide an SMC interface to the 9p filesystem. This permits
accessing firmware drivers through a common interface, using
standardized read/write/control operations.
Signed-off-by: Ambroise Vincent <ambroise.vincent@arm.com>
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I9314662314bb060f6bc02714476574da158b2a7d
Diffstat (limited to 'include')
-rw-r--r-- | include/lib/debugfs.h | 23 | ||||
-rw-r--r-- | include/plat/arm/common/arm_sip_svc.h | 8 |
2 files changed, 30 insertions, 1 deletions
diff --git a/include/lib/debugfs.h b/include/lib/debugfs.h index b7e33303c..8ed237ae2 100644 --- a/include/lib/debugfs.h +++ b/include/lib/debugfs.h @@ -56,5 +56,28 @@ int stat(const char *path, dir_t *dir); /* DebugFS initialization */ void debugfs_init(void); +int debugfs_smc_setup(void); + +/* Debugfs version returned through SMC interface */ +#define DEBUGFS_VERSION (0x000000001U) + +/* Function ID for accessing the debugfs interface */ +#define DEBUGFS_FID_VALUE (0x30U) + +#define is_debugfs_fid(_fid) \ + (((_fid) & FUNCID_NUM_MASK) == DEBUGFS_FID_VALUE) + +/* Error code for debugfs SMC interface failures */ +#define DEBUGFS_E_INVALID_PARAMS (-2) +#define DEBUGFS_E_DENIED (-3) + +uintptr_t debugfs_smc_handler(unsigned int smc_fid, + u_register_t cmd, + u_register_t arg2, + u_register_t arg3, + u_register_t arg4, + void *cookie, + void *handle, + uintptr_t flags); #endif /* DEBUGFS_H */ diff --git a/include/plat/arm/common/arm_sip_svc.h b/include/plat/arm/common/arm_sip_svc.h index 16573ce6a..85fdb289f 100644 --- a/include/plat/arm/common/arm_sip_svc.h +++ b/include/plat/arm/common/arm_sip_svc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2016-2019, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -16,9 +16,15 @@ /* U(0x8200ff02) is reserved */ #define ARM_SIP_SVC_VERSION U(0x8200ff03) +/* PMF_SMC_GET_TIMESTAMP_32 0x82000010 */ +/* PMF_SMC_GET_TIMESTAMP_64 0xC2000010 */ + /* Function ID for requesting state switch of lower EL */ #define ARM_SIP_SVC_EXE_STATE_SWITCH U(0x82000020) +/* DEBUGFS_SMC_32 0x82000030U */ +/* DEBUGFS_SMC_64 0xC2000030U */ + /* ARM SiP Service Calls version numbers */ #define ARM_SIP_SVC_VERSION_MAJOR U(0x0) #define ARM_SIP_SVC_VERSION_MINOR U(0x2) |