From a1d7d6d271d405a0ce3c60dac06fde05e3194064 Mon Sep 17 00:00:00 2001 From: "lishuang.xie" Date: Mon, 22 Jan 2024 09:41:24 +0800 Subject: [PATCH] update feature#1613# to dev_ck_v2.1 1. update: osp/src/ospCfgToBin.c 2. the spe file: old: malloc(128M) from system now: ddr for phy ape: 0x9900 0000 3. update: rfic/makefile 4. the rfic_xxx.out named rfic.out(Does not distinguish the board) 5. Test: 5.1 spu_case0_arm_case0_cpri: PASS 5.2 spu_case14_arm_case20_cpri:PASS 5.3 spu_case20_arm_case20_cpri:PASS 5.4 spu_case21_arm_case21_cpri:PASS 5.5 spu_case34_arm_case5: PASS 5.6 spu_case44_arm_case5: PASS --- osp/src/ospCfgToBin.c | 20 +++++++++----------- rfic/makefile | 21 ++++++++++++--------- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/osp/src/ospCfgToBin.c b/osp/src/ospCfgToBin.c index 508a0f4..753aeb7 100644 --- a/osp/src/ospCfgToBin.c +++ b/osp/src/ospCfgToBin.c @@ -30,11 +30,11 @@ /***************************************************************************/ /* ARM <---> ARM */ -#define ARM_SPE_CFG_PHY_SIZE (0x8000000) /* 改到系统内存,约定大小为128M */ //(0x1400000) /* 约定在20M以内 */ +#define ARM_SPE_CFG_PHY_SIZE (0x3000000) /* 改到系统内存,约定大小为128M */ //(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_SPE_CFG_FILE_NUM) #define ARM_SPE_CFG_FILE_SIZE (ARM_SPE_CFG_PHY_SIZE - ARM_SPE_CFG_INFO_SIZE - ARM_CFG_INDXN) /* 特殊配置文件总长度 */ -#define ARM_SPE_CFG_OFFSET (0x8A000000) /* 目前改到APE_PHY段,从0x1000 0000开始,故需要偏移0x8A00 0000 */ +#define ARM_SPE_CFG_OFFSET (0x89000000) /* 目前改到APE_PHY段,从0x1000 0000开始,故需要偏移0x8900 0000 */ #if 0 #define ARM_SPE_CFG_PHY_ADDR (0xB8000000) /* 指定配置文件首地址 */ @@ -321,9 +321,9 @@ int32_t osp_spe_cfg_file_init() { memset(&g_spe_osp_cfg_file_reg, 0, sizeof(g_spe_osp_cfg_file_reg)); g_spe_osp_cfg_file_idx = 0; - g_spe_static_mem_size = 0; + //g_spe_static_mem_size = 0; -#if 1 +#if 0 /* 改成从系统内存中分配128M */ g_spe_ptr_static_mem = malloc(ARM_SPE_CFG_PHY_SIZE); if (NULL == g_spe_ptr_static_mem) @@ -331,11 +331,9 @@ int32_t osp_spe_cfg_file_init() UCP_PRINT_ERROR("malloc(128M) for spe cfg error......\r\n"); return OSP_ERROR; } - g_spe_static_mem_size = ARM_SPE_CFG_PHY_SIZE; - return OSP_OK; -#endif - -#if 0 + //g_spe_static_mem_size = ARM_SPE_CFG_PHY_SIZE; + //return OSP_OK; +#else g_spe_ptr_static_mem = get_static_mem(APE_PHY, &g_spe_static_mem_size); if (0 == g_spe_static_mem_size) { @@ -603,8 +601,8 @@ int32_t osp_get_cfg_file(char* name, uint64_t *paddr, uint32_t *psize) if (0 == memcmp(head->name, name, strlen(name))) { /* 物理层需要物理地址,而还是虚拟地址 */ - //osp_virt_to_phy(APE_PHY, head->vir_addr, paddr); - *paddr = head->vir_addr; + osp_virt_to_phy(APE_PHY, head->vir_addr, paddr); + //*paddr = head->vir_addr; *psize = head->len; return OSP_OK; } diff --git a/rfic/makefile b/rfic/makefile index 9d17333..42d93e3 100644 --- a/rfic/makefile +++ b/rfic/makefile @@ -66,15 +66,18 @@ FINAL_SRCS_FILES += $(foreach f,$(SRC_FILES),$(if $(findstring $(abspath $(f)),$ # Variables: Output Files # ============================================================================== #BUILD_DIR := ./build -ifeq ($(BOARD_TYPE),EVB) - BIN_FILE_NAME := rfic_evb.out -else ifeq ($(BOARD_TYPE),EVMY) - BIN_FILE_NAME := rfic_evmy.out -else ifeq ($(BOARD_TYPE),EVMYF) - BIN_FILE_NAME := rfic_evmyf.out -else - BIN_FILE_NAME := rfic_evmyt.out -endif +#ifeq ($(BOARD_TYPE),EVB) +# BIN_FILE_NAME := rfic_evb.out +#else ifeq ($(BOARD_TYPE),EVMY) +# BIN_FILE_NAME := rfic_evmy.out +#else ifeq ($(BOARD_TYPE),EVMYF) +# BIN_FILE_NAME := rfic_evmyf.out +#else +# BIN_FILE_NAME := rfic_evmyt.out +#endif + +BIN_FILE_NAME := rfic.out + #$(info "BUILD_DIR=" $(BUILD_DIR)) OBJ_DIR := $(BUILD_DIR)/rfic BIN_FILE := $(BUILD_DIR)/$(BIN_FILE_NAME)