2 .\" Copyright (c) 2003 M. Warner Losh
4 .\" All rights reserved.
6 .\" This program is free software.
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\" notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\" notice, this list of conditions and the following disclaimer in the
15 .\" documentation and/or other materials provided with the distribution.
17 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
18 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
21 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 .\" $FreeBSD: src/share/man/man9/bus_set_resource.9,v 1.5 2005/06/28 20:15:18 hmp Exp $
31 .Dt BUS_SET_RESOURCE 9
35 .Nd "associate a definite resource with a given resource ID"
42 .Fa "device_t dev" "int type" "int rid" "u_long start" "u_long count" "int cpuid"
50 address of the resource
55 Typically, client drivers do not use this interface.
56 Bus drivers, however, often use it to set up the resources a client driver
59 The arguments are as follows:
60 .Bl -tag -width ".Fa start"
62 The device to set the resource on.
64 The type of resource you want to allocate.
67 .Bl -tag -width ".Dv SYS_RES_MEMORY" -compact
78 A bus-specific handle that identifies the resource being allocated.
80 The start address of this resource.
82 The length of the resource.
83 For example, the size of the memory in bytes.
85 Owner CPU for interrupt resources. Other resource types, e.g.
86 IOPORT, MEMORY and DRQ, are shared across CPUs, so this parameter
90 Zero is returned on success, otherwise an error is returned.
92 .Xr bus_alloc_resource 9 ,
93 .Xr bus_get_resource 9 ,
97 This manual page was written by
98 .An Warner Losh Aq Mt imp@FreeBSD.org .