Removing Nucleus references from OpenAMP repo. Documentation changes are pending
authoreanjum <etsam_anjum@mentor.com>
Thu, 27 Nov 2014 08:13:12 +0000 (13:13 +0500)
committereanjum <etsam_anjum@mentor.com>
Thu, 27 Nov 2014 08:13:12 +0000 (13:13 +0500)
116 files changed:
Makefile.commons
README.md
apps/Makefile
apps/firmware/zc702evk/nucleus/echo_test/.gitkeep [deleted file]
apps/firmware/zc702evk/nucleus/func_test_suite/.gitkeep [deleted file]
apps/firmware/zc702evk/nucleus/matrix_multiply/.gitkeep [deleted file]
apps/firmware/zc702evk/nucleus/rpc_demo/.gitkeep [deleted file]
apps/samples/master/nucleus/matrix_multiply/nucleus_linux/make [deleted file]
apps/samples/master/nucleus/matrix_multiply/nucleus_linux/matrix_multiply.c [deleted file]
apps/samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/make [deleted file]
apps/samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/matrix_multiply.c [deleted file]
apps/samples/remote/baremetal/matrix_multiply/rsc_table.c
apps/samples/remote/baremetal/matrix_multiply/rsc_table.h
apps/samples/remote/baremetal/rpc_demo/rsc_table.c
apps/samples/remote/baremetal/rpc_demo/rsc_table.h
apps/samples/remote/nucleus/matrix_multiply/make [deleted file]
apps/samples/remote/nucleus/matrix_multiply/matrix_multiply.c [deleted file]
apps/samples/remote/nucleus/matrix_multiply/rsc_table.c [deleted file]
apps/samples/remote/nucleus/matrix_multiply/rsc_table.h [deleted file]
apps/samples/remote/nucleus/rpc_demo/make [deleted file]
apps/samples/remote/nucleus/rpc_demo/rpc_demo.c [deleted file]
apps/samples/remote/nucleus/rpc_demo/rpc_demo.h [deleted file]
apps/samples/remote/nucleus/rpc_demo/rsc_table.c [deleted file]
apps/samples/remote/nucleus/rpc_demo/rsc_table.h [deleted file]
apps/tests/master/baremetal/func_test_suite/make
apps/tests/master/nucleus/echo_test/nucleus_linux/echo_test.c [deleted file]
apps/tests/master/nucleus/echo_test/nucleus_linux/make [deleted file]
apps/tests/master/nucleus/echo_test/nucleus_nucleusbm/echo_test.c [deleted file]
apps/tests/master/nucleus/echo_test/nucleus_nucleusbm/make [deleted file]
apps/tests/master/nucleus/func_test_suite/nucleus_linux/func_test_suite.c [deleted file]
apps/tests/master/nucleus/func_test_suite/nucleus_linux/make [deleted file]
apps/tests/master/nucleus/func_test_suite/nucleus_linux/test_suite.h [deleted file]
apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/func_test_suite.c [deleted file]
apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/make [deleted file]
apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/test_suite.h [deleted file]
apps/tests/master/nucleus/latency_test/nucleus_linux/latency_test.c [deleted file]
apps/tests/master/nucleus/latency_test/nucleus_linux/make [deleted file]
apps/tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.c [deleted file]
apps/tests/master/nucleus/latency_test/nucleus_nucleusbm/make [deleted file]
apps/tests/remote/baremetal/echo_test/rsc_table.c
apps/tests/remote/baremetal/echo_test/rsc_table.h
apps/tests/remote/baremetal/func_test_suite/rsc_table.c
apps/tests/remote/baremetal/func_test_suite/rsc_table.h
apps/tests/remote/nucleus/echo_test/echo_test.c [deleted file]
apps/tests/remote/nucleus/echo_test/make [deleted file]
apps/tests/remote/nucleus/echo_test/rsc_table.c [deleted file]
apps/tests/remote/nucleus/echo_test/rsc_table.h [deleted file]
apps/tests/remote/nucleus/func_test_suite/func_test_suite.c [deleted file]
apps/tests/remote/nucleus/func_test_suite/make [deleted file]
apps/tests/remote/nucleus/func_test_suite/rsc_table.c [deleted file]
apps/tests/remote/nucleus/func_test_suite/rsc_table.h [deleted file]
apps/tests/remote/nucleus/func_test_suite/test_suite.h [deleted file]
include/open_amp.h
libs/system/zc702evk/linux/rsc_table.h
libs/system/zc702evk/linux/scripts/makefiles/echo_test_nucleus_fw/Makefile [deleted file]
libs/system/zc702evk/linux/scripts/makefiles/mat_mul_nucleus_fw/Makefile [deleted file]
libs/system/zc702evk/linux/scripts/makefiles/readme
libs/system/zc702evk/linux/scripts/makefiles/rpc_demo_nucleus_fw/Makefile [deleted file]
libs/system/zc702evk/linux/scripts/open_amp_create_projects.sh
libs/system/zc702evk/nucleus/arch/arm/arch.h [deleted file]
libs/system/zc702evk/nucleus/arch/arm/arm_debug_defs.h [deleted file]
libs/system/zc702evk/nucleus/arch/arm/arm_defs.h [deleted file]
libs/system/zc702evk/nucleus/arch/arm/arm_mmu_defs.h [deleted file]
libs/system/zc702evk/nucleus/arch/arm/tool-csgnu_arm/csgnu_arm_defs.h [deleted file]
libs/system/zc702evk/nucleus/arch/arm/tool-csgnu_arm/toolset.h [deleted file]
libs/system/zc702evk/nucleus/bsp/arch/plat-zynq7000/platform.h [deleted file]
libs/system/zc702evk/nucleus/bsp/arch/plat-zynq7000/zynq7000_defs.h [deleted file]
libs/system/zc702evk/nucleus/bsp/zc702evk_defs.h [deleted file]
libs/system/zc702evk/nucleus/kernel/dev_mgr.h [deleted file]
libs/system/zc702evk/nucleus/kernel/eh_defs.h [deleted file]
libs/system/zc702evk/nucleus/kernel/eh_extr.h [deleted file]
libs/system/zc702evk/nucleus/kernel/eqm.h [deleted file]
libs/system/zc702evk/nucleus/kernel/esal_extr.h [deleted file]
libs/system/zc702evk/nucleus/kernel/nu_kernel.h [deleted file]
libs/system/zc702evk/nucleus/kernel/plus_cfg.h [deleted file]
libs/system/zc702evk/nucleus/kernel/plus_core.h [deleted file]
libs/system/zc702evk/nucleus/kernel/plus_supplement.h [deleted file]
libs/system/zc702evk/nucleus/kernel/proc_extern.h [deleted file]
libs/system/zc702evk/nucleus/kernel/rtl.h [deleted file]
libs/system/zc702evk/nucleus/kernel/rtl_extr.h [deleted file]
libs/system/zc702evk/nucleus/lib/arm-none-eabi-/master/libnucleus_master.a [deleted file]
libs/system/zc702evk/nucleus/lib/arm-none-eabi-/master/nucleus_gen_cfg.h [deleted file]
libs/system/zc702evk/nucleus/lib/arm-none-eabi-/remote/libnucleus_remote.a [deleted file]
libs/system/zc702evk/nucleus/lib/arm-none-eabi-/remote/nucleus_gen_cfg.h [deleted file]
libs/system/zc702evk/nucleus/lib/arm-none-eabi-/remote_proxy/libnucleus_remote.a [deleted file]
libs/system/zc702evk/nucleus/lib/arm-none-eabi-/remote_proxy/nucleus_gen_cfg.h [deleted file]
libs/system/zc702evk/nucleus/lib/arm-xilinx-eabi-/master/libnucleus_master.a [deleted file]
libs/system/zc702evk/nucleus/lib/arm-xilinx-eabi-/master/nucleus_gen_cfg.h [deleted file]
libs/system/zc702evk/nucleus/lib/arm-xilinx-eabi-/remote/libnucleus_remote.a [deleted file]
libs/system/zc702evk/nucleus/lib/arm-xilinx-eabi-/remote/nucleus_gen_cfg.h [deleted file]
libs/system/zc702evk/nucleus/lib/arm-xilinx-eabi-/remote_proxy/libnucleus_remote.a [deleted file]
libs/system/zc702evk/nucleus/lib/arm-xilinx-eabi-/remote_proxy/nucleus_gen_cfg.h [deleted file]
libs/system/zc702evk/nucleus/linker_master.ld [deleted file]
libs/system/zc702evk/nucleus/linker_remote.ld [deleted file]
libs/system/zc702evk/nucleus/nucleus.h [deleted file]
libs/system/zc702evk/nucleus/os/kernel/plus/core/inc/thread_control.h [deleted file]
libs/system/zc702evk/nucleus/services/cpu_dvfs.h [deleted file]
libs/system/zc702evk/nucleus/services/cpu_idle.h [deleted file]
libs/system/zc702evk/nucleus/services/cpu_selfrefresh.h [deleted file]
libs/system/zc702evk/nucleus/services/nu_services.h [deleted file]
libs/system/zc702evk/nucleus/services/nu_trace.h [deleted file]
libs/system/zc702evk/nucleus/services/nu_trace_os_mark.h [deleted file]
libs/system/zc702evk/nucleus/services/reg_api.h [deleted file]
libs/system/zc702evk/nucleus/services/reg_impl.h [deleted file]
libs/system/zc702evk/nucleus/services/reg_impl_mem_node.h [deleted file]
libs/system/zc702evk/nucleus/services/reg_status.h [deleted file]
libs/system/zc702evk/nucleus/services/runlevel_init.h [deleted file]
libs/system/zc702evk/nucleus/services/semaphore.h [deleted file]
libs/system/zc702evk/nucleus/services/syslog_extern.h [deleted file]
open_amp_build.sh
porting/env/bm_env.c
porting/env/env.h
porting/env/nu_env.c [deleted file]
porting/zc702evk/platform.c
porting/zc702evk/platform_info.c
remoteproc/elf_loader.h

index 0190e4512d96fdd608a4701e53b0a3308b622fc6..1815cf8ddfc86c8ffc69f346f1bda61948e2dfbc 100644 (file)
@@ -24,26 +24,9 @@ ifeq ($(PLAT),)
 export PLAT := zc702evk\r
 endif\r
 \r
-ifeq ($(OS),)\r
-export OS := nucleus\r
-endif\r
-\r
 BAREMETAL_INCLUDES := -I"$(OHOME)/libs/system/$(PLAT)/baremetal"\r
-NUCLEUS_INCLUDES := -I"$(OHOME)/libs/system/$(PLAT)/nucleus/arch/arm/tool-csgnu_arm" -I"$(OHOME)/libs/system/$(PLAT)/nucleus/bsp/arch/plat-zynq7000" -I"$(OHOME)/libs/system/$(PLAT)/nucleus" -I"$(OHOME)/libs/system/$(PLAT)/nucleus/arch/arm" \r
 GENERAL_INCLUDES := -I"$(OHOME)/include"\r
 \r
-ifeq ($(OS),nucleus)\r
-CFLAGS += $(NUCLEUS_INCLUDES)\r
-CFLAGS +=-D"ENV=0"\r
-ifeq ($(ROLE),master)\r
-CFLAGS +=-I"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master"\r
-CFLAGS+=-D"MASTER=1"\r
-else\r
-CFLAGS +=-I"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/remote"\r
-CFLAGS+=-D"MASTER=0"\r
-endif\r
-endif\r
-\r
 ifeq ($(OS),baremetal)\r
 CFLAGS += $(BAREMETAL_INCLUDES)\r
 CFLAGS +=-D"ENV=1"\r
index 4503122894dfabc70082ccc6b8376e94bb3781ab..914bac22217e3c9a1fa8527cdefe6ca072af900d 100644 (file)
--- a/README.md
+++ b/README.md
@@ -3,10 +3,9 @@ open-amp
 This repository is a place holder for Open Asymmetric Multi Processing (OpenAMP) framework project. The OpenAMP framework provides software components that enable development of software applications for Asymmetric Multiprocessing (AMP) systems. OpenAMP provides following features:
 
 1. Fully functional remoteproc and rpmsg components usable in following configurations;
-       a. Linux master/Nucleus RTOS or Bare Metal remote configuration
-       b. Nucleus master/Nucleus RTOS or Bare Metal remote configuration
-       c. Nucleus RTOS or Bare Metal master/Linux remote configuration
-2. Proxy infrastructure and supplied demos showcase ability of proxy on master to handle printf, scanf, open, close, read, write calls from Nucleus RTOS and Bare metal based remote contexts.
+       a. Linux master/Bare Metal remote configuration\r
+       b. Bare Metal master/Linux remote configuration\r
+2. Proxy infrastructure and supplied demos showcase ability of proxy on master to handle printf, scanf, open, close, read, write calls from Bare metal based remote contexts.\r
 3. Documentation - OpenAMP User Manual, OpenAMP Getting Started Guide and Performance Test Measurements.
 4. Performance tests have been conducted and OpenAMP latency measurements have been quantified and documented.
 
