This commit is contained in:
2025-12-24 17:21:08 +09:00
parent a96323de19
commit 96dc62d8dc
2302 changed files with 455822 additions and 0 deletions

View File

@@ -0,0 +1,158 @@
/******************************************************************************/
/* Component Name ICU-M COMM(PE) Driver */
/******************************************************************************/
/* Product : ICU-M Firmware */
/******************************************************************************/
/*******************************************************************************
* Copyright(C) 2021-2023 Renesas Electronics Corporation.
*
* RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY
*
* These instructions, statements, and programs are the confidential information
* of Renesas Electronics Corporation. They must be used and modified solely for
* the purpose for which it was furnished by Renesas Electronics Corporation.
* All part of them must not be reproduced nor disclosed to others in any form,
* without the prior written permission of Renesas Electronics Corporation.
*******************************************************************************/
#if !defined(ICUM_D_COMM_PE_PUB_H)
#define ICUM_D_COMM_PE_PUB_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**************************************************************************************/
/* Return Value Definition */
/**************************************************************************************/
#define ER_OK (0x00000000U)
#define ER_PARAM (0x00000001U)
#define ER_D_COMM_BASE (0x00000400U)
#define ER_D_COMM_QUE_FULL (ER_D_COMM_BASE+1U) /* Service request queue FULL */
#define ER_D_COMM_NO_ISD (ER_D_COMM_BASE+2U) /* No ISD in service response queue */
#define ER_D_COMM_QUE_ALREADY_INIT (ER_D_COMM_BASE+3U) /* Service queue already initialized */
#define ER_D_COMM_QUE_NOT_INIT (ER_D_COMM_BASE+4U) /* Service queue not initialized */
#define ER_D_COMM_PARAM_NOT_G_RAM (ER_D_COMM_BASE+5U) /* Param not within global RAM area */
#define ER_D_COMM_QUE_NOT_ACCESS (ER_D_COMM_BASE+6U)
#define ER_D_COMM_EXIST_ISD (ER_D_COMM_BASE+7U) /* ISD is exist in service response queue */
#define ER_D_COMM_MEMCHK_NG (ER_D_COMM_BASE+8U) /* address not within RAM area */
#define ER_D_COMM_ALIGN_NG (ER_D_COMM_BASE+9U) /* address not alignment NG */
/**************************************************************************************/
/* Definition */
/**************************************************************************************/
/* Bit pattern indicate channel No. of interrupt to send ( ICUM_COMM_INT_TO_CHANNEL ) */
#define ICUM_COMM_ICH_TO_SERV_REQUEST (0x00000002U)
#define ICUM_COMM_ICH_TO_CF_PRG_NOTIFY (0x00000004U)
#define ICUM_COMM_ICH_TO_DF_PRG_NOTIFY (0x00000008U)
#define ICUM_COMM_ICH_TO_CF_PRG_ERROR (0x00000010U)
#define ICUM_COMM_ICH_TO_DF_PRG_ERROR (0x00000020U)
#define ICUM_COMM_ICH_TO_OPERATION_END (0x00000040U)
/* Service execution request single interrupt */
#define ICUM_COMM_ICH_TO_SINGLE_INTERRUPT (0x00000001U)
/* Channel No. of interrupt to receive ( ICUM_COMM_INT_FROM_CHANNEL ) */
#define ICUM_COMM_ICH_FM_SYS_INTERRUPT (0U)
#define ICUM_COMM_ICH_FM_SERV_RESPONSE (1U)
/* PE status information ( ICUM_COMM_INFO_PE_STATUS ) */
#define ICUM_COMM_INF_PE_ST_FLS_DF_PRG (0U)
#define ICUM_COMM_INF_PE_ST_FLS_CF_PRG (1U)
#define ICUM_COMM_INF_PE_ST_FLS_OPRN (2U)
#define ICUM_COMM_INF_PE_ST_FACIACCDIS (3U)
#define ICUM_COMM_INF_PE_ST_PEID (8U)
#define ICUM_COMM_MEMCHECK_OK (0x00U)
#define ICUM_COMM_MEMCHECK_ERROR (0x01U)
/* Total number of PE */
#define TOTAL_PE_NUM (7U)
/* Length of service queue ( SERVICE_QUEUE_LENGTH ) */
#define REQUEST_QUEUE_LENGTH (16U)
#define RESPONSE_QUEUE_LENGTH (16U)
#define RESPONSE_QUEUE_OFST (16U)
#define PE_QUEUE_DUMMY (0U)
#define TOTAL_QUEUE_LENGTH (REQUEST_QUEUE_LENGTH + PE_QUEUE_DUMMY + RESPONSE_QUEUE_LENGTH + PE_QUEUE_DUMMY)
#define VM_QUEUE_LENGTH (4U)
/* Defines item of memory information */
extern const uint32_t memory_information[];
#define MEM_INFO_SERVICEQUE_1_ADDR (memory_information[0])
#define MEM_INFO_SERVICEQUE_1_SIZE (memory_information[1])
#define MEM_INFO_SHAREDMEM_1_ADDR (memory_information[2])
#define MEM_INFO_SHAREDMEM_1_SIZE (memory_information[3])
#define MEM_INFO_SHAREDMEM_2_ADDR (memory_information[4])
#define MEM_INFO_SHAREDMEM_2_SIZE (memory_information[5])
#define MEM_INFO_SHAREDMEM_3_ADDR (memory_information[6])
#define MEM_INFO_SHAREDMEM_3_SIZE (memory_information[7])
#define MEM_INFO_ICUM_SECUREMOD (memory_information[30])
/**************************************************************************************/
/* Macros */
/**************************************************************************************/
/***************************************************************************************
* Function ID : [ICUMFW_CD_S4_D_COMM_PE_0027]:[ICUMFW_UD_S4_D_COMM_PE_0027]
* Function name: GET_MY_PEID
* Description : Retrieve PEID from thread configurator register
* Arguments : None
*
* Return Value : PEID Value
***************************************************************************************/
extern uint32_t USER_ICUMIF_GetMyPEID(void);
#define GET_MY_PEID (USER_ICUMIF_GetMyPEID())
/**************************************************************************************/
/* Type definition */
/**************************************************************************************/
/*====================================================================================*/
/* Type definition: Channel number of interrupt to send */
/*====================================================================================*/
typedef uint32_t icum_comm_int_to_channel_t;
/*====================================================================================*/
/* Type definition: PE status information */
/*====================================================================================*/
typedef uint32_t icum_com_info_pe_status_t;
/**************************************************************************************/
/* Enumeration */
/**************************************************************************************/
/* None */
/**************************************************************************************/
/* Structure Definition */
/**************************************************************************************/
/* None */
/**************************************************************************************/
/* Prototypes */
/**************************************************************************************/
uint32_t D_COMM_PE_Init(uint32_t *p_request_queue);
uint32_t D_COMM_TriggerInterruptToICUP(icum_comm_int_to_channel_t channel,
r_icumif_isd_t *p_isd);
uint32_t D_COMM_GetResponseISD(r_icumif_isd_t **p_isd);
r_icumif_sts_t *D_COMM_GetICUStatusAddr(void);
uint32_t D_COMM_SetPEStatusInfo(icum_com_info_pe_status_t info, uint8_t set_value);
void D_COMM_SetInterruptEnable(void);
uint32_t D_COMM_SetSystemCallBackFunc(R_ICUMIF_CB_REGIST_t *p_regist_info);
uint32_t D_COMM_GetICUMemCheckErrInfo(uint8_t *p_error);
void D_COMM_IRQ_Handler(void);
uint32_t D_COMM_PE_CheckMemorySharedRAM(uint32_t start_addr, uint32_t size);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* ICUM_D_COMM_PE_PUB_H */

