diff options
author | Eric Ruei | 2015-11-24 17:28:34 -0600 |
---|---|---|
committer | Eric Ruei | 2015-11-24 17:28:34 -0600 |
commit | d37629cdee8a76f99aa2752653de1c20a098262a (patch) | |
tree | 347774ab36d3bfed48a32edb1b31cda956516ff5 | |
parent | 8e02a3e66d2aeb4c250a6eeb520f3d2721ee2e5c (diff) | |
download | cppi-lld-d37629cdee8a76f99aa2752653de1c20a098262a.tar.gz cppi-lld-d37629cdee8a76f99aa2752653de1c20a098262a.tar.xz cppi-lld-d37629cdee8a76f99aa2752653de1c20a098262a.zip |
Cleanup test/example code and projects for K1 support
-rw-r--r-- | example/sample/c6657/c66/bios/cppi_evmc6657_c66BiosExampleProject.txt | 11 | ||||
-rw-r--r-- | example/sample/c6657/c66/bios/sample.cfg | 2 | ||||
-rw-r--r-- | example/sample/c6678/c66/bios/cppi_evmc6678_c66BiosExampleProject.txt | 11 | ||||
-rw-r--r-- | example/sample/c6678/c66/bios/sample.cfg | 2 | ||||
-rw-r--r-- | example/sample/src/sample.c | 2 | ||||
-rw-r--r-- | test/src/cppi_test.c | 56 |
6 files changed, 58 insertions, 26 deletions
diff --git a/example/sample/c6657/c66/bios/cppi_evmc6657_c66BiosExampleProject.txt b/example/sample/c6657/c66/bios/cppi_evmc6657_c66BiosExampleProject.txt index 06416ee..def692d 100644 --- a/example/sample/c6657/c66/bios/cppi_evmc6657_c66BiosExampleProject.txt +++ b/example/sample/c6657/c66/bios/cppi_evmc6657_c66BiosExampleProject.txt | |||
@@ -1,2 +1,11 @@ | |||
1 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/src/sample.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/device/c6657/src/cppi_device.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/qmss/device/c6657/src/qmss_device.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/c6657/global-resource-list.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/c6657/policy_dsp-only.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_transport_setup.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6657/c66/bios/sample_osal.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6657/c66/bios/sample.cmd" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6657/c66/bios/sample.cfg" -ccs.setCompilerOptions "-mv64+ -g -DSOC_C6657 -DINTERNAL_LINKING_RAM -UL2_CACHE --diag_warning=225 -I${PDK_INSTALL_PATH}/ti/drv/cppi/example/sample/src" -rtsc.enableRtsc | 1 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/src/sample.c" |
2 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/device/c6657/src/cppi_device.c" | ||
3 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/qmss/device/c6657/src/qmss_device.c" | ||
4 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/c6657/global-resource-list.c" | ||
5 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/c6657/policy_dsp-only.c" | ||
6 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_transport_setup.c" | ||
7 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6657/c66/bios/sample_osal.c" | ||
8 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6657/c66/bios/sample.cmd" | ||
9 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6657/c66/bios/sample.cfg" | ||
10 | -ccs.setCompilerOptions "-mv64+ -g -DSOC_C6657 -DINTERNAL_LINKING_RAM -UL2_CACHE -DNUM_CORES=2 --diag_warning=225 -I${PDK_INSTALL_PATH}/ti/drv/cppi/example/sample/src" -rtsc.enableRtsc | ||
2 | 11 | ||
diff --git a/example/sample/c6657/c66/bios/sample.cfg b/example/sample/c6657/c66/bios/sample.cfg index 757cadc..8380c5f 100644 --- a/example/sample/c6657/c66/bios/sample.cfg +++ b/example/sample/c6657/c66/bios/sample.cfg | |||
@@ -44,7 +44,7 @@ var memmap = Program.cpu.memoryMap; | |||
44 | Startup = xdc.useModule('xdc.runtime.Startup'); | 44 | Startup = xdc.useModule('xdc.runtime.Startup'); |
45 | Startup.firstFxns.$add('&myStartupFxn'); | 45 | Startup.firstFxns.$add('&myStartupFxn'); |
46 | 46 | ||
47 | MultiProc.setConfig(null, ["CORE0", "CORE1", "CORE2", "CORE3"]); | 47 | MultiProc.setConfig(null, ["CORE0", "CORE1"]); |
48 | 48 | ||
49 | /* Synchronize all processors (this will be done in Ipc_start) */ | 49 | /* Synchronize all processors (this will be done in Ipc_start) */ |
50 | Ipc.procSync = Ipc.ProcSync_ALL; | 50 | Ipc.procSync = Ipc.ProcSync_ALL; |
diff --git a/example/sample/c6678/c66/bios/cppi_evmc6678_c66BiosExampleProject.txt b/example/sample/c6678/c66/bios/cppi_evmc6678_c66BiosExampleProject.txt index 413d41d..8fa6fbf 100644 --- a/example/sample/c6678/c66/bios/cppi_evmc6678_c66BiosExampleProject.txt +++ b/example/sample/c6678/c66/bios/cppi_evmc6678_c66BiosExampleProject.txt | |||
@@ -1,2 +1,11 @@ | |||
1 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/src/sample.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/device/c6678/src/cppi_device.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/qmss/device/c6678/src/qmss_device.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/c6678/global-resource-list.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/c6678/policy_dsp-only.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_transport_setup.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6678/c66/bios/sample_osal.c" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6678/c66/bios/sample.cmd" -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6678/c66/bios/sample.cfg" -ccs.setCompilerOptions "-mv64+ -g -DSOC_C6678 -DINTERNAL_LINKING_RAM -UL2_CACHE --diag_warning=225 -I${PDK_INSTALL_PATH}/ti/drv/cppi/example/sample/src" -rtsc.enableRtsc | 1 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/src/sample.c" |
2 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/device/c6678/src/cppi_device.c" | ||
3 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/qmss/device/c6678/src/qmss_device.c" | ||
4 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/c6678/global-resource-list.c" | ||
5 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/device/c6678/policy_dsp-only.c" | ||
6 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/rm/test/rm_transport_setup.c" | ||
7 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6678/c66/bios/sample_osal.c" | ||
8 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6678/c66/bios/sample.cmd" | ||
9 | -ccs.linkFile "PDK_INSTALL_PATH/ti/drv/cppi/example/sample/c6678/c66/bios/sample.cfg" | ||
10 | -ccs.setCompilerOptions "-mv64+ -g -DSOC_C6678 -DINTERNAL_LINKING_RAM -UL2_CACHE --diag_warning=225 -I${PDK_INSTALL_PATH}/ti/drv/cppi/example/sample/src" -rtsc.enableRtsc | ||
2 | 11 | ||
diff --git a/example/sample/c6678/c66/bios/sample.cfg b/example/sample/c6678/c66/bios/sample.cfg index 5c54834..474cc77 100644 --- a/example/sample/c6678/c66/bios/sample.cfg +++ b/example/sample/c6678/c66/bios/sample.cfg | |||
@@ -51,7 +51,7 @@ Ipc.procSync = Ipc.ProcSync_ALL; | |||
51 | 51 | ||
52 | SharedRegion.setEntryMeta(0, | 52 | SharedRegion.setEntryMeta(0, |
53 | { base: 0x0C000000, | 53 | { base: 0x0C000000, |
54 | len: 0x00008000, | 54 | len: 0x00020000, |
55 | ownerProcId: 0, | 55 | ownerProcId: 0, |
56 | isValid: true, | 56 | isValid: true, |
57 | name: "sharemem", | 57 | name: "sharemem", |
diff --git a/example/sample/src/sample.c b/example/sample/src/sample.c index d98aab6..8bb7d35 100644 --- a/example/sample/src/sample.c +++ b/example/sample/src/sample.c | |||
@@ -85,7 +85,9 @@ | |||
85 | #define RM 1 | 85 | #define RM 1 |
86 | 86 | ||
87 | #define SYSINIT 0 | 87 | #define SYSINIT 0 |
88 | #ifndef NUM_CORES | ||
88 | #define NUM_CORES 4 | 89 | #define NUM_CORES 4 |
90 | #endif | ||
89 | 91 | ||
90 | #define MAPPED_VIRTUAL_ADDRESS 0x81000000 | 92 | #define MAPPED_VIRTUAL_ADDRESS 0x81000000 |
91 | 93 | ||
diff --git a/test/src/cppi_test.c b/test/src/cppi_test.c index eec2a1b..592295f 100644 --- a/test/src/cppi_test.c +++ b/test/src/cppi_test.c | |||
@@ -2195,7 +2195,7 @@ void testMonoDescConfig (void) | |||
2195 | void testDescFunctions (Qmss_Result *hostReg_p, Qmss_Result *monoReg_p) | 2195 | void testDescFunctions (Qmss_Result *hostReg_p, Qmss_Result *monoReg_p) |
2196 | { | 2196 | { |
2197 | /* Memory region configuration information */ | 2197 | /* Memory region configuration information */ |
2198 | Qmss_MemRegInfo memInfo; | 2198 | Qmss_MemRegInfo hostMemInfo, monoMemInfo; |
2199 | /* Memory region configuration status */ | 2199 | /* Memory region configuration status */ |
2200 | Qmss_MemRegCfg memRegStatus; | 2200 | Qmss_MemRegCfg memRegStatus; |
2201 | /* Descriptor configuration */ | 2201 | /* Descriptor configuration */ |
@@ -2212,18 +2212,40 @@ void testDescFunctions (Qmss_Result *hostReg_p, Qmss_Result *monoReg_p) | |||
2212 | memset ((void *) monolithicDesc, 0, (SIZE_MONOLITHIC_DESC * NUM_MONOLITHIC_DESC)); | 2212 | memset ((void *) monolithicDesc, 0, (SIZE_MONOLITHIC_DESC * NUM_MONOLITHIC_DESC)); |
2213 | 2213 | ||
2214 | /* Setup memory region for host descriptors */ | 2214 | /* Setup memory region for host descriptors */ |
2215 | memset((void *)&memInfo, 0, sizeof(memInfo)); | 2215 | memset((void *)&hostMemInfo, 0, sizeof(hostMemInfo)); |
2216 | memInfo.descBase = (uint32_t *) l2_global_address ((uint32_t)hostDesc); | 2216 | hostMemInfo.descBase = (uint32_t *) l2_global_address ((uint32_t)hostDesc); |
2217 | memInfo.descSize = SIZE_HOST_DESC; | 2217 | hostMemInfo.descSize = SIZE_HOST_DESC; |
2218 | memInfo.descNum = NUM_HOST_DESC; | 2218 | hostMemInfo.descNum = NUM_HOST_DESC; |
2219 | memInfo.manageDescFlag = Qmss_ManageDesc_MANAGE_DESCRIPTOR; | 2219 | hostMemInfo.manageDescFlag = Qmss_ManageDesc_MANAGE_DESCRIPTOR; |
2220 | memInfo.memRegion = Qmss_MemRegion_MEMORY_REGION_NOT_SPECIFIED; | 2220 | hostMemInfo.memRegion = Qmss_MemRegion_MEMORY_REGION_NOT_SPECIFIED; |
2221 | memInfo.startIndex = 0; | 2221 | hostMemInfo.startIndex = 0; |
2222 | 2222 | ||
2223 | *hostReg_p = Qmss_insertMemoryRegion(&memInfo); | 2223 | /* Setup memory region for monolithic descriptors */ |
2224 | memset((void *)&monoMemInfo, 0, sizeof(monoMemInfo)); | ||
2225 | monoMemInfo.descBase = (uint32_t *) l2_global_address ((uint32_t)monolithicDesc); | ||
2226 | monoMemInfo.descSize = SIZE_MONOLITHIC_DESC; | ||
2227 | monoMemInfo.descNum = NUM_MONOLITHIC_DESC; | ||
2228 | monoMemInfo.manageDescFlag = Qmss_ManageDesc_MANAGE_DESCRIPTOR; | ||
2229 | monoMemInfo.memRegion = Qmss_MemRegion_MEMORY_REGION_NOT_SPECIFIED; | ||
2230 | monoMemInfo.startIndex = 0; | ||
2231 | |||
2232 | /* For devices that require ordering, insert lowest address first */ | ||
2233 | if (hostMemInfo.descBase < monoMemInfo.descBase) | ||
2234 | { | ||
2235 | /* host starts on lower address */ | ||
2236 | *hostReg_p = Qmss_insertMemoryRegion (&hostMemInfo); | ||
2237 | *monoReg_p = Qmss_insertMemoryRegion (&monoMemInfo); | ||
2238 | } | ||
2239 | else | ||
2240 | { | ||
2241 | /* Mono starts on lower address */ | ||
2242 | *monoReg_p = Qmss_insertMemoryRegion (&monoMemInfo); | ||
2243 | *hostReg_p = Qmss_insertMemoryRegion (&hostMemInfo); | ||
2244 | } | ||
2245 | |||
2224 | if (*hostReg_p < QMSS_SOK) | 2246 | if (*hostReg_p < QMSS_SOK) |
2225 | { | 2247 | { |
2226 | System_printf ("Error Core %d : Inserting memory region %d error code : %d\n", coreNum, memInfo.memRegion, *hostReg_p); | 2248 | System_printf ("Error Core %d : Inserting memory region %d error code : %d\n", coreNum, hostMemInfo.memRegion, *hostReg_p); |
2227 | errorCount++; | 2249 | errorCount++; |
2228 | } | 2250 | } |
2229 | else | 2251 | else |
@@ -2231,19 +2253,9 @@ void testDescFunctions (Qmss_Result *hostReg_p, Qmss_Result *monoReg_p) | |||
2231 | System_printf ("Core %d : Memory region %d inserted\n", coreNum, *hostReg_p); | 2253 | System_printf ("Core %d : Memory region %d inserted\n", coreNum, *hostReg_p); |
2232 | } | 2254 | } |
2233 | 2255 | ||
2234 | /* Setup memory region for monolithic descriptors */ | ||
2235 | memset((void *)&memInfo, 0, sizeof(memInfo)); | ||
2236 | memInfo.descBase = (uint32_t *) l2_global_address ((uint32_t)monolithicDesc); | ||
2237 | memInfo.descSize = SIZE_MONOLITHIC_DESC; | ||
2238 | memInfo.descNum = NUM_MONOLITHIC_DESC; | ||
2239 | memInfo.manageDescFlag = Qmss_ManageDesc_MANAGE_DESCRIPTOR; | ||
2240 | memInfo.memRegion = Qmss_MemRegion_MEMORY_REGION_NOT_SPECIFIED; | ||
2241 | memInfo.startIndex = 0; | ||
2242 | |||
2243 | *monoReg_p = Qmss_insertMemoryRegion (&memInfo); | ||
2244 | if (*monoReg_p < QMSS_SOK) | 2256 | if (*monoReg_p < QMSS_SOK) |
2245 | { | 2257 | { |
2246 | System_printf ("Error Core %d : Inserting memory region %d error code : %d\n", coreNum, memInfo.memRegion, *monoReg_p); | 2258 | System_printf ("Error Core %d : Inserting memory region %d error code : %d\n", coreNum, monoMemInfo.memRegion, *monoReg_p); |
2247 | errorCount++; | 2259 | errorCount++; |
2248 | } | 2260 | } |
2249 | else | 2261 | else |