index 52dd627cce46c987d9fd13e205857b30c91fd761..c9044b2fe8ffeda1fba6ebeb96e274cd1dd2606d 100644 (file)
@@ -1,95 +1,44 @@
-
-# Include commons make file to get platform and tool chain specific variables.
-
-
-include ../Makefile.commons
-
-all:
-ifeq ($(OS),nucleus)
-ifeq ($(ROLE),master)
-       make  -f samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/make
-       make  -f tests/master/nucleus/echo_test/nucleus_nucleusbm/make
-       make  -f tests/master/nucleus/func_test_suite/nucleus_nucleusbm/make
-else
-       make  -f samples/remote/nucleus/matrix_multiply/make
-       make  -f tests/remote/nucleus/echo_test/make
-       make  -f tests/remote/nucleus/func_test_suite/make
-       make  -f samples/remote/nucleus/rpc_demo/make
-endif
-endif                  
-ifeq ($(OS),baremetal) 
-ifeq ($(ROLE),remote)
-       make  -f samples/remote/baremetal/matrix_multiply/make
-       make  -f tests/remote/baremetal/echo_test/make
-       make  -f tests/remote/baremetal/func_test_suite/make
-       make  -f samples/remote/baremetal/rpc_demo/make
-endif
-endif
-
-benchmark:
-       make  -f tests/master/nucleus/latency_test/nucleus_nucleusbm/make
-
-linux_remote:
-ifeq ($(OS),nucleus)
-       make  -f samples/master/nucleus/matrix_multiply/nucleus_linux/make
-       make  -f tests/master/nucleus/echo_test/nucleus_linux/make
-       make  -f tests/master/nucleus/func_test_suite/nucleus_linux/make
-else
-       make  -f samples/master/baremetal/matrix_multiply/make
-       make  -f tests/master/baremetal/echo_test/make
-       make  -f tests/master/baremetal/func_test_suite/make
-endif
-
-linux_remote_benchmark:
-ifeq ($(OS),nucleus)
-       make  -f tests/master/nucleus/latency_test/nucleus_linux/make
-endif
-
-clean:
-ifeq ($(OS),nucleus)
-ifeq ($(ROLE),master)
-       make  -f samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/make clean
-       make  -f tests/master/nucleus/echo_test/nucleus_nucleusbm/make clean
-       make  -f tests/master/nucleus/func_test_suite/nucleus_nucleusbm/make clean
-else
-       make  -f samples/remote/nucleus/matrix_multiply/make clean
-       make  -f tests/remote/nucleus/echo_test/make clean
-       make  -f tests/remote/nucleus/func_test_suite/make clean
-       make  -f samples/remote/nucleus/rpc_demo/make clean
-endif
-endif                  
-ifeq ($(OS),baremetal)
-ifeq ($(ROLE),remote)
-       make  -f samples/remote/baremetal/matrix_multiply/make clean
-       make  -f tests/remote/baremetal/echo_test/make clean
-       make  -f tests/remote/baremetal/func_test_suite/make clean
-       make  -f samples/remote/baremetal/rpc_demo/make clean
-endif
-endif
-
-cleanbenchmark:
-       make  -f tests/master/nucleus/latency_test/nucleus_nucleusbm/make clean
-
-clean_linux_remote:
-ifeq ($(OS),nucleus)
-       make  -f samples/master/nucleus/matrix_multiply/nucleus_linux/make clean
-       make  -f tests/master/nucleus/echo_test/nucleus_linux/make clean
-       make  -f tests/master/nucleus/func_test_suite/nucleus_linux/make clean
-else
-       make  -f samples/master/baremetal/matrix_multiply/make clean
-       make  -f tests/master/baremetal/echo_test/make clean
-       make  -f tests/master/baremetal/func_test_suite/make clean
-endif
-
-clean_linux_remote_benchmark:
-ifeq ($(OS),nucleus)
-       make  -f tests/master/nucleus/latency_test/nucleus_linux/make clean
-endif
-
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
+\r
+# Include commons make file to get platform and tool chain specific variables.\r
+\r
+\r
+include ../Makefile.commons\r
+\r
+all:                   \r
+ifeq ($(OS),baremetal) \r
+ifeq ($(ROLE),remote)\r
+       make  -f samples/remote/baremetal/matrix_multiply/make\r
+       make  -f tests/remote/baremetal/echo_test/make\r
+       make  -f tests/remote/baremetal/func_test_suite/make\r
+       make  -f samples/remote/baremetal/rpc_demo/make\r
+endif\r
+endif\r
+\r
+linux_remote:\r
+       make  -f samples/master/baremetal/matrix_multiply/make\r
+       make  -f tests/master/baremetal/echo_test/make\r
+       make  -f tests/master/baremetal/func_test_suite/make\r
+\r
+\r
+clean:         \r
+ifeq ($(OS),baremetal)\r
+ifeq ($(ROLE),remote)\r
+       make  -f samples/remote/baremetal/matrix_multiply/make clean\r
+       make  -f tests/remote/baremetal/echo_test/make clean\r
+       make  -f tests/remote/baremetal/func_test_suite/make clean\r
+       make  -f samples/remote/baremetal/rpc_demo/make clean\r
+endif\r
+endif\r
+\r
+clean_linux_remote:\r
+       make  -f samples/master/baremetal/matrix_multiply/make clean\r
+       make  -f tests/master/baremetal/echo_test/make clean\r
+       make  -f tests/master/baremetal/func_test_suite/make clean\r
+\r
+post-build:\r
+       -@echo ' '\r
+\r
+secondary-outputs:\r
+\r
+PHONY: all clean dependents\r
+.SECONDARY: post-build\r
diff --git a/apps/firmware/zc702evk/nucleus/echo_test/.gitkeep b/apps/firmware/zc702evk/nucleus/echo_test/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/apps/firmware/zc702evk/nucleus/func_test_suite/.gitkeep b/apps/firmware/zc702evk/nucleus/func_test_suite/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/apps/firmware/zc702evk/nucleus/matrix_multiply/.gitkeep b/apps/firmware/zc702evk/nucleus/matrix_multiply/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/apps/firmware/zc702evk/nucleus/rpc_demo/.gitkeep b/apps/firmware/zc702evk/nucleus/rpc_demo/.gitkeep
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/apps/samples/master/nucleus/matrix_multiply/nucleus_linux/make b/apps/samples/master/nucleus/matrix_multiply/nucleus_linux/make
deleted file mode 100644 (file)
index f008ac8..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := samples/master/nucleus/matrix_multiply/nucleus_linux/matrix_multiply.out
-SAMPLE_C_SRC := samples/master/nucleus/matrix_multiply/nucleus_linux/matrix_multiply.c
-
-REMOTE_OUT   := matrix_multiply.out
-DST_DIR := samples/master/nucleus/matrix_multiply/nucleus_linux
-LINUX_SRC_DIR := firmware/$(PLAT)/linux
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
-SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
-
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
-
-
-$(SAMPLE_OUT): $(REMOTE_OUT) $(SAMPLEOBJFILES)
-
-       @echo 'Building master core matrix multiply sample for nucleus : $@'
-
-       $(LD)  -Wl,-Map=samples/master/nucleus/matrix_multiply/nucleus_linux/matrix_multiply.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group    
-       
-       $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
-       
-       @echo 'Finished building target: $@'
-       
-%.o:%.c
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-       
-%.o:%.S
-       @$(AS) -c -mcpu=cortex-a9 $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
-       
-$(REMOTE_OUT):
-       cd $(LINUX_SRC_DIR)/; cp firmware firmware1; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
-       mv $(LINUX_SRC_DIR)/firmware1.o $(DST_DIR)/firmware1.o
-       cd $(LINUX_SRC_DIR)/; cp firmware firmware2; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
-       mv $(LINUX_SRC_DIR)/firmware2.o $(DST_DIR)/
-       cd $(LINUX_SRC_DIR)/; rm firmware1; rm firmware2;
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_MAP) $(SAMPLE_BIN) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/samples/master/nucleus/matrix_multiply/nucleus_linux/matrix_multiply.c b/apps/samples/master/nucleus/matrix_multiply/nucleus_linux/matrix_multiply.c
deleted file mode 100644 (file)
index 4632fe0..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-/* This is a sample demonstration application that showcases usage of remoteproc
-and rpmsg APIs. This application is meant to run on the master CPU running Nucleus
-and showcases booting of linux remote firmware using remoteproc and 
-IPC with remote firmware using rpmsg; Nucleus on master core acts as a remoteproc master
-but as an rpmsg remote;It brings up a remote Linux based 
-firmware which acts as an rpmsg master and offloads matrix multiplication to Nucleus.
-Linux app generates two random matrices and transmits them to Nucleus which computes 
-the product and transmits results back to Linux. Once Linux application is complete, it
-requests a shutdown from Nucleus. Nucleus acknowledges with a shutdown message which results
-in Linux starting a system halt. Nucleus shutsdown the remote core after a reasonable delay which allows
-Linux to gracefully shutdown. */
-
-/* Including required headers */
-#include  <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 64)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define MAX_SIZE        6
-#define NUM_MATRIX      2
-/* Shutdown message ID */
-#define SHUTDOWN_MSG                   0xEF56A55A
-
-typedef struct _matrix
-{
-    unsigned long size;
-    unsigned long elements[MAX_SIZE][MAX_SIZE];
-} matrix;
-
-
-static  matrix  matrix_array[NUM_MATRIX];
-
-static  matrix matrix_result;
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric , unsigned long src );
-
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem;
-struct rpmsg_endpoint *rp_ept;
-struct rpmsg_channel *app_rp_chnl;
-char fw1_name []= "firmware1";
-
-static int shutdown_received = 0;
-
-static void Matrix_Multiply(const matrix *m, const matrix *n, matrix *r)
-{
-    int i, j, k;
-
-    r->size = m->size;
-
-    for (i = 0; i < m->size; ++i) {
-        for (j = 0; j < n->size; ++j) {
-            r->elements[i][j] = 0;
-        }
-    }
-
-    for (i = 0; i < m->size; ++i) {
-        for (j = 0; j < n->size; ++j) {
-            for (k = 0; k < r->size; ++k) {
-                r->elements[i][j] += m->elements[i][k] * n->elements[k][j];
-            }
-        }
-    }
-}
-
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if (status == NU_SUCCESS)
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-            uncached_mem_pool , pointer , STACK_SIZE , TASK_PRIORITY , TASK_SLICE ,
-            NU_PREEMPT , NU_START );
-        }
-        if(status == NU_SUCCESS)
-        {
-            status = NU_Create_Semaphore(&App_Sem ,"APP_SEM", 0, NU_FIFO);
-        }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv ) {
-
-    struct remote_proc *proc;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    STATUS             status;
-    int shutdown_msg = SHUTDOWN_MSG;
-
-    status = NU_System_Memory_Get(&sys_pool_ptr, NU_NULL);
-    
-    /* Start first firmware*/
-    if(status == NU_SUCCESS)
-    {   
-               printf("\n\n\r************************************");
-               printf("*******************************************\r\n");
-               printf("\r\n              Matrix Multiplication Application \r\n");
-               printf("\r\n");
-               printf("\r\nThis sample application will boot a remote Linux firmware \r\n");
-               printf("\r\nThis sample application will boot a remote Linux firmware \r\n");
-               printf("\r\nand handle offloaded matrix multiplication operations from\r\n");
-               printf("\r\nLinux RPMSG master to Nuclues RPMS Remote \r\n");
-
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-    
-    
-        printf("\r\n\nLoading remote context : %s \r\n" , fw1_name);
-        
-        printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-            
-        status = remoteproc_init((void *) fw1_name, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-    }
-    
-    if((!status) && (proc))
-    {
-        printf("\r\n\n********************************************\r\n");
-        printf("BOOTING LINUX REMOTE FIRMWARE");
-           printf("\r\n********************************************\r\n\n");
-        status = remoteproc_boot(proc);
-    }
-    
-    if(!status)
-    {
-        while(1)
-        {
-                       NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-        
-               if(shutdown_received == 1)
-               {
-                           break;      
-               }
-               
-                       /* Process received data and multiple matrices. */
-                       Matrix_Multiply(&matrix_array[0], &matrix_array[1], &matrix_result);
-
-                       /* Send the result of matrix multiplication back to master. */
-                       rpmsg_send(app_rp_chnl, &matrix_result, sizeof(matrix));
-           }
-           
-               /* Send shutdown message to remote */
-               rpmsg_send(app_rp_chnl, &shutdown_msg, sizeof(int));
-               
-               /* The remote Linux kernel requires around ~15 seconds to shutdown itself. Wait. */
-               NU_Sleep(100 * 18);
-               
-               remoteproc_shutdown(proc);
-               
-               remoteproc_deinit(proc);
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw1_name);
-    }            
-}
-
-/* This callback gets invoked when the remote chanl is created */
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) {
-
-    app_rp_chnl = rp_chnl;
-    rp_ept = rpmsg_create_ept(rp_chnl , rpmsg_read_cb ,RPMSG_NULL , RPMSG_ADDR_ANY);
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) {
-
-    rpmsg_destroy_ept(rp_ept);
-}
-
-/* This is the read callback, note we are in a task context when this callback
-is invoked, so kernel primitives can be used freely */
-void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * priv, unsigned long src) {
-
-    if ((*(int *) data) == SHUTDOWN_MSG)
-    {
-               shutdown_received  = 1;
-    }
-       
-    memcpy(matrix_array, data, len);
-
-    NU_Release_Semaphore(&App_Sem);
-}
-
diff --git a/apps/samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/make b/apps/samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/make
deleted file mode 100644 (file)
index e06c6c5..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/matrix_multiply.out
-SAMPLE_C_SRC := samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/matrix_multiply.c
-
-REMOTE_OUT   := matrix_multiply.out
-DST_DIR := samples/master/nucleus/matrix_multiply/nucleus_nucleusbm
-NU_SRC_DIR := firmware/$(PLAT)/nucleus/matrix_multiply
-BM_SRC_DIR := firmware/$(PLAT)/baremetal/matrix_multiply
-
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
-
-
-SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
-
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
-
-
-$(SAMPLE_OUT): $(REMOTE_OUT) $(SAMPLEOBJFILES)
-
-       @echo 'Building master core matrix multiply sample for nucleus : $@'
-
-       $(LD)  -Wl,-Map=samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/matrix_multiply.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group        
-       
-       $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
-       
-       @echo 'Finished building target: $@'
-       
-%.o:%.c
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-       
-%.o:%.S
-       @$(AS) -c -mcpu=cortex-a9 $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
-       
-$(REMOTE_OUT):
-       cd $(NU_SRC_DIR)/; cp firmware firmware1; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
-       mv $(NU_SRC_DIR)/firmware1.o $(DST_DIR)/
-       cd $(BM_SRC_DIR)/; cp firmware firmware2; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
-       mv $(BM_SRC_DIR)/firmware2.o $(DST_DIR)/
-       cd $(NU_SRC_DIR)/; rm firmware1
-       cd $(BM_SRC_DIR)/; rm firmware2
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_MAP) $(SAMPLE_BIN) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/matrix_multiply.c b/apps/samples/master/nucleus/matrix_multiply/nucleus_nucleusbm/matrix_multiply.c
deleted file mode 100644 (file)
index 6917ba3..0000000
+++ /dev/null
@@ -1,395 +0,0 @@
-/* This is a sample demonstration application that showcases usage of remoteproc
-and rpmsg APIs. This application is meant to run on the master CPU running Nucleus
-and showcases booting of two sub-sequent remote firmware cycles using remoteproc and 
-IPC with remote firmware using rpmsg; 1. It brings up a remote Nucleus based remote 
-firmware which performs matrix multiplication, 2. It brings up a baremetal based 
-remote firmware which performs matrix multiplication. Master app generates two random 
-matrices and transmits them to remotr firmware which computes the product and transmit 
-results back to master CPU */
-
-/* Including required headers */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-#include "open_amp.h"
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 64)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define MATRIX_SIZE    6
-
-#define SHUTDOWN_MSG   0xEF56A55A
-
-typedef struct _matrix
-{
-    unsigned long size;
-    unsigned long elements[MATRIX_SIZE][MATRIX_SIZE];
-} matrix;
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric , unsigned long src );
-
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem;
-
-struct rpmsg_endpoint *rp_ept;
-struct rpmsg_channel *app_rp_chnl;
-
-char fw1_name []= "firmware1"; /* Nucleus based matrix multiply remote firmware */
-char fw2_name []= "firmware2"; /* Baremetal based matrix multiply remote firmware */
-
-static struct _matrix* i_matrix;
-static struct _matrix* r_matrix;
-static int bytes_received;
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if (status == NU_SUCCESS)
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-            uncached_mem_pool , pointer , STACK_SIZE , TASK_PRIORITY , TASK_SLICE ,
-            NU_PREEMPT , NU_START );
-        }
-        if(status == NU_SUCCESS)
-        {
-            status = NU_Create_Semaphore(&App_Sem ,"APP_SEM", 0, NU_FIFO);
-        }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       matrix_print
- * *
- * *   DESCRIPTION
- * *
- * *       Function to print a matrix.
- * *
- * ***********************************************************************/
-static void matrix_print(struct _matrix* m)
-{
-    int i, j;
-
-    /* Generate two random matrices */
-    printf( " \r\n Master : Nucleus : Printing results \r\n");
-
-    for (i = 0; i < m->size; ++i) {
-        for (j = 0; j < m->size; ++j) {
-            printf(" %d ", (unsigned int)m->elements[i][j]);
-        }
-        printf("\r\n");
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       generate_matrices
- * *
- * *   DESCRIPTION
- * *
- * *       Function to generate random matrices.
- * *
- * ***********************************************************************/
-static void generate_matrices(int num_matrices, 
-                unsigned int matrix_size, void* p_data)
-{
-    int    i, j, k;
-    struct _matrix* p_matrix = p_data;
-    unsigned long value;
-
-    /* Seed for random number generator */
-    srand(ESAL_GE_TMR_OS_COUNT_READ());
-
-    for(i=0; i< num_matrices; i++)
-    {
-        /* Initialize workload */
-        p_matrix[i].size = matrix_size;
-        
-        printf( " \r\n Master : Nucleus : Input matrix %d \r\n", i);
-        for(j = 0; j < matrix_size; j++)
-        {
-            printf( "\r\n");
-            for(k = 0; k < matrix_size; k++)
-            {
-                value = (rand()&0x7F);
-                value = value%10;
-                p_matrix[i].elements[j][k] = value;
-                printf( " %d ", (unsigned int)p_matrix[i].elements[j][k]);
-            }
-        }
-        printf( "\r\n");
-    }
-    
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       matrix_multiply_shell
- * *
- * *   DESCRIPTION
- * *
- * *       Simple demo shell
- * *
- * ***********************************************************************/
-static void matrix_multiply_shell(void)
-{
-    unsigned char cmd;
-        
-    for ( ; ; )
-    {
-        printf("\r\n **************************************** \r\n");
-        printf(" Please enter command.\r\n");
-        printf(" **************************************** \r\n");
-        printf(" 1 - Generates random 6x6 matrices and transmits them to remote core over rpmsg .. \r\n"); 
-        printf(" 2 - Quit this application .. \r\n");
-        printf(" CMD>");
-        
-        cmd = getchar();
-        
-        if(cmd == '1')
-        {
-            printf("\r\n Generating random matrices now ... \r\n");            
-
-            generate_matrices(2, 6, i_matrix); 
-
-            printf("\r\n Writing generated matrices to rpmsg device, %d bytes written .. \r\n", \
-                    sizeof(*i_matrix)*2);
-
-            rpmsg_send(app_rp_chnl, i_matrix, sizeof(*i_matrix)*2);
-
-            NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-            
-            printf("\r\n Received results! - %d bytes from rpmsg device (transmitted from remote context) \r\n", bytes_received);
-
-            matrix_print(r_matrix);
-
-        }
-        else if(cmd == '2')
-        {
-            printf("\r\n Quitting application .. \r\n");
-            printf("\r\n Matrix multiplication demo end \r\n");
-
-            break;
-        }
-        else
-        {
-            printf("\r\n invalid command! \r\n");
-        }
-    }    
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv ) {
-
-    struct remote_proc *proc;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    STATUS             status;
-    int shutdown_msg = SHUTDOWN_MSG;
-
-    status = NU_System_Memory_Get(&sys_pool_ptr, NU_NULL);
-    
-       /* Allocate memory for input matrices */
-    if(status == NU_SUCCESS)
-    {
-        status = NU_Allocate_Memory (sys_pool_ptr, (VOID *)&i_matrix,sizeof(*i_matrix)*2, NU_NO_SUSPEND);
-    }
-    
-       /* Allocate memory for result matrix */
-    if(status == NU_SUCCESS)
-    {
-        status = NU_Allocate_Memory (sys_pool_ptr, (VOID *)&r_matrix,sizeof(*r_matrix), NU_NO_SUSPEND);
-    }
-    
-    /* Start first firmware*/
-    if(status == NU_SUCCESS)
-    {   
-               printf("\n\n\r************************************");
-               printf("*******************************************\r\n");
-               printf("\r\n              Matrix Multiplication Application \r\n");
-               printf("\r\n");
-               printf("\r\nThis sample application will offload matrix multiplication \r\n");
-               printf("\r\noperations from Nucleus master to remote cores\r\n");
-
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-    
-    
-        printf("\r\n\nLoading remote context : %s \r\n" , fw1_name);
-        
-        printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-            
-        status = remoteproc_init((void *) fw1_name, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-    }
-    
-       /* Boot first firmware */
-    if((!status) && (proc))
-    {
-        printf("\r\n\n********************************************\r\n");
-        printf("BOOTING NUCLEUS REMOTE FIRMWARE");
-           printf("\r\n********************************************\r\n\n");
-        status = remoteproc_boot(proc);
-    }
-    
-    if(!status)
-    {
-        /* Wait till communication channel is established */
-        NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-        printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-        printf("\r\nStarting application for first firmware  .. \r\n");
-        printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-               
-               /* Call matrix multiply application */
-        matrix_multiply_shell();
-
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-        printf("\r\nShutting down and deinitializing remote context : %s \r\n" , fw1_name);
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-
-        /* Send shutdown message to remote */
-               rpmsg_send(app_rp_chnl, &shutdown_msg, sizeof(int));
-
-        /* Wait for channel deletion callback. */
-        NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-
-               /* Shutdown remote processor and deinitialize remoteproc */
-        remoteproc_shutdown(proc);
-        remoteproc_deinit(proc);
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw1_name);
-    }        
-    
-       /* Start second firmware */
-    status = remoteproc_init((void *) fw2_name, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-
-       /* Boot first firmware */
-    if((!status) && (proc))
-    {
-           printf("\r\n\n********************************************\r\n");
-        printf("BOOTING BAREMETAL  REMOTE FIRMWARE");
-           printf("\r\n********************************************\r\n\n");
-        status = remoteproc_boot(proc);
-    }
-    
-    if(!status)
-    {
-               /* Wait till communication channel is established */
-        NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-    
-        printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-        printf("\r\nStarting application for second firmware  .. \r\n");
-        printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-        
-               /* Call matrix multiply application */
-        matrix_multiply_shell();
-        
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-        printf("\r\nShutting down and deinitializing remote context : %s \r\n" , fw2_name);
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-
-               /* Shut down remote processor and deinitialize remoteproc */
-        remoteproc_shutdown(proc);
-        remoteproc_deinit(proc);
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw2_name);
-    }        
-    
-}
-
-/* This callback gets invoked when the remote channel is created */
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) {
-    app_rp_chnl = rp_chnl;
-    rp_ept = rpmsg_create_ept(rp_chnl , rpmsg_read_cb ,RPMSG_NULL , RPMSG_ADDR_ANY);
-    NU_Release_Semaphore(&App_Sem);
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) {
-    NU_Release_Semaphore(&App_Sem);
-}
-
-/* This is the read callback, note we are in a task context when this callback
-is invoked, so kernel primitives can be used freely */
-void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * priv, unsigned long src) {
-
-    memcpy(r_matrix,data,len);
-    
-    bytes_received = len;
-    
-    NU_Release_Semaphore(&App_Sem);
-}
-
index a073704bfbf1e6a27ba4d25f804431cf97053a0f..85b11b1dc71953d84074687831febb322bb1ecd1 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include "open_amp.h"\r
index 9c28005fa2747df38c7bd455c9a80f7545f22a8d..0a8e95750d5d919b1fe9ece8236a632fc84d1801 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include <stddef.h>\r
index a073704bfbf1e6a27ba4d25f804431cf97053a0f..85b11b1dc71953d84074687831febb322bb1ecd1 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include "open_amp.h"\r
index 9c28005fa2747df38c7bd455c9a80f7545f22a8d..0a8e95750d5d919b1fe9ece8236a632fc84d1801 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include <stddef.h>\r
diff --git a/apps/samples/remote/nucleus/matrix_multiply/make b/apps/samples/remote/nucleus/matrix_multiply/make
deleted file mode 100644 (file)
index 401fc30..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := samples/remote/nucleus/matrix_multiply/matrix_multiply.out
-
-SAMPLE_SRC := samples/remote/nucleus/matrix_multiply/matrix_multiply.c samples/remote/nucleus/matrix_multiply/rsc_table.c
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_SRC))
-
-SAMPLE_DEPS   := $(patsubst %.c, %.d, $(SAMPLE_SRC))
-
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(SAMPLEOBJFILES)
-
-       @echo 'Building matrix multiplication application : $@'
-
-       $(LD)  -Wl,-Map=samples/remote/nucleus/matrix_multiply/matrix_multiply.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_remote.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/remote" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) -lnucleus_remote -lopen_amp -lc -lm -lstdc++ -Wl,--end-group        
-       
-       @echo 'Copying ELF image to firmware folder'
-       $(CP) $(SAMPLE_OUT) firmware/$(PLAT)/$(OS)/matrix_multiply/firmware
-
-    @echo 'Finished building target: $@'
-       
-%.o:%.c 
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_MAP)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/samples/remote/nucleus/matrix_multiply/matrix_multiply.c b/apps/samples/remote/nucleus/matrix_multiply/matrix_multiply.c
deleted file mode 100644 (file)
index 4176010..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/* This is a sample demonstration application that showcases usage of remoteproc\r
- and rpmsg APIs on the remote core. This application is meant to run on the remote CPU\r
- running Nucleus. This applicationr receives two matrices from the master, multiplies\r
- them and returns the result to the master core. */\r
-\r
-/* Including required headers */\r
-#include  <stdio.h>\r
-#include <string.h>\r
-#include <stdlib.h>\r
-#include "open_amp.h"\r
-#include "rsc_table.h"\r
-#include "nucleus.h"\r
-#include "kernel/nu_kernel.h"\r
-\r
-/* Define the main task's stack size */\r
-#define STACK_SIZE              (NU_MIN_STACK_SIZE * 64)\r
-\r
-/* Define the main task's priority */\r
-#define TASK_PRIORITY           26\r
-\r
-/* Define the main task's time slice */\r
-#define TASK_SLICE              20\r
-\r
-/* Application */\r
-#define MAX_SIZE                6\r
-#define NUM_MATRIX              2\r
-\r
-#define SHUTDOWN_MSG            0xEF56A55A\r
-\r
-typedef struct _matrix {\r
-    unsigned long size;\r
-    unsigned long elements[MAX_SIZE][MAX_SIZE];\r
-} matrix;\r
-\r
-/* Prototype for the main task's entry function */\r
-static void Main_Task_Entry(UNSIGNED argc, VOID *argv);\r
-\r
-static NU_TASK Task_Control_Block;\r
-static NU_SEMAPHORE Remote_Sem;\r
-static struct rpmsg_endpoint *rp_ept;\r
-static struct rpmsg_channel *app_rp_chnl;\r
-static matrix matrix_array[NUM_MATRIX];\r
-static matrix matrix_result;\r
-static struct remote_proc *proc;\r
-static struct rsc_table_info rsc_info;\r
-extern const struct remote_resource_table resources;\r
-static int shutdown_flag = 0;\r
-\r
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl);\r
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl);\r
-void rpmsg_read_default_cb(struct rpmsg_channel *rp_chnl, void *data, int len,\r
-                void * pric, unsigned long src);\r
-\r
-/***********************************************************************\r
- * *\r
- * *   FUNCTION\r
- * *\r
- * *       Application_Initialize\r
- * *\r
- * *   DESCRIPTION\r
- * *\r
- * *       Demo application entry point\r
- *\r
- * ***********************************************************************/\r
-VOID Application_Initialize(NU_MEMORY_POOL* mem_pool,\r
-                NU_MEMORY_POOL* uncached_mem_pool) {\r
-    VOID *pointer;\r
-    STATUS status;\r
-\r
-    /* Reference unused parameters to avoid toolset warnings */\r
-    NU_UNUSED_PARAM(uncached_mem_pool);\r
-\r
-    status = NU_Create_Semaphore(&Remote_Sem, "r_sem", 0, NU_FIFO);\r
-\r
-    if (status == NU_SUCCESS) {\r
-        status = NU_Allocate_Memory(mem_pool, &pointer,\r
-                        STACK_SIZE, NU_NO_SUSPEND);\r
-        if (status == NU_SUCCESS) {\r
-            /* Create task 0.  */\r
-            status = NU_Create_Task(&Task_Control_Block, "MAIN",\r
-                            Main_Task_Entry, 0, uncached_mem_pool, pointer,\r
-                            STACK_SIZE, TASK_PRIORITY, TASK_SLICE,\r
-                            NU_PREEMPT, NU_START);\r
-        }\r
-    }\r
-\r
-    /* Check to see if previous operations were successful */\r
-    if (status != NU_SUCCESS) {\r
-        /* Loop forever */\r
-        while (1);\r
-    }\r
-}\r
-\r
-static void Matrix_Multiply(const matrix *m, const matrix *n, matrix *r) {\r
-    int i, j, k;\r
-\r
-    r->size = m->size;\r
-\r
-    for (i = 0; i < m->size; ++i) {\r
-        for (j = 0; j < n->size; ++j) {\r
-            r->elements[i][j] = 0;\r
-        }\r
-    }\r
-\r
-    for (i = 0; i < m->size; ++i) {\r
-        for (j = 0; j < n->size; ++j) {\r
-            for (k = 0; k < r->size; ++k) {\r
-                r->elements[i][j] += m->elements[i][k] * n->elements[k][j];\r
-            }\r
-        }\r
-    }\r
-}\r
-\r
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) {\r
-\r
-    app_rp_chnl = rp_chnl;\r
-    rp_ept = rpmsg_create_ept(rp_chnl, rpmsg_read_default_cb, RPMSG_NULL,\r
-                    RPMSG_ADDR_ANY);\r
-}\r
-\r
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) {\r
-    rpmsg_destroy_ept(rp_ept);\r
-}\r
-\r
-void rpmsg_read_default_cb(struct rpmsg_channel *rp_chnl, void *data, int len,\r
-                void * priv, unsigned long src) {\r
-\r
-    if ((*(int *) data) == SHUTDOWN_MSG) {\r
-        shutdown_flag = 1;\r
-        NU_Release_Semaphore(&Remote_Sem);\r
-    } else {\r
-        env_memcpy(matrix_array, data, len);\r
-        NU_Release_Semaphore(&Remote_Sem);\r
-    }\r
-}\r
-\r
-/***********************************************************************\r
- * *\r
- * *   FUNCTION\r
- * *\r
- * *       Main_Task_Entry\r
- * *\r
- * *   DESCRIPTION\r
- * *\r
- * *       Entry function for the main task. This task prints a hello world\r
- * *       message.\r
- * *\r
- * ***********************************************************************/\r
-static VOID Main_Task_Entry(UNSIGNED argc, VOID *argv) {\r
-    rsc_info.rsc_tab = (struct resource_table *) &resources;\r
-    rsc_info.size = sizeof(resources);\r
-\r
-    remoteproc_resource_init(&rsc_info, rpmsg_channel_created,\r
-                    rpmsg_channel_deleted, rpmsg_read_default_cb, &proc);\r
-\r
-    for (;;) {\r
-\r
-        /* Wait for incoming matrix data. */\r
-        NU_Obtain_Semaphore(&Remote_Sem, NU_SUSPEND);\r
-\r
-        if (shutdown_flag) {\r
-            remoteproc_resource_deinit(proc);\r
-            break;\r
-        }\r
-\r
-        /* Process received data and multiple matrices. */\r
-        Matrix_Multiply(&matrix_array[0], &matrix_array[1], &matrix_result);\r
-\r
-        /* Send the result of matrix multiplication back to master. */\r
-        rpmsg_send(app_rp_chnl, &matrix_result, sizeof(matrix));\r
-\r
-        NU_Sleep(5);\r
-    }\r
-}\r
diff --git a/apps/samples/remote/nucleus/matrix_multiply/rsc_table.c b/apps/samples/remote/nucleus/matrix_multiply/rsc_table.c
deleted file mode 100644 (file)
index d87050c..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*\r
- * Copyright (c) 2014, Mentor Graphics Corporation\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are met:\r
- *\r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * 3. Neither the name of Mentor Graphics Corporation nor the names of its\r
- *    contributors may be used to endorse or promote products derived from this\r
- *    software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- * POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-/* This file populates resource table for Nucleus and BM remotes\r
- * for use by the Linux Master */\r
-\r
-#include "open_amp.h"\r
-#include "rsc_table.h"\r
-\r
-/* Place resource table in special ELF section */\r
-#define __section(S)            __attribute__((__section__(#S)))\r
-#define __resource              __section(.resource_table)\r
-\r
-\r
-#define RPMSG_IPU_C0_FEATURES       1\r
-\r
-/* VirtIO rpmsg device id */\r
-#define VIRTIO_ID_RPMSG_             7\r
-\r
-/* Remote supports Name Service announcement */\r
-#define VIRTIO_RPMSG_F_NS           0\r
-\r
-/* Resource table entries */\r
-#define ELF_START                   0x00000000\r
-#define ELF_END                     0x08000000\r
-#define NUM_VRINGS                                     0x02\r
-#define VRING_ALIGN                                    0x1000\r
-#define RING_TX                     0x08000000\r
-#define RING_RX                     0x08004000\r
-#define VRING_SIZE                  256\r
-\r
-const struct remote_resource_table __resource resources =\r
-{\r
-    /* Version */\r
-    1,\r
-\r
-    /* NUmber of table entries */\r
-    2,\r
-    /* reserved fields */\r
-    {   0, 0,},\r
-\r
-    /* Offsets of rsc entries */\r
-    {\r
-        offsetof(struct remote_resource_table, elf_cout),\r
-        offsetof(struct remote_resource_table, rpmsg_vdev),\r
-    },\r
-\r
-    /* End of ELF file */\r
-    {\r
-        RSC_CARVEOUT, ELF_START, ELF_START, ELF_END, 0, 0, "ELF_COUT",\r
-    },\r
-\r
-    /* Virtio device entry */\r
-    {   RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, 0, NUM_VRINGS, {0, 0},\r
-    },\r
-\r
-    /* Vring rsc entry - part of vdev rsc entry */\r
-    {\r
-        RING_TX, VRING_ALIGN, VRING_SIZE, 1, 0\r
-    },\r
-    {\r
-        RING_RX, VRING_ALIGN, VRING_SIZE, 2, 0\r
-    },\r
-};\r
diff --git a/apps/samples/remote/nucleus/matrix_multiply/rsc_table.h b/apps/samples/remote/nucleus/matrix_multiply/rsc_table.h
deleted file mode 100644 (file)
index 9c28005..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*\r
- * Copyright (c) 2014, Mentor Graphics Corporation\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are met:\r
- *\r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * 3. Neither the name of Mentor Graphics Corporation nor the names of its\r
- *    contributors may be used to endorse or promote products derived from this\r
- *    software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- * POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-/* This file populates resource table for Nucleus and BM remotes\r
- * for use by the Linux Master */\r
-\r
-#include <stddef.h>\r
-#include "open_amp.h"\r
-\r
-#define NO_RESOURCE_ENTRIES         8\r
-\r
-/* Resource table for the given remote */\r
-struct remote_resource_table {\r
-    unsigned int version;\r
-    unsigned int num;\r
-    unsigned int reserved[2];\r
-    unsigned int offset[NO_RESOURCE_ENTRIES];\r
-    /* text carveout entry */\r
-    struct fw_rsc_carveout elf_cout;\r
-    /* rpmsg vdev entry */\r
-    struct fw_rsc_vdev rpmsg_vdev;\r
-    struct fw_rsc_vdev_vring rpmsg_vring0;\r
-    struct fw_rsc_vdev_vring rpmsg_vring1;\r
-};\r
-\r
diff --git a/apps/samples/remote/nucleus/rpc_demo/make b/apps/samples/remote/nucleus/rpc_demo/make
deleted file mode 100644 (file)
index 6b36396..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := samples/remote/nucleus/rpc_demo/rpc_demo.out
-
-SAMPLE_SRC := samples/remote/nucleus/rpc_demo/rpc_demo.c samples/remote/nucleus/rpc_demo/rsc_table.c ../proxy/remote/rpmsg_retarget/rpmsg_retarget.c
-APP_INCLUDE := -I"../proxy/remote/rpmsg_retarget"
-
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_SRC))
-
-SAMPLE_DEPS   := $(patsubst %.c, %.d, $(SAMPLE_SRC))
-
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(SAMPLEOBJFILES)
-
-       @echo 'Building rpc demo application : $@'
-
-       $(LD)  -Wl,-Map=samples/remote/nucleus/rpc_demo/rpc_demo.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_remote.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/remote_proxy" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) -lnucleus_remote -lopen_amp -lc -lm -lstdc++ -Wl,--end-group        
-       
-       @echo 'Copying ELF image to firmware folder'
-       $(CP) $(SAMPLE_OUT) firmware/$(PLAT)/$(OS)/rpc_demo/firmware
-
-    @echo 'Finished building target: $@'
-       
-%.o:%.c 
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) $(APP_INCLUDE)  -c $< -o $@
-
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_MAP)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/samples/remote/nucleus/rpc_demo/rpc_demo.c b/apps/samples/remote/nucleus/rpc_demo/rpc_demo.c
deleted file mode 100644 (file)
index 388b283..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-
-/* This is a sample demonstration application that showcases usage of proxy from the remote core. 
-This application is meant to run on the remote CPU running Nucleus. 
-This applicationr can print to to master console and perform file I/O using proxy mechanism*/
-
-
-/* Including required headers */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include "open_amp.h"
-#include "rsc_table.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-#include "rpmsg_retarget.h"
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 64)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-/* Prototype for the main task's entry function */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-static NU_TASK Task_Control_Block;
-static NU_SEMAPHORE Remote_Sem;
-volatile int int_flag = 0;
-static struct rpmsg_channel *app_rp_chnl;
-static struct remote_proc *proc;
-static struct rsc_table_info rsc_info;
-extern const struct remote_resource_table resources;
-
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_default_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-void shutdown_cb(struct rpmsg_channel *rp_chnl);
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(
-                NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status;
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    status = NU_Create_Semaphore( &Remote_Sem , "r_sem" , 0 , NU_FIFO );
-
-    if (status == NU_SUCCESS)
-    {
-          status = NU_Allocate_Memory(mem_pool, &pointer,
-                              STACK_SIZE, NU_NO_SUSPEND);
-          if ( status == NU_SUCCESS )
-          {
-               /* Create task 0.  */
-               status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-                                   uncached_mem_pool , pointer , STACK_SIZE , TASK_PRIORITY , TASK_SLICE ,
-                                   NU_PREEMPT , NU_START );
-          }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl)
-{
-    app_rp_chnl = rp_chnl;
-    NU_Release_Semaphore( &Remote_Sem );
-}
-
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl)
-{
-
-}
-
-void rpmsg_read_default_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * priv, unsigned long src)
-{
-
-}
-
-#define REDEF_O_CREAT 100
-#define REDEF_O_EXCL 200
-#define REDEF_O_RDONLY 0
-#define REDEF_O_WRONLY 1
-#define REDEF_O_RDWR 2
-#define REDEF_O_APPEND 2000
-#define REDEF_O_ACCMODE 3
-
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv )
-{
-    int fd, bytes_written, bytes_read;
-    char fname[]="remote.file";
-    char wbuff[50];
-    char rbuff[1024];
-    char ubuff[50];
-    float fdata;
-    int idata;
-    int ret;
-
-    rsc_info.rsc_tab = (struct resource_table *)&resources;
-    rsc_info.size = sizeof(resources);
-
-    remoteproc_resource_init(&rsc_info, rpmsg_channel_created , rpmsg_channel_deleted ,rpmsg_read_default_cb, &proc);
-
-    NU_Obtain_Semaphore( &Remote_Sem , NU_SUSPEND );
-
-    rpmsg_retarget_init(app_rp_chnl , shutdown_cb);
-
-    printf("\r\nRemote>******************************************************\r\n");
-    printf("\r\nRemote>Nucleus RTOS Remote Procedure Call (RPC) Demonstration\r\n");
-    printf("\r\nRemote>******************************************************\r\n");
-
-    printf("\r\nRemote>Rpmsg based retargetting to proxy initialized..\r\n");
-
-    /* Remote performing file IO on Master */
-    printf("\r\nRemote>FileIO demo using open, write, read, close CRTL calls ..\r\n");
-
-    printf("\r\nRemote>Creating a file on master and writing to it..\r\n");
-    fd = open(fname, REDEF_O_CREAT | REDEF_O_WRONLY | REDEF_O_APPEND, S_IRUSR | S_IWUSR);
-    printf("\r\nRemote>Opened file '%s' with fd = %d\r\n", fname, fd);
-
-    sprintf(wbuff,"This is a test string being written to file..");
-    bytes_written = write(fd, wbuff, strlen(wbuff));
-    printf("\r\nRemote>Wrote to fd = %d, size = %d bytes \r\ncontent = %s\r\n", fd, bytes_written, wbuff);
-
-    close(fd);
-    printf("\r\nRemote>Closed fd = %d\r\n", fd);
-
-    /* Remote performing file IO on Master */
-    printf("\r\nRemote>Reading a file on master and displaying its contents..\r\n");
-    fd = open(fname, REDEF_O_RDONLY, S_IRUSR | S_IWUSR);
-    printf("\r\nRemote>Opened file '%s' with fd = %d\r\n", fname, fd);
-    bytes_read = read(fd, rbuff, 1024);
-    *(char*)(&rbuff[0]+bytes_read+1)=0;
-    printf("\r\nRemote>Read from fd = %d, size = %d bytes \r\ncontent = %s\r\n", fd, bytes_read, rbuff);
-    close(fd);
-    printf("\r\nRemote>Closed fd = %d\r\n", fd);
-
-    for(;;)
-    {
-        /* Remote performing STDIO on Master */
-        printf("\r\nRemote>Remote firmware using scanf and printf ..\r\n");
-        printf("\r\nRemote>Scanning user input from master..\r\n");
-        printf("\r\nRemote>Enter name\r\n");
-        ret = scanf("%s", ubuff);
-        if(ret) {
-            printf("\r\nRemote>Enter age\r\n");
-            ret = scanf("%d", &idata);
-            if(ret) {
-                printf("\r\nRemote>Enter value for pi\r\n");
-                ret = scanf("%f", &fdata);
-                if(ret) {
-                    printf("\r\nRemote>User name = '%s'\r\n", ubuff);
-                    printf("\r\nRemote>User age = '%d'\r\n", idata);
-                    printf("\r\nRemote>User entered value of pi = '%f'\r\n", fdata);
-                }
-            }
-        }
-
-        if(!ret)
-        {
-            /* Consume the read buffer */
-            while(getchar() != '\n');
-            printf("Remote> Invalid value. Starting again....");
-        }
-        else
-        {
-            printf("\r\nRemote>Repeat demo ? (enter yes or no) \r\n");
-            scanf("%s", ubuff);
-
-            if((strcmp(ubuff,"no")) && (strcmp(ubuff,"yes")))
-            {
-                printf("\r\nRemote>Invalid option. Starting again....\r\n");
-            }
-            else if((!strcmp(ubuff,"no")))
-            {
-                printf("\r\nRemote>RPC retargetting quitting ...\r\n");
-                break;
-            }
-        }
-    }
-
-
-    printf("\r\nRemote> Firmware's rpmsg-openamp-demo-channel going down! \r\n");
-}
-
-void shutdown_cb(struct rpmsg_channel *rp_chnl){
-    rpmsg_retarget_deinit(rp_chnl);
-    remoteproc_resource_deinit(proc);
-}
diff --git a/apps/samples/remote/nucleus/rpc_demo/rpc_demo.h b/apps/samples/remote/nucleus/rpc_demo/rpc_demo.h
deleted file mode 100644 (file)
index df38197..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * proxy_rtl.h
- *
- *  Created on: Mar 28, 2014
- *      Author: etsam
- */
-
-#ifndef PROXY_RTL_H_
-#define PROXY_RTL_H_
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define PRINTF                  0x00000000
-#define SCANF                   0x00000001
-#define FOPEN                   0x00000002
-#define FCLOSE                  0x00000003
-#define FREAD                   0x00000004
-#define FWRITE                  0x00000005
-#define COMMAND_ID              0xEF56A55A
-#define FILE_NAME_LEN           32
-#define FILE_MOD_LEN            4
-
-struct rtl_cmd {
-
-    /* Unique identifer for command message */
-    unsigned int cmd_id;
-
-    /* Command code */
-    unsigned int cmd_cc;
-
-    /* Length of data to to transfer ins response to command */
-    unsigned int data_len;
-
-    /* Command payload */
-    char buff[0];
-
-}__attribute__((__packed__));
-
-struct rtl_cmd_ack {
-
-    /* Command code for which ACK is sent */
-    unsigned int cmd_id;
-
-    /* Any data - apart from status */
-    unsigned int data;
-
-    /* Command status */
-    unsigned int status;
-};
-
-struct fopen_data {
-    char name[FILE_NAME_LEN];
-    char mode[FILE_MOD_LEN];
-};
-
-struct proxy_rtl {
-    /* Lock to exclusively accesses RTL functions */
-    void *rtl_lock;
-    /* Command completion lock */
-    void *data_lock;
-    /* Buffer for data transfer */
-    void *buff;
-    /* Current command reference */
-    /* Command completion status */
-    struct rtl_cmd *cmd;
-    struct rtl_cmd_ack cmd_ack;
-    /* Data length yet to transfer */
-    int rem_len;
-};
-
-#endif /* PROXY_RTL_H_ */
diff --git a/apps/samples/remote/nucleus/rpc_demo/rsc_table.c b/apps/samples/remote/nucleus/rpc_demo/rsc_table.c
deleted file mode 100644 (file)
index a073704..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*\r
- * Copyright (c) 2014, Mentor Graphics Corporation\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are met:\r
- *\r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * 3. Neither the name of Mentor Graphics Corporation nor the names of its\r
- *    contributors may be used to endorse or promote products derived from this\r
- *    software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- * POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-/* This file populates resource table for Nucleus and BM remotes\r
- * for use by the Linux Master */\r
-\r
-#include "open_amp.h"\r
-#include "rsc_table.h"\r
-\r
-/* Place resource table in special ELF section */\r
-#define __section(S)            __attribute__((__section__(#S)))\r
-#define __resource              __section(.resource_table)\r
-\r
-#define RPMSG_IPU_C0_FEATURES       1\r
-\r
-/* VirtIO rpmsg device id */\r
-#define VIRTIO_ID_RPMSG_             7\r
-\r
-/* Remote supports Name Service announcement */\r
-#define VIRTIO_RPMSG_F_NS           0\r
-\r
-/* Resource table entries */\r
-#define ELF_START                   0x00000000\r
-#define ELF_END                     0x08000000\r
-#define NUM_VRINGS                                     0x02\r
-#define VRING_ALIGN                                    0x1000\r
-#define RING_TX                     0x08000000\r
-#define RING_RX                     0x08004000\r
-#define VRING_SIZE                  256\r
-\r
-const struct remote_resource_table __resource resources =\r
-{\r
-    /* Version */\r
-    1,\r
-\r
-    /* NUmber of table entries */\r
-    2,\r
-    /* reserved fields */\r
-    {   0, 0,},\r
-\r
-    /* Offsets of rsc entries */\r
-    {\r
-        offsetof(struct remote_resource_table, elf_cout),\r
-        offsetof(struct remote_resource_table, rpmsg_vdev),\r
-    },\r
-\r
-    /* End of ELF file */\r
-    {\r
-        RSC_CARVEOUT, ELF_START, ELF_START, ELF_END, 0, 0, "ELF_COUT",\r
-    },\r
-\r
-    /* Virtio device entry */\r
-    {   RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, 0, NUM_VRINGS, {0, 0},\r
-    },\r
-\r
-    /* Vring rsc entry - part of vdev rsc entry */\r
-    {\r
-        RING_TX, VRING_ALIGN, VRING_SIZE, 1, 0\r
-    },\r
-    {\r
-        RING_RX, VRING_ALIGN, VRING_SIZE, 2, 0\r
-    },\r
-};\r
diff --git a/apps/samples/remote/nucleus/rpc_demo/rsc_table.h b/apps/samples/remote/nucleus/rpc_demo/rsc_table.h
deleted file mode 100644 (file)
index 9c28005..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*\r
- * Copyright (c) 2014, Mentor Graphics Corporation\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are met:\r
- *\r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * 3. Neither the name of Mentor Graphics Corporation nor the names of its\r
- *    contributors may be used to endorse or promote products derived from this\r
- *    software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- * POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-/* This file populates resource table for Nucleus and BM remotes\r
- * for use by the Linux Master */\r
-\r
-#include <stddef.h>\r
-#include "open_amp.h"\r
-\r
-#define NO_RESOURCE_ENTRIES         8\r
-\r
-/* Resource table for the given remote */\r
-struct remote_resource_table {\r
-    unsigned int version;\r
-    unsigned int num;\r
-    unsigned int reserved[2];\r
-    unsigned int offset[NO_RESOURCE_ENTRIES];\r
-    /* text carveout entry */\r
-    struct fw_rsc_carveout elf_cout;\r
-    /* rpmsg vdev entry */\r
-    struct fw_rsc_vdev rpmsg_vdev;\r
-    struct fw_rsc_vdev_vring rpmsg_vring0;\r
-    struct fw_rsc_vdev_vring rpmsg_vring1;\r
-};\r
-\r
index 56b96c8b3b5955f208d2525c7d576f6f3c941bf5..8ae55891ca01090761e0ab99a428e2c45fda8941 100644 (file)
@@ -14,7 +14,7 @@ SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
 
 $(SAMPLE_OUT): $(REMOTE_OUT)$(SAMPLEOBJFILES)
 
