]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blobdiff - rm_services.h
NOTICE OF RELOCATION
[keystone-rtos/rm-lld.git] / rm_services.h
index ec9c21e79c30b13f8858540658623bd4b1086035..a2f3bba0cf7f0f123b1f27260b1585e051bcfe9a 100644 (file)
@@ -1,13 +1,13 @@
 /**
  *   @file  rm_services.h
  *
- *   @brief   
- *      This is the RM include file for services provided to components that 
+ *   @brief
+ *      This is the RM include file for services provided to components that
  *      register a RM instance
  *
  *  \par
  *  ============================================================================
- *  @n   (C) Copyright 2012-2013, Texas Instruments, Inc.
+ *  @n   (C) Copyright 2012-2015, Texas Instruments, Inc.
  * 
  *  Redistribution and use in source and binary forms, with or without 
  *  modification, are permitted provided that the following conditions 
@@ -78,17 +78,17 @@ typedef enum {
     Rm_service_LAST
 } Rm_ServiceType;
 
-/** 
+/**
  * @brief RM service response information used by RM to provide service
  *        request results back to the application components
  */
 typedef struct {
-    /** RM instance handle from which the service request that spawned this 
+    /** RM instance handle from which the service request that spawned this
      *  result originated.  Used by application to sort responses, received
      *  via callback function, from RM instances located on the same core. */
     Rm_Handle rmHandle;
     /** Service request state.  State values can be found in rm.h starting
-     *  with #RM_SERVICE_PROCESSING, #RM_SERVICE_DENIED_BASE, and 
+     *  with #RM_SERVICE_PROCESSING, #RM_SERVICE_DENIED_BASE, and
      *  #RM_ERROR_LIBFDT_START */
     int32_t   serviceState;
     /** The service ID is returned to the application in order to match service
@@ -99,36 +99,38 @@ typedef struct {
     uint32_t  serviceId;
     /** Affected resource name */
     char      resourceName[RM_NAME_MAX_CHARS];
-    /** The resource base value allocated, freed, or mapped to NameServer name. */
+    /** The resource base value allocated, freed, or mapped to NameServer
+     *  name. */
     int32_t   resourceBase;
     /** The resource length starting at base allocated, freed, or mapped to
      *  NameServer name. */
     uint32_t  resourceLength;
 /** resourceNumOwners is not valid unless >= 0 */
-#define RM_RESOURCE_NUM_OWNERS_INVALID (-1)      
+#define RM_RESOURCE_NUM_OWNERS_INVALID (-1)
     /** Current number of owners for the returned resource.  A value greater
      *  than one means the resource is being shared.  This value is only valid
-     *  if the serviceState is RM_SERVICE_APPROVED or RM_SERVICE_APPROVED_STATIC. */
+     *  if the serviceState is RM_SERVICE_APPROVED or
+     *  RM_SERVICE_APPROVED_STATIC. */
     int32_t   resourceNumOwners;
 /** instAllocCount is not valid unless >= 0 */
-#define RM_INST_ALLOC_COUNT_INVALID (-1) 
-    /** Number of times the requesting instance has allocated the returned resource.
-     *  This value is only valid if the serviceState is RM_SERVICE_APPROVED or
-     *  RM_SERVICE_APPROVED_STATIC */
+#define RM_INST_ALLOC_COUNT_INVALID    (-1)
+    /** Number of times the requesting instance has allocated the returned
+     *  resource.  This value is only valid if the serviceState is
+     *  RM_SERVICE_APPROVED or RM_SERVICE_APPROVED_STATIC */
     int32_t   instAllocCount;
 } Rm_ServiceRespInfo;
 
-/** 
+/**
  * @brief RM service callback function
  */
 typedef struct {
-    /** Component callback function.  RM calls this function when a blocking 
+    /** Component callback function.  RM calls this function when a blocking
      *  resource service request is complete. The callback function supplied
      *  for this parameter must match the function pointer prototype. */
     void (*serviceCallback) (Rm_ServiceRespInfo *serviceResponse);
 } Rm_ServiceCallback;
 
