diff options
author | Tinku Mannan | 2015-02-20 15:55:02 -0600 |
---|---|---|
committer | Tinku Mannan | 2015-02-23 09:29:01 -0600 |
commit | 2cc9680d5cc2b905ac8c405bc8f7cb53b784c0c0 (patch) | |
tree | b986c701670924b8fc9f99845ac0bcfe08c83fe8 | |
parent | dc08af268200908d3d8a456ac852c65c53d2fd12 (diff) | |
download | netapi-2cc9680d5cc2b905ac8c405bc8f7cb53b784c0c0.tar.gz netapi-2cc9680d5cc2b905ac8c405bc8f7cb53b784c0c0.tar.xz netapi-2cc9680d5cc2b905ac8c405bc8f7cb53b784c0c0.zip |
Fix for SDOCM00114893DEV.NETAPI.01.01.00.05ADEV.NETAPI.01.01.00.05
-rwxr-xr-x | ti/runtime/netapi/src/netapi_init.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/ti/runtime/netapi/src/netapi_init.c b/ti/runtime/netapi/src/netapi_init.c index 87bc8a9..68168e0 100755 --- a/ti/runtime/netapi/src/netapi_init.c +++ b/ti/runtime/netapi/src/netapi_init.c | |||
@@ -747,26 +747,35 @@ int netapip_systemInit(NETAPI_HANDLE_T * handle, | |||
747 | netapi_VM_MempoolAttr[0].phys_addr = 0; | 747 | netapi_VM_MempoolAttr[0].phys_addr = 0; |
748 | netapi_VM_MempoolAttr[0].size = 0; | 748 | netapi_VM_MempoolAttr[0].size = 0; |
749 | 749 | ||
750 | #ifdef NETAPI_USE_DDR_AND_MSMC | ||
750 | /* Init attributes for un-cached MSMC */ | 751 | /* Init attributes for un-cached MSMC */ |
751 | netapi_VM_MempoolAttr[1].attr = HPLIB_ATTR_UN_CACHED; | 752 | netapi_VM_MempoolAttr[1].attr = HPLIB_ATTR_UN_CACHED; |
752 | netapi_VM_MempoolAttr[1].phys_addr = CSL_MSMC_SRAM_REGS; | 753 | netapi_VM_MempoolAttr[1].phys_addr = CSL_MSMC_SRAM_REGS; |
753 | netapi_VM_MempoolAttr[1].size = TUNE_NETAPI_PERM_MEM_SZ; | 754 | netapi_VM_MempoolAttr[1].size = TUNE_NETAPI_PERM_MEM_SZ; |
755 | #endif | ||
754 | #else | 756 | #else |
755 | netapi_VM_MempoolAttr[1].attr = HPLIB_ATTR_KM_CACHED0; | ||
756 | netapi_VM_MempoolAttr[1].phys_addr = 0; | ||
757 | netapi_VM_MempoolAttr[1].size = 0; | ||
758 | |||
759 | /* Init attributes for un-cached MSMC */ | 757 | /* Init attributes for un-cached MSMC */ |
760 | netapi_VM_MempoolAttr[0].attr = HPLIB_ATTR_UN_CACHED; | 758 | netapi_VM_MempoolAttr[0].attr = HPLIB_ATTR_UN_CACHED; |
761 | netapi_VM_MempoolAttr[0].phys_addr = CSL_MSMC_SRAM_REGS; | 759 | netapi_VM_MempoolAttr[0].phys_addr = CSL_MSMC_SRAM_REGS; |
762 | netapi_VM_MempoolAttr[0].size = TUNE_NETAPI_PERM_MEM_SZ; | 760 | netapi_VM_MempoolAttr[0].size = TUNE_NETAPI_PERM_MEM_SZ; |
761 | #ifdef NETAPI_USE_DDR_AND_MSMC | ||
762 | netapi_VM_MempoolAttr[1].attr = HPLIB_ATTR_KM_CACHED0; | ||
763 | netapi_VM_MempoolAttr[1].phys_addr = 0; | ||
764 | netapi_VM_MempoolAttr[1].size = 0; | ||
765 | #endif | ||
763 | #endif | 766 | #endif |
764 | /* initialize all the memory we are going to use | 767 | /* initialize all the memory we are going to use |
765 | - chunk for buffers, descriptors | 768 | - chunk for buffers, descriptors |
766 | - memory mapped peripherals we use, such as QMSS, PA, etc */ | 769 | - memory mapped peripherals we use, such as QMSS, PA, etc */ |
770 | #ifdef NETAPI_USE_DDR_AND_MSMC | ||
767 | result = hplib_vmInit(&netapi_VM_VirtAddr[0], | 771 | result = hplib_vmInit(&netapi_VM_VirtAddr[0], |
768 | 2, | 772 | 2, |
769 | &netapi_VM_MempoolAttr[0]); | 773 | &netapi_VM_MempoolAttr[0]); |
774 | #else | ||
775 | result = hplib_vmInit(&netapi_VM_VirtAddr[0], | ||
776 | 1, | ||
777 | &netapi_VM_MempoolAttr[0]); | ||
778 | #endif | ||
770 | 779 | ||
771 | if (result != hplib_OK) | 780 | if (result != hplib_OK) |
772 | { | 781 | { |
@@ -776,7 +785,9 @@ int netapip_systemInit(NETAPI_HANDLE_T * handle, | |||
776 | if (global_master_process == NETAPI_TRUE) | 785 | if (global_master_process == NETAPI_TRUE) |
777 | { | 786 | { |
778 | hplib_initMallocArea(0); | 787 | hplib_initMallocArea(0); |
788 | #ifdef NETAPI_USE_DDR_AND_MSMC | ||
779 | hplib_initMallocArea(1); | 789 | hplib_initMallocArea(1); |
790 | #endif | ||
780 | #ifdef NETAPI_ENABLE_SECURITY | 791 | #ifdef NETAPI_ENABLE_SECURITY |
781 | #define SEC_CONTEXT_SZ 384 //not tunable | 792 | #define SEC_CONTEXT_SZ 384 //not tunable |
782 | /* allocate 2x number of tunnels since we need one for inflow and one for data mode */ | 793 | /* allocate 2x number of tunnels since we need one for inflow and one for data mode */ |