1 modify pcie test case to adapt new code architecher

2 modify pcie log interface to reduce function stack size
This commit is contained in:
yonglin.gui 2023-10-08 18:02:38 +08:00
parent 946789f001
commit 7f00a0aa74
2 changed files with 7 additions and 8 deletions

View File

@ -326,22 +326,21 @@ void osp_sendLog_print(int level, char* pbuf, int size, int cell_id)
#ifdef PCIE_BACKHAUL
#include "../../../pet_rfm_spu0/driver/inc/ucp_pcie_traffic.h"
#define LOGBUFSIZE 512
#define LOGBUFSIZE 256
char tmp_buf[LOGBUFSIZE] = {0};
void com_debug_log(const char *fmt, ...)
{
PcieEpMemBarStruct_t* pUcpMemBar = (PcieEpMemBarStruct_t *)0x08740000;//pMemSection->baseAddr;
uint32_t core_id = get_core_id();
uint32_t count = 0;
uint32_t i = 0;
char tmp_buf[LOGBUFSIZE] = {0};
va_list args;
va_start(args,fmt);
while(1)
{
count++;
debug_write(DBG_DDR_COMMON_IDX(core_id, 40), do_read((void *)&pUcpMemBar->command[PCI_ENDPOINT_UCPEP_EP_ED]));//0xb7e0245c
debug_write(DBG_DDR_COMMON_IDX(core_id, 41), count);//0xb7e0245c
if(do_read((void *)&pUcpMemBar->command[PCI_ENDPOINT_UCPEP_EP_ED]) == 0)
{
vsnprintf(tmp_buf, LOGBUFSIZE, fmt, args);

View File

@ -151,7 +151,7 @@ void test_case_sendmsg_pcie()
ch = (MsgQueueLocalInfo_t *)&pMsgQueueLocalMgt->localUlQueue[i][que_id];
size = ch->bufSize-MSG_MBUF_HEAD_SIZE;
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
com_debug_log("alloc ctrl msg ulque[%d][%d] ch=0x%llx ch->bufSize=0x%x\n", i, que_id, (uint64_t)ch, ch->bufSize);
//com_debug_log("alloc ctrl msg ulque[%d][%d] ch=0x%llx ch->bufSize=0x%x\n", i, que_id, (uint64_t)ch, ch->bufSize);
if ( SUCCESS != ret) {
com_debug_log("alloc ctrl msg failed! ulque[%d][%d] ch=0x%llx ch->bufSize=0x%x\n", i, que_id, (uint64_t)ch, ch->bufSize);
continue;
@ -181,7 +181,7 @@ void test_case_sendmsg_pcie()
ch = (MsgQueueLocalInfo_t *)&pMsgQueueLocalMgt->localUlQueue[i][que_id];
size = ch->bufSize-MSG_MBUF_HEAD_SIZE;
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
com_debug_log("alloc data msg ulque[%d][%d] ch=0x%llx ch->bufSize=0x%x\n", i, que_id, (uint64_t)ch, ch->bufSize);
//com_debug_log("alloc data msg ulque[%d][%d] ch=0x%llx ch->bufSize=0x%x\n", i, que_id, (uint64_t)ch, ch->bufSize);
if ( SUCCESS != ret) {
com_debug_log("alloc data msg failed! ulque[%d][%d] ch=0x%llx ch->bufSize=0x%x\n", i, que_id, ch, ch->bufSize);
@ -227,7 +227,7 @@ void test_case_sendmsg_pcie()
ch = (MsgQueueLocalInfo_t *)&pMsgQueueLocalMgt->localUlQueue[i][que_id];
size = ch->bufSize-MSG_MBUF_HEAD_SIZE;
ret = msg_transfer_alloc_msg(handler.value, cu_flag, size, &buf, &availableSize, &offset);
com_debug_log("alloc oam msg ulque[%d][%d] ch=0x%llx ch->bufSize=0x%x\n", i, que_id, (uint64_t)ch, ch->bufSize);
//com_debug_log("alloc oam msg ulque[%d][%d] ch=0x%llx ch->bufSize=0x%x\n", i, que_id, (uint64_t)ch, ch->bufSize);
if ( SUCCESS != ret) {
com_debug_log("oam alloc msg failed! ulque[%d][%d] ch=0x%llx ch->bufSize = 0x%x\n", i, que_id, ch, ch->bufSize);
@ -427,7 +427,7 @@ void ape0_test_task_reg(void)
// test_case_cfgpar_pcie();
osp_task_info_ex pcie_timer_task_stc = {50, (int8_t*)"pcie_test_taskc", 50, 4096, OSP_NORMAL_TYPE, 1, 0, 0, NULL, (OSP_TASKENTRY_FUNC)pcie_test_task_func};
osp_task_create(&pcie_timer_task_stc);
osp_timer_sync(1);
//osp_timer_sync(1);
return;
}