]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/commitdiff
Fixed policy alignment retrieval bug
authorJustin Sobota <jsobota@ti.com>
Thu, 24 Jan 2013 19:41:25 +0000 (14:41 -0500)
committerJustin Sobota <jsobota@ti.com>
Thu, 24 Jan 2013 19:41:25 +0000 (14:41 -0500)
device/tci6614-server-policy.dtb
device/tci6614-server-policy.dts
rm.h
src/rm_dtb_util.c
src/rm_policy.c

index feff2fd992723f1ffe4105fcacf69fd5b131aad6..c80794aa50de5b37dba252e021e3f0c4fcd35996 100644 (file)
Binary files a/device/tci6614-server-policy.dtb and b/device/tci6614-server-policy.dtb differ
index 6b57763c57c506ddc97c7ff8508da9d5b17a1bf7..c0000526c8ad8f35f6f69ed2744320792c97eaf3 100644 (file)
         };
         accumulator-ch {
             assignments = <0 48>, "iux = (*)";
-            alloc-alignments = <20>;
+            allocation-alignment = <20>;
         };
         qos-cluster {
-                       assignments = <0 8>, "iux = (*)";
+            assignments = <0 8>, "iux = (*)";
         };
         qos-queue {
-                       assignments = <0 64>, "iux = (*)";
-        };        
+            assignments = <0 64>, "iux = (*)";
+        };
 
         /* Queue definitions based on csl_qm_queue.h */
         low-prio-queue {
-               assignments = <0 512>, "iux = (*)";
+            assignments = <0 512>, "iux = (*)";
         };
         aif-queue {
-               assignments = <512 128>, "iux = (*)";
+            assignments = <512 128>, "iux = (*)";
         };
         pass-queue {
-               assignments = <640 9>, "iux = (*)";
+            assignments = <640 9>, "iux = (*)";
         };     
         intc-queue {
-               assignments = <662 10>, "iux = (*)";
+            assignments = <662 10>, "iux = (*)";
         };
         srio-queue {
-               assignments = <672 16>, "iux = (*)";
+            assignments = <672 16>, "iux = (*)";
         }; 
         fftc-a-queue {
-               assignments = <688 4>, "iux = (*)";
+            assignments = <688 4>, "iux = (*)";
         };
         fftc-b-queue {
-               assignments = <692 4>, "iux = (*)";
+            assignments = <692 4>, "iux = (*)";
         };
         bcp-queue {
-               assignments = <864 8>, "iux = (*)";
+            assignments = <864 8>, "iux = (*)";
         };
         high-prio-queue {
-               assignments = <704 32>, "iux = (*)";
+            assignments = <704 32>, "iux = (*)";
         };
         starvation-queue {
-               assignments = <736 64>, "iux = (*)";
+            assignments = <736 64>, "iux = (*)";
         };
         infra-queue {
-               assignments = <800 32>, "iux = (*)";
+            assignments = <800 32>, "iux = (*)";
         };
         traffic-shaping-queue {
-               assignments = <832 32>, "iux = (*)";
+            assignments = <832 32>, "iux = (*)";
         };
         gp-queue {
-               assignments = <896  1104>, "xiu = (*)",
-                                         <2000 1000>, "iu=(RM_Server RM_Client_Delegate RM_Client)",
+            assignments = <896  1104>, "xiu = (*)",
+                          <2000 1000>, "iu=(RM_Server RM_Client_Delegate RM_Client)",
                           <3000 5192>, "iux=(RM_Server) & iu=(RM_Client_Delegate RM_Client)";
-        };          
+        };
     }; /* qmss */
 
     /* CPPI channel and flow ID ranges based on tci6614 cppi_device.c */
     cppi {
         srio-rx-ch {
-               assignments = <0 16>, "iux = (*)";
+            assignments = <0 16>, "iux = (*)";
         };
         srio-tx-ch {
-               assignments = <0 16>, "iux = (*)";
+            assignments = <0 16>, "iux = (*)";
         };
         srio-rx-flow-id {
-               assignments = <0 20>, "iux = (*)";
+            assignments = <0 20>, "iux = (*)";
         };   
 
         aif-rx-ch {
-               assignments = <0  50>, "iux = (*)",
-                             <50 79>, "iu  = (*)";
-               alloc-alignments = <20>;
+            assignments = <0  50>, "iux = (*)",
+                          <50 79>, "iu  = (*)";
+            allocation-alignment = <20>;
         };
         aif-tx-ch {
-               assignments = <0 129>, "iux = (*)";
+            assignments = <0 129>, "iux = (*)";
         };
         aif-rx-flow-id {
-               assignments = <0 129>, "iux = (*)";
+            assignments = <0 129>, "iux = (*)";
         };      
 
         fftc-a-rx-ch {
-               assignments = <0 4>, "iux = (*)";
+            assignments = <0 4>, "iux = (*)";
         };
         fftc-a-tx-ch {
-               assignments = <0 4>, "iux = (*)";
+            assignments = <0 4>, "iux = (*)";
         };
         fftc-a-rx-flow-id {
-               assignments = <0 8>, "iux = (*)";
+            assignments = <0 8>, "iux = (*)";
         };   
 
         fftc-b-rx-ch {
-               assignments = <0 4>, "iux = (*)";
+            assignments = <0 4>, "iux = (*)";
         };
         fftc-b-tx-ch {
-               assignments = <0 4>, "iux = (*)";
+            assignments = <0 4>, "iux = (*)";
         };
         fftc-b-rx-flow-id {
-               assignments = <0 8>, "iux = (*)";
+            assignments = <0 8>, "iux = (*)";
         };   
 
         pass-rx-ch {
-               assignments = <0 23>, "iux = (*)";
+            assignments = <0 23>, "iux = (*)";
         };
         pass-tx-ch {
-               assignments = <0 9>, "iux = (*)";
+            assignments = <0 9>, "iux = (*)";
         };
         pass-rx-flow-id {
-               assignments = <0 32>, "iux = (*)";
+            assignments = <0 32>, "iux = (*)";
         };   
         
         qmss-rx-ch {
-               assignments = <0 32>, "iux = (*)";
+            assignments = <0 32>, "iux = (*)";
         };
         qmss-tx-ch {
-               assignments = <0 32>, "iux = (*)";
+            assignments = <0 32>, "iux = (*)";
         };
         qmss-rx-flow-id {
-               assignments = <0 64>, "iux = (*)";
+            assignments = <0 64>, "iux = (*)";
         };   
 
         bcp-rx-ch {
-               assignments = <0 8>, "iux = (*)";
+            assignments = <0 8>, "iux = (*)";
         };
         bcp-tx-ch {
-               assignments = <0 8>, "iux = (*)";
+            assignments = <0 8>, "iux = (*)";
         };
         bcp-rx-flow-id {
-               assignments = <0 64>, "iux = (*)";
+            assignments = <0 64>, "iux = (*)";
         };           
     }; /* cppi */
 
