merge dev_ck_v2.1_feature#994#986 to dev_ck_v2.1

1. support New Feature#994
2. support New Feature#986
3. fix case3 by New Feature#1019
4. SPU(case34)+ARM(case0)  pass
5. SPU(case44)+ARM(case0)  pass
6. SPU(case21)+ARM(case21) pass
7. SPU(case14)+ARM(case3)  pass
8. local case: test osp_read_spe_cfg_file()
This commit is contained in:
lishuang.xie 2023-08-28 17:23:16 +08:00
parent 8450335667
commit ad9bb3d80a
3 changed files with 110 additions and 109 deletions

View File

@ -3,6 +3,7 @@
#define APE_CFG_FILE_NAME_LEN (64)
#define APE_CFG_FILE_NUM (64)
#define APE_SPE_CFG_FILE_NUM (128)
typedef struct OSP_CFG_FILE_REG
{

View File

@ -32,7 +32,7 @@
/* ARM <---> ARM */
#define ARM_SPE_CFG_PHY_SIZE (0x1400000) /* 约定在20M以内 */
#define ARM_SPE_CFG_INFO_ONE sizeof(osp_spe_cfg_file_reg)
#define ARM_SPE_CFG_INFO_SIZE (ARM_SPE_CFG_INFO_ONE * APE_CFG_FILE_NUM)
#define ARM_SPE_CFG_INFO_SIZE (ARM_SPE_CFG_INFO_ONE * APE_SPE_CFG_FILE_NUM)
#define ARM_SPE_CFG_OFFSET (0x8A000000) /* 目前改到APE_PHY段从0x1000 0000开始故需要偏移0x8A00 0000 */
#if 0
@ -52,7 +52,7 @@ uint64_t g_static_mem_size = 0;
/***************************************************************************/
/* ARM <---> ARM */
osp_spe_cfg_file_reg g_spe_osp_cfg_file_reg[APE_CFG_FILE_NUM];
osp_spe_cfg_file_reg g_spe_osp_cfg_file_reg[APE_SPE_CFG_FILE_NUM];
uint32_t g_spe_osp_cfg_file_idx = 0;
void *g_spe_ptr_static_mem = NULL;
uint64_t g_spe_static_mem_size = 0;
@ -366,7 +366,7 @@ int32_t osp_read_spe_cfg_to_bin(char* in_path)
system("rm -rf /ramfs/config_bak/*.*");
/* 遍历原始目录,获取所有文件的文件名及路径输出到:tmpfile */
sprintf(cmd_string, "find /%s/* -name '*.dat' > tmpfile", in_path);
sprintf(cmd_string, "find %s/* -name '*.dat' > tmpfile", in_path);
system(cmd_string);
/* 遍历原始目录,获取所有文件的文件名输出到:tmpfilename */
@ -380,7 +380,7 @@ int32_t osp_read_spe_cfg_to_bin(char* in_path)
return OSP_FILE_ERROR;
}
/* 逐一转化(文本文件 --> 二进制文件 */
while(osp_cfg_file_idx < APE_CFG_FILE_NUM)
while(osp_cfg_file_idx < APE_SPE_CFG_FILE_NUM)
{
/* 每行是原始文件的全路径 */
if (NULL == fgets(line_file_name_full, sizeof(line_file_name_full), file))
@ -463,7 +463,7 @@ int32_t osp_spe_bin_cfg_file_to_ddr()
return OSP_FILE_ERROR;
}
while(osp_cfg_file_idx < APE_CFG_FILE_NUM)
while(osp_cfg_file_idx < APE_SPE_CFG_FILE_NUM)
{
/* 每行是原始文件的全路径 */
if (NULL == fgets(line_file_full_name, sizeof(line_file_full_name), file))
@ -583,7 +583,7 @@ int32_t osp_get_cfg_file(char* name, uint64_t *paddr, uint32_t *psize)
UCP_PRINT_ERROR("[osp_get_cfg_file]: name too long\r\n");
return OSP_ERROR;
}
for (loop = 0; loop < APE_CFG_FILE_NUM; loop++)
for (loop = 0; loop < APE_SPE_CFG_FILE_NUM; loop++)
{
head = g_spe_osp_cfg_file_reg + loop;
if (0 == memcmp(head->name, name, strlen(name)))

View File

@ -23,7 +23,7 @@
#include "typedef.h"
#include "ucp_printf.h"
#include "msg_transfer_mem.h"
#include "ecs_sm_mgt.h"
#include "pet_sm_mgt.h"
#include "ucp_handshake.h"
#include "ospShell.h"
#include "ospLog.h"