-       @echo 'Building func_test_suite test for nucleus : $@'
+       @echo 'Building func_test_suite test for baremetal : $@'\r
 
        $(LD)  -Wl,-Map=tests/master/baremetal/func_test_suite/func_test_suite.map -Wl,--gc-sections -T"$(OHOME)/libs/system/$(PLAT)/baremetal/linker_master.ld" -L"$(OHOME)/libs/open_amp" -L"$(OHOME)/libs/system/$(PLAT)/baremetal" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lopen_amp -lbaremetal_master -lc -lm -lstdc++ -lcs3 -lcs3arm -lcs3unhosted -Wl,--end-group 
        
diff --git a/apps/tests/master/nucleus/echo_test/nucleus_linux/echo_test.c b/apps/tests/master/nucleus/echo_test/nucleus_linux/echo_test.c
deleted file mode 100644 (file)
index 2f06e20..0000000
+++ /dev/null
@@ -1,196 +0,0 @@
-/* This is a sample demonstration application that showcases usage of remoteproc
-and rpmsg APIs. This application is meant to run on the master CPU running Nucleus
-and showcases booting of linux remote firmware using remoteproc and 
-IPC with remote firmware using rpmsg; Nucleus on master core acts as a remoteproc master
-but as an rpmsg remote;It brings up a remote Linux based 
-firmware which acts as an rpmsg master and transmits data payloads to Nucleus.
-Linux app sends paylaods of incremental sizes to Nucleus which echoes them back to Linux. 
-Once Linux application is complete, it requests a shutdown from Nucleus. 
-Nucleus acknowledges with a shutdown message which results in Linux starting a system halt. 
-Nucleus shutsdown the remote core after a reasonable delay which allows
-Linux to gracefully shutdown. */
-
-/* Including required headers */
-#include  <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 64)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define MAX_RPMSG_BUFF_SIZE 512
-#define PAYLOAD_MIN_SIZE    1    
-#define PAYLOAD_MAX_SIZE    (MAX_RPMSG_BUFF_SIZE - 24)
-#define NUM_PAYLOADS        (PAYLOAD_MAX_SIZE/PAYLOAD_MIN_SIZE)
-
-#define SHUTDOWN_MSG   0xEF56A55A
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric , unsigned long src );
-
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem;
-struct rpmsg_endpoint *rp_ept;
-struct rpmsg_channel *app_rp_chnl;
-char fw_name1 []= "firmware1";
-
-int global_count;
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if (status == NU_SUCCESS)
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-                                    uncached_mem_pool , pointer , STACK_SIZE , 
-                                    TASK_PRIORITY , TASK_SLICE , NU_PREEMPT , NU_START );
-        }
-        if(status == NU_SUCCESS)
-        {
-            status = NU_Create_Semaphore(&App_Sem ,"APP_SEM", 0, NU_FIFO);
-        }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv ) {
-
-    struct remote_proc *proc;
-    int                status;
-       int shutdown_msg = SHUTDOWN_MSG;
-           
-       printf("\n\n\r************************************");
-       printf("*******************************************\r\n");
-       printf("\r\n              Echo Test Application \r\n");
-       printf("\r\n");
-       printf("\r\nThis test application will start a linux kernel on remote core and will act\r\n");
-       printf("\r\nas an RPMSG remote itself to echo back any data that it receives from Linux\r\n");
-
-       printf("\r\n******************************************");
-       printf("*************************************\n\r\n");
-
-       printf("\r\n******************************************");
-       printf("*************************************\n\r\n");
-    printf("\r\nLoading remote context : %s \r\n" , fw_name1);
-       printf("\r\n******************************************");
-       printf("*************************************\n\r\n");
-    
-  
-    status = remoteproc_init((void *) fw_name1, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-    
-    if(!status && (proc))
-    {
-               printf("\r\n\n********************************************\r\n");
-        printf("BOOTING LINUX REMOTE FIRMWARE");
-           printf("\r\n********************************************\r\n\n");
-        status = remoteproc_boot(proc);
-    }
-    
-    if(!status)
-    {   
-           /* Wait for shutdown message. */
-           NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-                       
-               /* Send shutdown message to remote */
-               rpmsg_send(app_rp_chnl, &shutdown_msg, sizeof(int));
-               
-               /* The remote Linux kernel requires around ~15 seconds to shutdown itself. Wait. */
-               NU_Sleep(100 * 18);
-               
-               remoteproc_shutdown(proc);
-               
-               remoteproc_deinit(proc);
-
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw_name1);
-    }       
-
-    printf("\r\nTest Completed \r\n");
-}
-
-/* This callback gets invoked when the remote chanl is created */
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) {
-
-    app_rp_chnl = rp_chnl;
-    
-    rp_ept = rpmsg_create_ept(rp_chnl , rpmsg_read_cb ,RPMSG_NULL , RPMSG_ADDR_ANY);
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) {
-    
-    rpmsg_destroy_ept(rp_ept);
-
-}
-
-/* This is the read callback, note we are in a task context when this callback
-is invoked, so kernel primitives can be used freely */
-void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * priv, unsigned long src) {
-   
-    if ((*(int *) data) == SHUTDOWN_MSG)
-    {
-        NU_Release_Semaphore(&App_Sem);
-    }
-    else
-    {
-           rpmsg_send(rp_chnl, data, len);
-    }
-}
-
diff --git a/apps/tests/master/nucleus/echo_test/nucleus_linux/make b/apps/tests/master/nucleus/echo_test/nucleus_linux/make
deleted file mode 100644 (file)
index 51805cf..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := tests/master/nucleus/echo_test/nucleus_linux/echo_test.out
-SAMPLE_C_SRC := tests/master/nucleus/echo_test/nucleus_linux/echo_test.c
-REMOTE_OUT   := echo_test.out
-DST_DIR := tests/master/nucleus/echo_test/nucleus_linux
-LINUX_SRC_DIR := firmware/$(PLAT)/linux
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
-SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(REMOTE_OUT)$(SAMPLEOBJFILES)
-
-       @echo 'Building echo_test test for nucleus : $@'
-
-       $(LD)  -Wl,-Map=tests/master/nucleus/echo_test/nucleus_linux/echo_test.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group  
-       
-       $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
-               
-       @echo 'Finished building target: $@'
-       
-%.o:%.c
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-       
-%.o:%.S
-       @$(AS) -c $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
-
-$(REMOTE_OUT):
-       cd $(LINUX_SRC_DIR)/; cp firmware firmware1; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
-       mv $(LINUX_SRC_DIR)/firmware1.o $(DST_DIR)/firmware1.o
-       cd $(LINUX_SRC_DIR)/; cp firmware firmware2; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
-       mv $(LINUX_SRC_DIR)/firmware2.o $(DST_DIR)/
-       cd $(LINUX_SRC_DIR)/; rm firmware1; rm firmware2;
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_BIN) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o $(SAMPLE_MAP)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/tests/master/nucleus/echo_test/nucleus_nucleusbm/echo_test.c b/apps/tests/master/nucleus/echo_test/nucleus_nucleusbm/echo_test.c
deleted file mode 100644 (file)
index cb865d9..0000000
+++ /dev/null
@@ -1,338 +0,0 @@
-/* This is a test demonstration application that showcases usage of remoteproc
-and rpmsg APIs. This application is meant to run on the master CPU running Nucleus
-and showcases booting of two sub-sequent remote firmware cycles using remoteproc and 
-IPC with remote firmware using rpmsg; 1. It brings up a remote Nucleus based remote 
-firmware which echoes back payload data, 2. It brings up a baremetal based 
-remote firmware which echoes back payload data. Master app transmists paylaods of
-varying sizes to the remote core which echoes them back. The master core validates
-the data integrity and shutsdown the core once the test has been completed.*/
-
-/* Including required headers */
-#include  <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 64)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define MAX_RPMSG_BUFF_SIZE 512
-#define PAYLOAD_MIN_SIZE    1    
-#define PAYLOAD_MAX_SIZE    (MAX_RPMSG_BUFF_SIZE - 24)
-#define NUM_PAYLOADS        (PAYLOAD_MAX_SIZE/PAYLOAD_MIN_SIZE)
-
-#define SHUTDOWN_MSG   0xEF56A55A
-
-struct _payload {
-    unsigned long    num;
-    unsigned long    size;
-    char             data[];
-};
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric , unsigned long src );
-
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem;
-struct rpmsg_endpoint *rp_ept;
-struct rpmsg_channel *app_rp_chnl;
-char fw_name1 []= "firmware1";
-char fw_name2 []= "firmware2";
-
-struct _payload* p_payload = NULL;
-struct _payload* r_payload = NULL;
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if (status == NU_SUCCESS)
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-                                    uncached_mem_pool , pointer , STACK_SIZE , 
-                                    TASK_PRIORITY , TASK_SLICE , NU_PREEMPT , NU_START );
-        }
-        if(status == NU_SUCCESS)
-        {
-            status = NU_Create_Semaphore(&App_Sem ,"APP_SEM", 0, NU_FIFO);
-        }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv ) {
-
-    struct remote_proc *proc;
-    int                idx ,i, size, status;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    int shutdown_msg = SHUTDOWN_MSG;
-
-    NU_System_Memory_Get(&sys_pool_ptr, NU_NULL);
-       
-       printf("\n\n\r************************************");
-       printf("*******************************************\r\n");
-       printf("\r\n              Echo Test Application \r\n");
-       printf("\r\n");
-       printf("\r\nThis test application will send variable length data \r\n");
-       printf("\r\npackets to remote cores\r\n");
-
-       printf("\r\n******************************************");
-       printf("*************************************\n\r\n");
-
-       printf("\r\n******************************************");
-       printf("*************************************\n\r\n");
-    printf("\r\nLoading remote context : %s \r\n" , fw_name1);
-       printf("\r\n******************************************");
-       printf("*************************************\n\r\n");
-    
-    NU_Allocate_Memory(sys_pool_ptr, (VOID **)&r_payload, (2 * sizeof(unsigned long) + PAYLOAD_MAX_SIZE), NU_NO_SUSPEND);
-            
-    status = remoteproc_init((void *) fw_name1, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-    
-    if(!status && (proc))
-    {
-               printf("\r\n\n********************************************\r\n");
-        printf("BOOTING NUCLEUS REMOTE FIRMWARE");
-           printf("\r\n********************************************\r\n\n");
-        status = remoteproc_boot(proc);
-    }
-    
-    if(!status)
-    {   
-        /* Wait for channel creation complete  callback. */
-        NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-        
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-        printf("\r\nStarting echo test on : %s \r\n" , fw_name1);
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");
-        
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {     
-            NU_Allocate_Memory(sys_pool_ptr, (VOID **)&p_payload, (2 * sizeof(unsigned long) + size), NU_NO_SUSPEND);
-                    
-            p_payload->num = i;
-            
-            p_payload->size = size;
-            
-            /* Setup the buffer with a pattern*/    
-            memset(&(p_payload->data[0]), 0xA5, size);  
-         
-            printf("\r\nSending data packet of size: %d to remote firmware : %s \r\n" , size, fw_name1);
-                    
-            /* Send data to remote side. */
-            rpmsg_send(app_rp_chnl, p_payload, (2 * sizeof(unsigned long)) + size);
-            
-            /* Wait for echo. */
-            NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-            
-            /* Validate packet number*/
-            if(p_payload->num != r_payload->num)
-            {
-                printf("\r\nError Echo packet number does not match with transmitted packet number: %d \r\n", (int)p_payload->num);
-            }
-                  
-            /* Validate the data integrity. */
-            for(idx = 0; idx < r_payload->size; idx++)
-            {
-                if(p_payload->data[idx] != r_payload->data[idx])
-                {
-                    printf("\r\nError receiving data packet of size: %d at data index %d \r\n", size, idx);
-                    break;
-                }
-            }
-            
-            if(idx == size)
-            {
-                printf("\r\nReceived data packet of size: %d from remote successfully \r\n", size);
-            }
-            
-            NU_Deallocate_Memory(p_payload);
-        }
-
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");  
-        printf("\r\nRemoving remote context : %s \r\n" , fw_name1);
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n");  
-
-        /* Send termination message to remote */
-               rpmsg_send(app_rp_chnl, &shutdown_msg, sizeof(int));
-
-        /* Wait for channel deletion callback. */
-        NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-
-        remoteproc_shutdown(proc);
-        
-        remoteproc_deinit(proc);
-
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw_name1);
-    }       
-
-       printf("\r\n******************************************");
-       printf("*************************************\n\r\n"); 
-    printf("\r\nLoading remote context : %s \r\n" , fw_name2);
-       printf("\r\n******************************************");
-       printf("*************************************\n\r\n"); 
-        
-    status = remoteproc_init((void *) fw_name2, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-    
-    if(!status && (proc))
-    {
-               printf("\r\n\n********************************************\r\n");
-        printf("BOOTING BAREMETAL REMOTE FIRMWARE");
-           printf("\r\n********************************************\r\n\n");
-        status = remoteproc_boot(proc);
-    }
-    
-    if(!status) 
-    {
-        NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n"); 
-        printf("\r\nStarting echo test on : %s \r\n" , fw_name2);
-               printf("\r\n******************************************");
-               printf("*************************************\n\r\n"); 
-        
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {     
-            NU_Allocate_Memory(sys_pool_ptr, (VOID **)&p_payload, (2 * sizeof(unsigned long) + size), NU_NO_SUSPEND);
-                                 
-            p_payload->num = i;
-            
-            p_payload->size = size;
-            
-            /* Setup the buffer with a pattern*/    
-            memset(&(p_payload->data[0]), 0xA5, size);  
-         
-            printf("\r\nSending data packet of size: %d to remote firmware : %s \r\n" , size, fw_name2);
-                    
-            /* Send data to remote side. */
-            rpmsg_send(app_rp_chnl, p_payload, (2 * sizeof(unsigned long)) + size);
-            
-            /* Wait for echo. */
-            NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-            
-            /* Validate packet number*/
-            if(p_payload->num != r_payload->num)
-            {
-                printf("\r\nError Echo packet number does not match with transmitted packet number %d \r\n", (int)p_payload->num);
-            }
-                
-            /* Validate the data integrity. */
-            for(idx = 0; idx < size; idx++)
-            {
-                if(p_payload->data[idx] != r_payload->data[idx])
-                {
-                    printf("\r\nError receiving data packet of size: %d at data index %d \r\n", size, idx);
-                    break;
-                }
-            }
-            
-            if(idx == size)
-            {
-                printf("\r\nReceived data packet of size: %d from remote successfully \r\n", size);
-            }
-            
-            NU_Deallocate_Memory(p_payload);
-        }
-        
-        printf("\r\nRemoving remote context : %s \r\n" , fw_name2);
-        
-        remoteproc_shutdown(proc);
-        
-        remoteproc_deinit(proc);
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw_name2);
-    }
-      
-    printf("\r\nTest Completed \r\n");
-}
-
-/* This callback gets invoked when the remote chanl is created */
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) {
-
-    app_rp_chnl = rp_chnl;
-    
-    rp_ept = rpmsg_create_ept(rp_chnl , rpmsg_read_cb ,RPMSG_NULL , RPMSG_ADDR_ANY);
-    
-    NU_Release_Semaphore(&App_Sem);
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) {
-    
-    rpmsg_destroy_ept(rp_ept);
-    NU_Release_Semaphore(&App_Sem);
-
-}
-
-/* This is the read callback, note we are in a task context when this callback
-is invoked, so kernel primitives can be used freely */
-void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * priv, unsigned long src) {
-
-    memcpy(r_payload,data,len);
-    
-    NU_Release_Semaphore(&App_Sem);
-}
-
diff --git a/apps/tests/master/nucleus/echo_test/nucleus_nucleusbm/make b/apps/tests/master/nucleus/echo_test/nucleus_nucleusbm/make
deleted file mode 100644 (file)
index ba76afc..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := tests/master/nucleus/echo_test/nucleus_nucleusbm/echo_test.out
-SAMPLE_C_SRC := tests/master/nucleus/echo_test/nucleus_nucleusbm/echo_test.c
-REMOTE_OUT   := echo_test.out
-DST_DIR := tests/master/nucleus/echo_test/nucleus_nucleusbm
-NU_SRC_DIR := firmware/$(PLAT)/nucleus/echo_test
-BM_SRC_DIR := firmware/$(PLAT)/baremetal/echo_test
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
-SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(REMOTE_OUT)$(SAMPLEOBJFILES)
-
-       @echo 'Building echo_test test for nucleus : $@'
-
-       $(LD)  -Wl,-Map=tests/master/nucleus/echo_test/nucleus_nucleusbm/echo_test.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group      
-       
-       $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
-               
-       @echo 'Finished building target: $@'
-       
-%.o:%.c
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-       
-%.o:%.S
-       @$(AS) -c $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
-
-$(REMOTE_OUT):
-       cd $(NU_SRC_DIR)/; cp firmware firmware1; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
-       mv $(NU_SRC_DIR)/firmware1.o $(DST_DIR)/
-       cd $(BM_SRC_DIR)/; cp firmware firmware2; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
-       mv $(BM_SRC_DIR)/firmware2.o $(DST_DIR)/
-       cd $(NU_SRC_DIR)/; rm firmware1
-       cd $(BM_SRC_DIR)/; rm firmware2
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_BIN) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o $(SAMPLE_MAP)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/tests/master/nucleus/func_test_suite/nucleus_linux/func_test_suite.c b/apps/tests/master/nucleus/func_test_suite/nucleus_linux/func_test_suite.c
deleted file mode 100644 (file)
index 4fc6f47..0000000
+++ /dev/null
@@ -1,644 +0,0 @@
-/* Including required headers */
-#include  <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "test_suite.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_default_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-void rpmsg_read_ept1_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-void rpmsg_read_ept2_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-
-int test_rpmsg_send(struct rpmsg_channel *rpmsg_chnl);
-int test_rpmsg_send_offchannel(struct rpmsg_channel *rpmsg_chnl, unsigned long src, unsigned long dst);
-
-int test_rpmsg_create_ept(struct rpmsg_channel *rpmsg_chnl);
-
-int test_remoteproc_multiple_lifecycles(char * firmware_name);
-
-int test_rpmsg_send_offchannel_impl(struct rpmsg_channel *rpmsg_chnl, unsigned long src, unsigned long dst);
-
-int test_rpmsg_send_impl(struct rpmsg_channel *rpmsg_chnl);
-
-int test_rpmsg_remote_channel_deletion(struct rpmsg_channel *rpmsg_chnl, char *channel_name);
-
-int test_execute_suite(char * firmware_name);
-
-
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem, Remote_Del_Sem;
-struct rpmsg_endpoint *rp_ept1 , *rp_ept2;
-struct rpmsg_channel *app_rp_chnl;
-char fw_name1[] = "firmware1";
-
-struct _payload* p_payload = NULL;
-struct _payload* r_payload = NULL;
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(
-                NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if ( status == NU_SUCCESS )
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-                            uncached_mem_pool , pointer , STACK_SIZE , TASK_PRIORITY , TASK_SLICE ,
-                            NU_PREEMPT , NU_START );
-        }
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Semaphore( &App_Sem , "APP_SEM" , 0 , NU_FIFO );
-        }
-
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Semaphore( &Remote_Del_Sem , "Del_SEM" , 0 , NU_FIFO );
-        }
-
-        NU_Allocate_Memory(uncached_mem_pool , (VOID **)&r_payload, 512 , NU_SUSPEND);
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv )
-{
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf("\r\n              OpenAMP Test Suite \r\n");
-    printf("\r\n");
-    printf("\r\nThis test suite will execute multiple test cases for rpmsg and rempteproc \r\n");
-    printf("\r\nAPIs available within OpenAMP \r\n");
-
-    printf("\r\n******************************************");
-    printf("*************************************\n\r\n");
-
-    test_execute_suite(fw_name1);
-}
-
-/* This callback gets invoked when the remote chanl is created */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl )
-{
-    app_rp_chnl = rp_chnl;
-
-    rp_ept1 = rpmsg_create_ept(rp_chnl , rpmsg_read_ept1_cb , RPMSG_NULL , RPMSG_ADDR_ANY);
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl )
-{
-    rpmsg_destroy_ept( rp_ept1 );
-
-    NU_Release_Semaphore( &Remote_Del_Sem );
-
-}
-
-/* This is the read callback, note we are in a task context when this callback
- is invoked, so kernel primitives can be used freely */
-void rpmsg_read_default_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * priv ,
-                unsigned long src )
-{
-    memcpy( r_payload , data , len );
-    NU_Release_Semaphore( &App_Sem );
-}
-
-void rpmsg_read_ept1_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * priv ,
-                unsigned long src )
-{
-    memcpy( r_payload , data , len );
-    NU_Release_Semaphore( &App_Sem );
-}
-
-void rpmsg_read_ept2_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * priv ,
-                unsigned long src )
-{
-    memcpy( r_payload , data , len );
-    NU_Release_Semaphore( &App_Sem );
-}
-
-void send_test_case_report(char *result_string)
-{
-    struct command* cmd;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    int status;
-
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-    
-    status = NU_Allocate_Memory(sys_pool_ptr , (void **)&(cmd), sizeof(struct command) + strlen(result_string) + 1, NU_SUSPEND);
-    
-    if(status == NU_SUCCESS)
-    {
-        cmd->comm_start=CMD_START;
-        cmd->comm_code = PRINT_RESULT;
-        
-        strcpy(cmd->data, result_string);
-            
-        status = rpmsg_send(app_rp_chnl, cmd, sizeof(struct command) + strlen(result_string) + 1);
-        
-        NU_Deallocate_Memory(cmd);
-        
-        /* Wait to receive echo*/
-        NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND );
-    }
-}
-
-int test_execute_suite(char * firmware_name)
-{
-    struct remote_proc *proc;
-    int status;
-    char default_channel[] = "rpmsg-openamp-demo-channel";
-    struct command* cmd;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf( "\r\nBoot remote context : %s \r\n" , firmware_name );
-    printf("\r\n******************************************");
-    printf("*************************************\n\r\n");
-
-    status = remoteproc_init( (void *) firmware_name ,rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_default_cb, &proc);
-
-    if (status)
-    {
-        printf( "\r\n CRITICAL ERROR: remoteproc_init call for remote context %s failed \r\n", firmware_name);
-
-        return -1;
-    }
-
-    status = remoteproc_boot( proc );
-
-    if (status)
-    {
-        printf( "\r\n CRITICAL ERROR: remoteproc_boot call for remote context %s failed \r\n", firmware_name);
-
-        return -1;
-    }
-
-    /* Wait for channel creation event */
-    NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND );
-    
-    /* Obtain remote firmware name */
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-    status = NU_Allocate_Memory(sys_pool_ptr , (void **)&(cmd), sizeof(struct command), NU_SUSPEND);
-    cmd->comm_start=CMD_START;
-    cmd->comm_code = QUERY_FW_NAME;
-    status = rpmsg_send(app_rp_chnl, cmd, sizeof(struct command));
-    NU_Deallocate_Memory(cmd);
-    
-    /* Wait to receive firmware name */
-    NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND );
-    
-    /* Test rpmsg_send API */
-    status = test_rpmsg_send(app_rp_chnl);
-
-    if(!status)
-    {
-        send_test_case_report("\r\nRPMSG Send Test: Passed\r\n");
-    }
-    else
-    {
-        send_test_case_report("\r\nRPMSG Send Test: Failed\r\n");
-    }
-
-    /* Test rpmsg_send_offchannel API. */
-    status = test_rpmsg_send_offchannel(app_rp_chnl, rp_ept1->addr, app_rp_chnl->dst);
-
-    if(!status)
-    {
-        send_test_case_report("\r\nRPMSG Send Offchannel Test: Passed\r\n");
-    }
-    else
-    {
-        send_test_case_report("\r\nRPMSG Send Offchannel: Failed\r\n");
-    }
-
-    status = test_rpmsg_create_ept(app_rp_chnl);
-
-    if(!status)
-    {
-        send_test_case_report("\r\nRPMSG Create EPT Test: Passed\r\n");
-    }
-    else
-    {
-        send_test_case_report("\r\nRPMSG Create EPT Test: Failed\r\n");
-    }
-    
-    send_test_case_report("\r\nChannel Deletion. Shutdown would be next\r\n");
-    
-    status = test_rpmsg_remote_channel_deletion(app_rp_chnl, default_channel);
-
-    NU_Sleep(100 * 18);
-    
-    status = remoteproc_shutdown(proc);
-    if(!status)
-    {
-        status = remoteproc_deinit(proc);
-    }
-
-    /* The multiple life-cycles test has been disabled for remote Linux configuration
-       as it would require manual user input at linux console to complete 
-       the rpmsg connection and would be cumbersome for the user. The multiple
-       lifecycles have been tested seperately. */
-    
-    
-    /*if(!status)
-    {
-        status = test_remoteproc_multiple_lifecycles(firmware_name);
-    }*/
-
-    return status;
-}
-
-int test_remoteproc_multiple_lifecycles(char * firmware_name)
-{
-    int i, status;
-    struct remote_proc *proc;
-
-    for(i = 0; i < 2; i++)
-    {
-        status = remoteproc_init( (void *) firmware_name ,rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_default_cb, &proc);
-
-        if (status)
-        {
-            break;
-        }
-        
-        status = remoteproc_boot( proc );
-
-        if (status)
-        {
-            break;
-        }
-
-        /* Wait for channel creation event */
-        status = NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND );
-
-        if (!status)
-        {
-            status = test_rpmsg_send_impl(app_rp_chnl);
-        }
-
-        if(!status){
-            test_rpmsg_remote_channel_deletion(app_rp_chnl , app_rp_chnl->name);
-        }
-        
-        NU_Sleep(100 * 18);
-            
-        if (!status)
-        {
-            status = remoteproc_shutdown(proc);
-        }
-        if (status)
-        {
-            break;
-        }
-        status = remoteproc_deinit(proc);
-
-        if (status)
-        {
-            break;
-        }
-
-    }
-
-    return status;
-}
-
-int test_rpmsg_remote_channel_deletion(struct rpmsg_channel *rpmsg_chnl, char *channel_name)
-{
-    struct command *cmd;
-    int status;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    struct chnl_cmd_data *chnl_data;
-
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-
-    status = NU_Allocate_Memory(sys_pool_ptr ,
-                                (void **)&(cmd), sizeof(struct command)+ sizeof(struct chnl_cmd_data), NU_SUSPEND);
-
-    cmd->comm_code = DELETE_CHNL;
-    cmd->comm_start = CMD_START;
-
-    chnl_data = (struct chnl_cmd_data *)cmd->data;
-
-    strncpy(chnl_data->name , channel_name, sizeof(struct chnl_cmd_data));
-
-    /* Let the other side that uninit its resources */
-    status = rpmsg_send( rpmsg_chnl , cmd , sizeof(struct command) + sizeof(struct chnl_cmd_data) );
-    if(status)
-    {
-        return status;
-    }
-    /* Wait for echo back */
-    status = NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND);
-
-    return status;
-}
-
-int test_rpmsg_create_ept(struct rpmsg_channel *rpmsg_chnl)
-{
-    struct command *cmd;
-    int status, i;
-    struct ept_cmd_data *ept_data;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    struct rpmsg_endpoint *test_ept[NUM_TEST_EPS];
-
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-
-    status = NU_Allocate_Memory(sys_pool_ptr ,
-                                (void **)&(cmd), sizeof(struct command) + sizeof(struct ept_cmd_data), NU_SUSPEND);
-
-    if(status != NU_SUCCESS)
-    {
-        return status;
-    }
-
-    for(i = 0; i < NUM_TEST_EPS; i++)
-    {
-        /* Tell the remote to create a new endpoint. */
-        cmd->comm_code = CREATE_EPT;
-        cmd->comm_start = CMD_START;
-
-        /* Send create endpoint command to remote */
-        ept_data = (struct ept_cmd_data *)cmd->data;
-        ept_data->dst= EPT_TEST_ADDR + i;
-        ept_data->src= EPT_TEST_ADDR + i;
-
-        /* Let the other side know that it needs to create endpoint with the given address */
-        status = rpmsg_send(rpmsg_chnl, cmd, sizeof(struct command) + sizeof(struct ept_cmd_data));
-
-        if(!status)
-        {
-            /* Wait for ack */
-            status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        }
-
-        if(!status)
-        {
-            test_ept[i] = rpmsg_create_ept(rpmsg_chnl , rpmsg_read_ept2_cb , RPMSG_NULL , EPT_TEST_ADDR + i);
-
-            if ( !test_ept[i] )
-            {
-                status = -1;
-            }
-
-        }
-        if(!status)
-        {
-            status = test_rpmsg_send_offchannel_impl(rpmsg_chnl, test_ept[i]->addr, test_ept[i]->addr);
-        }
-
-        if(!status)
-        {
-            /* Tell the remote to delete the endpoint. */
-            cmd->comm_code = DELETE_EPT;
-            cmd->comm_start = CMD_START;
-            /* Send delete endpoint command to remote */
-            ept_data = (struct ept_cmd_data *)cmd->data;
-            ept_data->dst= EPT_TEST_ADDR + i;
-            ept_data->src= EPT_TEST_ADDR + i;
-
-            /* Let the other side know that it needs to delete endpoint with the given address */
-            status = rpmsg_send(rpmsg_chnl, cmd, sizeof(struct command) + sizeof(struct ept_cmd_data));
-        }
-
-        if(!status)
-        {
-            /* Wait for ack */
-            status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        }
-
-        if(!status)
-        {
-            rpmsg_destroy_ept(test_ept[i]);
-        }
-    }
-
-    NU_Deallocate_Memory(cmd);
-    if(status)
-    {
-        return -1;
-    }
-
-    return status;
-}
-
-int test_rpmsg_send_impl(struct rpmsg_channel *rpmsg_chnl)
-{
-    struct command cmd;
-    int status;
-    int i, size, idx;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-    /* Tell the remote to be prepared for echo payloads. */
-    cmd.comm_start = CMD_START;
-    cmd.comm_code = START_ECHO;
-
-    status = rpmsg_send(rpmsg_chnl, &cmd, sizeof(struct command));
-
-    if(!status)
-    {
-        /* Wait for cmd ack. */
-        status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        if(status)
-        {
-            return -1;
-        }
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {
-            NU_Allocate_Memory(sys_pool_ptr , (void**)&p_payload, sizeof(struct _payload) + size , NU_SUSPEND );
-
-            p_payload->num = i;
-            p_payload->size = size;
-
-            /* Setup the buffer with a pattern*/
-            memset(p_payload->data, 0xA5, size);
-
-            /* Send data to remote side. */
-            status = rpmsg_send(rpmsg_chnl, p_payload, sizeof(struct _payload) + size);
-
-            if(status != 0)
-            {
-                break;
-            }
-
-            /* Wait for echo. */
-            status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-
-            /* Validate the data integrity. */
-            for(idx = 0; idx < r_payload->size; idx++)
-            {
-                if(p_payload->data[idx] != r_payload->data[idx])
-                {
-                    status = -1;
-                    break;
-                }
-            }
-
-            if(status != 0)
-            {
-                break;
-            }
-
-            NU_Deallocate_Memory(p_payload);
-
-        }
-        if(status)
-        {
-            return -1;
-        }
-        cmd.comm_start = CMD_START;
-        cmd.comm_code = STOP_ECHO;
-
-        status = rpmsg_send(rpmsg_chnl, &cmd, sizeof(struct command));
-        if(status)
-        if(status)
-        {
-            return -1;
-        }
-
-        /* Wait for echo. */
-        status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        
-        if(status)
-        {
-            return -1;
-        }
-     }
-
-    return status;
-}
-int test_rpmsg_send(struct rpmsg_channel *rpmsg_chnl)
-{
-    return test_rpmsg_send_impl(rpmsg_chnl);
-}
-
-int test_rpmsg_send_offchannel_impl(struct rpmsg_channel *rpmsg_chnl, unsigned long src, unsigned long dst)
-{
-    struct command cmd;
-    int status;
-    int i, size, idx;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-
-    /* Tell the remote to be prepared for echo payloads. */
-    cmd.comm_code = START_ECHO;
-    cmd.comm_start = CMD_START;
-    status = rpmsg_send(rpmsg_chnl, &cmd, sizeof(struct command));
-
-    if(!status)
-    {
-        /* Wait for cmd ack. */
-        status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        if(status)
-        {
-            return -1;
-        }
-
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {
-            NU_Allocate_Memory(sys_pool_ptr , (void**)&p_payload, sizeof(struct _payload) + size , NU_SUSPEND );
-            p_payload->num = i;
-            p_payload->size = size;
-
-            /* Setup the buffer with a pattern*/
-            memset(p_payload->data, 0xA5, size);
-
-            /* Send data to remote side. */
-            status = rpmsg_send_offchannel(app_rp_chnl, src, dst, p_payload ,
-                                             sizeof(struct _payload) + size);
-
-            if(status)
-            {
-                break;
-            }
-
-            /* Wait for echo. */
-            status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-
-            /* Validate the data integrity. */
-            for(idx = 0; idx < r_payload->size; idx++)
-            {
-                if(p_payload->data[idx] != r_payload->data[idx])
-                {
-                    status = -1;
-                    break;
-                }
-            }
-
-            if(status)
-            {
-                break;
-            }
-
-            NU_Deallocate_Memory(p_payload);
-        }
-        cmd.comm_start = CMD_START;
-        cmd.comm_code = STOP_ECHO;
-
-        status = rpmsg_send(rpmsg_chnl, &cmd, sizeof(struct command));
-        /* Wait for cmd ack. */
-        status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        if(status)
-        {
-            return -1;
-        }
-     }
-
-     return status;
-}
-
-int test_rpmsg_send_offchannel(struct rpmsg_channel *rpmsg_chnl, unsigned long src, unsigned long dst)
-{
-    return test_rpmsg_send_offchannel_impl(rpmsg_chnl, src, dst);
-}
diff --git a/apps/tests/master/nucleus/func_test_suite/nucleus_linux/make b/apps/tests/master/nucleus/func_test_suite/nucleus_linux/make
deleted file mode 100644 (file)
index 7889e4d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := tests/master/nucleus/func_test_suite/nucleus_linux/func_test_suite.out
-SAMPLE_C_SRC := tests/master/nucleus/func_test_suite/nucleus_linux/func_test_suite.c
-REMOTE_OUT   := func_test_suite.out
-DST_DIR := tests/master/nucleus/func_test_suite/nucleus_linux
-LINUX_SRC_DIR := firmware/$(PLAT)/linux
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
-SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(REMOTE_OUT)$(SAMPLEOBJFILES)
-
-       @echo 'Building func_test_suite test for nucleus : $@'
-
-       $(LD)  -Wl,-Map=tests/master/nucleus/func_test_suite/nucleus_linux/func_test_suite.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group      
-       
-       $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
-               
-       @echo 'Finished building target: $@'
-       
-%.o:%.c
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-       
-%.o:%.S
-       @$(AS) -c -mcpu=cortex-a9 $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
-
-$(REMOTE_OUT):
-       cd $(LINUX_SRC_DIR)/; cp firmware firmware1; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
-       mv $(LINUX_SRC_DIR)/firmware1.o $(DST_DIR)/firmware1.o
-       cd $(LINUX_SRC_DIR)/; cp firmware firmware2; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
-       mv $(LINUX_SRC_DIR)/firmware2.o $(DST_DIR)/
-       cd $(LINUX_SRC_DIR)/; rm firmware1; rm firmware2;
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o $(SAMPLE_MAP) $(SAMPLE_BIN)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/tests/master/nucleus/func_test_suite/nucleus_linux/test_suite.h b/apps/tests/master/nucleus/func_test_suite/nucleus_linux/test_suite.h
deleted file mode 100644 (file)
index 4a0ca99..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * m_ept_func_test.h
- *
- *  Created on: Mar 14, 2014
- *      Author: etsam
- */
-
-#ifndef M_EPT_FUNC_TEST_H_
-#define M_EPT_FUNC_TEST_H_
-
-struct command
-{
-    unsigned int comm_start;
-    unsigned int comm_code;
-    char data[0];
-}__attribute__((__packed__));
-
-struct ept_cmd_data
-{
-    unsigned int src;
-    unsigned int dst;
-};
-
-struct chnl_cmd_data
-{
-    char name[32];
-};
-
-/* Command Codes */
-
-#define CREATE_EPT      0x00000000
-#define DELETE_EPT      0x00000001
-#define CREATE_CHNL     0x00000002
-#define DELETE_CHNL     0x00000003
-#define START_ECHO      0x00000004
-#define STOP_ECHO       0x00000005
-#define QUERY_FW_NAME   0x00000006
-#define PRINT_RESULT    0x00000007
-
-#define CMD_START       0xEF56A55A
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 400)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define EPT_TEST_ADDR      59
-
-#define NUM_TEST_EPS       4
-
-#define MAX_RPMSG_BUFF_SIZE 512
-#define PAYLOAD_MIN_SIZE    1    
-#define PAYLOAD_MAX_SIZE    (MAX_RPMSG_BUFF_SIZE - 24)
-#define NUM_PAYLOADS        (PAYLOAD_MAX_SIZE/PAYLOAD_MIN_SIZE)
-
-struct _payload {
-    unsigned long    num;
-    unsigned long    size;
-    char             data[0];
-}__attribute__((__packed__));
-
-
-#endif /* M_EPT_FUNC_TEST_H_ */
diff --git a/apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/func_test_suite.c b/apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/func_test_suite.c
deleted file mode 100644 (file)
index 33fa4b4..0000000
+++ /dev/null
@@ -1,700 +0,0 @@
-/* This is a test demonstration application that tests usage of remoteproc
-and rpmsg APIs. This application is meant to run on the master CPU running Nucleus
-and showcases booting of two sub-sequent remote firmware cycles using remoteproc and 
-IPC with remote firmware using rpmsg; 1. It brings up a remote Nucleus based remote 
-firmware which can respond to test calls, 2. It brings up a baremetal based 
-remote firmware which can respond to test calls. Master app executes tests to validate
-the rpmsg APIs and shutsdown the core once the test has been completed.*/
-
-/* Including required headers */
-
-#include  <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "test_suite.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_default_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-void rpmsg_read_ept1_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-void rpmsg_read_ept2_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-
-int test_rpmsg_send(struct rpmsg_channel *rpmsg_chnl);
-int test_rpmsg_send_offchannel(struct rpmsg_channel *rpmsg_chnl, unsigned long src, unsigned long dst);
-
-int test_rpmsg_create_ept(struct rpmsg_channel *rpmsg_chnl);
-
-int test_remoteproc_multiple_lifecycles(char * firmware_name);
-
-int test_rpmsg_send_offchannel_impl(struct rpmsg_channel *rpmsg_chnl, unsigned long src, unsigned long dst);
-
-int test_rpmsg_send_impl(struct rpmsg_channel *rpmsg_chnl);
-
-int test_rpmsg_remote_channel_deletion(struct rpmsg_channel *rpmsg_chnl, char *channel_name);
-
-int test_execute_suite(char * firmware_name);
-
-
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem, Remote_Del_Sem;
-struct rpmsg_endpoint *rp_ept1 , *rp_ept2;
-struct rpmsg_channel *app_rp_chnl;
-char fw_name1[] = "firmware1";
-char fw_name2[] = "firmware2";
-
-struct _payload* p_payload = NULL;
-struct _payload* r_payload = NULL;
-static const char display_string[] = ".";
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(
-                NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if ( status == NU_SUCCESS )
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-                            uncached_mem_pool , pointer , STACK_SIZE , TASK_PRIORITY , TASK_SLICE ,
-                            NU_PREEMPT , NU_START );
-        }
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Semaphore( &App_Sem , "APP_SEM" , 0 , NU_FIFO );
-        }
-
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Semaphore( &Remote_Del_Sem , "Del_SEM" , 0 , NU_FIFO );
-        }
-
-        NU_Allocate_Memory(uncached_mem_pool , (VOID **)&r_payload, 512 , NU_SUSPEND);
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv )
-{
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf("\r\n              OpenAMP Test Suite \r\n");
-    printf("\r\n");
-    printf("\r\nThis test suite will execute multiple test cases for rpmsg and rempteproc \r\n");
-    printf("\r\nAPIs available within OpenAMP \r\n");
-
-    printf("\r\n******************************************");
-    printf("*************************************\n\r\n");
-
-    test_execute_suite(fw_name1);
-
-    test_execute_suite(fw_name2);
-
-
-}
-
-/* This callback gets invoked when the remote chanl is created */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl )
-{
-    app_rp_chnl = rp_chnl;
-
-    rp_ept1 = rpmsg_create_ept(rp_chnl , rpmsg_read_ept1_cb , RPMSG_NULL , RPMSG_ADDR_ANY);
-
-    NU_Release_Semaphore( &App_Sem );
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl )
-{
-    rpmsg_destroy_ept( rp_ept1 );
-
-    NU_Release_Semaphore( &Remote_Del_Sem );
-
-}
-
-/* This is the read callback, note we are in a task context when this callback
- is invoked, so kernel primitives can be used freely */
-void rpmsg_read_default_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * priv ,
-                unsigned long src )
-{
-    memcpy( r_payload , data , len );
-    NU_Release_Semaphore( &App_Sem );
-}
-
-void rpmsg_read_ept1_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * priv ,
-                unsigned long src )
-{
-    memcpy( r_payload , data , len );
-    NU_Release_Semaphore( &App_Sem );
-}
-
-void rpmsg_read_ept2_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * priv ,
-                unsigned long src )
-{
-    memcpy( r_payload , data , len );
-    NU_Release_Semaphore( &App_Sem );
-}
-
-
-int test_execute_suite(char * firmware_name)
-{
-    struct remote_proc *proc;
-    int status;
-    char default_channel[] = "rpmsg-openamp-demo-channel";
-    struct command* cmd;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf( "\r\nBoot remote context : %s \r\n" , firmware_name );
-    printf("\r\n******************************************");
-    printf("*************************************\n\r\n");
-
-    status = remoteproc_init( (void *) firmware_name ,rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_default_cb, &proc);
-
-    if (status)
-    {
-        printf( "\r\n CRITICAL ERROR: remoteproc_init call for remote context %s failed \r\n", firmware_name);
-
-        return -1;
-    }
-
-    status = remoteproc_boot( proc );
-
-    if (status)
-    {
-        printf( "\r\n CRITICAL ERROR: remoteproc_boot call for remote context %s failed \r\n", firmware_name);
-
-        return -1;
-    }
-
-    /* Wait for channel creation event */
-    NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND );
-       
-    /* Obtain remote firmware name */
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-    status = NU_Allocate_Memory(sys_pool_ptr , (void **)&(cmd), sizeof(struct command), NU_SUSPEND);
-    cmd->comm_start=CMD_START;
-    cmd->comm_code = QUERY_FW_NAME;
-    status = rpmsg_send(app_rp_chnl, cmd, sizeof(struct command));
-    NU_Deallocate_Memory(cmd);
-       
-    /* Wait to receive firmware name */
-    NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND );
-       
-    printf("\r\nREMOTE FIRMWARE NAME : %s \r\n", (char*)r_payload);
-
-    /* Test rpmsg_send API */
-    status = test_rpmsg_send(app_rp_chnl);
-
-    if(!status)
-    {
-        printf( "\r\nRESULT:   PASSED \r\n" );
-    }
-    else
-    {
-        printf( "\r\nRESULT:   FAILED \r\n" );
-    }
-
-    /* Test rpmsg_send_offchannel API. */
-    status = test_rpmsg_send_offchannel(app_rp_chnl, rp_ept1->addr, app_rp_chnl->dst);
-
-    if(!status)
-    {
-        printf( "\r\nRESULT:   PASSED \r\n" );
-    }
-    else
-    {
-        printf( "\r\nRESULT:   FAILED \r\n" );
-    }
-
-    status = test_rpmsg_create_ept(app_rp_chnl);
-
-    if(!status)
-    {
-        printf( "\r\nRESULT:   PASSED \r\n" );
-    }
-    else
-    {
-        printf( "\r\nRESULT:   FAILED \r\n" );
-    }
-
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf(" This test case will test channel deletion \r\n");
-    printf("******************************************");
-    printf("*************************************\r\n\n");
-
-    status = test_rpmsg_remote_channel_deletion(app_rp_chnl, default_channel);
-
-    if(!status)
-    {
-        printf( "\r\nRESULT:   PASSED \r\n" );
-    }
-    else
-    {
-        printf( "\r\nRESULT:   FAILED \r\n" );
-    }
-
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf( "\r\n\nShutdown remote context : %s \r\n" , firmware_name );
-    printf("******************************************");
-    printf("*************************************\r\n\n");
-
-    status = remoteproc_shutdown(proc);
-    if(!status)
-    {
-        status = remoteproc_deinit(proc);
-    }
-
-    if(!status)
-    {
-        status = test_remoteproc_multiple_lifecycles(firmware_name);
-    }
-
-    if(!status)
-    {
-        printf( "\r\nRESULT:   PASSED \r\n" );
-    }
-    else
-    {
-        printf( "\r\nRESULT:   FAILED \r\n" );
-    }
-
-    printf("\r\nFUNCTIONAL TEST SUITE COMPLETED EXECUTION! \r\n");
-
-    return status;
-}
-
-int test_remoteproc_multiple_lifecycles(char * firmware_name)
-{
-    int i, status;
-    struct remote_proc *proc;
-
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf(" This test case will test multiple lifecycles for firmware: %s \r\n", firmware_name);
-    printf("******************************************");
-    printf("*************************************\r\n\n");
-
-    for(i = 0; i < 10; i++)
-    {
-        status = remoteproc_init( (void *) firmware_name ,rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_default_cb, &proc);
-
-        if (status)
-        {
-            printf( "\r\n ERROR: remoteproc_init failed\r\n");
-
-            break;
-        }
-               
-           printf("\n\n\r************************************");
-               printf("*******************************************\r\n");
-               printf( "\r\n\nBoot remote context : %s \r\n" , firmware_name );
-               printf("******************************************");
-               printf("*************************************\r\n\n");
-
-        status = remoteproc_boot( proc );
-
-        if (status)
-        {
-            printf( "\r\n ERROR: remoteproc_boot failed\r\n");
-
-            break;
-        }
-
-        /* Wait for channel creation event */
-        status = NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND );
-
-        if (!status)
-        {
-            status = test_rpmsg_send_impl(app_rp_chnl);
-        }
-
-        if(!status){
-            test_rpmsg_remote_channel_deletion(app_rp_chnl , app_rp_chnl->name);
-        }
-               
-           printf("\n\n\r************************************");
-               printf("*******************************************\r\n");
-               printf( "\r\n\nShutdown remote context : %s \r\n" , firmware_name );
-               printf("******************************************");
-               printf("*************************************\r\n\n");
-
-        if (!status)
-        {
-            status = remoteproc_shutdown(proc);
-        }
-        if (status)
-        {
-            printf( "\r\n ERROR: remoteproc_shutdown failed\r\n");
-
-            break;
-        }
-        status = remoteproc_deinit(proc);
-
-        if (status)
-        {
-            printf( "\r\n ERROR: remoteproc_deinit failed\r\n");
-
-            break;
-        }
-
-        printf("%s", display_string);
-
-    }
-
-    return status;
-}
-
-int test_rpmsg_remote_channel_deletion(struct rpmsg_channel *rpmsg_chnl, char *channel_name)
-{
-    struct command *cmd;
-    int status;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    struct chnl_cmd_data *chnl_data;
-
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-
-    status = NU_Allocate_Memory(sys_pool_ptr ,
-                                (void **)&(cmd), sizeof(struct command)+ sizeof(struct chnl_cmd_data), NU_SUSPEND);
-
-    cmd->comm_code = DELETE_CHNL;
-    cmd->comm_start = CMD_START;
-
-    chnl_data = (struct chnl_cmd_data *)cmd->data;
-
-    strncpy(chnl_data->name , channel_name, sizeof(struct chnl_cmd_data));
-
-    /* Let the other side that uninit its resources */
-    status = rpmsg_send( rpmsg_chnl , cmd , sizeof(struct command) + sizeof(struct chnl_cmd_data) );
-    if(status)
-    {
-        return status;
-    }
-    /* Wait for echo back */
-    status = NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND);
-    /* Wait for channel deletion event */
-    status = NU_Obtain_Semaphore( &Remote_Del_Sem , NU_SUSPEND);
-
-    return status;
-}
-
-int test_rpmsg_create_ept(struct rpmsg_channel *rpmsg_chnl)
-{
-    struct command *cmd;
-    int status, i;
-    struct ept_cmd_data *ept_data;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    struct rpmsg_endpoint *test_ept[NUM_TEST_EPS];
-
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-
-    status = NU_Allocate_Memory(sys_pool_ptr ,
-                                (void **)&(cmd), sizeof(struct command) + sizeof(struct ept_cmd_data), NU_SUSPEND);
-
-    if(status != NU_SUCCESS)
-    {
-        return status;
-    }
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf(" This test case will test rpmsg_create_ept API \r\n");
-    printf("******************************************");
-    printf("*************************************\r\n\n");
-
-    for(i = 0; i < NUM_TEST_EPS; i++)
-    {
-        /* Tell the remote to create a new endpoint. */
-        cmd->comm_code = CREATE_EPT;
-        cmd->comm_start = CMD_START;
-
-        /* Send create endpoint command to remote */
-        ept_data = (struct ept_cmd_data *)cmd->data;
-        ept_data->dst= EPT_TEST_ADDR + i;
-        ept_data->src= EPT_TEST_ADDR + i;
-
-        /* Let the other side know that it needs to create endpoint with the given address */
-        status = rpmsg_send(rpmsg_chnl, cmd, sizeof(struct command) + sizeof(struct ept_cmd_data));
-
-        if(!status)
-        {
-            /* Wait for ack */
-            status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        }
-
-        if(!status)
-        {
-            printf("\r\nCreating an endpoint at address: %d \r\n", EPT_TEST_ADDR + i);
-
-            test_ept[i] = rpmsg_create_ept(rpmsg_chnl , rpmsg_read_ept2_cb , RPMSG_NULL , EPT_TEST_ADDR + i);
-
-            if ( !test_ept[i] )
-            {
-                status = -1;
-
-                printf("\r\n ERROR: rpmsg_create_ept API failed for endpoint address: %d \r\n", EPT_TEST_ADDR + i);
-            }
-
-        }
-        if(!status)
-        {
-            printf("\r\nTesting payloads on endpoint at address: %d \r\n", EPT_TEST_ADDR + i);
-
-            status = test_rpmsg_send_offchannel_impl(rpmsg_chnl, test_ept[i]->addr, test_ept[i]->addr);
-        }
-
-        if(!status)
-        {
-            /* Tell the remote to delete the endpoint. */
-            cmd->comm_code = DELETE_EPT;
-            cmd->comm_start = CMD_START;
-            /* Send delete endpoint command to remote */
-            ept_data = (struct ept_cmd_data *)cmd->data;
-            ept_data->dst= EPT_TEST_ADDR + i;
-            ept_data->src= EPT_TEST_ADDR + i;
-
-            /* Let the other side know that it needs to delete endpoint with the given address */
-            status = rpmsg_send(rpmsg_chnl, cmd, sizeof(struct command) + sizeof(struct ept_cmd_data));
-        }
-
-        if(!status)
-        {
-            /* Wait for ack */
-            status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        }
-
-        if(!status)
-        {
-            rpmsg_destroy_ept(test_ept[i]);
-        }
-    }
-
-    NU_Deallocate_Memory(cmd);
-    if(status)
-        while(1);
-
-    return status;
-}
-
-int test_rpmsg_send_impl(struct rpmsg_channel *rpmsg_chnl)
-{
-    struct command cmd;
-    int status;
-    int i, size, idx;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-    /* Tell the remote to be prepared for echo payloads. */
-    cmd.comm_start = CMD_START;
-    cmd.comm_code = START_ECHO;
-
-    status = rpmsg_send(rpmsg_chnl, &cmd, sizeof(struct command));
-
-    if(!status)
-    {
-        /* Wait for cmd ack. */
-        status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        if(status)
-            while(1);
-
-        printf("\r\nTransmitting paylaods to remote \r\n");
-
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {
-            NU_Allocate_Memory(sys_pool_ptr , (void**)&p_payload, sizeof(struct _payload) + size , NU_SUSPEND );
-
-            p_payload->num = i;
-            p_payload->size = size;
-
-            /* Setup the buffer with a pattern*/
-            memset(p_payload->data, 0xA5, size);
-
-            /* Send data to remote side. */
-            status = rpmsg_send(rpmsg_chnl, p_payload, sizeof(struct _payload) + size);
-
-            if(status != 0)
-            {
-                break;
-            }
-
-            /* Wait for echo. */
-            status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-
-            /* Validate the data integrity. */
-            for(idx = 0; idx < r_payload->size; idx++)
-            {
-                if(p_payload->data[idx] != r_payload->data[idx])
-                {
-                    status = -1;
-                    break;
-                }
-            }
-
-            if(status != 0)
-            {
-                break;
-            }
-
-            NU_Deallocate_Memory(p_payload);
-            printf("%s", display_string);
-        }
-        if(status)
-            while(1);
-        cmd.comm_start = CMD_START;
-        cmd.comm_code = STOP_ECHO;
-
-        status = rpmsg_send(rpmsg_chnl, &cmd, sizeof(struct command));
-        if(status)
-            while(1);
-
-        /* Wait for echo. */
-        status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        if(status)
-            while(1);
-     }
-
-
-    return status;
-}
-int test_rpmsg_send(struct rpmsg_channel *rpmsg_chnl)
-{
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf(" This test case will test rpmsg_send API \r\n");
-    printf("******************************************");
-    printf("*************************************\r\n\n");
-
-    return test_rpmsg_send_impl(rpmsg_chnl);
-}
-
-int test_rpmsg_send_offchannel_impl(struct rpmsg_channel *rpmsg_chnl, unsigned long src, unsigned long dst)
-{
-    struct command cmd;
-    int status;
-    int i, size, idx;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    NU_System_Memory_Get(NU_NULL, &sys_pool_ptr);
-
-    /* Tell the remote to be prepared for echo payloads. */
-    cmd.comm_code = START_ECHO;
-    cmd.comm_start = CMD_START;
-    status = rpmsg_send(rpmsg_chnl, &cmd, sizeof(struct command));
-
-    if(!status)
-    {
-        /* Wait for cmd ack. */
-        status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        if(status)
-            while(1);
-
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {
-            NU_Allocate_Memory(sys_pool_ptr , (void**)&p_payload, sizeof(struct _payload) + size , NU_SUSPEND );
-            p_payload->num = i;
-            p_payload->size = size;
-
-            /* Setup the buffer with a pattern*/
-            memset(p_payload->data, 0xA5, size);
-
-            /* Send data to remote side. */
-            status = rpmsg_send_offchannel(app_rp_chnl, src, dst, p_payload ,
-                                             sizeof(struct _payload) + size);
-
-            if(status)
-            {
-                break;
-            }
-
-            /* Wait for echo. */
-            status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-
-            /* Validate the data integrity. */
-            for(idx = 0; idx < r_payload->size; idx++)
-            {
-                if(p_payload->data[idx] != r_payload->data[idx])
-                {
-                    status = -1;
-                    break;
-                }
-            }
-
-            if(status)
-            {
-                break;
-            }
-
-            printf("%s", display_string);
-            NU_Deallocate_Memory(p_payload);
-        }
-        cmd.comm_start = CMD_START;
-        cmd.comm_code = STOP_ECHO;
-
-        status = rpmsg_send(rpmsg_chnl, &cmd, sizeof(struct command));
-        /* Wait for cmd ack. */
-        status = NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-        if(status)
-            while(1);
-     }
-
-     return status;
-}
-
-int test_rpmsg_send_offchannel(struct rpmsg_channel *rpmsg_chnl, unsigned long src, unsigned long dst)
-{
-    printf("\n\n\r************************************");
-    printf("*******************************************\r\n");
-    printf(" This test case will test rpmsg_send_offchannel API \r\n");
-    printf("******************************************");
-    printf("*************************************\r\n\n");
-
-    return test_rpmsg_send_offchannel_impl(rpmsg_chnl, src, dst);
-}
diff --git a/apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/make b/apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/make
deleted file mode 100644 (file)
index b399d83..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := tests/master/nucleus/func_test_suite/nucleus_nucleusbm/func_test_suite.out
-SAMPLE_C_SRC := tests/master/nucleus/func_test_suite/nucleus_nucleusbm/func_test_suite.c
-REMOTE_OUT   := func_test_suite.out
-DST_DIR := tests/master/nucleus/func_test_suite/nucleus_nucleusbm
-NU_SRC_DIR := firmware/zc702evk/nucleus/func_test_suite
-BM_SRC_DIR := firmware/zc702evk/baremetal/func_test_suite
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
-SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(REMOTE_OUT)$(SAMPLEOBJFILES)
-
-       @echo 'Building func_test_suite test for nucleus : $@'
-
-       $(LD)  -Wl,-Map=tests/master/nucleus/func_test_suite/nucleus_nucleusbm/func_test_suite.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group  
-       
-       $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
-               
-       @echo 'Finished building target: $@'
-       
-%.o:%.c
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-       
-%.o:%.S
-       @$(AS) -c -mcpu=cortex-a9 $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
-
-$(REMOTE_OUT):
-       cd $(NU_SRC_DIR)/; cp firmware firmware1; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
-       mv $(NU_SRC_DIR)/firmware1.o $(DST_DIR)/
-       cd $(BM_SRC_DIR)/; cp firmware firmware2; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
-       mv $(BM_SRC_DIR)/firmware2.o $(DST_DIR)/
-       cd $(NU_SRC_DIR)/; rm firmware1
-       cd $(BM_SRC_DIR)/; rm firmware2
-               
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o $(SAMPLE_MAP) $(SAMPLE_BIN)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/test_suite.h b/apps/tests/master/nucleus/func_test_suite/nucleus_nucleusbm/test_suite.h
deleted file mode 100644 (file)
index d8312b7..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * m_ept_func_test.h
- *
- *  Created on: Mar 14, 2014
- *      Author: etsam
- */
-
-#ifndef M_EPT_FUNC_TEST_H_
-#define M_EPT_FUNC_TEST_H_
-
-struct command
-{
-    unsigned int comm_start;
-    unsigned int comm_code;
-    char data[0];
-}__attribute__((__packed__));
-
-struct ept_cmd_data
-{
-    unsigned int src;
-    unsigned int dst;
-};
-
-struct chnl_cmd_data
-{
-    char name[32];
-};
-
-/* Command Codes */
-
-#define CREATE_EPT      0x00000000
-#define DELETE_EPT      0x00000001
-#define CREATE_CHNL     0x00000002
-#define DELETE_CHNL     0x00000003
-#define START_ECHO      0x00000004
-#define STOP_ECHO       0x00000005
-#define QUERY_FW_NAME   0x00000006
-
-#define CMD_START       0xEF56A55A
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 400)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define EPT_TEST_ADDR      59
-
-#define NUM_TEST_EPS       4
-
-#define MAX_RPMSG_BUFF_SIZE 512
-#define PAYLOAD_MIN_SIZE    1    
-#define PAYLOAD_MAX_SIZE    (MAX_RPMSG_BUFF_SIZE - 24)
-#define NUM_PAYLOADS        (PAYLOAD_MAX_SIZE/PAYLOAD_MIN_SIZE)
-
-struct _payload {
-    unsigned long    num;
-    unsigned long    size;
-    char             data[0];
-}__attribute__((__packed__));
-
-
-#endif /* M_EPT_FUNC_TEST_H_ */
diff --git a/apps/tests/master/nucleus/latency_test/nucleus_linux/latency_test.c b/apps/tests/master/nucleus/latency_test/nucleus_linux/latency_test.c
deleted file mode 100644 (file)
index 1ae70a6..0000000
+++ /dev/null
@@ -1,249 +0,0 @@
-/* This is a test demonstration application that mesaures performance of remoteproc
-and rpmsg APIs. This application is meant to run on the master CPU running Nucleus
-and showcases booting of two sub-sequent remote firmware cycles using remoteproc and 
-IPC with remote firmware using rpmsg; It brings up a remote linux based remote 
-firmware which can respond to test calls. Master app executes tests to caluclate the performance 
-of the rpmsg and remoteproc APIs and shutsdown the core once the test has been completed.*/
-
-/* Including required headers */
-#include  <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 64)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define MAX_RPMSG_BUFF_SIZE 512
-#define PAYLOAD_MIN_SIZE    1    
-#define PAYLOAD_MAX_SIZE    (MAX_RPMSG_BUFF_SIZE - 24)
-#define NUM_PAYLOADS        (PAYLOAD_MAX_SIZE/PAYLOAD_MIN_SIZE)
-
-struct _payload {
-    unsigned long    num;
-    unsigned long    size;
-    char             data[];
-};
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric , unsigned long src );
-
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem;
-struct rpmsg_endpoint *rp_ept;
-struct rpmsg_channel *app_rp_chnl;
-
-char fw_name1 []= "firmware1";
-
-struct _payload* p_payload = NULL;
-struct _payload* r_payload = NULL;
-
-UINT64 time_start, time_end;
-UINT64 fw1_average_rtt, fw2_average_rtt;
-UINT64 fw1_boot_time, fw2_boot_time;
-UINT64 fw1_shutdown_time, fw2_shutdown_time;
-    
-UINT64 payload_roundtrip_time[NUM_PAYLOADS];
-
-extern unsigned long long    boot_time_stamp;
-extern unsigned long long    shutdown_time_stamp;
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool)
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if (status == NU_SUCCESS)
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-                                    uncached_mem_pool , pointer , STACK_SIZE , 
-                                    TASK_PRIORITY , TASK_SLICE , NU_PREEMPT , NU_START );
-        }
-        if(status == NU_SUCCESS)
-        {
-            status = NU_Create_Semaphore(&App_Sem ,"APP_SEM", 0, NU_FIFO);
-        }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv ) 
-{
-    struct remote_proc *proc;
-    int                i, size, status;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-
-    NU_System_Memory_Get(&sys_pool_ptr, NU_NULL);
-   
-    printf("\r\n\nExecuting tests for remote context : %s. It corresponds to  Linux remote firmware \r\n" , fw_name1);
-    
-    /* Allocate memory for Rx buffer. */
-    NU_Allocate_Memory(sys_pool_ptr, (VOID **)&r_payload, (2 * sizeof(unsigned long) + PAYLOAD_MAX_SIZE), NU_NO_SUSPEND);
-            
-    /* Initialize remoteproc for first firmware. */
-    status = remoteproc_init((void *) fw_name1, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-    
-    if(!status && (proc))
-    {
-        /* Note time stamp. */
-        time_start = NU_Get_Time_Stamp();
-        
-        /* Boot firmware 1. */            
-        status = remoteproc_boot(proc);
-    }
-    
-    if(!status)
-    {
-        /* Firmware 1 boot time. */
-        fw1_boot_time = boot_time_stamp - time_start;
-            
-        /* Wait for channel creation complete  callback. */
-        NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-        
-        /* Send paylaods of incremental data sizes. */                
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {     
-            NU_Allocate_Memory(sys_pool_ptr, (VOID **)&p_payload, (2 * sizeof(unsigned long) + size), NU_NO_SUSPEND);
-            
-            /* Setup payload size and properties. */        
-            p_payload->num = i;
-            p_payload->size = size;
-            
-            /* Setup the buffer with a pattern*/    
-            memset(&(p_payload->data[0]), 0xA5, size);  
-            
-            time_start = NU_Get_Time_Stamp();
-              
-            /* Send data to remote side. */
-            rpmsg_send(app_rp_chnl, p_payload, (2 * sizeof(unsigned long)) + size);
-            
-            /* Wait for echo. */
-            NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-            
-            NU_Deallocate_Memory(p_payload);
-            
-            /* Save payload round-trip time.*/
-            payload_roundtrip_time[i] = time_end - time_start;
-        }
-        
-        /* Average out the payload round-trip time. */
-        for(i =0; i<NUM_PAYLOADS; i++)
-        {
-            fw1_average_rtt += payload_roundtrip_time[i];
-        }
-        
-        fw1_average_rtt = fw1_average_rtt / NUM_PAYLOADS;
-        
-        time_start = NU_Get_Time_Stamp();
-                
-        remoteproc_shutdown(proc);
-        
-        fw1_shutdown_time = shutdown_time_stamp - time_start;
-                
-        remoteproc_deinit(proc);
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw_name1);
-    }       
-        
-    /* Convert the values into nano-seconds. */
-    fw1_average_rtt = (fw1_average_rtt * 1000000000)/ (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw1_boot_time = (fw1_boot_time * 1000000000) / (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw1_shutdown_time = (fw1_shutdown_time * 1000000000)/ (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw2_average_rtt = (fw2_average_rtt * 1000000000)/ (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw2_boot_time = (fw2_boot_time * 1000000000) / (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw2_shutdown_time = (fw2_shutdown_time * 1000000000)/ (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    
-    printf("\r\n **************************************** \r\n");
-    printf(" OpenAMP Latency Test Results \r\n");
-    printf(" **************************************** \r\n");
-    
-    printf("\r\n Nucleus Remote: Average rpmsg_send API Round-Trip:           %d ns\r\n", (int)fw1_average_rtt);
-    printf("\r\n Nucleus Remote: remoteproc_boot API:                         %d ns\r\n", (int)fw1_boot_time);
-    printf("\r\n Nucleus Remote: remoteproc_shutdown API:                     %d ns\r\n", (int)fw1_shutdown_time);
-        
-    printf("\r\n Baremetal Remote: Average rpmsg_send API Round-Trip:         %d ns\r\n", (int)fw2_average_rtt);
-    printf("\r\n Baremetal Remote: remoteproc_boot API:                       %d ns\r\n", (int)fw2_boot_time);
-    printf("\r\n Baremetal Remote: remoteproc_shutdown API:                   %d ns\r\n", (int)fw2_shutdown_time);
-}
-
-/* This callback gets invoked when the remote channel is created */
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) 
-{
-    app_rp_chnl = rp_chnl;
-    
-    rp_ept = rpmsg_create_ept(rp_chnl , rpmsg_read_cb ,RPMSG_NULL , RPMSG_ADDR_ANY);
-    
-    NU_Release_Semaphore(&App_Sem);
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) 
-{   
-    rpmsg_destroy_ept(rp_ept);
-}
-
-/* This is the read callback, note we are in a task context when this callback
-is invoked, so kernel primitives can be used freely */
-void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * priv, unsigned long src) 
-{
-    time_end = NU_Get_Time_Stamp();
-    
-    memcpy(r_payload,data,len);
-    
-    NU_Release_Semaphore(&App_Sem);
-}
-
diff --git a/apps/tests/master/nucleus/latency_test/nucleus_linux/make b/apps/tests/master/nucleus/latency_test/nucleus_linux/make
deleted file mode 100644 (file)
index 8176a0f..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := tests/master/nucleus/latency_test/nucleus_linux/latency_test.out
-SAMPLE_C_SRC := tests/master/nucleus/latency_test/nucleus_linux/latency_test.c
-REMOTE_OUT   := latency_test.out
-DST_DIR := tests/master/nucleus/latency_test/nucleus_linux
-LINUX_SRC_DIR := firmware/$(PLAT)/linux
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
-SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(REMOTE_OUT)$(SAMPLEOBJFILES)
-
-       @echo 'Building latency test for nucleus : $@'
-
-       $(LD)  -Wl,-Map=tests/master/nucleus/latency_test/nucleus_linux/latency_test.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group    
-       
-       $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
-               
-       @echo 'Finished building target: $@'
-       
-%.o:%.c
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-       
-%.o:%.S
-       @$(AS) -c -mcpu=cortex-a9 $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
-
-$(REMOTE_OUT):
-       cd $(LINUX_SRC_DIR)/; cp firmware firmware1; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
-       mv $(LINUX_SRC_DIR)/firmware1.o $(DST_DIR)/firmware1.o
-       cd $(LINUX_SRC_DIR)/; cp firmware firmware2; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
-       mv $(LINUX_SRC_DIR)/firmware2.o $(DST_DIR)/
-       cd $(LINUX_SRC_DIR)/; rm firmware1; rm firmware2;
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_BIN) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o $(SAMPLE_MAP)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.c b/apps/tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.c
deleted file mode 100644 (file)
index 44c5b29..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/* This is a test demonstration application that tests performance of remoteproc
-and rpmsg APIs. This application is meant to run on the master CPU running Nucleus
-and showcases booting of two sub-sequent remote firmware cycles using remoteproc and 
-IPC with remote firmware using rpmsg; 1. It brings up a remote Nucleus based remote 
-firmware which can respond to test calls, 2. It brings up a baremetal based 
-remote firmware which can respond to test calls. Master app executes tests to measure 
-performance of the rpmsg and remote proc APIs and shutsdown the core once the test has 
-been completed.*/
-
-/* Including required headers */
-#include  <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 64)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define MAX_RPMSG_BUFF_SIZE 512
-#define PAYLOAD_MIN_SIZE    1    
-#define PAYLOAD_MAX_SIZE    (MAX_RPMSG_BUFF_SIZE - 24)
-#define NUM_PAYLOADS        (PAYLOAD_MAX_SIZE/PAYLOAD_MIN_SIZE)
-#define SHUTDOWN_MSG       0xEF56A55A
-struct _payload {
-    unsigned long    num;
-    unsigned long    size;
-    char             data[];
-};
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric , unsigned long src );
-
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem;
-struct rpmsg_endpoint *rp_ept;
-struct rpmsg_channel *app_rp_chnl;
-
-char fw_name1 []= "firmware1";
-char fw_name2 []= "firmware2";
-
-struct _payload* p_payload = NULL;
-struct _payload* r_payload = NULL;
-
-UINT64 time_start, time_end;
-UINT64 fw1_average_rtt = 0, fw2_average_rtt = 0;
-UINT64 fw1_boot_time = 0, fw2_boot_time = 0;
-UINT64 fw1_shutdown_time =0, fw2_shutdown_time =0;
-    
-UINT64 payload_roundtrip_time[NUM_PAYLOADS];
-
-extern unsigned long long    boot_time_stamp;
-extern unsigned long long    shutdown_time_stamp;
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool)
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if (status == NU_SUCCESS)
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-                                    uncached_mem_pool , pointer , STACK_SIZE , 
-                                    TASK_PRIORITY , TASK_SLICE , NU_PREEMPT , NU_START );
-        }
-        if(status == NU_SUCCESS)
-        {
-            status = NU_Create_Semaphore(&App_Sem ,"APP_SEM", 0, NU_FIFO);
-        }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv ) 
-{
-    struct remote_proc *proc;
-    int                idx,i, size;
-    NU_MEMORY_POOL     *sys_pool_ptr;
-    STATUS status = NU_SUCCESS;
-    int shutdown_msg = SHUTDOWN_MSG;
-
-    NU_System_Memory_Get(&sys_pool_ptr, NU_NULL);
-   
-    printf("\r\n\nExecuting tests for remote context : %s. It corresponds to Nucleus remote firmware \r\n" , fw_name1);
-    
-    /* Allocate memory for Rx buffer. */
-    NU_Allocate_Memory(sys_pool_ptr, (VOID **)&r_payload, (2 * sizeof(unsigned long) + PAYLOAD_MAX_SIZE), NU_NO_SUSPEND);
-            
-    /* Initialize remoteproc for first firmware. */
-    status = remoteproc_init((void *) fw_name1, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-           
-
-    if(!status && (proc))
-    {
-        /* Note time stamp. */
-        time_start = NU_Get_Time_Stamp();
-        
-        /* Boot firmware 1. */            
-        status = remoteproc_boot(proc);
-    }
-    
-    if(!status)
-    {
-        /* Firmware 1 boot time. */
-        fw1_boot_time = boot_time_stamp - time_start;
-            
-        /* Wait for channel creation complete  callback. */
-        NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-        
-        /* Send paylaods of incremental data sizes. */                
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {     
-            NU_Allocate_Memory(sys_pool_ptr, (VOID **)&p_payload, (2 * sizeof(unsigned long) + size), NU_NO_SUSPEND);
-            
-            /* Setup payload size and properties. */        
-            p_payload->num = i;
-            p_payload->size = size;
-            
-            /* Setup the buffer with a pattern*/    
-            memset(&(p_payload->data[0]), 0xA5, size);  
-            
-            time_start = NU_Get_Time_Stamp();
-
-            /* Send data to remote side. */
-            rpmsg_send(app_rp_chnl, p_payload, (2 * sizeof(unsigned long)) + size);
-
-            /* Wait for echo. */
-            NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-            
-            /* Validate packet number*/
-            if(p_payload->num != r_payload->num)
-            {
-                printf("\r\nError Echo packet number does not match with transmitted packet number: %d \r\n", (int)p_payload->num);
-            }
-                  
-            /* Validate the data integrity. */
-            for(idx = 0; idx < r_payload->size; idx++)
-            {
-                if(p_payload->data[idx] != r_payload->data[idx])
-                {
-                    printf("\r\nError receiving data packet of size: %d at data index %d \r\n", size, idx);
-                    break;
-                }
-            }
-            
-            NU_Deallocate_Memory(p_payload);
-            
-            /* Save payload round-trip time.*/
-            payload_roundtrip_time[i] = time_end - time_start;
-        }
-        
-        /* Average out the payload round-trip time. */
-        for(i =0; i<NUM_PAYLOADS; i++)
-        {
-            fw1_average_rtt += payload_roundtrip_time[i];
-        }
-        
-        fw1_average_rtt = fw1_average_rtt / NUM_PAYLOADS;
-
-        /* Send termination message to remote */
-        rpmsg_send(app_rp_chnl, &shutdown_msg, sizeof(int));
-
-        /* Wait for channel deletion callback. */
-        NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-
-        time_start = NU_Get_Time_Stamp();
-                
-        remoteproc_shutdown(proc);
-        
-        fw1_shutdown_time = shutdown_time_stamp - time_start;
-                
-        remoteproc_deinit(proc);
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw_name1);
-    }       
-    
-    printf("\r\n\nExecuting tests for remote context : %s. It corresponds to Baremetal remote firmware \r\n" , fw_name2);
-    
-    status = remoteproc_init((void *) fw_name2, rpmsg_channel_created, rpmsg_channel_deleted, rpmsg_read_cb, &proc);
-    
-    if(!status && (proc))
-    {
-               /* Note time stamp. */
-        time_start = NU_Get_Time_Stamp();
-        
-        /* Boot firmware 2. */            
-        status = remoteproc_boot(proc);
-        
-    }
-    
-    if(!status)
-    {
-        fw2_boot_time = boot_time_stamp - time_start;
-        
-        NU_Obtain_Semaphore(&App_Sem, NU_SUSPEND);
-        
-        for(i = 0, size=PAYLOAD_MIN_SIZE; i < NUM_PAYLOADS; i++, size++)
-        {     
-            NU_Allocate_Memory(sys_pool_ptr, (VOID **)&p_payload, (2 * sizeof(unsigned long) + size), NU_NO_SUSPEND);
-                                 
-            p_payload->num = i;
-            
-            p_payload->size = size;
-            
-            /* Setup the buffer with a pattern*/    
-            memset(&(p_payload->data[0]), 0xA5, size);  
-            
-            time_start = NU_Get_Time_Stamp();
-                        
-            /* Send data to remote side. */
-            rpmsg_send(app_rp_chnl, p_payload, (2 * sizeof(unsigned long)) + size);
-            
-            /* Wait for echo. */
-            NU_Obtain_Semaphore(&App_Sem , NU_SUSPEND);
-            
-            /* Validate packet number*/
-            if(p_payload->num != r_payload->num)
-            {
-                printf("\r\nError Echo packet number does not match with transmitted packet number %d \r\n", (int)p_payload->num);
-            }
-                
-            /* Validate the data integrity. */
-            for(idx = 0; idx < size; idx++)
-            {
-                if(p_payload->data[idx] != r_payload->data[idx])
-                {
-                    printf("\r\nError receiving data packet of size: %d at data index %d \r\n", size, idx);
-                    break;
-                }
-            }
-            
-            NU_Deallocate_Memory(p_payload);
-            
-            payload_roundtrip_time[i] = time_end - time_start;
-        }
-        
-        for(i =0; i<NUM_PAYLOADS; i++)
-        {
-            fw2_average_rtt += payload_roundtrip_time[i];
-        }
-        
-        fw2_average_rtt = fw2_average_rtt / NUM_PAYLOADS;
-        
-        time_start = NU_Get_Time_Stamp();
-                
-        remoteproc_shutdown(proc);
-        
-        fw2_shutdown_time = shutdown_time_stamp - time_start;
-        
-        remoteproc_deinit(proc);
-    }
-    else
-    {
-        printf("\r\n\nLoading remote context: %s failed \r\n" , fw_name2);
-    }
-    
-    /* Convert the values into nano-seconds. */
-    fw1_average_rtt = (fw1_average_rtt * 1000000000)/ (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw1_boot_time = (fw1_boot_time * 1000000000) / (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw1_shutdown_time = (fw1_shutdown_time * 1000000000)/ (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw2_average_rtt = (fw2_average_rtt * 1000000000)/ (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw2_boot_time = (fw2_boot_time * 1000000000) / (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    fw2_shutdown_time = (fw2_shutdown_time * 1000000000)/ (NU_HW_Ticks_Per_SW_Tick * NU_PLUS_TICKS_PER_SEC);
-    
-    printf("\r\n **************************************** \r\n");
-    printf(" OpenAMP Latency Test Results \r\n");
-    printf(" **************************************** \r\n");
-    
-    printf("\r\n Nucleus Remote: Average rpmsg_send API Round-Trip:           %d ns\r\n", (int)fw1_average_rtt);
-    printf("\r\n Nucleus Remote: remoteproc_boot API:                         %d ns\r\n", (int)fw1_boot_time);
-    printf("\r\n Nucleus Remote: remoteproc_shutdown API:                     %d ns\r\n", (int)fw1_shutdown_time);
-        
-    printf("\r\n Baremetal Remote: Average rpmsg_send API Round-Trip:         %d ns\r\n", (int)fw2_average_rtt);
-    printf("\r\n Baremetal Remote: remoteproc_boot API:                       %d ns\r\n", (int)fw2_boot_time);
-    printf("\r\n Baremetal Remote: remoteproc_shutdown API:                   %d ns\r\n", (int)fw2_shutdown_time);
-}
-
-/* This callback gets invoked when the remote channel is created */
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) 
-{
-    app_rp_chnl = rp_chnl;
-    
-    rp_ept = rpmsg_create_ept(rp_chnl , rpmsg_read_cb ,RPMSG_NULL , RPMSG_ADDR_ANY);
-    
-    NU_Release_Semaphore(&App_Sem);
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) 
-{   
-    rpmsg_destroy_ept(rp_ept);
-    NU_Release_Semaphore(&App_Sem);
-}
-
-/* This is the read callback, note we are in a task context when this callback
-is invoked, so kernel primitives can be used freely */
-void rpmsg_read_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * priv, unsigned long src) 
-{
-    time_end = NU_Get_Time_Stamp();
-    
-    memcpy(r_payload,data,len);
-    
-    NU_Release_Semaphore(&App_Sem);
-}
-
diff --git a/apps/tests/master/nucleus/latency_test/nucleus_nucleusbm/make b/apps/tests/master/nucleus/latency_test/nucleus_nucleusbm/make
deleted file mode 100644 (file)
index 2cb0ea8..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.out
-SAMPLE_C_SRC := tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.c
-REMOTE_OUT   := latency_test.out
-DST_DIR := tests/master/nucleus/latency_test/nucleus_nucleusbm
-NU_SRC_DIR := firmware/$(PLAT)/nucleus/echo_test
-BM_SRC_DIR := firmware/$(PLAT)/baremetal/echo_test
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_C_SRC))
-SAMPLE_DEPS := $(patsubst %.c, %.d, $(SAMPLE_C_SRC))
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-SAMPLE_BIN := $(patsubst %.out, %.bin, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(REMOTE_OUT)$(SAMPLEOBJFILES)
-
-       @echo 'Building latency test for nucleus : $@'
-
-       $(LD)  -Wl,-Map=tests/master/nucleus/latency_test/nucleus_nucleusbm/latency_test.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_master.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/master" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o -lnucleus_master -lopen_amp -lc -lm -lstdc++ -Wl,--end-group        
-       
-       $(OBJCPY) -O binary $(SAMPLE_OUT) $(SAMPLE_BIN)
-               
-       @echo 'Finished building target: $@'
-       
-%.o:%.c
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-       
-%.o:%.S
-       @$(AS) -c -mcpu=cortex-a9 $(ARCH_ASFLAGS) $(INCLUDE) $< -o $@
-
-$(REMOTE_OUT):
-       cd $(NU_SRC_DIR)/; cp firmware firmware1; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware1 firmware1.o
-       mv $(NU_SRC_DIR)/firmware1.o $(DST_DIR)/
-       cd $(BM_SRC_DIR)/; cp firmware firmware2; \
-       $(OBJCPY) -I binary -O elf32-littlearm -B arm firmware2 firmware2.o
-       mv $(BM_SRC_DIR)/firmware2.o $(DST_DIR)/
-       cd $(NU_SRC_DIR)/; rm firmware1
-       cd $(BM_SRC_DIR)/; rm firmware2
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_BIN) $(DST_DIR)/firmware1.o $(DST_DIR)/firmware2.o $(SAMPLE_MAP)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
index 02d221dbc44f30936493ed71f3eb841b3eb7549c..6eee4a5422af40eebc64f38050f54dc9f7badc91 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include "open_amp.h"\r
index 9c28005fa2747df38c7bd455c9a80f7545f22a8d..0a8e95750d5d919b1fe9ece8236a632fc84d1801 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include <stddef.h>\r
index a073704bfbf1e6a27ba4d25f804431cf97053a0f..85b11b1dc71953d84074687831febb322bb1ecd1 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include "open_amp.h"\r
index 9c28005fa2747df38c7bd455c9a80f7545f22a8d..0a8e95750d5d919b1fe9ece8236a632fc84d1801 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include <stddef.h>\r
diff --git a/apps/tests/remote/nucleus/echo_test/echo_test.c b/apps/tests/remote/nucleus/echo_test/echo_test.c
deleted file mode 100644 (file)
index 66bc950..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/* This is a sample demonstration application that showcases usage of rpmsg 
-This application is meant to run on the remote CPU running Nucleus.
-This application echoes back data that was sent to it by the master core. */
-
-
-/* Including required headers */
-#include  <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "rsc_table.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 64)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define SHUTDOWN_MSG   0xEF56A55A
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_default_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * pric, unsigned long src);
-
-/* Globals */
-static NU_TASK Task_Control_Block;
-static struct rpmsg_endpoint *rp_ept;
-static struct rpmsg_channel *app_rp_chnl;
-static struct remote_proc *proc;
-static struct rsc_table_info rsc_info;
-extern const struct remote_resource_table resources;
-static volatile int shutdown_flag = 0;
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if (status == NU_SUCCESS) {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE,
-                        NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if (status == NU_SUCCESS) {
-            status = NU_Create_Task(&Task_Control_Block, "MAIN",
-                            Main_Task_Entry, 0, uncached_mem_pool, pointer,
-                            STACK_SIZE, TASK_PRIORITY, TASK_SLICE,
-                            NU_PREEMPT, NU_START);
-        }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv ) {
-
-       rsc_info.rsc_tab = (struct resource_table *)&resources;
-    rsc_info.size = sizeof(struct remote_resource_table);
-
-    /* This API creates the virtio devices for this remote node and initializes
-     other relevant resources defined in the resource table */
-    remoteproc_resource_init(&rsc_info, rpmsg_channel_created,
-                    rpmsg_channel_deleted, rpmsg_read_default_cb, &proc);
-
-    for ( ; ; )
-    {
-        if(shutdown_flag)
-        {
-            remoteproc_resource_deinit(proc);
-            break;
-        }
-        NU_Sleep(100);
-    }
-}
-
-/* This callback gets invoked when the remote chanl is created */
-void rpmsg_channel_created(struct rpmsg_channel *rp_chnl) {
-
-    app_rp_chnl = rp_chnl;
-    rp_ept = rpmsg_create_ept(rp_chnl, rpmsg_read_default_cb, RPMSG_NULL,
-                    RPMSG_ADDR_ANY);
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted(struct rpmsg_channel *rp_chnl) {
-
-}
-
-/* This is the read callback, note we are in a task context when this callback 
-is invoked, so kernel primitives can be used freely */
-void rpmsg_read_default_cb(struct rpmsg_channel *rp_chnl, void *data, int len,
-                void * priv, unsigned long src) {
-
-    if ((*((int *) data)) == SHUTDOWN_MSG) {
-        shutdown_flag = 1;
-    } else {
-        /* Send the result of matrix multiplication back to master. */
-        rpmsg_send(rp_chnl, data, len);
-    }
-}
-
-
diff --git a/apps/tests/remote/nucleus/echo_test/make b/apps/tests/remote/nucleus/echo_test/make
deleted file mode 100644 (file)
index f1509f6..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := tests/remote/nucleus/echo_test/echo_test.out
-SAMPLE_SRC := tests/remote/nucleus/echo_test/echo_test.c tests/remote/nucleus/echo_test/rsc_table.c
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_SRC))
-
-SAMPLE_DEPS   := $(patsubst %.c, %.d, $(SAMPLE_SRC))
-
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(SAMPLEOBJFILES) 
-
-       @echo 'Building echo test for nucleus : $@'
-
-       $(LD)  -Wl,-Map=tests/remote/nucleus/echo_test/echo_test.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_remote.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/remote" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) -lnucleus_remote -lopen_amp -lc -lm -lstdc++ -Wl,--end-group      
-       
-       @echo 'Copying ELF image to firmware folder'
-       $(CP) $(SAMPLE_OUT) firmware/$(PLAT)/$(OS)/echo_test/firmware
-       
-       @echo 'Finished building target: $@'
-       
-%.o:%.c 
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_MAP)
-
-
-
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/tests/remote/nucleus/echo_test/rsc_table.c b/apps/tests/remote/nucleus/echo_test/rsc_table.c
deleted file mode 100644 (file)
index a073704..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*\r
- * Copyright (c) 2014, Mentor Graphics Corporation\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are met:\r
- *\r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * 3. Neither the name of Mentor Graphics Corporation nor the names of its\r
- *    contributors may be used to endorse or promote products derived from this\r
- *    software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- * POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-/* This file populates resource table for Nucleus and BM remotes\r
- * for use by the Linux Master */\r
-\r
-#include "open_amp.h"\r
-#include "rsc_table.h"\r
-\r
-/* Place resource table in special ELF section */\r
-#define __section(S)            __attribute__((__section__(#S)))\r
-#define __resource              __section(.resource_table)\r
-\r
-#define RPMSG_IPU_C0_FEATURES       1\r
-\r
-/* VirtIO rpmsg device id */\r
-#define VIRTIO_ID_RPMSG_             7\r
-\r
-/* Remote supports Name Service announcement */\r
-#define VIRTIO_RPMSG_F_NS           0\r
-\r
-/* Resource table entries */\r
-#define ELF_START                   0x00000000\r
-#define ELF_END                     0x08000000\r
-#define NUM_VRINGS                                     0x02\r
-#define VRING_ALIGN                                    0x1000\r
-#define RING_TX                     0x08000000\r
-#define RING_RX                     0x08004000\r
-#define VRING_SIZE                  256\r
-\r
-const struct remote_resource_table __resource resources =\r
-{\r
-    /* Version */\r
-    1,\r
-\r
-    /* NUmber of table entries */\r
-    2,\r
-    /* reserved fields */\r
-    {   0, 0,},\r
-\r
-    /* Offsets of rsc entries */\r
-    {\r
-        offsetof(struct remote_resource_table, elf_cout),\r
-        offsetof(struct remote_resource_table, rpmsg_vdev),\r
-    },\r
-\r
-    /* End of ELF file */\r
-    {\r
-        RSC_CARVEOUT, ELF_START, ELF_START, ELF_END, 0, 0, "ELF_COUT",\r
-    },\r
-\r
-    /* Virtio device entry */\r
-    {   RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, 0, NUM_VRINGS, {0, 0},\r
-    },\r
-\r
-    /* Vring rsc entry - part of vdev rsc entry */\r
-    {\r
-        RING_TX, VRING_ALIGN, VRING_SIZE, 1, 0\r
-    },\r
-    {\r
-        RING_RX, VRING_ALIGN, VRING_SIZE, 2, 0\r
-    },\r
-};\r
diff --git a/apps/tests/remote/nucleus/echo_test/rsc_table.h b/apps/tests/remote/nucleus/echo_test/rsc_table.h
deleted file mode 100644 (file)
index 9c28005..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*\r
- * Copyright (c) 2014, Mentor Graphics Corporation\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are met:\r
- *\r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * 3. Neither the name of Mentor Graphics Corporation nor the names of its\r
- *    contributors may be used to endorse or promote products derived from this\r
- *    software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- * POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-/* This file populates resource table for Nucleus and BM remotes\r
- * for use by the Linux Master */\r
-\r
-#include <stddef.h>\r
-#include "open_amp.h"\r
-\r
-#define NO_RESOURCE_ENTRIES         8\r
-\r
-/* Resource table for the given remote */\r
-struct remote_resource_table {\r
-    unsigned int version;\r
-    unsigned int num;\r
-    unsigned int reserved[2];\r
-    unsigned int offset[NO_RESOURCE_ENTRIES];\r
-    /* text carveout entry */\r
-    struct fw_rsc_carveout elf_cout;\r
-    /* rpmsg vdev entry */\r
-    struct fw_rsc_vdev rpmsg_vdev;\r
-    struct fw_rsc_vdev_vring rpmsg_vring0;\r
-    struct fw_rsc_vdev_vring rpmsg_vring1;\r
-};\r
-\r
diff --git a/apps/tests/remote/nucleus/func_test_suite/func_test_suite.c b/apps/tests/remote/nucleus/func_test_suite/func_test_suite.c
deleted file mode 100644 (file)
index eaf47f3..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-
-/* This is a test application that runs Nucleus on the remote core 
-and responds to commands from master core to test the usage of rpmsg APIs. */
-
-/* Including required headers */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-#include "open_amp.h"
-#include "rsc_table.h"
-#include "test_suite.h"
-#include "nucleus.h"
-#include "kernel/nu_kernel.h"
-
-/* Prototypes */
-static void Main_Task_Entry( UNSIGNED argc , VOID *argv );
-
-#define EPT_ADDR        59
-
-/* Application provided callbacks */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl );
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl );
-void rpmsg_read_default_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-void rpmsg_read_ept_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * pric ,
-                unsigned long src );
-/* Globals */
-NU_TASK Task_Control_Block;
-NU_SEMAPHORE App_Sem;
-struct rpmsg_endpoint *rp_ept;
-struct rpmsg_channel *app_rp_chnl;
-UINT32 Src;
-UINT32 Len;
-CHAR firmware_name[] = "nucleus-fn-test-suite-remote-firmware";
-CHAR r_buffer[512];
-struct rsc_table_info rsc_info;
-extern const struct remote_resource_table resources;
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Application_Initialize
- * *
- * *   DESCRIPTION
- * *
- * *       Demo application entry point
- *
- * ***********************************************************************/
-VOID Application_Initialize(
-                NU_MEMORY_POOL* mem_pool , NU_MEMORY_POOL* uncached_mem_pool )
-{
-    VOID *pointer;
-    STATUS status = NU_SUCCESS;
-
-    /* Reference unused parameters to avoid toolset warnings */
-    NU_UNUSED_PARAM( uncached_mem_pool );
-
-    if ( status == NU_SUCCESS )
-    {
-        status = NU_Allocate_Memory(mem_pool, &pointer, STACK_SIZE, NU_NO_SUSPEND);
-
-        /* Create the main task for matrix processing */
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Task( &Task_Control_Block , "MAIN" , Main_Task_Entry , 0 ,
-                            uncached_mem_pool , pointer , STACK_SIZE , TASK_PRIORITY , TASK_SLICE ,
-                            NU_PREEMPT , NU_START );
-        }
-        if ( status == NU_SUCCESS )
-        {
-            status = NU_Create_Semaphore( &App_Sem , "APP_SEM" , 0 , NU_FIFO );
-        }
-    }
-
-    /* Check to see if previous operations were successful */
-    if ( status != NU_SUCCESS )
-    {
-        /* Loop forever */
-        while ( 1 );
-    }
-}
-
-/***********************************************************************
- * *
- * *   FUNCTION
- * *
- * *       Main_Task_Entry
- * *
- * *   DESCRIPTION
- * *
- * *       Entry function for the main task. This task prints a hello world
- * *       message.
- * *
- * ***********************************************************************/
-static VOID Main_Task_Entry( UNSIGNED argc , VOID *argv )
-{
-
-    struct remote_proc *proc;
-    BOOLEAN uninit = NU_FALSE;
-    struct ept_cmd_data *ept_data;
-
-    rsc_info.rsc_tab = (struct resource_table *)&resources;
-    rsc_info.size = sizeof(struct remote_resource_table);
-
-    /* This API creates the virtio devices for this remote node and initializes
-     other relevant resources defined in the resource table */
-    remoteproc_resource_init( &rsc_info, rpmsg_channel_created , rpmsg_channel_deleted ,
-                    rpmsg_read_default_cb , &proc );
-
-    for ( ; ; )
-    {
-
-        NU_Obtain_Semaphore( &App_Sem , NU_SUSPEND );
-
-        struct command *cmd = (struct command *)r_buffer;
-        if(cmd->comm_start == CMD_START)
-        {
-            unsigned int cm_code = cmd->comm_code;
-            void *data = cmd->data;
-
-            switch ( cm_code )
-            {
-                case CREATE_EPT :
-                    ept_data = (struct ept_cmd_data *)data;
-                    rp_ept = rpmsg_create_ept( app_rp_chnl , rpmsg_read_ept_cb , RPMSG_NULL ,
-                                    ept_data->dst );
-                    if (rp_ept){
-                        /* Send data back to ack. */
-                        rpmsg_sendto( app_rp_chnl , r_buffer , Len , Src );
-                    }
-                    break;
-                case DELETE_EPT :
-                    rpmsg_destroy_ept(rp_ept);
-                    rpmsg_sendto( app_rp_chnl , r_buffer , Len , Src );
-
-                    break;
-                case CREATE_CHNL :
-                    break;
-                case DELETE_CHNL :
-                    rpmsg_sendto( app_rp_chnl , r_buffer , Len , Src );
-                    remoteproc_resource_deinit( proc );
-                    uninit = NU_TRUE;
-                    break;
-                case QUERY_FW_NAME :
-                    rpmsg_send( app_rp_chnl , &firmware_name[0], strlen(firmware_name)+1);
-                    break;
-                default :
-                    rpmsg_sendto( app_rp_chnl , r_buffer , Len , Src );
-                    break;
-            }
-        }else
-        {
-            rpmsg_sendto( app_rp_chnl , r_buffer , Len , Src );
-        }
-
-        if ( uninit )
-            break;
-    }
-}
-
-/* This callback gets invoked when the remote chanl is created */
-void rpmsg_channel_created( struct rpmsg_channel *rp_chnl )
-{
-    app_rp_chnl = rp_chnl;
-}
-
-/* This callback gets invoked when the remote channel is deleted */
-void rpmsg_channel_deleted( struct rpmsg_channel *rp_chnl )
-{
-
-}
-
-/* This is the read callback, note we are in a task context when this callback
- is invoked, so kernel primitives can be used freely */
-void rpmsg_read_default_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * priv ,
-                unsigned long src )
-{
-    memcpy( r_buffer , data , len );
-    Src = src;
-    Len = len;
-    NU_Release_Semaphore( &App_Sem );
-}
-
-void rpmsg_read_ept_cb( struct rpmsg_channel *rp_chnl , void *data , int len , void * priv ,
-                unsigned long src )
-{
-    rpmsg_send_offchannel( rp_chnl , rp_ept->addr , src , data , len );
-}
diff --git a/apps/tests/remote/nucleus/func_test_suite/make b/apps/tests/remote/nucleus/func_test_suite/make
deleted file mode 100644 (file)
index 5ae1d2d..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-
-include ../Makefile.commons
-
-SAMPLE_OUT := tests/remote/nucleus/func_test_suite/func_test_suite.out
-SAMPLE_SRC := tests/remote/nucleus/func_test_suite/func_test_suite.c tests/remote/nucleus/func_test_suite/rsc_table.c
-
-SAMPLEOBJFILES := $(patsubst %.c, %.o, $(SAMPLE_SRC))
-
-SAMPLE_DEPS   := $(patsubst %.c, %.d, $(SAMPLE_SRC))
-
-SAMPLE_MAP := $(patsubst %.out, %.map, $(SAMPLE_OUT))
-
-$(SAMPLE_OUT): $(SAMPLEOBJFILES) 
-
-       @echo 'Building echo test for nucleus : $@'
-
-       $(LD)  -Wl,-Map=tests/remote/nucleus/func_test_suite/func_test_suite.map  -nostartfiles -Wl,--gc-sections -Wl,--wrap=malloc -Wl,--wrap=calloc -Wl,--wrap=realloc -Wl,--wrap=free -T"$(OHOME)/libs/system/$(PLAT)/nucleus/linker_remote.ld" -L"$(OHOME)/libs/system/$(PLAT)/nucleus/lib/$(CROSS)/remote" -L"$(OHOME)/libs/open_amp" -o "$(SAMPLE_OUT)" -Wl,--start-group $(SAMPLEOBJFILES) -lnucleus_remote -lopen_amp -lc -lm -lstdc++ -Wl,--end-group  
-       
-       @echo 'Copying ELF image to firmware folder'
-       $(CP) $(SAMPLE_OUT) firmware/$(PLAT)/$(OS)/func_test_suite/firmware
-       
-       @echo 'Finished building target: $@'
-       
-%.o:%.c 
-       @echo CC $(<:.c=.o)
-       @$(CC) $(CFLAGS) $(ARCH_CFLAGS) $(INCLUDE) -c $< -o $@
-
-clean:
-       -$(RM) $(SAMPLEOBJFILES) $(SAMPLE_DEPS) $(SAMPLE_OUT) $(SAMPLE_MAP)
-       
-post-build:
-       -@echo ' '
-
-secondary-outputs:
-
-PHONY: all clean dependents
-.SECONDARY: post-build
diff --git a/apps/tests/remote/nucleus/func_test_suite/rsc_table.c b/apps/tests/remote/nucleus/func_test_suite/rsc_table.c
deleted file mode 100644 (file)
index a073704..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*\r
- * Copyright (c) 2014, Mentor Graphics Corporation\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are met:\r
- *\r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * 3. Neither the name of Mentor Graphics Corporation nor the names of its\r
- *    contributors may be used to endorse or promote products derived from this\r
- *    software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- * POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-/* This file populates resource table for Nucleus and BM remotes\r
- * for use by the Linux Master */\r
-\r
-#include "open_amp.h"\r
-#include "rsc_table.h"\r
-\r
-/* Place resource table in special ELF section */\r
-#define __section(S)            __attribute__((__section__(#S)))\r
-#define __resource              __section(.resource_table)\r
-\r
-#define RPMSG_IPU_C0_FEATURES       1\r
-\r
-/* VirtIO rpmsg device id */\r
-#define VIRTIO_ID_RPMSG_             7\r
-\r
-/* Remote supports Name Service announcement */\r
-#define VIRTIO_RPMSG_F_NS           0\r
-\r
-/* Resource table entries */\r
-#define ELF_START                   0x00000000\r
-#define ELF_END                     0x08000000\r
-#define NUM_VRINGS                                     0x02\r
-#define VRING_ALIGN                                    0x1000\r
-#define RING_TX                     0x08000000\r
-#define RING_RX                     0x08004000\r
-#define VRING_SIZE                  256\r
-\r
-const struct remote_resource_table __resource resources =\r
-{\r
-    /* Version */\r
-    1,\r
-\r
-    /* NUmber of table entries */\r
-    2,\r
-    /* reserved fields */\r
-    {   0, 0,},\r
-\r
-    /* Offsets of rsc entries */\r
-    {\r
-        offsetof(struct remote_resource_table, elf_cout),\r
-        offsetof(struct remote_resource_table, rpmsg_vdev),\r
-    },\r
-\r
-    /* End of ELF file */\r
-    {\r
-        RSC_CARVEOUT, ELF_START, ELF_START, ELF_END, 0, 0, "ELF_COUT",\r
-    },\r
-\r
-    /* Virtio device entry */\r
-    {   RSC_VDEV, VIRTIO_ID_RPMSG_, 0, RPMSG_IPU_C0_FEATURES, 0, 0, 0, NUM_VRINGS, {0, 0},\r
-    },\r
-\r
-    /* Vring rsc entry - part of vdev rsc entry */\r
-    {\r
-        RING_TX, VRING_ALIGN, VRING_SIZE, 1, 0\r
-    },\r
-    {\r
-        RING_RX, VRING_ALIGN, VRING_SIZE, 2, 0\r
-    },\r
-};\r
diff --git a/apps/tests/remote/nucleus/func_test_suite/rsc_table.h b/apps/tests/remote/nucleus/func_test_suite/rsc_table.h
deleted file mode 100644 (file)
index 9c28005..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*\r
- * Copyright (c) 2014, Mentor Graphics Corporation\r
- * All rights reserved.\r
- *\r
- * Redistribution and use in source and binary forms, with or without\r
- * modification, are permitted provided that the following conditions are met:\r
- *\r
- * 1. Redistributions of source code must retain the above copyright notice,\r
- *    this list of conditions and the following disclaimer.\r
- * 2. Redistributions in binary form must reproduce the above copyright notice,\r
- *    this list of conditions and the following disclaimer in the documentation\r
- *    and/or other materials provided with the distribution.\r
- * 3. Neither the name of Mentor Graphics Corporation nor the names of its\r
- *    contributors may be used to endorse or promote products derived from this\r
- *    software without specific prior written permission.\r
- *\r
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"\r
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\r
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r
- * POSSIBILITY OF SUCH DAMAGE.\r
- */\r
-\r
-/* This file populates resource table for Nucleus and BM remotes\r
- * for use by the Linux Master */\r
-\r
-#include <stddef.h>\r
-#include "open_amp.h"\r
-\r
-#define NO_RESOURCE_ENTRIES         8\r
-\r
-/* Resource table for the given remote */\r
-struct remote_resource_table {\r
-    unsigned int version;\r
-    unsigned int num;\r
-    unsigned int reserved[2];\r
-    unsigned int offset[NO_RESOURCE_ENTRIES];\r
-    /* text carveout entry */\r
-    struct fw_rsc_carveout elf_cout;\r
-    /* rpmsg vdev entry */\r
-    struct fw_rsc_vdev rpmsg_vdev;\r
-    struct fw_rsc_vdev_vring rpmsg_vring0;\r
-    struct fw_rsc_vdev_vring rpmsg_vring1;\r
-};\r
-\r
diff --git a/apps/tests/remote/nucleus/func_test_suite/test_suite.h b/apps/tests/remote/nucleus/func_test_suite/test_suite.h
deleted file mode 100644 (file)
index 1ead2b6..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * m_ept_func_test.h
- *
- *  Created on: Mar 14, 2014
- *      Author: etsam
- */
-
-#ifndef M_EPT_FUNC_TEST_H_
-#define M_EPT_FUNC_TEST_H_
-
-struct command
-{
-    unsigned int comm_start;
-    unsigned int comm_code;
-    char data[0];
-}__attribute__((__packed__));
-
-struct ept_cmd_data
-{
-    unsigned int src;
-    unsigned int dst;
-};
-
-struct chnl_cmd_data
-{
-    char name[32];
-};
-
-/* Command Codes */
-
-#define CREATE_EPT      0x00000000
-#define DELETE_EPT      0x00000001
-#define CREATE_CHNL     0x00000002
-#define DELETE_CHNL     0x00000003
-#define START_ECHO      0x00000004
-#define STOP_ECHO       0x00000005
-#define QUERY_FW_NAME   0x00000006
-
-#define CMD_START       0xEF56A55A
-
-/* Define the main task's stack size */
-#define STACK_SIZE      (NU_MIN_STACK_SIZE * 400)
-
-/* Define the main task's priority */
-#define TASK_PRIORITY   26
-
-/* Define the main task's time slice */
-#define TASK_SLICE      20
-
-#define EPT_TEST_ADDR      59
-
-#define NUM_TEST_EPS       4
-
-#define MAX_RPMSG_BUFF_SIZE 512
-#define PAYLOAD_MIN_SIZE    1
-#define PAYLOAD_MAX_SIZE    (MAX_RPMSG_BUFF_SIZE - 24)
-#define NUM_PAYLOADS        (PAYLOAD_MAX_SIZE/PAYLOAD_MIN_SIZE)
-
-struct _payload {
-    unsigned long    num;
-    unsigned long    size;
-    char             data[0];
-}__attribute__((__packed__));
-
-
-#endif /* M_EPT_FUNC_TEST_H_ */
index 7f101a78040edfa086b2e83147d90008fd2c01a5..03b6ddbe94d22955f7d4b6e14bf6a630d8a88161 100644 (file)
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-#ifndef MEMF_H_\r
-#define MEMF_H_\r
+#ifndef OPEN_AMP_H_\r
+#define OPEN_AMP_H_\r
 \r
 #include "../rpmsg/rpmsg.h"\r
 #include "../remoteproc/remoteproc.h"\r
 \r
 \r
