---
title: setCommandBuffers
framework: kernel
role: pseudoSymbol
path: kernel/iofirewiresbp2orb/1813129-setcommandbuffers
---

# setCommandBuffers

Creates a page table from a list of ranges.

## Declaration

```occ
virtual IOReturn setCommandBuffers(
 IOMemoryDescriptor *memoryDescriptor,
 UInt32 offset = 0, 
 UInt32 length = 0 ); 
```

## Parameters

- `memoryDescriptor`: IOMemoryDescriptor describe ranges to be written to a page table.
- `offset`: Offset in bytes into data to begin writing table at.
- `length`: Number of bytes of data to map from offset.

## Return Value

Return Value Returns KIOReturnSuccess if the page table was written successfully.

## Overview

Overview Creates a page table with the given parameters. Any addresses mapped by this method must remain valid until setCommandBuffers is called again or releaseCommandBuffers is called. The SBP2 services do not release references to the command buffers just because the command has completed.

## See Also

### Miscellaneous

- [allocatePageTable](kernel/iofirewiresbp2orb/1812982-allocatepagetable.md)
- [deallocatePageTable](kernel/iofirewiresbp2orb/1812989-deallocatepagetable.md)
- [getCommandBufferDescriptor](kernel/iofirewiresbp2orb/1812997-getcommandbufferdescriptor.md)
- [getCommandFlags](kernel/iofirewiresbp2orb/1813002-getcommandflags.md)
- [getCommandGeneration](kernel/iofirewiresbp2orb/1813010-getcommandgeneration.md)
- [getCommandTimeout](kernel/iofirewiresbp2orb/1813017-getcommandtimeout.md)
- [getLogin](kernel/iofirewiresbp2orb/1813023-getlogin.md)
- [getMaxPayloadSize](kernel/iofirewiresbp2orb/1813031-getmaxpayloadsize.md)
- [getORBAddress](kernel/iofirewiresbp2orb/1813039-getorbaddress.md)
- [getRefCon](kernel/iofirewiresbp2orb/1813049-getrefcon.md)
- [getRefCon64](kernel/iofirewiresbp2orb/1813059-getrefcon64.md)
- [release](kernel/iofirewiresbp2orb/1813072-release.md)
- [releaseCommandBuffers](kernel/iofirewiresbp2orb/1813085-releasecommandbuffers.md)
- [setBufferConstraints](kernel/iofirewiresbp2orb/1813096-setbufferconstraints.md)
- [setCommandBlock(IOMemoryDescriptor *)](kernel/iofirewiresbp2orb/1813109-setcommandblock.md)
- [setCommandBlock(void *, UInt32)](kernel/iofirewiresbp2orb/1813121-setcommandblock.md)
- [setCommandBuffersAsRanges(IOMemoryDescriptor *, UInt32, UInt32)](kernel/iofirewiresbp2orb/1813141-setcommandbuffersasranges.md)
- [setCommandBuffersAsRanges(IOVirtualRange *, UInt32, IODirection, task_t, UInt32, UInt32)](kernel/iofirewiresbp2orb/1813149-setcommandbuffersasranges.md)
- [setCommandBuffersAsRanges64](kernel/iofirewiresbp2orb/1813162-setcommandbuffersasranges64.md)
- [setCommandFlags](kernel/iofirewiresbp2orb/1813178-setcommandflags.md)
- [setCommandGeneration](kernel/iofirewiresbp2orb/1813197-setcommandgeneration.md)
- [setCommandTimeout](kernel/iofirewiresbp2orb/1813211-setcommandtimeout.md)
- [setMaxPayloadSize](kernel/iofirewiresbp2orb/1813231-setmaxpayloadsize.md)
- [setRefCon](kernel/iofirewiresbp2orb/1813244-setrefcon.md)
- [setRefCon64](kernel/iofirewiresbp2orb/1813262-setrefcon64.md)
