adjust resource allocated from a parent bus
This function is used to ask the parent bus to adjust the resource range
assigned to an allocated resource. The resource
should have been allocated by a previous
call to bus_alloc_resource(9)
. The new resource
range must overlap the existing range of r
argument should match the
argument passed to
when the resource was
Note that none of the constraints of the original allocation request such as
alignment or boundary restrictions are checked by
(). It is the caller's
responsibility to enforce any such requirements.
() method returns zero
on success or an error code on failure.
Grow an existing memory resource by 4096 bytes.
struct resource *res;
error = bus_adjust_resource(dev, SYS_RES_MEMORY, res,
rman_get_start(res), rman_get_end(res) + 0x1000);
() will fail if:
- The dev device does not have a parent
- The r resource is a shared resource.
- The new address range does not overlap with the existing address range of
- The new address range conflicts with another allocated resource.