misc: imx8: add more scfw api
Subsystems (3)
PATCH 1/1 misc: imx8: add more scfw api
Add more scfw api for clk/partition/seco usage The api will be used by ccf/partition/secure boot.
Signed-off-by Peng Fan <[email protected]>
--- arch/arm/include/asm/arch-imx8/sci/rpc.h | 24 + arch/arm/include/asm/arch-imx8/sci/sci.h | 42 +- arch/arm/include/asm/arch-imx8/sci/svc/seco/api.h | 37 ++ drivers/misc/imx8/scu_api.c | 520 +++++++++++++++++++++- 4 files changed, 613 insertions(+), 10 deletions(-) create mode 100644 arch/arm/include/asm/arch-imx8/sci/svc/seco/api.h
arch/arm/include/asm/arch-imx8/sci/rpc.h +24 -0
@@ -142,6 +142,7 @@ struct sc_rpc_msg_s {#define RM_FUNC_SET_MASTER_SID 11U#define RM_FUNC_SET_PERIPHERAL_PERMISSIONS 12U#define RM_FUNC_IS_RESOURCE_OWNED 13U +#define RM_FUNC_GET_RESOURCE_OWNER 33U#define RM_FUNC_IS_RESOURCE_MASTER 14U#define RM_FUNC_IS_RESOURCE_PERIPHERAL 15U#define RM_FUNC_GET_RESOURCE_INFO 16U
@@ -158,4 +159,27 @@ struct sc_rpc_msg_s {#define RM_FUNC_IS_PAD_OWNED 25U#define RM_FUNC_DUMP 27U +/* SECO RPC */ +#define SECO_FUNC_UNKNOWN 0 +#define SECO_FUNC_IMAGE_LOAD 1U +#define SECO_FUNC_AUTHENTICATE 2U +#define SECO_FUNC_FORWARD_LIFECYCLE 3U +#define SECO_FUNC_RETURN_LIFECYCLE 4U +#define SECO_FUNC_COMMIT 5U +#define SECO_FUNC_ATTEST_MODE 6U +#define SECO_FUNC_ATTEST 7U +#define SECO_FUNC_GET_ATTEST_PKEY 8U +#define SECO_FUNC_GET_ATTEST_SIGN 9U +#define SECO_FUNC_ATTEST_VERIFY 10U +#define SECO_FUNC_GEN_KEY_BLOB 11U +#define SECO_FUNC_LOAD_KEY 12U +#define SECO_FUNC_GET_MP_KEY 13U +#define SECO_FUNC_UPDATE_MPMR 14U +#define SECO_FUNC_GET_MP_SIGN 15U +#define SECO_FUNC_BUILD_INFO 16U +#define SECO_FUNC_CHIP_INFO 17U +#define SECO_FUNC_ENABLE_DEBUG 18U +#define SECO_FUNC_GET_EVENT 19U +#define SECO_FUNC_FUSE_WRITE 20U +#endif /* SC_RPC_H */
arch/arm/include/asm/arch-imx8/sci/sci.h +40 -2
72 lines not on this page · raw message
arch/arm/include/asm/arch-imx8/sci/svc/seco/api.h new file +37 -0
@@ -0,0 +1,37 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* +* Copyright 2019 NXP +*/ + +#ifndef SC_SECO_API_H +#define SC_SECO_API_H + +/* Includes */ + +#include <asm/arch/sci/types.h> + +/* Defines */ +#define SC_SECO_AUTH_CONTAINER 0U/* Authenticate container */ +#define SC_SECO_VERIFY_IMAGE 1U/* Verify image */ +#define SC_SECO_REL_CONTAINER 2U/* Release container */ +#define SC_SECO_AUTH_SECO_FW 3U/* SECO Firmware */ +#define SC_SECO_AUTH_HDMI_TX_FW 4U/* HDMI TX Firmware */ +#define SC_SECO_AUTH_HDMI_RX_FW 5U/* HDMI RX Firmware */ + +#define SC_SECO_RNG_STAT_UNAVAILABLE 0U/* Unable to initialize the RNG */ +#define SC_SECO_RNG_STAT_INPROGRESS 1U/* Initialization is on-going */ +#define SC_SECO_RNG_STAT_READY 2U/* Initialized */ + +/* Types */ + +/*! +* This type is used to issue SECO authenticate commands. +*/ +typedef u8 sc_seco_auth_cmd_t ; + +/*! +* This type is used to return the RNG initialization status. +*/ +typedef u32 sc_seco_rng_stat_t ; + +#endif /* SC_SECO_API_H */
drivers/misc/imx8/scu_api.c +512 -8
563 lines not on this page · raw message
Signature · 1 line
2.16.4