Merge branch 'dev_ck_v2.1_bug#1061_bug#1081_bug#1079#' into 'dev_ck_v2.1'
1. fix Bug#1061 See merge request ucp/driver/ucp4008_platform_spu!34
This commit is contained in:
commit
0c9d8ff4e9
@ -49,7 +49,7 @@ void phy_para_init(int protocol, int option);
|
|||||||
// stc timer初始化,该接口只需八个核中的一个核调用即可
|
// stc timer初始化,该接口只需八个核中的一个核调用即可
|
||||||
void ape_stc_init();
|
void ape_stc_init();
|
||||||
|
|
||||||
// scs sm初始化,该接口只需八个核中的一个核调用即可,放在main函数的最前面
|
// pet sm初始化,该接口只需八个核中的一个核调用即可,放在main函数的最前面
|
||||||
void pet_sm_init();
|
void pet_sm_init();
|
||||||
/***************************************************************/
|
/***************************************************************/
|
||||||
// 以下接口,为帕拉丁临时验证带OSP的版本使用,最好按声明的顺序依次调用。
|
// 以下接口,为帕拉丁临时验证带OSP的版本使用,最好按声明的顺序依次调用。
|
||||||
|
@ -94,7 +94,7 @@ extern void osp_del_task(int prio, int scsId);
|
|||||||
函数入参:无
|
函数入参:无
|
||||||
函数功能:设置配置文件标识位
|
函数功能:设置配置文件标识位
|
||||||
*/
|
*/
|
||||||
void osp_var_init(void);
|
extern void osp_var_init(void);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
函数名称:smart_int_disable
|
函数名称:smart_int_disable
|
||||||
@ -191,7 +191,6 @@ extern int osp_get_cfgfile(char* name, uint32_t *pbuf, int* psize);
|
|||||||
/* 定时点相关接口 */
|
/* 定时点相关接口 */
|
||||||
/************************************************************************************/
|
/************************************************************************************/
|
||||||
/*
|
/*
|
||||||
|
|
||||||
函数名称:osp_timer_sync
|
函数名称:osp_timer_sync
|
||||||
函数功能:使能定时点任务
|
函数功能:使能定时点任务
|
||||||
函数参数:int scsId:子载波ID号
|
函数参数:int scsId:子载波ID号
|
||||||
@ -209,7 +208,6 @@ extern int osp_get_cfgfile(char* name, uint32_t *pbuf, int* psize);
|
|||||||
extern void osp_timer_sync(int scsId); /* 使能任务定时点 */
|
extern void osp_timer_sync(int scsId); /* 使能任务定时点 */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
函数名称:osp_timer_unsync
|
函数名称:osp_timer_unsync
|
||||||
函数功能:删小区时,用于定时点中断、任务及时隙中断
|
函数功能:删小区时,用于定时点中断、任务及时隙中断
|
||||||
函数参数:int scsId:子载波ID号
|
函数参数:int scsId:子载波ID号
|
||||||
|
@ -264,31 +264,17 @@ start_hook_func osp_init_start_hook[] =
|
|||||||
|
|
||||||
void osp_start()
|
void osp_start()
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int32_t core_id = get_core_id();
|
||||||
int apeId = get_core_id();
|
int32_t ret = 0;
|
||||||
g_ape_id = get_core_id();
|
g_ape_id = get_core_id();
|
||||||
g_que_id = g_ape_id;
|
g_que_id = g_ape_id;
|
||||||
|
|
||||||
#if 1
|
ret = smart_os_debug_init((DBG_DDR_OS_ADDR_BASE + core_id*DBG_DDR_OS_LEN), DBG_DDR_OS_LEN); // 推荐768, 实际1024
|
||||||
ret = smart_os_debug_init((DBG_DDR_OS_ADDR_BASE+apeId*DBG_DDR_OS_LEN), DBG_DDR_OS_LEN); // 推荐768, 实际1024
|
|
||||||
if (0 != ret)
|
if (0 != ret)
|
||||||
{
|
{
|
||||||
debug_write(DBG_DDR_ERR_IDX(apeId, 31), ret); // ape0: 0xb7e2407c
|
debug_write(DBG_DDR_ERR_IDX(core_id, 31), ret); // ape0: 0xb7e2407c
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE+apeId*DBG_DDR_HW_LEN), DBG_DDR_HW_LEN); // 推荐384,实际512
|
|
||||||
if (0 != ret)
|
|
||||||
{
|
|
||||||
debug_write(DBG_DDR_ERR_IDX(apeId, 32), ret); // ape0: 0xb7e24080
|
|
||||||
}
|
|
||||||
#if 0
|
|
||||||
ret = smart_spin_debug_init((DBG_DDR_SPIN_ADDR_BASE+apeId*DBG_DDR_SPIN_LEN), DBG_DDR_SPIN_LEN); // 推荐36, 实际64
|
|
||||||
if (0 != ret)
|
|
||||||
{
|
|
||||||
debug_write(DBG_DDR_ERR_IDX(apeId, 39), ret); // ape0: 0xb7e2407c
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
smart_kernel_init(osp_init_start_hook, g_ape_id);
|
smart_kernel_init(osp_init_start_hook, g_ape_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -494,7 +494,7 @@ void osp_hw_que_irq(void)
|
|||||||
|
|
||||||
#ifdef UCP_OSP_DBG_HW_CNT_ENABLE
|
#ifdef UCP_OSP_DBG_HW_CNT_ENABLE
|
||||||
uint8_t src_core_id = do_read_byte((char*)(&pmsg_head->src_core_id));
|
uint8_t src_core_id = do_read_byte((char*)(&pmsg_head->src_core_id));
|
||||||
__ucps2_synch(0);
|
//__ucps2_synch(0);
|
||||||
|
|
||||||
switch (src_core_id)
|
switch (src_core_id)
|
||||||
{
|
{
|
||||||
@ -566,7 +566,7 @@ void osp_hw_que_irq(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
dst_task_id = do_read_byte((char*)(&pmsg_head->dst_task_id));
|
dst_task_id = do_read_byte((char*)(&pmsg_head->dst_task_id));
|
||||||
__ucps2_synch(0);
|
//__ucps2_synch(0);
|
||||||
|
|
||||||
if (OSP_OK != osp_task_id_is_true(dst_task_id))
|
if (OSP_OK != osp_task_id_is_true(dst_task_id))
|
||||||
{
|
{
|
||||||
|
@ -20,7 +20,7 @@ int osp_sw_queue_int(osp_sw_queue *p_sw_queue_head)
|
|||||||
p_sw_queue_head->full_count = 0;
|
p_sw_queue_head->full_count = 0;
|
||||||
p_sw_queue_head->empty_count = 0;
|
p_sw_queue_head->empty_count = 0;
|
||||||
p_sw_queue_head->mask = OSP_QUE_DEP-1;
|
p_sw_queue_head->mask = OSP_QUE_DEP-1;
|
||||||
p_sw_queue_head->msg_sem = osp_create_sem(1);
|
//p_sw_queue_head->msg_sem = osp_create_sem(1);
|
||||||
/*if (NULL == p_sw_queue_head->msg_sem)
|
/*if (NULL == p_sw_queue_head->msg_sem)
|
||||||
{
|
{
|
||||||
return -OSP_PAR_ILL;
|
return -OSP_PAR_ILL;
|
||||||
|
@ -558,11 +558,25 @@ int osp_task_create(osp_task_info_ex *t_info_val)
|
|||||||
if ((t_info_val->task_type == OSP_TIMER_TYPE) || (t_info_val->task_type == OSP_DRIVER_TYPE) || (t_info_val->task_type == OSP_OSP_TYPE))
|
if ((t_info_val->task_type == OSP_TIMER_TYPE) || (t_info_val->task_type == OSP_DRIVER_TYPE) || (t_info_val->task_type == OSP_OSP_TYPE))
|
||||||
{
|
{
|
||||||
tcb_handle->sem = osp_create_sem(0);
|
tcb_handle->sem = osp_create_sem(0);
|
||||||
|
if (NULL == tcb_handle->sem)
|
||||||
|
{
|
||||||
|
UCP_PRINT_ERROR("task=%d, create sem error.\n\r", t_info_val->task_id);
|
||||||
|
FREE((stack_down-4));
|
||||||
|
FREE((char*)tcb_handle);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//else if((t_attr_val->sem_value != 0) && (t_attr_val->task_type == OSP_EVENT_TYPE))
|
//else if((t_attr_val->sem_value != 0) && (t_attr_val->task_type == OSP_EVENT_TYPE))
|
||||||
if (t_info_val->task_type == OSP_EVENT_TYPE)
|
if (t_info_val->task_type == OSP_EVENT_TYPE)
|
||||||
{
|
{
|
||||||
tcb_handle->event_sem = osp_create_sem(0);
|
tcb_handle->event_sem = osp_create_sem(0);
|
||||||
|
if (NULL == tcb_handle->event_sem)
|
||||||
|
{
|
||||||
|
UCP_PRINT_ERROR("task=%d, create sem error.\n\r", t_info_val->task_id);
|
||||||
|
FREE((stack_down-4));
|
||||||
|
FREE((char*)tcb_handle);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
tcb_handle->que_head = (osp_sw_queue*)osp_malloc(sizeof(osp_sw_queue));
|
tcb_handle->que_head = (osp_sw_queue*)osp_malloc(sizeof(osp_sw_queue));
|
||||||
if (NULL == tcb_handle->que_head)
|
if (NULL == tcb_handle->que_head)
|
||||||
{
|
{
|
||||||
@ -606,6 +620,9 @@ int osp_task_create(osp_task_info_ex *t_info_val)
|
|||||||
debug_write(OSP_DEBUG_POT(g_ape_id, 29), t_info_val->task_id);
|
debug_write(OSP_DEBUG_POT(g_ape_id, 29), t_info_val->task_id);
|
||||||
UCP_PRINT_ERROR("timer point is overflow\n\r");
|
UCP_PRINT_ERROR("timer point is overflow\n\r");
|
||||||
UCP_PRINT_ERROR("timer cfg failed\n\r");
|
UCP_PRINT_ERROR("timer cfg failed\n\r");
|
||||||
|
osp_delete_sem(tcb_handle->sem);
|
||||||
|
FREE((stack_down-4));
|
||||||
|
FREE((char*)tcb_handle);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
g_osp_timer_desc[g_osp_timer_desc_idx].task_id = t_info_val->task_id;
|
g_osp_timer_desc[g_osp_timer_desc_idx].task_id = t_info_val->task_id;
|
||||||
@ -667,7 +684,7 @@ int osp_task_create(osp_task_info_ex *t_info_val)
|
|||||||
FREE((char*)tcb_handle);
|
FREE((char*)tcb_handle);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
UCP_PRINT_LOG("smart_task_create return: 0x%08x, task_id = 0x%08x, task_pro = 0x%08x\r\n", ret, tcb_handle->task_id, tcb_handle->priority);
|
UCP_PRINT_LOG("smart_task_create return:%d, task_id=%d, num=%d", ret, tcb_handle->task_id, g_taskid_num);
|
||||||
debug_write(OSP_DEBUG_POT(g_ape_id, 30), ret);
|
debug_write(OSP_DEBUG_POT(g_ape_id, 30), ret);
|
||||||
debug_write(OSP_DEBUG_POT(g_ape_id, 31), t_info_val->task_id);
|
debug_write(OSP_DEBUG_POT(g_ape_id, 31), t_info_val->task_id);
|
||||||
|
|
||||||
@ -718,6 +735,7 @@ void osp_del_timer_task(int task_id)
|
|||||||
if(NULL == tcb_handle)
|
if(NULL == tcb_handle)
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_POT(g_ape_id, 13), task_id);
|
debug_write(OSP_DEBUG_POT(g_ape_id, 13), task_id);
|
||||||
|
UCP_PRINT_ERROR("osp_del_timer_task: no tcb_handle(task_id=%d)", task_id);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -725,9 +743,11 @@ void osp_del_timer_task(int task_id)
|
|||||||
if (task_prio <= 0)
|
if (task_prio <= 0)
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_POT(g_ape_id, 14), task_id);
|
debug_write(OSP_DEBUG_POT(g_ape_id, 14), task_id);
|
||||||
|
UCP_PRINT_ERROR("osp_del_timer_task: no task_prio(task_id=%d)", task_id);
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
smart_task_del(task_prio); /* 删除任务 */
|
||||||
g_task_id_array[task_prio] = 0; /* 通过优先级清任务列表 */
|
g_task_id_array[task_prio] = 0; /* 通过优先级清任务列表 */
|
||||||
g_prio_array[task_id] = 0; /* 通过任务ID清优先级列表 */
|
g_prio_array[task_id] = 0; /* 通过任务ID清优先级列表 */
|
||||||
FREE((char*)((tcb_handle->stack_down)-4)); /* 释放栈空间 */
|
FREE((char*)((tcb_handle->stack_down)-4)); /* 释放栈空间 */
|
||||||
@ -745,7 +765,7 @@ void osp_del_timer_task(int task_id)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
smart_task_del(task_prio); /* 删除任务 */
|
//smart_task_del(task_prio); /* 删除任务 */
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -783,7 +803,7 @@ void osp_del_task(int prio, int scsId)
|
|||||||
tcb_handle = (osp_tcb*)g_tcb_handler_tbl[task_id];
|
tcb_handle = (osp_tcb*)g_tcb_handler_tbl[task_id];
|
||||||
|
|
||||||
/* 根据消息类型分别处理 */
|
/* 根据消息类型分别处理 */
|
||||||
#if 0
|
#if 0 /* osp_timer_unsync接口直接由物理层调用 */
|
||||||
if (OSP_TIMER_TYPE == tcb_handle->task_type)
|
if (OSP_TIMER_TYPE == tcb_handle->task_type)
|
||||||
{
|
{
|
||||||
/* 只要删除定时点任务,那就清空所有定时点任务相关信息 */
|
/* 只要删除定时点任务,那就清空所有定时点任务相关信息 */
|
||||||
@ -795,16 +815,23 @@ void osp_del_task(int prio, int scsId)
|
|||||||
#endif
|
#endif
|
||||||
if (OSP_EVENT_TYPE == tcb_handle->task_type)
|
if (OSP_EVENT_TYPE == tcb_handle->task_type)
|
||||||
{
|
{
|
||||||
|
/* 删除任务 */
|
||||||
|
smart_task_del(prio);
|
||||||
|
|
||||||
/* 事件任务,删除事件信号量和软件队列 */
|
/* 事件任务,删除事件信号量和软件队列 */
|
||||||
osp_delete_sem(tcb_handle->event_sem);
|
osp_delete_sem(tcb_handle->event_sem);
|
||||||
osp_free((char*)tcb_handle->que_head);
|
osp_free((char*)tcb_handle->que_head);
|
||||||
}
|
}
|
||||||
else if (OSP_NORMAL_TYPE == tcb_handle->task_type)
|
else if (OSP_NORMAL_TYPE == tcb_handle->task_type)
|
||||||
{
|
{
|
||||||
/* 无操作 */
|
/* 删除任务 */
|
||||||
|
smart_task_del(prio);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* 删除任务 */
|
||||||
|
smart_task_del(prio);
|
||||||
|
|
||||||
/* 其他任务,删除信号量 */
|
/* 其他任务,删除信号量 */
|
||||||
osp_delete_sem(tcb_handle->sem);
|
osp_delete_sem(tcb_handle->sem);
|
||||||
}
|
}
|
||||||
@ -822,14 +849,14 @@ void osp_del_task(int prio, int scsId)
|
|||||||
if (task_id == g_task_id_table[u8_loop])
|
if (task_id == g_task_id_table[u8_loop])
|
||||||
{
|
{
|
||||||
g_task_id_table[u8_loop] = 0;
|
g_task_id_table[u8_loop] = 0;
|
||||||
memcpy(&(g_task_id_table[u8_loop]), &(g_task_id_table[u8_loop+1]), (g_taskid_num-u8_loop-1));
|
memcpy(&(g_task_id_table[u8_loop]), &(g_task_id_table[u8_loop+1]), sizeof(int)*(g_taskid_num-u8_loop-1));
|
||||||
g_taskid_num--;
|
g_taskid_num--;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 删除任务 */
|
/* 删除任务 */
|
||||||
smart_task_del(prio);
|
//smart_task_del(prio);
|
||||||
debug_write(OSP_DEBUG_POT(g_ape_id, 33), task_id);
|
debug_write(OSP_DEBUG_POT(g_ape_id, 33), task_id);
|
||||||
|
|
||||||
#ifdef UCP_TICK_ENABLE
|
#ifdef UCP_TICK_ENABLE
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include "ucp_printf.h"
|
#include "ucp_printf.h"
|
||||||
#include "ucp_tick.h"
|
#include "ucp_tick.h"
|
||||||
|
|
||||||
osp_id_timer_t g_task_off_tbl[10][50] = {0}; /* 根据定时点任务,分解成时隙,偏移,任务ID */
|
osp_id_timer_t g_task_off_tbl[10][100] = {0}; /* 根据定时点任务,分解成时隙,偏移,任务ID */
|
||||||
osp_timer_desc g_osp_timer_desc[OSP_TIMER_TASK_MAX] ={0}; /* 定时点任务与定时点信息汇总 */
|
osp_timer_desc g_osp_timer_desc[OSP_TIMER_TASK_MAX] ={0}; /* 定时点任务与定时点信息汇总 */
|
||||||
int g_osp_timer_desc_idx = 0;
|
int g_osp_timer_desc_idx = 0;
|
||||||
|
|
||||||
@ -21,7 +21,7 @@ extern void stc_timer_set_tmrpoint(stStcTimerPoint *pTmrPoint);
|
|||||||
|
|
||||||
//uint32_t g_task_timer_offset_forsoc[120] = {0};
|
//uint32_t g_task_timer_offset_forsoc[120] = {0};
|
||||||
char g_register_task_buf[OSP_TMR_POINT_MAX] = {0};
|
char g_register_task_buf[OSP_TMR_POINT_MAX] = {0};
|
||||||
uint8_t gu8_register_task_group[10][50] = {0};
|
uint8_t gu8_register_task_group[10][100] = {0};
|
||||||
//char g_t_off_larger[50] = {0};
|
//char g_t_off_larger[50] = {0};
|
||||||
uint16_t g_reg_task_index = 0;
|
uint16_t g_reg_task_index = 0;
|
||||||
|
|
||||||
@ -43,13 +43,25 @@ void osp_timer_clear_stctimer()
|
|||||||
void osp_timer_clear_task()
|
void osp_timer_clear_task()
|
||||||
{
|
{
|
||||||
uint16_t u16_loop = 0;
|
uint16_t u16_loop = 0;
|
||||||
|
|
||||||
|
for (u16_loop = 0; u16_loop < g_osp_timer_desc_idx; u16_loop++)
|
||||||
|
{
|
||||||
|
if ((g_osp_timer_desc[u16_loop].task_id) > 0)
|
||||||
|
{
|
||||||
|
osp_del_timer_task(g_osp_timer_desc[u16_loop].task_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
for (u16_loop = 0; u16_loop < g_reg_task_index; u16_loop++)
|
for (u16_loop = 0; u16_loop < g_reg_task_index; u16_loop++)
|
||||||
{
|
{
|
||||||
if (g_register_task_buf[g_reg_task_index] > 0)
|
//UCP_PRINT_ERROR("loop=%d, taskid=%d", u16_loop, g_register_task_buf[u16_loop]);
|
||||||
|
if (g_register_task_buf[u16_loop] > 0)
|
||||||
{
|
{
|
||||||
osp_del_timer_task(g_register_task_buf[g_reg_task_index]);
|
osp_del_timer_task(g_register_task_buf[u16_loop]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* OSP侧定时点任务初始化 */
|
/* OSP侧定时点任务初始化 */
|
||||||
@ -125,6 +137,7 @@ void osp_timer_sync(int scsId)
|
|||||||
tmp_bitmap &= ~(1 << slot_id);
|
tmp_bitmap &= ~(1 << slot_id);
|
||||||
g_task_off_tbl[slot_id][tbl_index].task_id = ptr->task_id;
|
g_task_off_tbl[slot_id][tbl_index].task_id = ptr->task_id;
|
||||||
g_task_off_tbl[slot_id][tbl_index].t_offset = ptr->t_offset;
|
g_task_off_tbl[slot_id][tbl_index].t_offset = ptr->t_offset;
|
||||||
|
//UCP_PRINT_ERROR("i=%d,j=%d,taskid=%d,offset=%d", slot_id,tbl_index, ptr->task_id, ptr->t_offset);
|
||||||
}
|
}
|
||||||
tmp_cnt++;
|
tmp_cnt++;
|
||||||
ptr++;
|
ptr++;
|
||||||
@ -135,8 +148,13 @@ void osp_timer_sync(int scsId)
|
|||||||
for(i = 0; i < 10;i++)
|
for(i = 0; i < 10;i++)
|
||||||
{
|
{
|
||||||
stc_timer_index = 0;
|
stc_timer_index = 0;
|
||||||
for(j = 0; j < 50;j++)
|
for(j = 0; j < 100;j++)
|
||||||
{
|
{
|
||||||
|
if (50 <= stc_timer_index)
|
||||||
|
{
|
||||||
|
UCP_PRINT_ERROR("one slot timer tasks overflow\n\r");
|
||||||
|
return ;
|
||||||
|
}
|
||||||
if (0 == j)
|
if (0 == j)
|
||||||
{
|
{
|
||||||
g_stcTimerPoint[i*50 + stc_timer_index].pointVal = 0;
|
g_stcTimerPoint[i*50 + stc_timer_index].pointVal = 0;
|
||||||
|
@ -64,15 +64,8 @@ void spu_drv_init(void)
|
|||||||
{
|
{
|
||||||
pet_sm_alloc();
|
pet_sm_alloc();
|
||||||
|
|
||||||
int32_t core_id = get_core_id();
|
|
||||||
|
|
||||||
debug_write(DBG_DDR_COMMON_IDX(core_id, 0), PLATFORM_BUILD_DATA);
|
|
||||||
UCP_PRINT_EMPTY("Hello world from APE[0x%08x]\r\n", core_id);
|
|
||||||
|
|
||||||
ape_drv_init();
|
ape_drv_init();
|
||||||
|
|
||||||
UCP_PRINT_EMPTY("core_id[0x%08x] ape_drv_init OK\r\n", core_id);
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,24 +13,24 @@
|
|||||||
// -FHDR------------------------------------------------------------
|
// -FHDR------------------------------------------------------------
|
||||||
|
|
||||||
#include "ape_top.h"
|
#include "ape_top.h"
|
||||||
#include "osp_init.h"
|
#include "lib_debug_init.h"
|
||||||
#include "smartos.h"
|
|
||||||
#include "log_client.h"
|
#include "log_client.h"
|
||||||
|
#include "osp_init.h"
|
||||||
|
|
||||||
int32_t main(int32_t argc, char* argv[])
|
int32_t main(int32_t argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
int32_t core_id = 0;
|
||||||
|
int32_t ret = 0;
|
||||||
|
|
||||||
set_core_id();
|
set_core_id();
|
||||||
|
|
||||||
soc_drv_init();
|
core_id = get_core_id();
|
||||||
#if 1
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 0), PLATFORM_BUILD_DATA);
|
||||||
int32_t apeId = get_core_id();
|
|
||||||
|
|
||||||
int32_t ret = smart_irq_debug_init(DBG_DDR_IRQ_ADDR_BASE+apeId*DBG_DDR_IRQ_LEN, DBG_DDR_IRQ_LEN);
|
soc_drv_init();
|
||||||
if (0 != ret)
|
|
||||||
{
|
ret = spu_lib_debug_init(core_id);
|
||||||
debug_write(DBG_DDR_ERR_IDX(apeId, 10), ret);
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 1), ret);
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
spu_log_client_init();
|
spu_log_client_init();
|
||||||
|
|
||||||
|
@ -61,6 +61,19 @@ static uint32_t gu32_app_sendto_que8_ng = 0;
|
|||||||
static uint32_t gu32_app_sendto_que9_ng = 0;
|
static uint32_t gu32_app_sendto_que9_ng = 0;
|
||||||
static uint32_t gu32_app_sendto_que10_ng = 0;
|
static uint32_t gu32_app_sendto_que10_ng = 0;
|
||||||
static uint32_t gu32_app_sendto_que11_ng = 0;
|
static uint32_t gu32_app_sendto_que11_ng = 0;
|
||||||
|
|
||||||
|
static uint32_t gu32_app_recv_que0 = 0; // #24
|
||||||
|
static uint32_t gu32_app_recv_que1 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que2 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que3 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que4 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que5 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que6 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que7 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que8 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que9 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que10 = 0;
|
||||||
|
static uint32_t gu32_app_recv_que11 = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define APP_PALLADIUM_TEST
|
#define APP_PALLADIUM_TEST
|
||||||
@ -210,62 +223,62 @@ int32_t osp_send_msg(uint32_t msg_addr,
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 12), ++gu32_app_sendto_que0_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 12), ++gu32_app_sendto_que0_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 13), ++gu32_app_sendto_que1_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 13), ++gu32_app_sendto_que1_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 14), ++gu32_app_sendto_que2_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 14), ++gu32_app_sendto_que2_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 15), ++gu32_app_sendto_que3_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 15), ++gu32_app_sendto_que3_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 16), ++gu32_app_sendto_que4_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 16), ++gu32_app_sendto_que4_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 17), ++gu32_app_sendto_que5_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 17), ++gu32_app_sendto_que5_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 6:
|
case 6:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 18), ++gu32_app_sendto_que6_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 18), ++gu32_app_sendto_que6_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 7:
|
case 7:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 19), ++gu32_app_sendto_que7_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 19), ++gu32_app_sendto_que7_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 8:
|
case 8:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 20), ++gu32_app_sendto_que8_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 20), ++gu32_app_sendto_que8_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 9:
|
case 9:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 21), ++gu32_app_sendto_que9_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 21), ++gu32_app_sendto_que9_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 10:
|
case 10:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 22), ++gu32_app_sendto_que10_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 22), ++gu32_app_sendto_que10_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 11:
|
case 11:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 23), ++gu32_app_sendto_que11_ng);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 23), ++gu32_app_sendto_que11_ng);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -284,62 +297,62 @@ int32_t osp_send_msg(uint32_t msg_addr,
|
|||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 0), ++gu32_app_sendto_que0_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 0), ++gu32_app_sendto_que0_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 1), ++gu32_app_sendto_que1_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 1), ++gu32_app_sendto_que1_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 2), ++gu32_app_sendto_que2_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 2), ++gu32_app_sendto_que2_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 3), ++gu32_app_sendto_que3_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 3), ++gu32_app_sendto_que3_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 4), ++gu32_app_sendto_que4_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 4), ++gu32_app_sendto_que4_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 5), ++gu32_app_sendto_que5_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 5), ++gu32_app_sendto_que5_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 6:
|
case 6:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 6), ++gu32_app_sendto_que6_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 6), ++gu32_app_sendto_que6_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 7:
|
case 7:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 7), ++gu32_app_sendto_que7_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 7), ++gu32_app_sendto_que7_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 8:
|
case 8:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 8), ++gu32_app_sendto_que8_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 8), ++gu32_app_sendto_que8_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 9:
|
case 9:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 9), ++gu32_app_sendto_que9_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 9), ++gu32_app_sendto_que9_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 10:
|
case 10:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 10), ++gu32_app_sendto_que10_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 10), ++gu32_app_sendto_que10_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 11:
|
case 11:
|
||||||
{
|
{
|
||||||
debug_write(OSP_DEBUG_HW_POT(src_core_id, 11), ++gu32_app_sendto_que11_ok);
|
debug_write(OSP_DEBUG_HW_POT(core_id, 11), ++gu32_app_sendto_que11_ok);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
@ -387,15 +400,154 @@ int32_t osp_send_msg_oam(uint32_t msg_addr,
|
|||||||
debug_write(DBG_DDR_COMMON_IDX(core_id, 13), g_ecs_app_debug_info.ecs_msg_InQue_err);
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 13), g_ecs_app_debug_info.ecs_msg_InQue_err);
|
||||||
debug_write(DBG_DDR_ERR_IDX(core_id, 19), ret_queue);
|
debug_write(DBG_DDR_ERR_IDX(core_id, 19), ret_queue);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef UCP_OSP_DBG_HW_CNT_ENABLE
|
||||||
|
switch (dst_core_id)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 12), ++gu32_app_sendto_que0_ng);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#ifdef APP_PALLADIUM_TEST
|
case 1:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 13), ++gu32_app_sendto_que1_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 14), ++gu32_app_sendto_que2_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 15), ++gu32_app_sendto_que3_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 16), ++gu32_app_sendto_que4_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 5:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 17), ++gu32_app_sendto_que5_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 6:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 18), ++gu32_app_sendto_que6_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 7:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 19), ++gu32_app_sendto_que7_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 20), ++gu32_app_sendto_que8_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 9:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 21), ++gu32_app_sendto_que9_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 10:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 22), ++gu32_app_sendto_que10_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 11:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 23), ++gu32_app_sendto_que11_ng);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
#ifdef APP_PALLADIUM_TEST
|
||||||
debug_write(DBG_DDR_COMMON_IDX(core_id, 14), g_ecs_app_debug_info.ecs_msg_send_num);
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 14), g_ecs_app_debug_info.ecs_msg_send_num);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef UCP_OSP_DBG_HW_CNT_ENABLE
|
||||||
|
switch (dst_core_id)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 0), ++gu32_app_sendto_que0_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 1), ++gu32_app_sendto_que1_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 2), ++gu32_app_sendto_que2_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 3), ++gu32_app_sendto_que3_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 4), ++gu32_app_sendto_que4_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 5:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 5), ++gu32_app_sendto_que5_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 6:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 6), ++gu32_app_sendto_que6_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 7:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 7), ++gu32_app_sendto_que7_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 8), ++gu32_app_sendto_que8_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 9:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 9), ++gu32_app_sendto_que9_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 10:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 10), ++gu32_app_sendto_que10_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 11:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 11), ++gu32_app_sendto_que11_ok);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return ret_queue;
|
return ret_queue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uint8_t ecs_hw_que_get_info(uint8_t que_id, uint32_t* pmsg_addr, uint32_t* pmsg_size)
|
uint8_t ecs_hw_que_get_info(uint8_t que_id, uint32_t* pmsg_addr, uint32_t* pmsg_size)
|
||||||
{
|
{
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
@ -432,6 +584,80 @@ uint8_t ecs_hw_que_get_info(uint8_t que_id, uint32_t* pmsg_addr, uint32_t* pmsg_
|
|||||||
*pmsg_addr = u32addr;
|
*pmsg_addr = u32addr;
|
||||||
*pmsg_size = u32msg_size;
|
*pmsg_size = u32msg_size;
|
||||||
|
|
||||||
|
#ifdef UCP_OSP_DBG_HW_CNT_ENABLE
|
||||||
|
uint8_t src_core_id = do_read_byte((char*)(&pmsg_head->src_core_id));
|
||||||
|
//__ucps2_synch(0);
|
||||||
|
|
||||||
|
switch (src_core_id)
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 24), ++gu32_app_recv_que0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 1:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 25), ++gu32_app_recv_que1);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 2:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 26), ++gu32_app_recv_que2);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 3:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 27), ++gu32_app_recv_que3);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 4:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 28), ++gu32_app_recv_que4);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 5:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 29), ++gu32_app_recv_que5);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 6:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 30), ++gu32_app_recv_que6);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 7:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 31), ++gu32_app_recv_que7);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 8:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 32), ++gu32_app_recv_que8);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 9:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 33), ++gu32_app_recv_que9);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 10:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 34), ++gu32_app_recv_que10);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case 11:
|
||||||
|
{
|
||||||
|
debug_write(OSP_DEBUG_HW_POT(core_id, 35), ++gu32_app_recv_que11);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef APP_PALLADIUM_TEST
|
#ifdef APP_PALLADIUM_TEST
|
||||||
g_ecs_app_debug_info.ecs_msg_get_info_num++;
|
g_ecs_app_debug_info.ecs_msg_get_info_num++;
|
||||||
debug_write(DBG_DDR_COMMON_IDX(core_id, 17), g_ecs_app_debug_info.ecs_msg_get_info_num);
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 17), g_ecs_app_debug_info.ecs_msg_get_info_num);
|
||||||
|
21
public/common/platform/inc/lib_debug_init.h
Normal file
21
public/common/platform/inc/lib_debug_init.h
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
// +FHDR------------------------------------------------------------
|
||||||
|
// Copyright (c) 2022 SmartLogic.
|
||||||
|
// ALL RIGHTS RESERVED
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// Filename : lib_debug_init.h
|
||||||
|
// Author : xianfeng.du
|
||||||
|
// Created On : 2023-09-23
|
||||||
|
// Last Modified :
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -FHDR------------------------------------------------------------
|
||||||
|
|
||||||
|
#ifndef __SPU_LIB_DEBUG_INIT_H__
|
||||||
|
#define __SPU_LIB_DEBUG_INIT_H__
|
||||||
|
|
||||||
|
extern int32_t spu_lib_debug_init(uint8_t core_id);
|
||||||
|
|
||||||
|
#endif /* __SPU_LIB_DEBUG_INIT_H__ */
|
||||||
|
|
51
public/common/platform/src/lib_debug_init.s.c
Normal file
51
public/common/platform/src/lib_debug_init.s.c
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
// +FHDR------------------------------------------------------------
|
||||||
|
// Copyright (c) 2022 SmartLogic.
|
||||||
|
// ALL RIGHTS RESERVED
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// Filename : lib_debug_init.c
|
||||||
|
// Author : xianfeng.du
|
||||||
|
// Created On : 2023-09-23
|
||||||
|
// Last Modified :
|
||||||
|
// -----------------------------------------------------------------
|
||||||
|
// Description:
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// -FHDR------------------------------------------------------------
|
||||||
|
#include "typedef.h"
|
||||||
|
#include "lib_debug_init.h"
|
||||||
|
#include "ucp_utility.h"
|
||||||
|
|
||||||
|
#define SPU_APE_NUM (8)
|
||||||
|
|
||||||
|
extern int smart_irq_debug_init(uint32_t debug_base_addr, uint32_t len_bytes);
|
||||||
|
extern int smart_hq_debug_init( uint32_t debug_base_addr, uint32_t len_bytes);
|
||||||
|
|
||||||
|
/*
|
||||||
|
return : 0 -- OK
|
||||||
|
0x001 -- interrupt error
|
||||||
|
0x010 -- hw queue error
|
||||||
|
*/
|
||||||
|
int32_t spu_lib_debug_init(uint8_t core_id)
|
||||||
|
{
|
||||||
|
int32_t ret = 0;
|
||||||
|
int32_t ret_val = 0;
|
||||||
|
|
||||||
|
/* interrupt */
|
||||||
|
ret = smart_irq_debug_init((DBG_DDR_IRQ_ADDR_BASE + core_id*DBG_DDR_IRQ_LEN), DBG_DDR_IRQ_LEN);
|
||||||
|
if (0 != ret)
|
||||||
|
{
|
||||||
|
debug_write(DBG_DDR_ERR_IDX(core_id, 10), ret);
|
||||||
|
ret_val += 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* hw queue */
|
||||||
|
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE + core_id*DBG_DDR_HW_LEN), DBG_DDR_HW_LEN); // 推荐384,实际512
|
||||||
|
if (0 != ret)
|
||||||
|
{
|
||||||
|
debug_write(DBG_DDR_ERR_IDX(core_id, 32), ret); // ape0: 0xb7e24080
|
||||||
|
ret_val += 1 << 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret_val;
|
||||||
|
}
|
||||||
|
|
@ -28,7 +28,7 @@ typedef struct ECS_DEBUG_INFO_STRUCT
|
|||||||
uint32_t ecs_msg_QutQue_ok;
|
uint32_t ecs_msg_QutQue_ok;
|
||||||
uint32_t ecs_msg_QueIsEmpty_num;
|
uint32_t ecs_msg_QueIsEmpty_num;
|
||||||
}ecs_debug_info;
|
}ecs_debug_info;
|
||||||
ecs_debug_info g_ecs_debug_info; /* ECS硬件队列调试信息 */
|
ecs_debug_info g_ecs_debug_info; /* ECS¿¿¿¿¿¿¿¿ */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef UCP_OSP_DBG_HW_CNT_ENABLE
|
#ifdef UCP_OSP_DBG_HW_CNT_ENABLE
|
||||||
@ -46,8 +46,8 @@ static uint32_t gu32_app_recv_que10 = 0;
|
|||||||
static uint32_t gu32_app_recv_que11 = 0;
|
static uint32_t gu32_app_recv_que11 = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ecs_hw_que_info_withirq_t g_ecs_hw_que_info; /* ECS带中断的硬件队列相关信息 */
|
ecs_hw_que_info_withirq_t g_ecs_hw_que_info; /* ECS¿¿¿¿¿¿¿¿¿¿¿¿ */
|
||||||
ecs_hw_que_info_noirq_t gst_ecs_hw_que_info_noirq; /* ECS不带中断的硬件队列相关信息 */
|
ecs_hw_que_info_noirq_t gst_ecs_hw_que_info_noirq; /* ECS¿¿¿¿¿¿¿¿¿¿¿¿¿ */
|
||||||
|
|
||||||
extern void ecs_hw_que_irq(void);
|
extern void ecs_hw_que_irq(void);
|
||||||
|
|
||||||
@ -201,6 +201,17 @@ ALWAYS_INLINE int32_t ecs_hw_que_recv(uint8_t u8dst_que_id, uint32_t *pu32value)
|
|||||||
int32_t i32ret = 0;
|
int32_t i32ret = 0;
|
||||||
int32_t apeId = get_core_id();
|
int32_t apeId = get_core_id();
|
||||||
|
|
||||||
|
/* is empty */
|
||||||
|
i32ret = smart_que_is_empty(u8dst_que_id);
|
||||||
|
if (0 != i32ret)
|
||||||
|
{
|
||||||
|
/* no message return */
|
||||||
|
#ifdef APP_PALLADIUM_TEST
|
||||||
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 47), i32ret);
|
||||||
|
#endif
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
i32ret = smart_out_que(u8dst_que_id, pu32value);
|
i32ret = smart_out_que(u8dst_que_id, pu32value);
|
||||||
if (0 != i32ret)
|
if (0 != i32ret)
|
||||||
{
|
{
|
||||||
|
@ -27,9 +27,9 @@
|
|||||||
#define PRINT_TICK 0x00000010
|
#define PRINT_TICK 0x00000010
|
||||||
|
|
||||||
//#define UCP_PRINT_LEVEL (PRINT_OFF)
|
//#define UCP_PRINT_LEVEL (PRINT_OFF)
|
||||||
//#define UCP_PRINT_LEVEL (PRINT_ERROR | PRINT_WARN |PRINT_LOG | PRINT_DEBUG | PRINT_TICK)
|
#define UCP_PRINT_LEVEL (PRINT_ERROR | PRINT_WARN |PRINT_LOG | PRINT_DEBUG | PRINT_TICK)
|
||||||
//#define UCP_PRINT_LEVEL (PRINT_ERROR | PRINT_DEBUG)
|
//#define UCP_PRINT_LEVEL (PRINT_ERROR | PRINT_DEBUG)
|
||||||
#define UCP_PRINT_LEVEL (PRINT_ERROR)
|
//#define UCP_PRINT_LEVEL (PRINT_ERROR)
|
||||||
|
|
||||||
|
|
||||||
#if (UCP_PRINT_LEVEL & PRINT_ERROR)
|
#if (UCP_PRINT_LEVEL & PRINT_ERROR)
|
||||||
|
@ -28,13 +28,6 @@ void ecs_rfm0_drv_init(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
#if 1
|
|
||||||
ret = smart_irq_debug_init(DBG_DDR_IRQ_ADDR_BASE+apeId*DBG_DDR_IRQ_LEN, DBG_DDR_IRQ_LEN);
|
|
||||||
if (0 != ret)
|
|
||||||
{
|
|
||||||
debug_write(DBG_DDR_ERR_IDX(apeId, 11), ret);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ret = smart_irq_init(apeId);
|
ret = smart_irq_init(apeId);
|
||||||
if (0 != ret)
|
if (0 != ret)
|
||||||
{
|
{
|
||||||
|
@ -22,20 +22,21 @@
|
|||||||
#include "phy_para.h"
|
#include "phy_para.h"
|
||||||
#include "ecpri_queue_proc.h"
|
#include "ecpri_queue_proc.h"
|
||||||
#include "ecpri_csu.h"
|
#include "ecpri_csu.h"
|
||||||
|
#include "lib_debug_init.h"
|
||||||
|
|
||||||
|
|
||||||
int32_t main(int32_t argc, char* argv[])
|
int32_t main(int32_t argc, char* argv[])
|
||||||
{
|
{
|
||||||
UCP_PRINT_EMPTY("Hello world from ECS RFM SPU0,coreId[0x%x]", get_core_id());
|
int32_t core_id = 0;
|
||||||
debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA);
|
int32_t ret = 0;
|
||||||
|
|
||||||
/* hw_debug_init */
|
UCP_PRINT_EMPTY("Hello world from ECS RFM SPU0,coreId[0x%x]", get_core_id());
|
||||||
int32_t core_id = get_core_id();
|
|
||||||
int ret = 0;
|
core_id = get_core_id();
|
||||||
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE+DBG_DDR_HW_LEN*core_id), DBG_DDR_HW_LEN); // 推è<C2A8><C3A8>384,实é™?512
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 0), PLATFORM_BUILD_DATA);
|
||||||
if (0 != ret)
|
|
||||||
{
|
ret = spu_lib_debug_init(core_id);
|
||||||
debug_write(DBG_DDR_ERR_IDX(core_id, 46), ret);
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 1), ret);
|
||||||
}
|
|
||||||
|
|
||||||
spu_log_client_init();
|
spu_log_client_init();
|
||||||
|
|
||||||
|
@ -37,13 +37,7 @@ void ecs_rfm1_drv_init(void)
|
|||||||
SET_CLK_CFG_EMU();
|
SET_CLK_CFG_EMU();
|
||||||
//APC0_CSU_ELEVELMASK = 0xFFFFFFFF;
|
//APC0_CSU_ELEVELMASK = 0xFFFFFFFF;
|
||||||
int32_t ret = 0;
|
int32_t ret = 0;
|
||||||
#if 1
|
|
||||||
ret = smart_irq_debug_init(DBG_DDR_IRQ_ADDR_BASE+apeId*DBG_DDR_IRQ_LEN, DBG_DDR_IRQ_LEN);
|
|
||||||
if (0 != ret)
|
|
||||||
{
|
|
||||||
debug_write(DBG_DDR_ERR_IDX(apeId, 12), ret);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
ret = smart_irq_init(apeId);
|
ret = smart_irq_init(apeId);
|
||||||
if (0 != ret)
|
if (0 != ret)
|
||||||
{
|
{
|
||||||
@ -73,7 +67,7 @@ void ecs_rfm1_drv_init(void)
|
|||||||
UCP_PRINT_EMPTY("ctc cal intr init.\r\n");
|
UCP_PRINT_EMPTY("ctc cal intr init.\r\n");
|
||||||
#ifdef PALLADIUM_TEST
|
#ifdef PALLADIUM_TEST
|
||||||
flag++;
|
flag++;
|
||||||
debug_write((DBG_DDR_IDX_DRV_BASE+1+(apeId<<2)), flag);
|
debug_write((DBG_DDR_IDX_DRV_BASE+1+(apeId<<2)), flag); // 0xB4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
@ -88,7 +82,7 @@ void ecs_rfm1_drv_init(void)
|
|||||||
hw_gpio_init();
|
hw_gpio_init();
|
||||||
#ifdef PALLADIUM_TEST
|
#ifdef PALLADIUM_TEST
|
||||||
flag++;
|
flag++;
|
||||||
debug_write((DBG_DDR_IDX_DRV_BASE+1+(apeId<<2)), flag);
|
debug_write((DBG_DDR_IDX_DRV_BASE+1+(apeId<<2)), flag); // 0xB4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ecs_hw_que_init(apeId);
|
ecs_hw_que_init(apeId);
|
||||||
@ -109,13 +103,13 @@ void ecs_rfm1_drv_init(void)
|
|||||||
#endif
|
#endif
|
||||||
#ifdef PALLADIUM_TEST
|
#ifdef PALLADIUM_TEST
|
||||||
flag++;
|
flag++;
|
||||||
debug_write((DBG_DDR_IDX_DRV_BASE+1+(apeId<<2)), flag);
|
debug_write((DBG_DDR_IDX_DRV_BASE+1+(apeId<<2)), flag); // 0xB4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
rfm_stc_init();
|
rfm_stc_init();
|
||||||
#ifdef PALLADIUM_TEST
|
#ifdef PALLADIUM_TEST
|
||||||
flag++;
|
flag++;
|
||||||
debug_write((DBG_DDR_IDX_DRV_BASE+1+(apeId<<2)), flag);
|
debug_write((DBG_DDR_IDX_DRV_BASE+1+(apeId<<2)), flag); // 0xB4
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -138,7 +132,7 @@ void check_phy_cell(void)
|
|||||||
//debug_write(DBG_DDR_COMMON_IDX(get_core_id(),5), 5);
|
//debug_write(DBG_DDR_COMMON_IDX(get_core_id(),5), 5);
|
||||||
|
|
||||||
//rdmcycle(&clockBegin);
|
//rdmcycle(&clockBegin);
|
||||||
// cpri_timer_reconfig(&cellPara);
|
//cpri_timer_reconfig(&cellPara);
|
||||||
int32_t ret = mtimer_reconfig(&cellPara);
|
int32_t ret = mtimer_reconfig(&cellPara);
|
||||||
//rdmcycle(&clockEnd);
|
//rdmcycle(&clockEnd);
|
||||||
//clockCnt = clockEnd - clockBegin;
|
//clockCnt = clockEnd - clockBegin;
|
||||||
|
@ -28,6 +28,8 @@
|
|||||||
#define RFM_TEST_OAM_MSG_SIZE (8)
|
#define RFM_TEST_OAM_MSG_SIZE (8)
|
||||||
#define RFM_MSG_TYPE (0)
|
#define RFM_MSG_TYPE (0)
|
||||||
|
|
||||||
|
extern void phy_oam_msg_proc(uint32_t u32msg_addr, uint32_t u32msg_size);
|
||||||
|
|
||||||
OamMsgTransferHeader_t *g_oam_msg_ptr = NULL;
|
OamMsgTransferHeader_t *g_oam_msg_ptr = NULL;
|
||||||
SpuOamBaseDelaySetRsp_t *g_oam_base_delay_set_rsp_ptr = NULL;
|
SpuOamBaseDelaySetRsp_t *g_oam_base_delay_set_rsp_ptr = NULL;
|
||||||
SpuOamBaseDelayQryRsp_t *g_oam_base_delay_qry_rsp_ptr = NULL;
|
SpuOamBaseDelayQryRsp_t *g_oam_base_delay_qry_rsp_ptr = NULL;
|
||||||
@ -95,6 +97,9 @@ void oam_msg_proc(uint32_t u32msg_addr, uint32_t u32msg_size)
|
|||||||
oam_fiber_delay_qry_ptr = (SpuOamFiberDelayQryReq_t *)((uint8_t *)g_oam_msg_ptr + sizeof(OamMsgTransferHeader_t));
|
oam_fiber_delay_qry_ptr = (SpuOamFiberDelayQryReq_t *)((uint8_t *)g_oam_msg_ptr + sizeof(OamMsgTransferHeader_t));
|
||||||
oam_fiber_delay_proc(oam_fiber_delay_qry_ptr, g_oam_msg_ptr);
|
oam_fiber_delay_proc(oam_fiber_delay_qry_ptr, g_oam_msg_ptr);
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
phy_oam_msg_proc(u32msg_addr, u32msg_size);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
#include "phy_para.h"
|
#include "phy_para.h"
|
||||||
#include "hw_cpri.h"
|
#include "hw_cpri.h"
|
||||||
#include "hwque.h"
|
#include "hwque.h"
|
||||||
|
#include "lib_debug_init.h"
|
||||||
|
|
||||||
#ifdef TEST_ENABLE
|
#ifdef TEST_ENABLE
|
||||||
#include "fh_test.h"
|
#include "fh_test.h"
|
||||||
@ -57,23 +58,22 @@ extern uint32_t gCpriCsuDummyFlag;
|
|||||||
|
|
||||||
int32_t main(int32_t argc, char* argv[])
|
int32_t main(int32_t argc, char* argv[])
|
||||||
{
|
{
|
||||||
UCP_PRINT_EMPTY("Hello world from ECS RFM SPU1,coreId[0x%x]", get_core_id());
|
int32_t core_id = 0;
|
||||||
debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA);
|
int32_t ret = 0;
|
||||||
|
|
||||||
|
UCP_PRINT_EMPTY("Hello world from ECS RFM SPU1,coreId[0x%x]", get_core_id());
|
||||||
|
|
||||||
|
core_id = get_core_id();
|
||||||
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 0), PLATFORM_BUILD_DATA);
|
||||||
|
|
||||||
|
ret = spu_lib_debug_init(core_id);
|
||||||
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 1), ret);
|
||||||
|
|
||||||
/* hw_debug_init */
|
|
||||||
int32_t core_id = get_core_id();
|
|
||||||
#ifdef PALLADIUM_TEST
|
#ifdef PALLADIUM_TEST
|
||||||
int flag = 1;
|
int flag = 1;
|
||||||
debug_write((DBG_DDR_IDX_DRV_BASE+(core_id<<2)), flag); // 0xB0
|
debug_write((DBG_DDR_IDX_DRV_BASE+(core_id<<2)), flag); // 0xB0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ret = 0;
|
|
||||||
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE+DBG_DDR_HW_LEN*core_id), DBG_DDR_HW_LEN); // ÍÆ¼ö384£¬Êµ¼Ê512
|
|
||||||
if (0 != ret)
|
|
||||||
{
|
|
||||||
debug_write(DBG_DDR_ERR_IDX(core_id, 46), ret);
|
|
||||||
}
|
|
||||||
|
|
||||||
spu_log_client_init();
|
spu_log_client_init();
|
||||||
|
|
||||||
spu_log_server_init();
|
spu_log_server_init();
|
||||||
|
@ -222,13 +222,18 @@ void ecs_rfm1_delete_cell(uint32_t scsId, uint32_t cellId, uint32_t coreId)
|
|||||||
flag++;
|
flag++;
|
||||||
debug_write((DBG_DDR_IDX_DRV_BASE+52), flag); // 0xb7e060d0
|
debug_write((DBG_DDR_IDX_DRV_BASE+52), flag); // 0xb7e060d0
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
volatile uint32_t gCellFlag = 0;
|
volatile uint32_t gCellFlag = 0;
|
||||||
void phy_init(void)
|
void phy_init(void)
|
||||||
{
|
{
|
||||||
gCellFlag = 0;
|
gCellFlag = 0;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
void phy_oam_msg_proc(uint32_t u32msg_addr, uint32_t u32msg_size)
|
||||||
|
{
|
||||||
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void phy_msg_proc(uint32_t u32msg_addr, uint32_t u32msg_size)
|
void phy_msg_proc(uint32_t u32msg_addr, uint32_t u32msg_size)
|
||||||
@ -279,7 +284,7 @@ void ddr_wr_callback()
|
|||||||
|
|
||||||
uint32_t gFapiCallCnt = 0;
|
uint32_t gFapiCallCnt = 0;
|
||||||
void rfm1_fapi_callback()
|
void rfm1_fapi_callback()
|
||||||
{
|
{
|
||||||
gFapiCallCnt++;
|
gFapiCallCnt++;
|
||||||
debug_write((DBG_DDR_IDX_DRV_BASE+123), gFapiCallCnt); // 0x1ec
|
debug_write((DBG_DDR_IDX_DRV_BASE+123), gFapiCallCnt); // 0x1ec
|
||||||
}
|
}
|
||||||
|
@ -20,15 +20,22 @@
|
|||||||
#include "ucp_printf.h"
|
#include "ucp_printf.h"
|
||||||
#include "testcase.h"
|
#include "testcase.h"
|
||||||
#include "phy_para.h"
|
#include "phy_para.h"
|
||||||
|
#include "lib_debug_init.h"
|
||||||
|
|
||||||
//#include "stc_timer.h"
|
//#include "stc_timer.h"
|
||||||
|
|
||||||
int32_t main(int32_t argc, char* argv[])
|
int32_t main(int32_t argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
//SET_CLK_CFG_EMU();
|
//SET_CLK_CFG_EMU();
|
||||||
|
int32_t core_id = 0;
|
||||||
int ret = FAILURE;
|
int ret = FAILURE;
|
||||||
UCP_PRINT_LOG("Hello world from PET RFM SPU0,coreId[0x%x]", get_core_id());
|
UCP_PRINT_LOG("Hello world from PET RFM SPU0,coreId[0x%x]", get_core_id());
|
||||||
debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA);
|
|
||||||
|
core_id = get_core_id();
|
||||||
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 0), PLATFORM_BUILD_DATA);
|
||||||
|
|
||||||
|
ret = spu_lib_debug_init(core_id);
|
||||||
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 1), ret);
|
||||||
|
|
||||||
pet_rfm_spu0_drv_init();
|
pet_rfm_spu0_drv_init();
|
||||||
|
|
||||||
|
@ -20,20 +20,20 @@
|
|||||||
#include "spu_shell.h"
|
#include "spu_shell.h"
|
||||||
#include "pet_rfm_spu1_oam.h"
|
#include "pet_rfm_spu1_oam.h"
|
||||||
#include "hwque.h"
|
#include "hwque.h"
|
||||||
|
#include "lib_debug_init.h"
|
||||||
|
|
||||||
int32_t main(int32_t argc, char* argv[])
|
int32_t main(int32_t argc, char* argv[])
|
||||||
{
|
{
|
||||||
UCP_PRINT_EMPTY("Hello world from PET RFM SPU1,coreId[0x%x]", get_core_id());
|
int32_t core_id = 0;
|
||||||
debug_write(DBG_DDR_COMMON_IDX(get_core_id(), 0), PLATFORM_BUILD_DATA);
|
int32_t ret = 0;
|
||||||
|
|
||||||
/* hw_debug_init */
|
UCP_PRINT_EMPTY("Hello world from PET RFM SPU1,coreId[0x%x]", get_core_id());
|
||||||
int32_t core_id = get_core_id();
|
|
||||||
int ret = 0;
|
core_id = get_core_id();
|
||||||
ret = smart_hq_debug_init((DBG_DDR_HW_ADDR_BASE+DBG_DDR_HW_LEN*core_id), DBG_DDR_HW_LEN); // ÍÆ¼ö384£¬Êµ¼Ê512
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 0), PLATFORM_BUILD_DATA);
|
||||||
if (0 != ret)
|
|
||||||
{
|
ret = spu_lib_debug_init(core_id);
|
||||||
debug_write(DBG_DDR_ERR_IDX(core_id, 46), ret);
|
debug_write(DBG_DDR_COMMON_IDX(core_id, 1), ret);
|
||||||
}
|
|
||||||
|
|
||||||
spu_log_client_init();
|
spu_log_client_init();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user