diff --git a/rm.h b/rm.h
index 8ccbeadf00a328a8701372fc5851f8c7fa6e7aa4..6e209076440f1ac2e9db8342c6f02fdf71fdd535 100644 (file)
--- a/rm.h
+++ b/rm.h
@@ -150,8 +150,7 @@ extern "C" {
 #define RM_INIT_ERROR_POLICY_SYNTAX_ERROR_PERM_CHAR_WITHOUT_ASSIGN_CHAR -264
 #define RM_INIT_ERROR_POLICY_SYNTAX_ERROR_INVALID_CHAR_ON_RIGHT_WITH_ASSINMENT_ON_LEFT -265
 #define RM_INIT_ERROR_PREMAIN_INST_AND_POSTMAIN_INST_NAMES_DONT_MATCH -266
-
-
+#define RM_INIT_ERROR_POLICY_UNKNOWN_RESOURCE_PROPERTY -267
 
 /** 
  * @brief Maximum number of characters in a RM instance name
index d33ff91238ec9e455eb737fee6cd3d926e1440fd..73097ba792f7d66c07405cb4c1dab13aa7a6738f 100644 (file)
@@ -473,8 +473,8 @@ void Rm_resourceFreeNsAssignmentList (Rm_NsAssignment *nsAssignmentList)
  * listed in a Resource Manager Policy */
 char rmPolicyValidInstances[] = "valid-instances";
 char rmPolicyAssignments[] = "assignments";
-char rmPolicyAllocationSizes[] = "allocation-sizes";
-char rmPolicyAllocationAlignments[] = "allocation-alignments";
+char rmPolicyAllocationSizes[] = "allocation-size";
+char rmPolicyAllocationAlignments[] = "allocation-alignment";
 
 Rm_PolicyPropType Rm_policyGetPropertyType(const char * propertyName)
 {
index 5839baf056dca953a77b04eb6a90d0b8c07be7c4..26f2529de315bb409477ea87f8c96028ea1ead90 100644 (file)
@@ -750,6 +750,7 @@ int32_t Rm_policyValidatePolicy(void *policyDtb, Rm_PolicyValidInstTree *validIn
     const char          *propertyName;
        int32_t              propertyLen;
        const void          *propertyData;
+    Rm_PolicyPropType    propertyType;
     Rm_PolicyAssignment *assignmentList;
     int32_t              result;
 
@@ -765,7 +766,8 @@ int32_t Rm_policyValidatePolicy(void *policyDtb, Rm_PolicyValidInstTree *validIn
         propertyOffset = fdt_first_property_offset(policyDtb, nodeOffset);                
         while (propertyOffset > RM_DTB_UTIL_STARTING_NODE_OFFSET) {
             propertyData = fdt_getprop_by_offset(policyDtb, propertyOffset, &propertyName, &propertyLen);
-            if (Rm_policyGetPropertyType(propertyName) == Rm_policyPropType_ASSIGNMENTS) {
+            propertyType = Rm_policyGetPropertyType(propertyName);
+            if (propertyType == Rm_policyPropType_ASSIGNMENTS) {
                 assignmentList = Rm_policyExtractAssignments(propertyData, propertyLen);
                 
                 if ((result = Rm_policyValidateAssignmentPermissions(validInstTree, assignmentList)) != RM_INIT_OK) {
@@ -774,6 +776,9 @@ int32_t Rm_policyValidatePolicy(void *policyDtb, Rm_PolicyValidInstTree *validIn
                 }
                 Rm_policyFreeAssignments(assignmentList);
             }
+            else if (propertyType == Rm_policyPropType_UNKNOWN) {
+                return(RM_INIT_ERROR_POLICY_UNKNOWN_RESOURCE_PROPERTY);
+            }
             propertyOffset = fdt_next_property_offset(policyDtb, propertyOffset);
         }
     }