-#endif /* MEMF_H_ */\r
+#endif /* OPEN_AMP_H_ */\r
index 9c28005fa2747df38c7bd455c9a80f7545f22a8d..0a8e95750d5d919b1fe9ece8236a632fc84d1801 100644 (file)
@@ -27,7 +27,7 @@
  * POSSIBILITY OF SUCH DAMAGE.\r
  */\r
 \r
-/* This file populates resource table for Nucleus and BM remotes\r
+/* This file populates resource table for BM remote\r
  * for use by the Linux Master */\r
 \r
 #include <stddef.h>\r
diff --git a/libs/system/zc702evk/linux/scripts/makefiles/echo_test_nucleus_fw/Makefile b/libs/system/zc702evk/linux/scripts/makefiles/echo_test_nucleus_fw/Makefile
deleted file mode 100644 (file)
index 90ace3c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-include $(PETALINUX)/components/apps/apps.common.mk
-FIRMWARE=firmware
-install:
-       $(TARGETINST) -d data/$(FIRMWARE) /lib/firmware/zc702evk/nucleus/echo_test/$(FIRMWARE)
-
diff --git a/libs/system/zc702evk/linux/scripts/makefiles/mat_mul_nucleus_fw/Makefile b/libs/system/zc702evk/linux/scripts/makefiles/mat_mul_nucleus_fw/Makefile
deleted file mode 100644 (file)
index 25ee0a4..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-include $(PETALINUX)/components/apps/apps.common.mk
-FIRMWARE=firmware
-install:
-       $(TARGETINST) -d data/$(FIRMWARE) /lib/firmware/zc702evk/nucleus/matrix_multiply/$(FIRMWARE)
index 975a0f9a38258d636d447b16e4b03b653027b5fd..aedf46fefd32305d73c58fef22fc401bad74940e 100644 (file)
@@ -2,4 +2,4 @@
 This folder contains makefiles for PetaLinux applicatiosn and modules 
 which need to be updated before the build process. These files are only
 for the process of build automation and do not constitute the standard 
