]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blobdiff - include/rm_loc.h
Added pre-main capabilities, cleaned up services and NameServer modules
[keystone-rtos/rm-lld.git] / include / rm_loc.h
index 843a1d94c9e4b4edfcae22e3f2b00bdfc2e5e795..a5d65739b8a862953a49e37d60736137f221f52a 100644 (file)
@@ -48,6 +48,11 @@ extern "C" {
 #include <ti/drv/rm/rm_services.h>
 #include <ti/drv/rm/rm_transport.h>
 
+/* RM internal includes */
+#include <ti/drv/rm/include/rm_servicesloc.h>
+#include <ti/drv/rm/include/rm_policyloc.h>
+#include <ti/drv/rm/include/rm_nameserverloc.h>
+
 /* AVL BBST includes */
 #include <ti/drv/rm/include/tree.h>
 
@@ -61,19 +66,6 @@ typedef void *Rm_TransportRouteMap;
 /** Pointer to RM instance's transaction queue */
 typedef void *Rm_TransactionQueue;
 
-/** Pointer to the RM instance's allocators */
-typedef void *Rm_Allocators;
-
-/** Pointer to the RM instance's NameServer (Valid only on Server) */
-typedef void *Rm_NameServer;
-
-/** Pointer to the RM instance's policy information */
-typedef void *Rm_Policy;
-
-/** Pointer to the RM instance's valid policy instances */
-typedef void *Rm_PolicyValidInstances;
-
-
 /**
  * @brief RM protocol packet resource information
  */
@@ -89,7 +81,7 @@ typedef struct {
     int32_t  alignment;
     /** If applicable, the NameServer name assigned to the specified
      *  resource.  Used for commands centering on RM NameServer actions */
-    char     nsName[RM_RESOURCE_NAME_MAX_CHARS];
+    char     nameServerName[RM_RESOURCE_NAME_MAX_CHARS];
 } Rm_ResourceInfo;
 
 /**
@@ -142,8 +134,9 @@ typedef enum {
 } Rm_AllocatorOp;
 
 typedef struct {
-    void            *serviceSrcInstNode;
+    Rm_PolicyValidInstNode *serviceSrcInstNode;
     Rm_AllocatorOp   operation;
+    uint32_t         allocType;
     Rm_ResourceInfo *resourceInfo;
 } Rm_AllocatorOpInfo;
 
@@ -155,23 +148,32 @@ typedef struct Rm_Allocator_s {
     struct Rm_Allocator_s *nextAllocator;
 } Rm_Allocator;
 
+
+typedef struct {
+    char                    instName[RM_INSTANCE_NAME_MAX_CHARS];
+    void                   *startupDtb;
+    Rm_PolicyValidInstTree *validInstTree;
+    uint32_t                requestCount;
+    Rm_ServicePreMainReq   *preMainReqList;
+} Rm_PreMainInst;
+
 typedef struct {
-    char name[RM_INSTANCE_NAME_MAX_CHARS];
-    Rm_InstType instType;
-    bool registeredWithDelegateOrServer;
-    Rm_Policy policy;
-    Rm_PolicyValidInstances validInstances;    
-    Rm_Allocatorallocators;
-    Rm_NameServer nameServer;
+    char                    instName[RM_INSTANCE_NAME_MAX_CHARS];
+    Rm_InstType             instType;
+    bool                    registeredWithDelegateOrServer;
+    void                   *policy;
+    Rm_PolicyValidInstTree *validInstances;    
+    Rm_Allocator           *allocators;
+    Rm_NameServerTree      *nameServer;
     /* RM instance transport parameters */
-    Rm_TransportRouteMap routeMap;
+    Rm_TransportRouteMap    routeMap;
     /* RM Transaction sequence number counter */
-    uint32_t transactionSeqNum;
+    uint32_t                transactionSeqNum;
     /* RM transaction queue */
-    Rm_TransactionQueue transactionQueue;
+    Rm_TransactionQueue     transactionQueue;
     /* Transport API function pointers - not global in case application wants to
       * hook up different transports to RM */
-    Rm_TransportCallouts transport;
+    Rm_TransportCallouts    transport;
 } Rm_Inst;
 
 Rm_Transaction *Rm_transactionQueueAdd(Rm_Inst *rmInst);
@@ -179,7 +181,7 @@ Rm_Transaction *Rm_transactionQueueFind(Rm_Inst *rmInst, uint32_t transactionId)
 int32_t Rm_transactionQueueDelete(Rm_Inst *rmInst, uint32_t transactionId);
 uint32_t Rm_transactionGetSequenceNum(Rm_Inst *rmInst);
 
-Rm_Allocator *Rm_allocatorFind(Rm_Inst *rmInst, char *resourceName);
+Rm_Allocator *Rm_allocatorFind(Rm_Allocator *allocatorList, char *resourceName);
 
 void Rm_transactionResponder (Rm_Inst *rmInst, Rm_Transaction *transaction);
 void Rm_transactionForwarder (Rm_Inst *rmInst, Rm_Transaction *transaction);
@@ -191,7 +193,7 @@ void Rm_transactionProcessor (Rm_Inst *rmInst, Rm_Transaction *transaction);
 
 /* Declare the tree structure nodes */
 typedef struct Rm_AllocatedTo_s {
-    void                    *instNameNode;
+    Rm_PolicyValidInstNode  *instNameNode;
     struct Rm_AllocatedTo_s *nextAllocatedTo;
 } Rm_AllocatedTo;