-/** 
+/**
  * @brief RM service request information
  */
 typedef struct {
@@ -156,15 +158,16 @@ typedef struct {
  *     property defined.
  *  b) The default alignment of 1 if no alignment is specified in the policy
  *     for the resource.
- *  This value is only valid if resourceBase is set to #RM_RESOURCE_BASE_UNSPECIFIED */
-#define RM_RESOURCE_ALIGNMENT_UNSPECIFIED (-1)      
+ *  This value is only valid if resourceBase is set to
+ *  #RM_RESOURCE_BASE_UNSPECIFIED */
+#define RM_RESOURCE_ALIGNMENT_UNSPECIFIED (-1)
     /** Alignment of the resource affected by the service request.  Only valid
      *  if resourceBase is set to #RM_RESOURCE_BASE_UNSPECIFIED.
      *  #RM_RESOURCE_ALIGNMENT_UNSPECIFIED can be substituted. */
     int32_t             resourceAlignment;
-    /** The NameServer name associated, or to be associated, with a resource. 
-     *  The NameServer name has precedence over #resourceBase and #resourceLength
-     *  for all resource modification service types as well as
+    /** The NameServer name associated, or to be associated, with a resource.
+     *  The NameServer name has precedence over #resourceBase and
+     *  #resourceLength for all resource modification service types as well as
      *  #Rm_service_RESOURCE_GET_BY_NAME.  If the NameServer name and the base
      *  and length are not NULL the resource information retrieved from the
      *  NameServer entry for the name will replace the values present in
@@ -177,7 +180,7 @@ typedef struct {
     Rm_ServiceCallback  callback;
 } Rm_ServiceReqInfo;
 
-/** 
+/**
  * @brief RM service handle provided to application components for requesting
  *        services
  */
@@ -186,36 +189,38 @@ typedef struct {
     void *rmHandle;
     /**
      *  @b Description
-     *  @n  
+     *  @n
      *      Processes service requests from application components.  Responses
-     *      are returned immediately if the service request could be satisfied 
-     *      without blocking.  If the service request requires a blocking operation,
-     *      such as forwarding the service request to another instance for
-     *      validation, the response will be received via the Rm_ServerCallback
+     *      are returned immediately if the service request could be satisfied
+     *      without blocking.  If the service request requires a blocking
+     *      operation, such as forwarding the service request to another
+     *      instance for validation, the response will be received via the
+     *      Rm_ServerCallback
      *
      *   @param[in] rmHandle
      *      RM instance handle specifies the instance that handles the service
-     *      request.  The request's result, if policy checks are involved, will be
-     *      based on the permissions assigned to the rmHandle's instance name within
-     *      global/static policy.
-     *  
+     *      request.  The request's result, if policy checks are involved, will
+     *      be based on the permissions assigned to the rmHandle's instance
+     *      name within global/static policy.
+     *
      *  @param[in]  serviceRequest
      *      Pointer to the service request structure
      *
      *  @param[out]  serviceResponse
      *      Pointer to a service response structure.
      */
-    void (*Rm_serviceHandler)(void *rmHandle, const Rm_ServiceReqInfo *serviceRequest,
+    void (*Rm_serviceHandler)(void *rmHandle,
+                              const Rm_ServiceReqInfo *serviceRequest,
                               Rm_ServiceRespInfo *serviceResponse);
 } Rm_ServiceHandle;
 
 /**
  *  @b Description
- *  @n  
- *      This function returns a RM service handle to the application to 
- *      provide services to software components (LLDs, BIOS, etc) that want to use RM
- *      for resource management. Only one service handle can be opened from
- *      each RM instance.
+ *  @n
+ *      This function returns a RM service handle to the application to
+ *      provide services to software components (LLDs, BIOS, etc) that want to
+ *      use RM for resource management. Only one service handle can be opened
+ *      from each RM instance.
  *
  *  @param[in]  rmHandle
  *      RM instance handle from which the service handle will be opened
@@ -227,13 +232,14 @@ typedef struct {
  *  @retval
  *      Success - Rm_ServiceHandle and result = #RM_OK
  *  @retval
- *      Failure - NULL Rm_ServiceHandle and result = #RM_ERROR_SERVICE_HANDLE_MEM_ALLOC_FAILED
+ *      Failure - NULL Rm_ServiceHandle and
+ *                result = #RM_ERROR_SERVICE_HANDLE_MEM_ALLOC_FAILED
  */
 Rm_ServiceHandle *Rm_serviceOpenHandle(Rm_Handle rmHandle, int32_t *result);
 
 /**
  *  @b Description
- *  @n  
+ *  @n
  *      This function closes a RM instance's service handle
  *
  *  @param[in]  rmServiceHandle
@@ -246,8 +252,8 @@ Rm_ServiceHandle *Rm_serviceOpenHandle(Rm_Handle rmHandle, int32_t *result);
  */
 int32_t Rm_serviceCloseHandle(Rm_ServiceHandle *rmServiceHandle);
 
-/** 
-@} 
+/**
+@}
 */
 
 #ifdef __cplusplus