-part of MEMF.
+part of OpenAMP.
diff --git a/libs/system/zc702evk/linux/scripts/makefiles/rpc_demo_nucleus_fw/Makefile b/libs/system/zc702evk/linux/scripts/makefiles/rpc_demo_nucleus_fw/Makefile
deleted file mode 100644 (file)
index b029478..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-include $(PETALINUX)/components/apps/apps.common.mk
-FIRMWARE=firmware
-install:
-       $(TARGETINST) -d data/$(FIRMWARE) /lib/firmware/zc702evk/nucleus/rpc_demo/$(FIRMWARE)
index 856a2f3ee8dad0a3497c612ae82475190931878a..47aa45335bf70cb12bdf5454ed33cc293625ae43 100644 (file)
@@ -1,10 +1,8 @@
-
 # This scripts automates the process of PetaLinux project creation.
-
 PRESENT=$(pwd)
 
 if [ "$1" == "master" ]; then
-       
+
        # Change directory to the master PetaLinux project directory
        cd "$2"
 
@@ -64,30 +62,6 @@ if [ "$1" == "master" ]; then
 
        #Firmware Installation
 
-       #Nucleus Matrix Multiply Sample
-       
-       petalinux-create -t apps --template install -n mat_mul_nucleus_fw --enable
-
-       cp $OPENAMP/apps/firmware/zc702evk/nucleus/matrix_multiply/firmware ./components/apps/mat_mul_nucleus_fw/data/firmware
-
-       cp $OPENAMP/libs/system/zc702evk/linux/scripts/makefiles/mat_mul_nucleus_fw/Makefile ./components/apps/mat_mul_nucleus_fw/Makefile
-
-       #Nucleus Echo Test
-
-       petalinux-create -t apps --template install -n echo_test_nucleus_fw --enable
-       cp $OPENAMP/apps/firmware/zc702evk/nucleus/echo_test/firmware ./components/apps/echo_test_nucleus_fw/data/firmware
-
-       cp $OPENAMP/libs/system/zc702evk/linux/scripts/makefiles/echo_test_nucleus_fw/Makefile ./components/apps/echo_test_nucleus_fw/Makefile
-       
-       #Nucleus RPC Demo
-
-       petalinux-create -t apps --template install -n rpc_demo_nucleus_fw --enable
-
-       cp $OPENAMP/apps/firmware/zc702evk/nucleus/rpc_demo/firmware ./components/apps/rpc_demo_nucleus_fw/data/firmware
-
-       cp $OPENAMP/libs/system/zc702evk/linux/scripts/makefiles/rpc_demo_nucleus_fw/Makefile ./components/apps/rpc_demo_nucleus_fw/Makefile
-
        #Bare-metal Matrix Multiply Sample
 
        petalinux-create -t apps --template install -n mat_mul_baremetal_fw --enable
