diff --git a/qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.c b/qnx/src/ipc3x_dev/ti/syslink/resources/RscTable.c
index 93edfa62101b11ecfccea7f3c50c6caf3d189c2f..875946a6108d7ab5fb1b660ea8e4719a2390326c 100644 (file)
*
* ============================================================================
*
- * Copyright (c) 2012, Texas Instruments Incorporated
+ * Copyright (c) 2012-2015, Texas Instruments Incorporated
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
#include <_MultiProc.h>
#include <dload_api.h>
#include <ti/syslink/ProcMgr.h>
+#include <Processor.h>
#include <Bitops.h>
#include <_MessageQCopyDefs.h>
#include <ProcDefs.h>
* Macros and types
* =============================================================================
*/
+/*
+ * ZEROINIT_CHUNKS - Set to 1 to zero-init chunk allocations for
+ * dynamically allocated remote core memory carveout
+ * sections. Default is 0 to achieve better startup
+ * performance.
+ */
+#define ZEROINIT_CHUNKS 0
#define RSC_TABLE_STRING ".resource_table"
#define DDR_MEM 0x80000000
UInt32 size;
} Carveout_Elem;
-typedef struct Carveout_Object_tag {
- UInt32 addr;
- UInt32 size;
- List_Handle freeBlocks;
-} Carveout_Object;
-
/*!
* @brief RscTable Header
*/
/*!< Resource table length. */
UInt32 rscTableDA;
/*!< Resource table device address. */
- Carveout_Object * carveout[SYSLINK_MAX_MEMENTRIES];
- /*!< Carveouts for this table. */
- UInt32 numCarveouts;
- /*!< Carveouts for this table. */
- SysLink_MemEntry memEntries[SYSLINK_MAX_MEMENTRIES];
+ Ipc_MemEntry memEntries[IPC_MAX_MEMENTRIES];
/*!< Memory Entries for the remote processor. */
UInt32 numMemEntries;
/*!< Number of Memory Entries in the memEntries array. */
*
* @brief RscTable state object variable
*/
-#if !defined(SYSLINK_BUILD_DEBUG)
+#if !defined(IPC_BUILD_DEBUG)
static
-#endif /* if !defined(SYSLINK_BUILD_DEBUG) */
+#endif /* if !defined(IPC_BUILD_DEBUG) */
RscTable_ModuleObject RscTable_state;
status = DLOAD_get_section_offset((LOADER_FILE_DESC *)fileDesc,
RSC_TABLE_STRING, &res_offs, &res_size,
&res_addr);
- if (status >= 0) {
+ if (status == TRUE) {
obj = Memory_calloc(NULL, sizeof (RscTable_Object), 0, NULL);
if (obj != NULL) {
// Allocate memory to hold the table
return (RscTable_Handle)obj;
}
-/* Helper functions for processing carveout */
-Int Carveout_register (RscTable_Object *obj, UInt32 id, Ptr carveOut,
- UInt32 carveOutLen)
-{
- Int status = 0;
- Carveout_Object * cout = NULL;
- List_Params params;
-
- cout = Memory_alloc(NULL, sizeof(Carveout_Object), 0, NULL);
- if (cout) {
- cout->addr = (UInt32)carveOut;
- cout->size = carveOutLen;
- List_Params_init(¶ms);
- cout->freeBlocks = List_create(¶ms);
- if (cout->freeBlocks == NULL) {
- status = RSCTABLE_E_MEMORY;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_register",
- status,
- "Unable to create free list");
- Memory_free(NULL, cout, sizeof(Carveout_Object));
- cout = NULL;
- }
- else {
- // Add the whole of the memory to the free list
- Carveout_Elem * elem = Memory_alloc(NULL, sizeof(Carveout_Elem),
- 0, NULL);
- if (elem) {
- elem->addr = cout->addr;
- elem->size = cout->size;
- List_put(cout->freeBlocks, (List_Elem *)elem);
- }
- else {
- status = RSCTABLE_E_MEMORY;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_register",
- status,
- "Unable to allocate elem");
- List_delete(&cout->freeBlocks);
- Memory_free(NULL, cout, sizeof(Carveout_Object));
- cout = NULL;
- }
- }
- }
- else {
- status = RSCTABLE_E_MEMORY;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_register",
- status,
- "Unable to allocate carveout structure");
- }
-
- obj->carveout[id] = cout;
- obj->numCarveouts++;
- return status;
-}
-
-Int Carveout_unregister (RscTable_Object *obj, UInt32 id)
-{
- Int status = 0;
- List_Elem * elem = NULL;
-
- if (obj->carveout[id]) {
- if (obj->carveout[id]->freeBlocks) {
- while ((elem = List_get(obj->carveout[id]->freeBlocks)))
- Memory_free(NULL, elem, sizeof(Carveout_Elem));
- List_delete(&obj->carveout[id]->freeBlocks);
- }
-
- Memory_free(NULL, obj->carveout[id], sizeof(Carveout_Object));
- obj->carveout[id] = NULL;
- obj->numCarveouts--;
- }
- else {
- status = RSCTABLE_E_INVALIDARG;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_unregister",
- status,
- "No carveout associated with obj");
- }
-
- return status;
-}
-
// allocate any addr
Int Chunk_allocate (RscTable_Object *obj, UInt32 size, UInt32 * pa)
{
"Chunk_allocate",
status,
"Invalid arg passed");
+ GT_3trace(curTrace, GT_4CLASS, "obj [0x%x] obj->chunks [0x%x] pa [0x%x]", obj, obj ? obj->chunks : NULL, pa);
}
else {
// first try to allocate contiguous mem
da = mmap64(NULL, size,
PROT_NOCACHE | PROT_READ | PROT_WRITE,
+#if ZEROINIT_CHUNKS
MAP_ANON | MAP_PHYS | MAP_SHARED,
+#else
+ MAP_ANON | MAP_PHYS | MAP_SHARED | MAP_NOINIT,
+#endif
NOFD,
0);
if (da == MAP_FAILED) {
return status;
}
-// allocate any addr from a specified carveout
-Int Carveout_allocate (RscTable_Object *obj, UInt32 size, UInt32 * pa)
-{
- Int status = 0;
- Carveout_Object * cout = NULL;
- List_Elem * elem = NULL;
- Bool found = FALSE;
- UInt i = 0;
-
- if (!pa || !obj || !obj->numCarveouts) {
- status = RSCTABLE_E_INVALIDARG;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_allocate",
- status,
- "Invalid arg passed");
- }
- else {
- for (i = 0; i < obj->numCarveouts; i++) {
- *pa = 0;
- cout = obj->carveout[i];
-
- // search for a free block with sufficient size
- List_traverse(elem, cout->freeBlocks) {
- if (((Carveout_Elem *)elem)->size >= size) {
- found = TRUE;
- break;
- }
- }
- if (found) {
- UInt32 rem = 0;
- UInt32 addr = 0;
-
- // found a spot for our request
- addr = ((Carveout_Elem *)elem)->addr;
- rem = ((Carveout_Elem *)elem)->size - size;
- if (rem) {
- ((Carveout_Elem *)elem)->addr += size;
- ((Carveout_Elem *)elem)->size = rem;
- }
- else {
- List_remove(cout->freeBlocks, elem);
- Memory_free (NULL, elem, sizeof(Carveout_Elem));
- }
- *pa = addr;
- break;
- }
- }
- if (i == obj->numCarveouts) {
- status = RSCTABLE_E_MEMORY;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_allocate",
- status,
- "Not enough room in carveout");
- }
- }
- return status;
-}
-
-// allocate specific addr
-Int Carveout_reserve (RscTable_Object *obj, UInt32 size, UInt32 pa)
-{
- Int status = 0;
- Carveout_Object * cout = NULL;
- List_Elem * elem = NULL;
- Bool found = FALSE;
- UInt i = 0;
-
- if (!pa || !obj || !obj->numCarveouts) {
- status = RSCTABLE_E_INVALIDARG;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_reserve",
- status,
- "Invalid arg passed");
- }
- else {
- for (i = 0; i < obj->numCarveouts; i++) {
- cout = obj->carveout[i];
-
- // search for a free block with sufficient size
- List_traverse(elem, cout->freeBlocks) {
- if ((((Carveout_Elem *)elem)->addr <= pa) &&
- ((((Carveout_Elem *)elem)->addr +
- ((Carveout_Elem *)elem)->size) >= (pa + size))) {
- found = TRUE;
- break;
- }
- }
- if (found) {
- UInt32 rem_start = 0;
- UInt32 rem_end = 0;
-
- // found a spot for our request
- if (((Carveout_Elem *)elem)->addr < pa) {
- // there is free mem at the beginning of the block
- rem_start = pa - ((Carveout_Elem *)elem)->addr;
- }
- if (((Carveout_Elem *)elem)->addr + ((Carveout_Elem *)elem)->size >
- (pa + size)) {
- // there is free mem at the end of the block
- rem_end = ((Carveout_Elem *)elem)->addr +
- ((Carveout_Elem *)elem)->size - (pa + size);
- }
- // now carve up the block
- if (rem_start) {
- ((Carveout_Elem *)elem)->size = rem_start;
- }
- else if (rem_end) {
- ((Carveout_Elem *)elem)->size = rem_end;
- ((Carveout_Elem *)elem)->addr = pa + size;
- }
- else {
- List_remove(cout->freeBlocks, elem);
- Memory_free (NULL, elem, sizeof(Carveout_Elem));
- }
- if (rem_start && rem_end) {
- Carveout_Elem * c_elem = NULL;
- c_elem = Memory_alloc (NULL, sizeof(Carveout_Elem), 0, NULL);
- if (c_elem) {
- c_elem->size = rem_end;
- c_elem->addr = pa + size;
- List_insert(cout->freeBlocks, (List_Elem *)&c_elem->elem,
- elem->next);
- }
- else {
- /* add mem back to free block */
- ((Carveout_Elem *)elem)->size += (size + rem_end);
- status = RSCTABLE_E_MEMORY;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_reserve",
- status,
- "Unable to allocate elem");
- }
- }
- break;
- }
- }
- if (i == obj->numCarveouts) {
- status = RSCTABLE_E_MEMORY;
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "Carveout_reserve",
- status,
- "Specified addr/size not available");
-
- }
- }
- return status;
-}
-
Int
-RscTable_process (UInt16 procId, Bool mmuEnabled, UInt32 numCarveouts,
- Ptr carveOut[], UInt32 carveOutLen[], Bool tryAlloc,
- UInt32 * numBlocks)
+RscTable_process (UInt16 procId, Bool tryAlloc, UInt32 * numBlocks,
+ Processor_Handle procHandle, ProcMgr_BootMode bootMode)
{
Int status = 0;
Int ret = 0;
RscTable_Header * table = NULL;
UInt i = 0, j = 0;
UInt dmem_num = 0;
+ struct fw_rsc_vdev *vdev = NULL;
+ struct fw_rsc_vdev_vring * vring = NULL;
+ UInt32 vr_size = 0;
+#if !ZEROINIT_CHUNKS
+ UInt32 vringVA = 0, vringSize = 0;
+#endif
// Find the table for this coreId, if not found, return an error
if (procId >= MultiProc_MAXPROCESSORS || !RscTable_state.handles[procId]) {
obj->numMemEntries = 0;
- // Register carveout mem regions if provided
- if (numCarveouts && carveOut && carveOutLen) {
- for (i = 0; i < numCarveouts; i++) {
- status = Carveout_register(obj, i, carveOut[i], carveOutLen[i]);
- if (status < 0) {
- GT_setFailureReason (curTrace,
- GT_4CLASS,
- "RscTable_process",
- status,
- "Carveout_register failed");
- return status;
- }
- }
- }
-
// TODO: Check the version
printf("RscTable_process: RscTable version is [%d]\n", table->ver);
case TYPE_CARVEOUT :
{
// TODO: need to allocate this mem from carveout
- struct fw_rsc_carveout * cout = (struct fw_rsc_carveout *)entry;
+ struct fw_rsc_carveout * cout =
+ (struct fw_rsc_carveout *)entry;
UInt32 pa = 0;
- if (cout->pa == 0)
- if (mmuEnabled)
+
+ if (bootMode == ProcMgr_BootMode_NoBoot) {
+ /* Lookup physical address of carveout from page table */
+ if (Processor_translateFromPte(procHandle,
+ &cout->pa, cout->da) != ProcMgr_S_SUCCESS) {
+ status = RSCTABLE_E_FAIL;
+ GT_setFailureReason (curTrace,
+ GT_4CLASS,
+ "RscTable_process",
+ status,
+ "Failed to lookup address from page table");
+ ret = -1;
+ }
+ }
+ else {
+ if (cout->pa == 0) {
ret = Chunk_allocate (obj, cout->len, &pa);
- else {
- ret = Carveout_reserve (obj, cout->len, cout->da);
- pa = cout->da;
}
- else
- ret = Carveout_reserve (obj, cout->len, cout->pa);
- if (!ret) {
- cout->pa = pa;
- if (obj->numMemEntries == SYSLINK_MAX_MEMENTRIES) {
+ if (!ret) {
+ cout->pa = pa;
+ }
+ }
+
+ if (ret == 0) {
+ if (obj->numMemEntries == IPC_MAX_MEMENTRIES) {
ret = -1;
}
else {
obj->memEntries[obj->numMemEntries].slaveVirtAddr =
- cout->da;
+ cout->da;
obj->memEntries[obj->numMemEntries].masterPhysAddr =
- cout->pa;
- obj->memEntries[obj->numMemEntries].size = cout->len;
- //if (mmuEnabled) {
- obj->memEntries[obj->numMemEntries].map = TRUE;
- obj->memEntries[obj->numMemEntries].mapMask =
- ProcMgr_SLAVEVIRT;
- //}
- //else
- // obj->memEntries[obj->numMemEntries].map = FALSE;
- obj->memEntries[obj->numMemEntries].isCached = FALSE;
+ cout->pa;
+ obj->memEntries[obj->numMemEntries].size =
+ cout->len;
+ obj->memEntries[obj->numMemEntries].map = TRUE;
+ obj->memEntries[obj->numMemEntries].mapMask =
+ ProcMgr_SLAVEVIRT;
+ obj->memEntries[obj->numMemEntries].isCached =
+ FALSE;
obj->memEntries[obj->numMemEntries].isValid = TRUE;
obj->numMemEntries++;
}
printf ("RscTable_process: carveout [%s] @ da [0x%08x] pa [0x%08x] len [0x%x]\n", cout->name, cout->da, cout->pa, cout->len);
break;
}
+ case TYPE_INTMEM :
+ {
+ struct fw_rsc_intmem * cout = (struct fw_rsc_intmem *)entry;
+
+ if (obj->numMemEntries == IPC_MAX_MEMENTRIES) {
+ ret = -1;
+ }
+ else {
+ obj->memEntries[obj->numMemEntries].slaveVirtAddr =
+ cout->da;
+ obj->memEntries[obj->numMemEntries].masterPhysAddr =
+ cout->pa;
+ obj->memEntries[obj->numMemEntries].size = cout->len;
+ /* do not map to slave MMU */
+ obj->memEntries[obj->numMemEntries].map = FALSE;
+ obj->memEntries[obj->numMemEntries].mapMask =
+ ProcMgr_SLAVEVIRT;
+ obj->memEntries[obj->numMemEntries].isCached = FALSE;
+ obj->memEntries[obj->numMemEntries].isValid = TRUE;
+ obj->numMemEntries++;
+ }
+ printf ("RscTable_process: intmem [%s] @ da [0x%08x]"
+ " pa [0x%08x] len [0x%x]\n", cout->name, cout->da,
+ cout->pa, cout->len);
+ break;
+ }
case TYPE_DEVMEM :
{
// only care about mem in DDR for now
struct fw_rsc_devmem * dmem = (struct fw_rsc_devmem *)entry;
UInt32 pa = 0;
+
if (dmem->pa >= DDR_MEM) {
// HACK: treat vring mem specially, vring is always the
// first devmem entry, may change in future
if (dmem_num++ == 0) {
- // memory should already be reserved for vring
- if (obj->vringPa == 0) {
- // vdev must have been defined first
- GT_setFailureReason (curTrace,
+ if (bootMode == ProcMgr_BootMode_NoBoot) {
+ /*
+ * Lookup physical address of vrings from page
+ * table
+ */
+ if (Processor_translateFromPte(procHandle,
+ &pa, dmem->da) != ProcMgr_S_SUCCESS) {
+ status = RSCTABLE_E_FAIL;
+ GT_setFailureReason (curTrace,
+ GT_4CLASS,
+ "RscTable_process",
+ status,
+ "Failed to lookup address from page table");
+ ret = -1;
+ }
+ obj->vringPa = pa;
+ obj->vringBufsPa = pa + vr_size;
+ }
+ else {
+ // memory should already be reserved for vring
+ if (obj->vringPa == 0) {
+ // vdev must have been defined first
+ GT_setFailureReason (curTrace,
GT_4CLASS,
"RscTable_process",
status,
"Vring Must be Defined First");
- ret = -1;
- }
- else if (obj->vringPa != dmem->pa &&
- (!tryAlloc || !mmuEnabled)) {
- // defined pa does not match allocated pa, and
- // either the mmu is disabled or the platform has
- // not given permission to allocate on our own
- ret = -1;
- GT_setFailureReason (curTrace,
+ ret = -1;
+ }
+ else if (obj->vringPa != dmem->pa && (!tryAlloc)) {
+ // defined pa does not match allocated pa, and
+ // either the mmu is disabled or the platform has
+ // not given permission to allocate on our own
+ ret = -1;
+ GT_setFailureReason (curTrace,
GT_4CLASS,
"RscTable_process",
status,
"Vring PA Mis-match");
- GT_2trace (curTrace, GT_4CLASS,
+ GT_2trace (curTrace, GT_4CLASS,
"vringPa is 0x%x, dmem->pa is 0x%x",
obj->vringPa, dmem->pa);
+ }
}
- else {
+ if (ret == 0) {
+#if !ZEROINIT_CHUNKS
+ /* Map the phys mem to local */
+ vringVA = (UInt32)mmap_device_io(vringSize,
+ obj->vringPa);
+ if (vringVA != MAP_DEVICE_FAILED) {
+ /* Zero-init the vring */
+ Memory_set((Ptr)vringVA, 0, vringSize);
+ munmap_device_io(vringVA, vringSize);
+ }
+ else {
+ GT_0trace(curTrace, GT_4CLASS,
+ "RscTable_alloc: "
+ "Warning - Unable to zero-init vring mem");
+ }
+#endif
+ /*
+ * Override the vring 'da' field in resource table.
+ * This allows the slave to look it up when creating
+ * the VirtQueues
+ */
+ for (j = 0; j < vdev->num_of_vrings; j++) {
+ vring = (struct fw_rsc_vdev_vring *)
+ ((UInt32)vdev + sizeof(*vdev) +
+ (sizeof(*vring) * j));
+ vring->da = obj->vringPa + (j *
+ vr_size / vdev->num_of_vrings);
+ }
+
+ /*
+ * Override the physical address provided by the
+ * entry with the physical locations of the vrings
+ * as allocated when we processed the vdev entry
+ * (or as allocated by external loader for late
+ * attach mode)
+ */
dmem->pa = obj->vringPa;
}
}
- else {
- ret = Carveout_reserve (obj, dmem->len, dmem->pa);
- if (ret && mmuEnabled && tryAlloc) {
- ret = Carveout_allocate (obj, dmem->len, &pa);
- if (!ret) dmem->pa = pa;
- }
- }
}
if (!ret) {
- if (obj->numMemEntries == SYSLINK_MAX_MEMENTRIES) {
+ if (obj->numMemEntries == IPC_MAX_MEMENTRIES) {
ret = -1;
}
else {
obj->memEntries[obj->numMemEntries].masterPhysAddr =
dmem->pa;
obj->memEntries[obj->numMemEntries].size = dmem->len;
- //if (mmuEnabled) {
- obj->memEntries[obj->numMemEntries].map = TRUE;
- obj->memEntries[obj->numMemEntries].mapMask =
- ProcMgr_SLAVEVIRT;
- //}
- //else
- // obj->memEntries[obj->numMemEntries].map = FALSE;
+ obj->memEntries[obj->numMemEntries].map = TRUE;
+ obj->memEntries[obj->numMemEntries].mapMask =
+ ProcMgr_SLAVEVIRT;
obj->memEntries[obj->numMemEntries].isCached = FALSE;
obj->memEntries[obj->numMemEntries].isValid = TRUE;
obj->numMemEntries++;
case TYPE_VDEV :
{
// TODO: save vring info for future use
- struct fw_rsc_vdev *vdev = (struct fw_rsc_vdev *)entry;
- struct fw_rsc_vdev_vring * vring = NULL;
- UInt32 vr_size = 0;
UInt32 vr_bufs_size = 0;
UInt32 pa = 0;
+
+ vdev = (struct fw_rsc_vdev *)entry;
obj->numVrings = vdev->num_of_vrings;
obj->vrings = Memory_alloc(NULL,
sizeof (*vring) * obj->numVrings, 0,
vring = (struct fw_rsc_vdev_vring *)
((UInt32)vdev + sizeof(*vdev) +
(sizeof(*vring) * j));
+ /*
+ * Making a copy of original vring, given obj->vrings[j].da
+ * is used as slave virtual address in RscTable_getInfo(),
+ * and that is what the original vring definition contains.
+ */
Memory_copy (&obj->vrings[j], vring, sizeof (*vring));
printf ("RscTable_process: vring [%d] @ [0x%08x]\n",
vring->num, vring->da);
vr_size += ROUND_UP(MessageQCopy_RINGSIZE, 0x4000);
vr_bufs_size += (vring->num) * RPMSG_BUF_SIZE;
}
- if (!ret)
+ if ((!ret) && (bootMode != ProcMgr_BootMode_NoBoot)) {
// HACK: round up to multiple of 1MB, because we know this
// is the size of the remote entry
- if (mmuEnabled)
- ret = Chunk_allocate(obj,
- ROUND_UP(vr_size + vr_bufs_size, 0x100000),
- &pa);
- else
- ret = Carveout_allocate(obj,
- ROUND_UP(vr_size + vr_bufs_size, 0x100000),
- &pa);
+ ret = Chunk_allocate(obj,
+ ROUND_UP(vr_size + vr_bufs_size, 0x100000),
+ &pa);
+ }
+
+ if (!ret) {
+#if !ZEROINIT_CHUNKS
+ vringSize = vr_size + vr_bufs_size;
+#endif
+ if (bootMode != ProcMgr_BootMode_NoBoot) {
+ obj->vringPa = pa;
+ obj->vringBufsPa = pa + vr_size;
+ }
+ }
else if (obj->vrings) {
Memory_free (NULL, obj->vrings,
sizeof(*vring) * obj->numVrings);
obj->vrings = NULL;
}
- if (!ret) {
- obj->vringPa = pa;
- obj->vringBufsPa = pa + vr_size;
- }
break;
}
- case TYPE_CRASHDUMP :
- // what to do with this?
- break;
default :
break;
}
obj->numMemEntries = 0;
}
*numBlocks = obj->numMemEntries;
- // Can un-register the carveout now? Don't need it anymore?
- for (i = 0; i < numCarveouts; i++)
- Carveout_unregister(obj, i);
return status;
}
Int
-RscTable_getMemEntries (UInt16 procId, SysLink_MemEntry *memEntries,
+RscTable_getMemEntries (UInt16 procId, Ipc_MemEntry *memEntries,
UInt32 * numMemEntries)
{
Int status = 0;
return status;
}
+Int RscTable_setStatus(UInt16 procId, UInt32 value)
+{
+ Int i;
+ Int status = 0;
+
+ RscTable_Object * obj = (RscTable_Object *)RscTable_state.handles[procId];
+ RscTable_Header * table = (RscTable_Header *)obj->rscTable;
+
+ /* Look for the vdev entry and update the status */
+ for (i = 0; i < table->num; i++) {
+ RscTable_MemEntry * entry =
+ (RscTable_MemEntry *)((UInt32)table + table->offset[i]);
+ if (entry->type == TYPE_VDEV) {
+ struct fw_rsc_vdev *vdev = (struct fw_rsc_vdev *)entry;
+ vdev->status = value;
+ break;
+ }
+ }
+
+ if (i == table->num) {
+ status = RSCTABLE_E_FAIL;
+ }
+
+ return status;
+}
+
#if defined (__cplusplus)
}
#endif /* defined (__cplusplus) */