View File

@@ -0,0 +1,95 @@
/******************************************************************************/
/* Component Name ICU-M Interface Library (ICUMIF) */
/******************************************************************************/
/* Product : ICU-M Firmware */
/******************************************************************************/
/*******************************************************************************
* Copyright(C) 2021-2023 Renesas Electronics Corporation.
*
* RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY
*
* These instructions, statements, and programs are the confidential information
* of Renesas Electronics Corporation. They must be used and modified solely for
* the purpose for which it was furnished by Renesas Electronics Corporation.
* All part of them must not be reproduced nor disclosed to others in any form,
* without the prior written permission of Renesas Electronics Corporation.
*******************************************************************************/
#if !defined(R_ICUMIF_PUB_H)
#define R_ICUMIF_PUB_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**************************************************************************************/
/* Return Value Definition */
/**************************************************************************************/
/*===========================================================================*/
/* Definition of return value of ICU-M interface primitive */
/*===========================================================================*/
#define R_ICUMIF_ER_OK (0) /* Successful completion */
#define R_ICUMIF_ER_PARAM_ALIGNMENT (-1) /* Parameter alignment error */
#define R_ICUMIF_ER_PARAM_RANGE (-2) /* Parameter range error */
#define R_ICUMIF_ER_ADDR_NOT_G_RAM (-3) /* Address not within global RAM area */
#define R_ICUMIF_ER_IF_LIB_NOT_INIT (-4) /* ICU-M interface library not initialized */
#define R_ICUMIF_ER_REQ_QUEUE_FULL (-5) /* Service request queue FULL */
#define R_ICUMIF_ER_SOFTWARE_ERROR (-99) /* Software error */
/* Used only by R_ICUMIF_IsServiceCompleted */
#define R_ICUMIF_RTN_SERV_RUNNING (0) /* Service running */
#define R_ICUMIF_RTN_SERV_COMPLETION (1) /* Service execution completion */
/**************************************************************************************/
/* Definition */
/**************************************************************************************/
/* None */
/**************************************************************************************/
/* Macros */
/**************************************************************************************/
/* None */
/**************************************************************************************/
/* Type definition */
/**************************************************************************************/
/* None */
/**************************************************************************************/
/* Enumeration */
/**************************************************************************************/
/* None */
/**************************************************************************************/
/* Structure Definition */
/**************************************************************************************/
/*===========================================================================*/
/* Type definition: Registration information of call back function */
/*===========================================================================*/
typedef struct R_ICUMIF_CB_REGIST
{
void (*p_func_addr)(void);
} R_ICUMIF_CB_REGIST_t;
/**********************************************************************************/
/* Prototypes */
/**********************************************************************************/
int32_t R_ICUMIF_Init(uint32_t *p_request_queue);
int32_t R_ICUMIF_ServiceRequest(r_icumif_isd_t *p_ISD);
int32_t R_ICUMIF_ServiceResponse(void);
int32_t R_ICUMIF_IsServiceCompleted(r_icumif_isd_t *p_ISD);
r_icumif_sts_t *R_ICUMIF_GetStatus(void);
int32_t R_ICUMIF_SetSystemCallBackFunc(R_ICUMIF_CB_REGIST_t *p_regist_info);
void R_ICUMIF_IRQ_Handler(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* #if !defined(R_ICUMIF_PUB_H) */

View File

@@ -0,0 +1,39 @@
/******************************************************************************/
/* Component Name Customer-implement component */
/******************************************************************************/
/* Product : ICU-M Firmware */
/*******************************************************************************
* Copyright(C) 2021-2023 Renesas Electronics Corporation.
*
* RENESAS ELECTRONICS CONFIDENTIAL AND PROPRIETARY
*
* These instructions, statements, and programs are the confidential information
* of Renesas Electronics Corporation. They must be used and modified solely for
* the purpose for which it was furnished by Renesas Electronics Corporation.
* All part of them must not be reproduced nor disclosed to others in any form,
* without the prior written permission of Renesas Electronics Corporation.
*******************************************************************************/
#if !defined(USER_ICUMIF_API_PUB_H)
#define USER_ICUMIF_API_PUB_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/***************************************************************************************/
/* Prototypes */
/***************************************************************************************/
extern void USER_ICUMIF_FlushDCache(uint32_t addr, uint32_t size);
extern void USER_ICUMIF_InvalidateDCache(uint32_t addr, uint32_t size);
extern uint32_t USER_ICUMIF_GetMyPEID(void);
extern void USER_ICUMIF_GetLock(uintptr_t *p_saved_psw);
extern void USER_ICUMIF_ReleaseLock(uintptr_t saved_psw);
extern void USER_ICUMIF_Sync(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* #if !defined(USER_ICUMIF_API_PUB_H) */