I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
95 lines
3 KiB
Groff
95 lines
3 KiB
Groff
.\" -*- nroff -*-
|
|
.\"
|
|
.\" Copyright (c) 2003 M. Warner Losh
|
|
.\"
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" This program is free software.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
|
|
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
.\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.\" %FreeBSD: src/share/man/man9/bus_activate_resource.9,v 1.3 2003/05/30 21:13:32 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd March 28, 2003
|
|
.Dt BUS_ACTIVATE_RESOURCE 9
|
|
.Os
|
|
.Sh 名称
|
|
.Nm bus_activate_resource , bus_deactivate_resource
|
|
.Nd リソースの活性化または非活性化
|
|
.Sh 書式
|
|
.In sys/param.h
|
|
.In sys/bus.h
|
|
.Pp
|
|
.In machine/bus.h
|
|
.In sys/rman.h
|
|
.In machine/resource.h
|
|
.Ft int
|
|
.Fo bus_activate_resource
|
|
.Fa "device_t dev" "int type" "int rid" "struct resource *r"
|
|
.Fc
|
|
.Ft int
|
|
.Fo bus_deactivate_resource
|
|
.Fa "device_t dev" "int type" "int rid" "struct resource *r"
|
|
.Fc
|
|
.Sh 解説
|
|
これらの関数は、その前に割り当てられたリソースを活性化または非活性化します。
|
|
一般的に、バスドライバがそのリソースをデバイス空間にマップできるように
|
|
するため、リソースはドライバによってアクセスされる前に活性化されなければ
|
|
なりません。
|
|
.Pp
|
|
引数は以下の通りです。
|
|
.Bl -tag -width indent
|
|
.It Fa dev
|
|
そのリソースの所有を要求するデバイスです。
|
|
割り当ての前には、そのリソースは親のバスによって所有されています。
|
|
.It Fa type
|
|
割り当てたいリソースの型です。
|
|
これは下記の中の 1 つです。
|
|
.Pp
|
|
.Bl -tag -width ".Dv SYS_RES_MEMORY" -compact
|
|
.It Dv SYS_RES_IRQ
|
|
IRQ のリソースです。
|
|
.It Dv SYS_RES_DRQ
|
|
ISA DMA ラインのリソースです。
|
|
.It Dv SYS_RES_IOPORT
|
|
I/O ポートのリソースです。
|
|
.It Dv SYS_RES_MEMORY
|
|
I/O メモリのリソースです。
|
|
.El
|
|
.It Fa rid
|
|
割り当てられているリソースを識別するバス特有のハンドルへのポインタです。
|
|
.It Fa r
|
|
.Xr bus_alloc_resource 9
|
|
によって返される
|
|
.Vt "struct resource"
|
|
へのポインタです。
|
|
.El
|
|
.Sh 戻り値
|
|
成功時には 0 が返され、そうでなければエラーが返されます。
|
|
.Sh 関連項目
|
|
.Xr bus_alloc_resource 9 ,
|
|
.Xr device 9 ,
|
|
.Xr driver 9
|
|
.Sh 作者
|
|
このマニュアルページは
|
|
.An Warner Losh Aq imp@FreeBSD.org
|
|
が書きました。
|