@@ -170,3 +144,4 @@ fi
 
 # Return
 cd $PRESENT
+
diff --git a/libs/system/zc702evk/nucleus/arch/arm/arch.h b/libs/system/zc702evk/nucleus/arch/arm/arch.h
deleted file mode 100644 (file)
index 545d0c1..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/***********************************************************************\r
-*\r
-*             Copyright 2010 Mentor Graphics Corporation\r
-*                         All Rights Reserved.\r
-*\r
-* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS\r
-* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS\r
-* SUBJECT TO LICENSE TERMS.\r
-*\r
-************************************************************************\r
-\r
-************************************************************************\r
-*\r
-*   FILE NAME\r
-*\r
-*       arch.h\r
-*\r
-*   DESCRIPTION\r
-*\r
-*       This file is a wrapper header file that includes all the necessary\r
-*       header files for the given architecture\r
-*\r
-*   DATA STRUCTURES\r
-*\r
-*       None\r
-*\r
-*   DEPENDENCIES\r
-*\r
-*       None\r
-*\r
-***********************************************************************/\r
-\r
-#ifndef ARCH_H\r
-#define ARCH_H\r
-\r
-/* Include configuration header file */\r
-#include    "nucleus_gen_cfg.h"\r
-\r
-/* Include ARM common header files */\r
-#include    "arm_debug_defs.h"\r
-#include    "arm_defs.h"\r
-#include    "arm_mmu_defs.h"\r
-\r
-#endif  /* ARCH_H */\r
diff --git a/libs/system/zc702evk/nucleus/arch/arm/arm_debug_defs.h b/libs/system/zc702evk/nucleus/arch/arm/arm_debug_defs.h
deleted file mode 100644 (file)
index 161d3c6..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-/***********************************************************************\r
-*\r
-*             Copyright 2006 Mentor Graphics Corporation\r
-*                         All Rights Reserved.\r
-*\r
-* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS\r
-* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS\r
-* SUBJECT TO LICENSE TERMS.\r
-*\r
-************************************************************************\r
-\r
-************************************************************************\r
-*\r
-*   FILE NAME\r
-*\r
-*       arm_debug_defs.h\r
-*\r
-*   DESCRIPTION\r
-*\r
-*       This file contains all definitions, structures, etc for the\r
-*       ARM Debug.\r
-*\r
-*   DATA STRUCTURES\r
-*\r
-*       None\r
-*\r
-*   DEPENDENCIES\r
-*\r
-*       None\r
-*\r
-***********************************************************************/\r
-\r
-#ifndef         ARM_DEBUG_DEFS_H\r
-#define         ARM_DEBUG_DEFS_H\r
-\r
-/* External functions */\r
-extern VOID     ESAL_AR_DBG_Exception_Exit(VOID);\r
-\r
-/* Debug Support flags */\r
-#define         ESAL_GE_DBG_SUPPORT_HW_STEP         (0x1 << 0)\r
-\r
-/* Protocol specific register model definitions */\r
-#define         NU_REG_RSP_MODE                   1               \r
-#define         NU_REG_MDP_MODE                   2\r
-\r
-/* Remote Serial Protocol for GNU Debugger */\r
-#define         ESAL_AR_DBG_RSP_NUM_REGS            26\r
-#define         ESAL_AR_DBG_RSP_BLOCK_REGS          16\r
-#define         ESAL_AR_DBG_STACK_PTR_REGID         13\r
-#define         ESAL_AR_DBG_PC_IDX_REGID            15\r
-\r
-/* Register Mapping values (positive values are register offsets) */\r
-#define         ESAL_AR_DBG_REG_NOT_MAPPED      -1\r
-#define         ESAL_AR_DBG_REG_STACK_POINTER   -2\r
-\r
-/* Register definition */\r
-#define         ESAL_AR_DBG_REG_R0                  0x00\r
-#define         ESAL_AR_DBG_REG_R1                  0x01\r
-#define         ESAL_AR_DBG_REG_R2                  0x02\r
-#define         ESAL_AR_DBG_REG_R3                  0x03\r
-#define         ESAL_AR_DBG_REG_R4                  0x04\r
-#define         ESAL_AR_DBG_REG_R5                  0x05\r
-#define         ESAL_AR_DBG_REG_R6                  0x06\r
-#define         ESAL_AR_DBG_REG_R7                  0x07\r
-#define         ESAL_AR_DBG_REG_R8                  0x08\r
-#define         ESAL_AR_DBG_REG_R9                  0x09\r
-#define         ESAL_AR_DBG_REG_R10                 0x0A\r
-#define         ESAL_AR_DBG_REG_R11                 0x0B\r
-#define         ESAL_AR_DBG_REG_R12                 0x0C\r
-#define         ESAL_AR_DBG_REG_R13                 0x0D\r
-#define         ESAL_AR_DBG_REG_R14                 0x0E\r
-#define         ESAL_AR_DBG_REG_R15                 0x0F\r
-#define         ESAL_AR_DBG_REG_FPR0                0x10\r
-#define         ESAL_AR_DBG_REG_FPR1                0x11\r
-#define         ESAL_AR_DBG_REG_FPR2                0x12\r
-#define         ESAL_AR_DBG_REG_FPR3                0x13\r
-#define         ESAL_AR_DBG_REG_FPR4                0x14\r
-#define         ESAL_AR_DBG_REG_FPR5                0x15\r
-#define         ESAL_AR_DBG_REG_FPR6                0x16\r
-#define         ESAL_AR_DBG_REG_FPR7                0x17\r
-#define         ESAL_AR_DBG_REG_FPS                 0x18\r
-#define         ESAL_AR_DBG_REG_CPSR                0x19\r
-\r
-/* Number of maximum registers in stack frame */\r
-#define         ESAL_AR_DBG_NUM_REGS                ESAL_AR_DBG_RSP_NUM_REGS\r
-\r
-/* Number of expedited registers */\r
-#define         ESAL_AR_DBG_EXP_NUM_REGS            3\r
-\r
-/* breakpoint instructions for specific instruction replacement */\r
-#define         ESAL_AR_DBG_ARM_BRK_OPCODE          0xE7FDDEFE\r
-#define         ESAL_AR_DBG_THUMB_BRK_OPCODE        0x0000DEFE\r
-\r
-/* NOP instructions for specific instruction replacement */\r
-#define         ESAL_AR_DBG_ARM_NOP_OPCODE          0xE1A00000 \r
-#define         ESAL_AR_DBG_THUMB_NOP_OPCODE        0x1C00\r
-\r
-/* Define flags for PSR */\r
-#define         ESAL_AR_DBG_PSR_N                   ESAL_GE_MEM_32BIT_SET(31)\r
-#define         ESAL_AR_DBG_PSR_Z                   ESAL_GE_MEM_32BIT_SET(30)\r
-#define         ESAL_AR_DBG_PSR_C                   ESAL_GE_MEM_32BIT_SET(29)\r
-#define         ESAL_AR_DBG_PSR_V                   ESAL_GE_MEM_32BIT_SET(28)\r
-#define         ESAL_AR_DBG_PSR_Q                   ESAL_GE_MEM_32BIT_SET(27) \r
-#define         ESAL_AR_DBG_PSR_I                   ESAL_GE_MEM_32BIT_SET(7)\r
-#define         ESAL_AR_DBG_PSR_F                   ESAL_GE_MEM_32BIT_SET(6)\r
-#define         ESAL_AR_DBG_PSR_T                   ESAL_GE_MEM_32BIT_SET(5)\r
-#define         ESAL_AR_DBG_PSR_M                   0x0000001f\r
-#define         ESAL_AR_DBG_PSR_M32                 0x00000010\r
-#define         ESAL_AR_DBG_PSR_M_USER              0x00000000\r
-#define         ESAL_AR_DBG_PSR_M_FIQ               0x00000001\r
-#define         ESAL_AR_DBG_PSR_M_IRQ               0x00000002\r
-#define         ESAL_AR_DBG_PSR_M_SVC               0x00000003\r
-#define         ESAL_AR_DBG_PSR_M_ABORT             0x00000007\r
-#define         ESAL_AR_DBG_PSR_M_UNDEF             0x0000000b\r
-#define         ESAL_AR_DBG_PSR_M_SYSTEM            0x0000000f\r
-#define         ESAL_AR_DBG_PSR_32_IF               (ESAL_ARM_PSR_I+ESAL_ARM_PSR_F)\r
-\r
-/* Macro definitions for helping decoding instruction */\r
-#define         ESAL_AR_DBG_ToPsr(x)                  (((x) & ~ESAL_AR_DBG_ARM_PSR_32_IF) | (((x) & ESAL_AR_DBG_ARM_PSR_32_IF) << 20))\r
-#define         ESAL_AR_DBG_PcplusPsr(pc_val, psr_val)((psr_val & ESAL_AR_DBG_ARM_PSR_M32) ? (pc_val) : \\r
-                                                                   (pc_val) | ESAL_AR_DBG_ToPsr(psr_val))\r
-\r
-/* Defines ARM shift type */\r
-typedef enum\r
-{\r
-    ESAL_ST_LSL, \r
-    ESAL_ST_LSR, \r
-    ESAL_ST_ASR, \r
-    ESAL_ST_ROR\r
-\r
-} ESAL_AR_DBG_SHIFT_TYPE;\r
-\r
-/* Define Opcode type */\r
-typedef         UINT32                              ESAL_AR_DBG_OPCODE;\r
-\r
-/* Define Register type */\r
-typedef         UINT32                              ESAL_AR_DBG_REG;\r
-\r
-#endif  /* ARM_DEBUG_DEFS_H */\r
diff --git a/libs/system/zc702evk/nucleus/arch/arm/arm_defs.h b/libs/system/zc702evk/nucleus/arch/arm/arm_defs.h
deleted file mode 100644 (file)
index a1c5856..0000000
+++ /dev/null
@@ -1,345 +0,0 @@
-/***********************************************************************\r
-*\r
-*             Copyright 2006 Mentor Graphics Corporation\r
-*                         All Rights Reserved.\r
-*\r
-* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS\r
-* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS\r
-* SUBJECT TO LICENSE TERMS.\r
-*\r
-************************************************************************\r
-\r
-************************************************************************\r
-*\r
-*   FILE NAME\r
-*\r
-*       arm_defs.h\r
-*\r
-*   DESCRIPTION\r
-*\r
-*       This file contains all definitions, structures, etc for the\r
-*       base ARM architecture.\r
-*\r
-*   DATA STRUCTURES\r
-*\r
-*       None\r
-*\r
-*   DEPENDENCIES\r
-*\r
-*       None\r
-*\r
-***********************************************************************/\r
-\r
-#ifndef         ARM_DEFS_H\r
-#define         ARM_DEFS_H\r
-\r
-/* Define if the OS timer is part of the architecture (NU_TRUE)\r
-   NOTE:  The OS timer can be located at only one of the following levels of\r
-          abstraction: the processor level or the architecture level. \r
-          If ESAL_AR_OS_TIMER_USED is NU_TRUE, the OS timer is contained\r
-          within the architecture.  If ESAL_AR_OS_TIMER_USED is NU_FALSE,\r
-          the OS timer is contained within the processor component. */\r
-#define         ESAL_AR_OS_TIMER_USED                   NU_FALSE\r
-\r
-/* Define if architecture supports unaligned 16-bit accesses to memory. */\r
-#define         ESAL_AR_UNALIGNED_16BIT_SPT             NU_FALSE\r
-\r
-/* Define if architecture supports unaligned 32-bit accesses to memory. */\r
-#define         ESAL_AR_UNALIGNED_32BIT_SPT             NU_FALSE\r
-\r
-/* Define number of accesses required to read or write a pointer */\r
-#define         ESAL_AR_PTR_ACCESS                      1\r
-\r
-/* Define number of accesses required to read or write a 32-bit value */\r
-#define         ESAL_AR_32BIT_ACCESS                    1\r
-\r
-/* Size, in bytes, of architecture system stack.  This stack will be\r
-   utilized when servicing interrupts. */\r
-#define         ESAL_AR_SYSTEM_STACK_SIZE               CFG_NU_OS_ARCH_ARM_COM_SYSTEM_STACK_SIZE\r
-\r
-#if (CFG_NU_OS_ARCH_ARM_COM_FPU_SUPPORT == 2)\r
-\r
-/* Define number of single-precision floating point registers */\r
-#define         ESAL_AR_STK_NUM_FPU_REGS                64\r
-\r
-#else\r
-\r
-/* Define number of single-precision floating point registers */\r
-#define         ESAL_AR_STK_NUM_FPU_REGS                32\r
-\r
-#endif /* (CFG_NU_OS_ARCH_ARM_COM_FPU_SUPPORT == 2) */\r
-\r
-/* Define number of single-precision floating point registers required to\r
-   be saved within a toolset stack frame (s16-s31) */\r
-#define         ESAL_TS_STK_NUM_FPU_REGS                16\r
-\r
-/* Define bit mask used to determine if THUMB state for a given code pointer */\r
-#define         ESAL_AR_STK_THUMB_MASK                  ESAL_GE_MEM_32BIT_SET(0)\r
-\r
-/* Define stack frame structure for minimum architecture registers required\r
-   to be saved in order to enter a C environment during in interrupt / exception.\r
-   These registers are the "scratch" registers that will not be preserved across \r
-   a function call boundary and any interrupt state registers that must preserved\r
-   to allow interrupt nesting. */\r
-typedef struct\r
-{\r
-    UINT32              r0;\r
-    UINT32              r1;\r
-    UINT32              r2;\r
-    UINT32              r3;\r
-    UINT32              r12;\r
-    UINT32              spsr;    \r
-    UINT32              lr;\r
-    UINT32              rtn_address;\r
-\r
-} ESAL_AR_STK_MIN;\r
-\r
-/* Define stack frame structure for the architecture supported. \r
-   This stack frame contains all registers that must be preserved\r
-   across an (unsolicited) interrupt context switch.\r
-   NOTE:  This stack frame includes the minimum stack frame\r
-          defined above AND all other registers for the given\r
-          architecture. */\r
-typedef struct  ESAL_AR_STK_STRUCT\r
-{\r
-    UINT32              stack_type;\r
-    UINT32              r4;\r
-    UINT32              r5;\r
-    UINT32              r6;\r
-    UINT32              r7;\r
-    UINT32              r8;\r
-    UINT32              r9;\r
-    UINT32              r10;\r
-    UINT32              r11;\r
-\r
-#if (CFG_NU_OS_ARCH_ARM_COM_FPU_SUPPORT > 0)\r
-\r
-    UINT32              fpscr;\r
-    UINT32              s[ESAL_AR_STK_NUM_FPU_REGS];\r
-\r
-#endif  /* CFG_NU_OS_ARCH_ARM_COM_FPU_SUPPORT > 0 */\r
-\r
-    ESAL_AR_STK_MIN     min_stack;\r
-\r
-} ESAL_AR_STK;\r
-\r
-/* Define stack frame structure for the toolset / architecture supported. */\r
-typedef struct  ESAL_TS_STK_STRUCT\r
-{\r
-    UINT32          stack_type;\r
-    UINT32          r4;\r
-    UINT32          r5;\r
-    UINT32          r6;\r
-    UINT32          r7;\r
-    UINT32          r8;\r
-    UINT32          r9;\r
-    UINT32          r10;\r
-    UINT32          r11;\r
-    UINT32          rtn_address;\r
-\r
-#if (CFG_NU_OS_ARCH_ARM_COM_FPU_SUPPORT > 0)\r
-\r
-    UINT32          fpscr;\r
-    UINT32          s[ESAL_TS_STK_NUM_FPU_REGS];\r
-\r
-#endif  /* CFG_NU_OS_ARCH_ARM_COM_FPU_SUPPORT > 0 */\r
-\r
-} ESAL_TS_STK;\r
-\r
-/* Coprocessor registers */\r
-#define         ESAL_TS_RTE_CP0                 p0\r
-#define         ESAL_TS_RTE_CP1                 p1\r
-#define         ESAL_TS_RTE_CP2                 p2\r
-#define         ESAL_TS_RTE_CP3                 p3\r
-#define         ESAL_TS_RTE_CP4                 p4\r
-#define         ESAL_TS_RTE_CP5                 p5\r
-#define         ESAL_TS_RTE_CP6                 p6\r
-#define         ESAL_TS_RTE_CP7                 p7\r
-#define         ESAL_TS_RTE_CP8                 p8\r
-#define         ESAL_TS_RTE_CP9                 p9\r
-#define         ESAL_TS_RTE_CP10                p10\r
-#define         ESAL_TS_RTE_CP11                p11\r
-#define         ESAL_TS_RTE_CP12                p12\r
-#define         ESAL_TS_RTE_CP13                p13\r
-#define         ESAL_TS_RTE_CP14                p14\r
-#define         ESAL_TS_RTE_CP15                p15\r
-\r
-/* CRn and CRm register values */\r
-#define         ESAL_TS_RTE_C0                  c0\r
-#define         ESAL_TS_RTE_C1                  c1\r
-#define         ESAL_TS_RTE_C2                  c2\r
-#define         ESAL_TS_RTE_C3                  c3\r
-#define         ESAL_TS_RTE_C4                  c4\r
-#define         ESAL_TS_RTE_C5                  c5\r
-#define         ESAL_TS_RTE_C6                  c6\r
-#define         ESAL_TS_RTE_C7                  c7\r
-#define         ESAL_TS_RTE_C8                  c8\r
-#define         ESAL_TS_RTE_C9                  c9\r
-#define         ESAL_TS_RTE_C10                 c10\r
-#define         ESAL_TS_RTE_C11                 c11\r
-#define         ESAL_TS_RTE_C12                 c12\r
-#define         ESAL_TS_RTE_C13                 c13\r
-#define         ESAL_TS_RTE_C14                 c14\r
-#define         ESAL_TS_RTE_C15                 c15\r
-\r
-/* Size, in bytes, of architecture exception stack.  This stack will be\r
-   utilized when servicing exceptions. */\r
-#define         ESAL_AR_EXCEPTION_STACK_SIZE            2048\r
-\r
-/* Define if interrupt servicing initialization is required at the \r
-   architecture level. */\r
-#define         ESAL_AR_ISR_INIT_REQUIRED               NU_TRUE\r
-\r
-/* Define if architecture mandates that all interrupt handlers perform a\r
-   "return from interrupt" (RTI) instruction in order for the hardware to\r
-   correctly restore the state of execution to the pre-interrupt condition.\r
-   NOTE:  Most architectures allow the state of execution to be restored \r
-          without needing to perform an RTI.  In most cases, this will be set \r
-          to NU_FALSE */\r
-#define         ESAL_AR_ISR_RTI_MANDATORY               NU_FALSE\r
-\r
-/* Define bit values for the architecture's status register / machine state register /\r
-   etc that are used to enable and disable interrupts for the given architecture. */\r
-#define         ESAL_AR_INTERRUPTS_DISABLE_BITS         0x000000C0\r
-#define         ESAL_AR_INTERRUPTS_ENABLE_BITS          0x00000000\r
-\r
-/* CPSR bit defines / masks */\r
-#define         ESAL_AR_INT_CPSR_THUMB                  ESAL_GE_MEM_32BIT_SET(5)\r
-#define         ESAL_AR_INT_CPSR_MODE_MASK              0x0000001F\r
-#define         ESAL_AR_INT_CPSR_SYS_MODE               0x0000001F\r
-#define         ESAL_AR_INT_CPSR_IRQ_MODE               0x00000012\r
-#define         ESAL_AR_INT_CPSR_FIQ_MODE               0x00000011\r
-#define         ESAL_AR_INT_CPSR_SUP_MODE               0x00000013\r
-#define         ESAL_AR_INT_CPSR_E_BIT                  0x00000200 \r
-#define         ESAL_AR_INT_CPSR_IRQ_BIT                ESAL_GE_MEM_32BIT_SET(7)\r
-#define         ESAL_AR_INT_CPSR_FIQ_BIT                ESAL_GE_MEM_32BIT_SET(6)\r
-#define         ESAL_AR_INT_CPSR_SYS_DISABLED           (ESAL_AR_INT_CPSR_SYS_MODE |     \\r
-                                                        ESAL_AR_INTERRUPTS_DISABLE_BITS)\r
-\r
-/* Defines used to specify an interrupt source type as FIQ or IRQ.  This value\r
-   can be bitwise OR'd with the priority field when enabling an interrupt source via\r
-   the ESAL_GE_INT_Enable API to specify if an interrupt will be routed as an FIQ or IRQ.\r
-   The default for all interrupt sources is IRQ routed (interrupt will be IRQ routed if\r
-   no value is bitwise OR'd with the priority).\r
-   NOTE:  This operation is not supported by all ARM processor implementations - some \r
-          processors allow any interrupt source to be either FIQ or IRQ while other\r
-          do not allow this functionality. */\r
-#define         ESAL_AR_INT_IRQ_ROUTED                  (INT)0x00001000\r
-#define         ESAL_AR_INT_FIQ_ROUTED                  (INT)0x00002000\r
-\r
-/* Define ESAL interrupt vector IDs for this architecture.\r
-   These IDs match up with architecture interrupts.\r
-   Values correspond to the index of entries in ESAL_GE_ISR_Interrupt_Handler[].\r
-   Names are of the form ESAL_AR_<Name>_INT_VECTOR_ID, where <Name> comes\r
-   directly from the hardware documentation */\r
-#define         ESAL_AR_IRQ_INT_VECTOR_ID               0\r
-#define         ESAL_AR_FIQ_INT_VECTOR_ID               1\r
-\r
-/* Define the last ESAL interrupt vector ID for this architecture + 1 */\r
-#define         ESAL_AR_INT_VECTOR_ID_DELIMITER         (ESAL_AR_FIQ_INT_VECTOR_ID + 1)\r
-\r
-/* Define ESAL exception vector IDs for the architecture.\r
-   These IDs match up with architecture exceptions.\r
-   Values correspond to the index of entries in ESAL_GE_ISR_Exception_Handler[].\r
-   Names are of the form ESAL_AR_<Name>_EXCEPT_VECTOR_ID, where <Name> comes\r
-   directly from the hardware documentation */\r
-#define         ESAL_AR_UNDEF_EXCEPT_VECTOR_ID          0\r
-#define         ESAL_AR_SWI_EXCEPT_VECTOR_ID            1\r
-#define         ESAL_AR_PREFETCH_EXCEPT_VECTOR_ID       2\r
-#define         ESAL_AR_DATA_EXCEPT_VECTOR_ID           3\r
-\r
-/* Define the last ESAL exception vector ID for this architecture + 1 */\r
-#define         ESAL_AR_EXCEPT_VECTOR_ID_DELIMITER      (ESAL_AR_DATA_EXCEPT_VECTOR_ID + 1)\r
-\r
-/* Define variable(s) required to save / restore architecture interrupt state.\r
-   These variable(s) are used in conjunction with the ESAL_AR_INT_ALL_DISABLE() and\r
-   ESAL_AR_INT_ALL_RESTORE() macros to hold any data that must be preserved in\r
-   order to allow these macros to function correctly. */\r
-#define         ESAL_AR_INT_CONTROL_VARS                INT  esal_ar_int_tmp;\r
-\r
-/* This macro locks out interrupts and saves the current\r
-   architecture status register / state register to the specified\r
-   address.  This function does not attempt to mask any bits in\r
-   the return register value and can be used as a quick method\r
-   to guard a critical section.\r
-   NOTE:  This macro is used in conjunction with ESAL_AR_INT_ALL_RESTORE\r
-          defined below and ESAL_AR_INT_CONTROL_VARS defined above. */\r
-#define         ESAL_AR_INT_ALL_DISABLE()                                       \\r
-                {                                                               \\r
-                    ESAL_TS_RTE_CPSR_CXSF_READ(&esal_ar_int_tmp);               \\r
-                    ESAL_TS_RTE_CPSR_C_WRITE(ESAL_AR_INT_CPSR_SYS_DISABLED);    \\r
-                }\r
-\r
-/* This macro restores the architecture status / state register\r
-   used to lockout interrupts to the value provided.  The\r
-   intent of this function is to be a fast mechanism to restore the\r
-   interrupt level at the end of a critical section to its\r
-   original level.\r
-   NOTE:  This macro is used in conjunction with ESAL_AR_INT_ALL_DISABLE\r
-          and ESAL_AR_INT_CONTROL_VARS defined above. */\r
-#define         ESAL_AR_INT_ALL_RESTORE()                                       \\r
-                {                                                               \\r
-                    ESAL_TS_RTE_CPSR_CXSF_WRITE(esal_ar_int_tmp);               \\r
-                }\r
-\r
-/* This macro locks-out interrupts but doesn't save the status\r
-   register / control register value. */\r
-#define         ESAL_AR_INT_FAST_ALL_DISABLE()                                  \\r
-                {                                                               \\r
-                    ESAL_TS_RTE_CPSR_C_WRITE(ESAL_AR_INT_CPSR_SYS_DISABLED);    \\r
-                }\r
-\r
-/* This macro unlocks interrupts but doesn't save the status\r
-   register / control register value. */\r
-#define         ESAL_AR_INT_FAST_ALL_ENABLE()                                   \\r
-                {                                                               \\r
-                    ESAL_TS_RTE_CPSR_C_WRITE(ESAL_AR_INT_CPSR_SYS_MODE);        \\r
-                }\r
-\r
-/* This macro sets the interrupt related bits in the status register / control\r
-   register to the specified value. */\r
-#define         ESAL_AR_INT_BITS_SET(set_bits)                                  \\r
-                {                                                               \\r
-                    INT     tmp_val;                                            \\r
-                                                                                \\r
-                    ESAL_TS_RTE_CPSR_CXSF_READ(&tmp_val);                       \\r
-                    tmp_val &= ~ESAL_AR_INTERRUPTS_DISABLE_BITS;                \\r
-                    tmp_val |= set_bits;                                        \\r
-                    ESAL_TS_RTE_CPSR_CXSF_WRITE(tmp_val);                       \\r
-                }\r
-\r
-/* This macro gets the interrupt related bits from the status register / control\r
-   register. */\r
-#define         ESAL_AR_INT_BITS_GET(get_bits_ptr)                              \\r
-                {                                                               \\r
-                    INT     tmp_val;                                            \\r
-                                                                                \\r
-                    ESAL_TS_RTE_CPSR_CXSF_READ(&tmp_val);                       \\r
-                    tmp_val &= ESAL_AR_INTERRUPTS_DISABLE_BITS;                 \\r
-                    *get_bits_ptr = tmp_val;                                    \\r
-                }\r
-\r
-/* Vector table address for ARM when running from ROM */\r
-#define         ESAL_AR_ISR_VECTOR_TABLE_DEST_ADDR_ROM      0x00000000\r
-\r
-/* Size of ARM vector table (in bytes) */\r
-#define         ESAL_AR_ISR_VECTOR_TABLE_SIZE               64\r
-\r
-/* Number of 32-bit registers saved on interrupt stack */\r
-#define         ESAL_AR_ISR_STACK_SIZE                      3\r
-\r
-/* Size, in bytes, of supervisor stack */\r
-#define         ESAL_AR_ISR_SUP_STACK_SIZE                  256\r
-\r
-/* Define breakpoint instruction used for XScale \r
-   processors (after vector table installation) */\r
-#define         ESAL_AR_ISR_XSCALE_VECT_INSTALL_BRK         0x1234\r
-\r
-/* Determines where the ISR nesting counter is incremented.  \r
-   When set to 0 the increment occurs in assembly files, when \r
-   set to 1 the increment will occur in c files. */\r
-#define         ESAL_AR_ISR_INCREMENT_IN_C                  NU_TRUE\r
-\r
-\r
-#endif  /* ARM_DEFS_H */\r
-\r
diff --git a/libs/system/zc702evk/nucleus/arch/arm/arm_mmu_defs.h b/libs/system/zc702evk/nucleus/arch/arm/arm_mmu_defs.h
deleted file mode 100644 (file)
index f81945b..0000000
+++ /dev/null
@@ -1,775 +0,0 @@
-/***********************************************************************\r
-*\r
-*             Copyright 2006 Mentor Graphics Corporation\r
-*                         All Rights Reserved.\r
-*\r
-* THIS WORK CONTAINS TRADE SECRET AND PROPRIETARY INFORMATION WHICH IS\r
-* THE PROPERTY OF MENTOR GRAPHICS CORPORATION OR ITS LICENSORS AND IS\r
-* SUBJECT TO LICENSE TERMS.\r
-*\r
-************************************************************************\r
-\r
-************************************************************************\r
-*\r
-*   FILE NAME\r
-*\r
-*       arm_mmu_defs.h\r
-*\r
-*   DESCRIPTION\r
-*\r
-*       This file contains all definitions, structures, etc for the\r
-*       ARM MMU.\r
-*\r
-*   DATA STRUCTURES\r
-*\r
-*       None\r
-*\r
-*   DEPENDENCIES\r
-*\r
-*       None\r
-*\r
-***********************************************************************/\r
-\r
-#ifndef     ARM_MMU_DEFS_H\r
-#define     ARM_MMU_DEFS_H\r
-\r
-/* Define core cache availability\r
-   NOTE:  A differentiation is made in ESAL between cache that\r
-          is contained on a processor and cache that is\r
-          inherent as part of a core (L2 vs L1 cache). */\r
-#define     ESAL_CO_CACHE_AVAILABLE                 NU_TRUE\r
-\r
-/*********************************************\r
-* ARM v4/5 & v6/7 MMU Variant definitions\r
-*********************************************/\r
-\r
-#if (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT != 2)\r
-\r
-/* Translation table is 16K in size */\r
-#define     ESAL_CO_MEM_TTB_SIZE                    ESAL_GE_MEM_16K\r
-\r
-/* Each TTB descriptor covers a 1MB region */\r
-#define     ESAL_CO_MEM_TTB_SECT_SIZE               ESAL_GE_MEM_1M\r
-\r
-/* Mask off lower bits of addr */\r
-#define     ESAL_CO_MEM_TTB_SECT_SIZE_MASK          (~(ESAL_CO_MEM_TTB_SECT_SIZE-1UL))\r
-\r
-/* Define shift to convert memory address to index of translation table entry (descriptor).\r
-   Shift 20 bits (for a 1MB section) - 2 bits (for a 4 byte TTB descriptor) */\r
-#define     ESAL_CO_MEM_TTB_SECT_TO_DESC_SHIFT      (20-2)\r
-\r
-/* Define domain access values */\r
-#define     ESAL_CO_MEM_DOMAIN_D0_MANAGER_ACCESS    0x3\r
-\r
-#define     ESAL_CO_MEM_TTB_DESC_BACKWARDS          ESAL_GE_MEM_32BIT_SET(4)\r
-#define     ESAL_CO_MEM_TTB_DESC_AP_MANAGER        (ESAL_GE_MEM_32BIT_SET(10)        |          \\r
-                                                    ESAL_GE_MEM_32BIT_SET(11))\r
-#define     ESAL_CO_MEM_TTB_DESC_SECT               ESAL_GE_MEM_32BIT_SET(1)\r
-\r
-/* Define translation table descriptor bits */\r
-#define     ESAL_CO_MEM_TTB_DESC_B                  ESAL_GE_MEM_32BIT_SET(2)\r
-#define     ESAL_CO_MEM_TTB_DESC_C                  ESAL_GE_MEM_32BIT_SET(3)\r
-#define     ESAL_CO_MEM_TTB_DESC_TEX                ESAL_GE_MEM_32BIT_SET(12)\r
-#define     ESAL_CO_MEM_TTB_DESC_S                  ESAL_GE_MEM_32BIT_SET(16)\r
-\r
-#endif /* (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT != 2) */\r
-\r
-/*********************************************\r
-* ARM v7-R MPU definitions\r
-*********************************************/\r
-#if (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT == 2)\r
-\r
-/* Define MPU region attribute bits. */\r
-#define     ESAL_CO_MEM_MPU_ATTR_B                  ESAL_GE_MEM_32BIT_SET(0)\r
-#define     ESAL_CO_MEM_MPU_ATTR_C                  ESAL_GE_MEM_32BIT_SET(1)\r
-#define     ESAL_CO_MEM_MPU_ATTR_S                  ESAL_GE_MEM_32BIT_SET(2)\r
-#define     ESAL_CO_MEM_MPU_ATTR_TEX                ESAL_GE_MEM_32BIT_SET(3)\r
-#define     ESAL_CO_MEM_MPU_AP_XN                   ESAL_GE_MEM_32BIT_SET(12)\r
-#define     ESAL_CO_MEM_MPU_AP_FULL                (ESAL_GE_MEM_32BIT_SET(8)        |          \\r
-                                                    ESAL_GE_MEM_32BIT_SET(9))\r
-#define     ESAL_CO_MEM_MPU_AP_RO                  (ESAL_GE_MEM_32BIT_SET(9)        |          \\r
-                                                    ESAL_GE_MEM_32BIT_SET(10))\r
-#define     ESAL_CO_MEM_MPU_REG_ENABLE              ESAL_GE_MEM_32BIT_SET(0)\r
-#define     ESAL_CO_MEM_MPU_REG_COUNT_MASK          0xFF00\r
-\r
-#endif /* (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT == 2) */\r
-\r
-/*********************************************\r
-* Common definitions\r
-*********************************************/\r
-/* Define CP15 Register 1: control register bits */\r
-#define     ESAL_CO_MEM_CP15_CTRL_V                ESAL_GE_MEM_32BIT_SET(13)\r
-#define     ESAL_CO_MEM_CP15_CTRL_I                ESAL_GE_MEM_32BIT_SET(12)\r
-#define     ESAL_CO_MEM_CP15_CTRL_Z                ESAL_GE_MEM_32BIT_SET(11)\r
-#define     ESAL_CO_MEM_CP15_CTRL_W                ESAL_GE_MEM_32BIT_SET(3)\r
-#define     ESAL_CO_MEM_CP15_CTRL_C                ESAL_GE_MEM_32BIT_SET(2)\r
-#define     ESAL_CO_MEM_CP15_CTRL_A                ESAL_GE_MEM_32BIT_SET(1)\r
-#define     ESAL_CO_MEM_CP15_CTRL_M                ESAL_GE_MEM_32BIT_SET(0)\r
-\r
-/* MVA Format SBZ mask */\r
-#define     ESAL_CO_MEM_MVA_SBZ_MASK             ~(ESAL_CO_MEM_CACHE_LINE_SIZE - 1UL)\r
-\r
-/* Defines related to Cache Level ID Register */\r
-#define     ESAL_CO_MEM_DCACHE_SIZE_SHIFT           16\r
-#define     ESAL_CO_MEM_CACHE_SIZE_BIT              4\r
-#define     ESAL_CO_MEM_CACHE_SIZE_MASK             0xF\r
-\r
-/*********************************************\r
-* ARM v4/5 MMU Variant definitions\r
-*********************************************/\r
-#if (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT  == 0)\r
-\r
-/* Define all access  (manager access permission / not cachable / not buffered)  */\r
-#define     ESAL_CO_MEM_TTB_DESC_ALL_ACCESS         (ESAL_CO_MEM_TTB_DESC_AP_MANAGER |  \\r
-                                                     ESAL_CO_MEM_TTB_DESC_BACKWARDS  |  \\r
-                                                     ESAL_CO_MEM_TTB_DESC_SECT)\r
-\r
-/* The size of each cache segment (in bytes) */\r
-#define     ESAL_CO_MEM_CACHE_LINE_SIZE             32\r
-\r
-/* Define the set and way sizes and bit shift values */\r
-#define     ESAL_CO_MEM_CACHE_WAY_SIZE              4\r
-#define     ESAL_CO_MEM_DSIZE_BITSHIFT              18\r
-#define     ESAL_CO_MEM_CACHE_SET_SHIFT             2\r
-#define     ESAL_CO_MEM_CACHE_WAY_SHIFT             30\r
-\r
-#if (ESAL_CO_CACHE_AVAILABLE == NU_TRUE)\r
-\r
-/* This macro invalidates all of the cache at the core level. */\r
-#define     ESAL_CO_MEM_CACHE_ALL_INVALIDATE()                          \\r
-            {                                                           \\r
-                ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,               \\r
-                                     0, ESAL_TS_RTE_C7,                 \\r
-                                     ESAL_TS_RTE_C7, 0);                \\r
-            }\r
-\r
-/* This macro invalidates all of the data cache at the core level. */\r
-#define     ESAL_CO_MEM_DCACHE_ALL_INVALIDATE()                         \\r
-            {                                                           \\r
-                ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,               \\r
-                                     0, ESAL_TS_RTE_C7,                 \\r
-                                     ESAL_TS_RTE_C6, 0);                \\r
-            }\r
-\r
-/* This macro flushes all data cache to physical memory (writeback cache)\r
-   and invalidates all data cache entries at the core level. */\r
-#define     ESAL_CO_MEM_DCACHE_ALL_FLUSH_INVAL()                        \\r
-            {                                                           \\r
-                UINT32  cache_nsets;                                    \\r
-                UINT32  cache_way;                                      \\r
-                UINT32  cache_val;                                      \\r
-                UINT32  cache_sets;                                     \\r
-                                                                        \\r
-                /* Get cache info */                                    \\r
-                ESAL_TS_RTE_CP_READ(ESAL_TS_RTE_CP15, 0, &cache_sets,   \\r
-                                    ESAL_TS_RTE_C0, ESAL_TS_RTE_C0, 1); \\r
-                                                                        \\r
-                /* Isolate data cache size bits */                      \\r
-                cache_sets >>= ESAL_CO_MEM_DSIZE_BITSHIFT;              \\r
-                cache_sets &= ESAL_CO_MEM_CACHE_SIZE_MASK;              \\r
-                                                                        \\r
-                /* Calculate number of sets from this size value */     \\r
-                cache_sets = (1UL << (cache_sets +                      \\r
-                                      ESAL_CO_MEM_CACHE_SET_SHIFT));    \\r
-                                                                        \\r
-                /* Loop through each cache way */                       \\r
-                for (cache_way = 0;                                     \\r
-                     cache_way < ESAL_CO_MEM_CACHE_WAY_SIZE;            \\r
-                     cache_way++)                                       \\r
-                {                                                       \\r
-                    /* Update the 'way' bit and clear the 'set' bits */ \\r
-                    cache_val = (cache_way << ESAL_CO_MEM_CACHE_WAY_SHIFT); \\r
-                                                                        \\r
-                    /* Loop through each cache set */                   \\r
-                    for (cache_nsets = 0;                               \\r
-                         cache_nsets < cache_sets;                      \\r
-                         cache_nsets++)                                 \\r
-                    {                                                   \\r
-                        /* Clean and invalidate the DCache */           \\r
-                        ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,       \\r
-                                             cache_val, ESAL_TS_RTE_C7, \\r
-                                             ESAL_TS_RTE_C14, 2);       \\r
-                                                                        \\r
-                        /* Move to the next cache 'set' */              \\r
-                        cache_val += ESAL_CO_MEM_CACHE_LINE_SIZE;       \\r
-                    }                                                   \\r
-                }                                                       \\r
-            }\r
-\r
-#endif  /* (ESAL_CO_CACHE_AVAILABLE == NU_TRUE) */\r
-\r
-#endif  /* (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT  == 0) */\r
-\r
-/*************************************************\r
-* ARM v6/7 MMU and ARMv7-R MPU Variant definitions\r
-*************************************************/\r
-#if (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT  != 0)\r
-\r
-/* Define all access  (manager access permission / not cachable / not bufferd)  */\r
-#define     ESAL_CO_MEM_TTB_DESC_ALL_ACCESS         (ESAL_CO_MEM_TTB_DESC_AP_MANAGER |          \\r
-                                                     ESAL_CO_MEM_TTB_DESC_SECT)\r
-\r
-/* The size of each cache segment (in bytes) */\r
-#define     ESAL_CO_MEM_CACHE_LINE_SIZE             (UINT)(CFG_NU_OS_ARCH_ARM_COM_V6V7_CACHE_LINE_SIZE)\r
-\r
-/* This mask is used to align the virtual address to cache line size */\r
-#define     ESAL_CO_MEM_ADDR_ALIGN_MASK             (~(ESAL_CO_MEM_CACHE_LINE_SIZE-1UL))\r
-\r
-/* CLIDR and CCSIDR mask values */\r
-#define     ESAL_CO_MEM_CLIDR_LOC_MASK              0x7000000\r
-#define     ESAL_CO_MEM_CCSIDR_LINESIZE_MASK        0x7\r
-#define     ESAL_CO_MEM_CCSIDR_ASSOC_MASK           0x3FF\r
-#define     ESAL_CO_MEM_CCSIDR_NUMSET_MASK          0x7FFF\r
-\r
-/* CLIDR and CCSIDR shift values */\r
-#define     ESAL_CO_MEM_CLIDR_LOC_RSHT_OFFSET       24\r
-#define     ESAL_CO_MEM_CCSIDR_ASSOC_RSHT_OFFSET    3\r
-#define     ESAL_CO_MEM_CCSIDR_NUMSET_RSHT_OFFSET   13\r
-\r
-/* Extract 'encoded' line length of the cache */\r
-#define     ESAL_CO_MEM_CCSIDR_LINESIZE_GET(ccsidr_reg) (ccsidr_reg &                           \\r
-                                                         ESAL_CO_MEM_CCSIDR_LINESIZE_MASK)\r
-\r
-/* Extract 'encoded' way size of the cache */\r
-#define     ESAL_CO_MEM_CCSIDR_ASSOC_GET(ccsidr_reg)    (ESAL_CO_MEM_CCSIDR_ASSOC_MASK &        \\r
-                                                        (ccsidr_reg >>                          \\r
-                                                         ESAL_CO_MEM_CCSIDR_ASSOC_RSHT_OFFSET))\r
-\r
-/* Extract 'encoded' maximum number of index size */\r
-#define     ESAL_CO_MEM_CCSIDR_NUMSET_GET(ccsidr_reg)   (ESAL_CO_MEM_CCSIDR_NUMSET_MASK &       \\r
-                                                        (ccsidr_reg >>                          \\r
-                                                         ESAL_CO_MEM_CCSIDR_NUMSET_RSHT_OFFSET))\r
-\r
-/* Refer to chapter B3.12.31 c7, Cache and branch predictor maintenance functions in the\r
-   ARM Architecture Reference Manual ARMv7-A and ARMv7-R Edition 1360*/\r
-/* Calculate # of bits to be shifted for set size and way size */\r
-\r
-/* log2(line size in bytes) = ccsidr_linesize + 2 + logbase2(4) */\r
-#define     ESAL_CO_MEM_L_CALCULATE(linesize)           (linesize + 2 + 2)\r
-\r
-/* log2(nsets) = 32 - way_size_bit_pos */\r
-\r
-/* Find the bit position of way size increment */\r
-#define     ESAL_CO_MEM_A_CALCULATE(assoc, a_offset_ref)                                        \\r
-            {                                                                                   \\r
-                UINT32  temp_pos = 0x80000000;                                                  \\r
-                                                                                                \\r
-                *a_offset_ref = 0;                                                              \\r
-                                                                                                \\r
-                /* Logic to count the number of leading zeros before the first 1 */             \\r
-                while(!((assoc & temp_pos) == temp_pos))                                        \\r
-                {                                                                               \\r
-                    (*a_offset_ref)++;                                                          \\r
-                    temp_pos = temp_pos >> 1;                                                   \\r
-                }                                                                               \\r
-            }\r
-\r
-/* Factor way, cache number, index number */\r
-#define     ESAL_CO_MEM_DCCISW_SET(dccisw_ref, level, numsets, assoc, l_offset, a_offset)       \\r
-            {                                                                                   \\r
-                *dccisw_ref = (level | (numsets << l_offset) | (assoc << a_offset));            \\r
-            }\r
-\r
-/* This macro extracts line size, assoc and set size from CCSIDR */\r
-#define     ESAL_CO_MEM_CCSIDR_VALS_GET(linesize_ref, assoc_ref, numsets_ref,                   \\r
-                                        l_offset_ref, a_offset_ref)                             \\r
-            {                                                                                   \\r
-                UINT32  ccsidr_val;                                                             \\r
-                                                                                                \\r
-                /* Read the selected cache's CCSIDR */                                          \\r
-                ESAL_TS_RTE_CP_READ(ESAL_TS_RTE_CP15, 1, &ccsidr_val,                           \\r
-                                    ESAL_TS_RTE_C0, ESAL_TS_RTE_C0, 0);                         \\r
-                                                                                                \\r
-                /* Extract 'encoded' line length of the cache */                                \\r
-                *linesize_ref = ESAL_CO_MEM_CCSIDR_LINESIZE_GET(ccsidr_val);                    \\r
-                                                                                                \\r
-                /* Extract 'encoded' way size of the cache */                                   \\r
-                *assoc_ref = ESAL_CO_MEM_CCSIDR_ASSOC_GET(ccsidr_val);                          \\r
-                                                                                                \\r
-                /* Extract 'encoded' maximum number of index size */                            \\r
-                *numsets_ref = ESAL_CO_MEM_CCSIDR_NUMSET_GET(ccsidr_val);                       \\r
-                                                                                                \\r
-                /* Calculate # of bits to be shifted for set size and way size */               \\r
-                                                                                                \\r
-                /* log2(line size in bytes) = ccsidr_linesize + 2 + log2(4) */                  \\r
-                *l_offset_ref = ESAL_CO_MEM_L_CALCULATE(*linesize_ref);                         \\r
-                                                                                                \\r
-                /* log2(nsets) = 32 - way_size_bit_pos */                                       \\r
-                ESAL_CO_MEM_A_CALCULATE(*assoc_ref, a_offset_ref);                              \\r
-            }\r
-\r
-#if (ESAL_CO_CACHE_AVAILABLE == NU_TRUE)\r
-\r
-/* This macro invalidates all of the cache at the core level. */\r
-#define     ESAL_CO_MEM_CACHE_ALL_INVALIDATE()                                                  \\r
-            {                                                                                   \\r
-                ESAL_CO_MEM_ICACHE_ALL_INVALIDATE();                                            \\r
-                ESAL_CO_MEM_DCACHE_ALL_INVALIDATE();                                            \\r
-            }\r
-\r
-/* This macro invalidates all of the data cache at the core level. */\r
-#define     ESAL_CO_MEM_DCACHE_ALL_OP(type)                                                     \\r
-            {                                                                                   \\r
-                UINT32  clidr_val = 0;                                                          \\r
-                UINT32  clidr_loc = 0;                                                          \\r
-                UINT32  cache_number = 0;                                                       \\r
-                UINT32  cache_type = 0;                                                         \\r
-                UINT32  ccsidr_linesize = 0;                                                    \\r
-                UINT32  ccsidr_assoc = 0;                                                       \\r
-                INT32   ccsidr_numsets = 0;                                                     \\r
-                INT32   way_size_copy = 0;                                                      \\r
-                UINT32  set_size_bit_pos = 0;                                                   \\r
-                UINT32  cache_number_pos = 0;                                                   \\r
-                UINT32  way_size_bit_pos = 0;                                                   \\r
-                UINT32  set_way_value = 0;                                                      \\r
-                                                                                                \\r
-                                                                                                \\r
-                /* Read CLIDR to extract level of coherence (LOC) */                            \\r
-                ESAL_TS_RTE_CP_READ(ESAL_TS_RTE_CP15, 1, &clidr_val,                            \\r
-                                    ESAL_TS_RTE_C0, ESAL_TS_RTE_C0, 1);                         \\r
-                                                                                                \\r
-                /* Extract LOC from CLIDR and align it at bit 1 */                              \\r
-                clidr_loc = (clidr_val & ESAL_CO_MEM_CLIDR_LOC_MASK) >>                         \\r
-                            ESAL_CO_MEM_CLIDR_LOC_RSHT_OFFSET;                                  \\r
-                                                                                                \\r
-                /* Proceed only iff LOC is non-zero */                                          \\r
-                if (clidr_loc != 0)                                                             \\r
-                {                                                                               \\r
-                    do                                                                          \\r
-                    {                                                                           \\r
-                        /* Extract cache type from CLIDR */                                     \\r
-                        cache_number_pos = cache_number + (cache_number >> 1);                  \\r
-                        cache_type = (clidr_val >> cache_number_pos) & 0x7;                     \\r
-                                                                                                \\r
-                        /* Continue only iff data cache */                                      \\r
-                        if (cache_type >= 2)                                                    \\r
-                        {                                                                       \\r
-                            /* Select desired cache level in CSSELR */                          \\r
-                            ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 2, cache_number,             \\r
-                                                 ESAL_TS_RTE_C0, ESAL_TS_RTE_C0, 0);            \\r
-                                                                                                \\r
-                            ESAL_TS_RTE_ISB_EXECUTE();                                          \\r
-                                                                                                \\r
-                            /* Get data like linesize, assoc and set size */                    \\r
-                            ESAL_CO_MEM_CCSIDR_VALS_GET(&ccsidr_linesize,                       \\r
-                                                        &ccsidr_assoc,                          \\r
-                                                        &ccsidr_numsets,                        \\r
-                                                        &set_size_bit_pos,                      \\r
-                                                        &way_size_bit_pos);                     \\r
-                                                                                                \\r
-                            do                                                                  \\r
-                            {                                                                   \\r
-                                way_size_copy = ccsidr_assoc;                                   \\r
-                                                                                                \\r
-                                do                                                              \\r
-                                {                                                               \\r
-                                    /* Factor way, cache number, index number */                \\r
-                                    ESAL_CO_MEM_DCCISW_SET(&set_way_value, cache_number,        \\r
-                                                           ccsidr_numsets, way_size_copy,       \\r
-                                                           set_size_bit_pos,                    \\r
-                                                           way_size_bit_pos);                   \\r
-                                                                                                \\r
-                                    /* Execute invalidate if type = 0 */                        \\r
-                                    if (type == 0)                                              \\r
-                                    {                                                           \\r
-                                        ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,               \\r
-                                                             set_way_value,                     \\r
-                                                             ESAL_TS_RTE_C7,                    \\r
-                                                             ESAL_TS_RTE_C6, 2);                \\r
-                                    }                                                           \\r
-                                    else                                                        \\r
-                                    {                                                           \\r
-                                        ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,               \\r
-                                                             set_way_value,                     \\r
-                                                             ESAL_TS_RTE_C7,                    \\r
-                                                             ESAL_TS_RTE_C14, 2);               \\r
-                                    }                                                           \\r
-                                                                                                \\r
-                                /* decrement the way */                                         \\r
-                                } while((--way_size_copy) >= 0);                                \\r
-                                                                                                \\r
-                            /* decrement the set */                                             \\r
-                            } while((--ccsidr_numsets) >= 0);                                   \\r
-                                                                                                \\r
-                        } /* end if */                                                          \\r
-                                                                                                \\r
-                        /* Increment cache number */                                            \\r
-                        cache_number += 2;                                                      \\r
-                                                                                                \\r
-                    /* end do-while */                                                          \\r
-                    } while(clidr_loc >= cache_number);                                         \\r
-                                                                                                \\r
-                }                                                                               \\r
-                                                                                                \\r
-                /* Switch back to cache level 0 in CSSELR */                                    \\r
-                ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 2, 0,                                    \\r
-                                     ESAL_TS_RTE_C0, ESAL_TS_RTE_C0, 0);                        \\r
-                                                                                                \\r
-                /* Sync */                                                                      \\r
-                ESAL_TS_RTE_DSB_EXECUTE();                                                      \\r
-                ESAL_TS_RTE_ISB_EXECUTE();                                                      \\r
-            }\r
-\r
-/* This macro flushes all data cache to physical memory (writeback cache)\r
-   and invalidates all data cache entries at the core level. */\r
-#define     ESAL_CO_MEM_DCACHE_ALL_FLUSH_INVAL()        ESAL_CO_MEM_DCACHE_ALL_OP(1)\r
-\r
-#if (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT  == 1)\r
-\r
-/* This macro invalidates all of the data cache at the core level. */\r
-#define     ESAL_CO_MEM_DCACHE_ALL_INVALIDATE()         ESAL_CO_MEM_DCACHE_ALL_OP(0)\r
-\r
-#elif (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT  == 2)\r
-\r
-/* This macro invalidates all of the data caches at the core level. */\r
-#define     ESAL_CO_MEM_DCACHE_ALL_INVALIDATE()                         \\r
-            {                                                           \\r
-                ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,               \\r
-                                     0, ESAL_TS_RTE_C15,                \\r
-                                     ESAL_TS_RTE_C5, 0);                \\r
-                /* Sync */                                              \\r
-                ESAL_TS_RTE_DSB_EXECUTE();                              \\r
-                ESAL_TS_RTE_ISB_EXECUTE();                              \\r
-            }\r
-\r
-#endif /* (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT  == 1) */\r
-\r
-#endif  /* (ESAL_CO_CACHE_AVAILABLE == NU_TRUE) */\r
-\r
-#endif  /* (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT  != 0) */\r
-\r
-/*********************************************\r
-* Common cache operation macros\r
-*********************************************/\r
-\r
-#if (ESAL_CO_CACHE_AVAILABLE == NU_TRUE)\r
-\r
-/* This macro invalidates all of the instruction cache at the core level. */\r
-#define     ESAL_CO_MEM_ICACHE_ALL_INVALIDATE()                         \\r
-            {                                                           \\r
-                ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,               \\r
-                                     0, ESAL_TS_RTE_C7,                 \\r
-                                     ESAL_TS_RTE_C5, 0);                \\r
-            }\r
-\r
-/* This macro invalidates all instruction cache for the specified address\r
-   range at the core level. */\r
-#define     ESAL_CO_MEM_ICACHE_INVALIDATE(addr, size)                   \\r
-            {                                                           \\r
-                UINT32  addr_v=(UINT32)addr & ESAL_CO_MEM_MVA_SBZ_MASK; \\r
-                UINT32  l_size = 0;                                     \\r
-                UINT32  align_size = ((UINT32)size + ((UINT32)addr &    \\r
-                                      (ESAL_CO_MEM_CACHE_LINE_SIZE-1)));\\r
-                                                                        \\r
-                /* This is to prevent compiler warnings. */             \\r
-                NU_UNUSED_PARAM(align_size);                            \\r
-                                                                        \\r
-                do                                                      \\r
-                {                                                       \\r
-                    /* Invalidate Icache in MVA format */               \\r
-                    ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,           \\r
-                                         (addr_v), ESAL_TS_RTE_C7,      \\r
-                                         ESAL_TS_RTE_C5, 1);            \\r
-                                                                        \\r
-                    /* Move to the next way */                          \\r
-                    addr_v += ESAL_CO_MEM_CACHE_LINE_SIZE;              \\r
-                    l_size += ESAL_CO_MEM_CACHE_LINE_SIZE;              \\r
-                                                                        \\r
-                } while (l_size < align_size);                          \\r
-            }\r
-\r
-/* This macro invalidates all data cache for the specified address\r
-   range at the core level. */\r
-#define     ESAL_CO_MEM_DCACHE_INVALIDATE(addr, size)                   \\r
-            {                                                           \\r
-                UINT32  addr_v=(UINT32)addr & ESAL_CO_MEM_MVA_SBZ_MASK; \\r
-                UINT32  l_size = 0;                                     \\r
-                UINT32  align_size = ((UINT32)size + ((UINT32)addr &    \\r
-                                      (ESAL_CO_MEM_CACHE_LINE_SIZE-1)));\\r
-                                                                        \\r
-                /* This is to prevent compiler warnings. */             \\r
-                NU_UNUSED_PARAM(align_size);                            \\r
-                                                                        \\r
-                do                                                      \\r
-                {                                                       \\r
-                    /* Invalidate Dcache in MVA format */               \\r
-                    ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,           \\r
-                                         (addr_v), ESAL_TS_RTE_C7,      \\r
-                                         ESAL_TS_RTE_C6, 1);            \\r
-                                                                        \\r
-                    /* Move to the next way */                          \\r
-                    addr_v += ESAL_CO_MEM_CACHE_LINE_SIZE;              \\r
-                    l_size += ESAL_CO_MEM_CACHE_LINE_SIZE;              \\r
-                                                                        \\r
-                } while (l_size < align_size);                          \\r
-            }\r
-\r
-/* This macro flushes all data cache to physical memory (writeback cache)\r
-   for the given address range, then invalidates all data cache entries\r
-   at the core level. */\r
-#define     ESAL_CO_MEM_DCACHE_FLUSH_INVAL(addr, size)                  \\r
-            {                                                           \\r
-                UINT32  addr_v=(UINT32)addr & ESAL_CO_MEM_MVA_SBZ_MASK; \\r
-                UINT32  l_size = 0;                                     \\r
-                UINT32  align_size = ((UINT32)size + ((UINT32)addr &    \\r
-                                      (ESAL_CO_MEM_CACHE_LINE_SIZE-1)));\\r
-                                                                        \\r
-                /* This is to prevent compiler warnings. */             \\r
-                NU_UNUSED_PARAM(align_size);                            \\r
-                                                                        \\r
-                do                                                      \\r
-                {                                                       \\r
-                    /* Clean (flush) and invalidate the Dcache */       \\r
-                    ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0,           \\r
-                                         (addr_v), ESAL_TS_RTE_C7,      \\r
-                                         ESAL_TS_RTE_C14, 1);           \\r
-                                                                        \\r
-                    /* Move to the next way */                          \\r
-                    addr_v += ESAL_CO_MEM_CACHE_LINE_SIZE;              \\r
-                    l_size += ESAL_CO_MEM_CACHE_LINE_SIZE;              \\r
-                                                                        \\r
-                } while (l_size < align_size);                          \\r
-            }\r
-\r
-/* This macro disables instruction and data cache */\r
-#define         ESAL_CO_MEM_CACHE_DISABLE()                                                     \\r
-                {                                                                               \\r
-                    UINT32  cp15_ctrl_val;                                                      \\r
-                                                                                                \\r
-                    /* Read current CP15 control register value */                              \\r
-                    ESAL_TS_RTE_CP_READ(ESAL_TS_RTE_CP15, 0, &cp15_ctrl_val, ESAL_TS_RTE_C1, ESAL_TS_RTE_C0, 0); \\r
-                                                                                                \\r
-                    /* Clear instruction cache enable and data cache enable bits */             \\r
-                    cp15_ctrl_val &= ~(ESAL_CO_MEM_CP15_CTRL_I | ESAL_CO_MEM_CP15_CTRL_C);      \\r
-                                                                                                \\r
-                    /* Write updated CP15 control register value */                             \\r
-                    ESAL_TS_RTE_CP_WRITE(ESAL_TS_RTE_CP15, 0, cp15_ctrl_val, ESAL_TS_RTE_C1, ESAL_TS_RTE_C0, 0); \\r
-                    ESAL_TS_RTE_NOP_EXECUTE();                                                  \\r
-                    ESAL_TS_RTE_NOP_EXECUTE();                                                  \\r
-                    ESAL_TS_RTE_NOP_EXECUTE();                                                  \\r
-                }\r
-#if (CFG_NU_OS_ARCH_ARM_COM_MMU_VARIANT  == 1)\r
-/* This macro flushes data cache and invalidate instruction cache */\r
-#define         ESAL_CO_MEM_ICACHE_FLUSH_INVAL(addr, size)                                      \\r
-                {                                                                               \\r
-                    UINT32  cache_info;                                                         \\r
-                    UINT32  line_size;                                                          \\r
-                    UINT32  current_addr;                                                       \\r
-                                                                                                \\r
-                    /* Read cache level ID register value */                                    \\r
-                    ESAL_TS_RTE_CP_READ(ESAL_TS_RTE_CP15, 0, &cache_info,                       \\r
-                                        ESAL_TS_RTE_C0, ESAL_TS_RTE_C0, 1);                     \\r
-                                                                                                \\r
-                    /* Calculate the size */                                                    \\r
-                    line_size = cache_info >> ESAL_CO_MEM_DCACHE_SIZE_SHIFT;                    \\r
-                    line_size = line_size & ESAL_CO_MEM_CACHE_SIZE_MASK;                        \\r
-                    line_size = ESAL_CO_MEM_CACHE_SIZE_BIT << line_size;                     &nb