diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-04-16 07:34:58 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2003-04-16 07:34:58 +0000 |
commit | f691cb702ba59ade461a5cba614c9b32c08e1cb4 (patch) | |
tree | 41e73be01d88ea793254fc33ee2514a663c530c9 /share/man/man9 | |
parent | 0266dc6c3d046f70bc62540dbf7087df93a3282b (diff) |
uncomment the bus_space_vaddr() since at least sparc64 has it
Diffstat (limited to 'share/man/man9')
-rw-r--r-- | share/man/man9/Makefile | 46 | ||||
-rw-r--r-- | share/man/man9/bus_space.9 | 112 |
2 files changed, 86 insertions, 72 deletions
diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 4002dbb53ff..f4ccfc70b3b 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1,10 +1,10 @@ -# $OpenBSD: Makefile,v 1.67 2003/03/12 13:06:18 tedu Exp $ +# $OpenBSD: Makefile,v 1.68 2003/04/16 07:34:57 mickey Exp $ # $NetBSD: Makefile,v 1.4 1996/01/09 03:23:01 thorpej Exp $ # Makefile for section 9 (kernel function and variable) manual pages. -MAN= altq.9 audio.9 autoconf.9 boot.9 bus_dma.9 bus_space.9 copy.9 \ - crypto.9 ctxsw.9 disk.9 disklabel.9 \ +MAN= altq.9 audio.9 autoconf.9 boot.9 bus_dma.9 bus_space.9 \ + copy.9 crypto.9 ctxsw.9 disk.9 disklabel.9 \ dohooks.9 dopowerhooks.9 doshutdownhooks.9 dostartuphooks.9 \ extattr.9 file.9 \ fork1.9 extent.9 getdevvp.9 getnewvnode.9 hash.9 hashinit.9 \ @@ -35,27 +35,41 @@ MLINKS+=bus_dma.9 bus_dmamap_create.9 bus_dma.9 bus_dmamap_destroy.9 \ bus_dma.9 bus_dmamem_map.9 bus_dma.9 bus_dmamem_unmap.9 \ bus_dma.9 bus_dmamem_mmap.9 MLINKS+=bus_space.9 bus_space_alloc.9 bus_space.9 bus_space_barrier.9 \ + bus_space.9 bus_space_vaddr.9 \ bus_space.9 bus_space_copy_1.9 bus_space.9 bus_space_copy_2.9 \ bus_space.9 bus_space_copy_4.9 bus_space.9 bus_space_copy_8.9 \ bus_space.9 bus_space_free.9 bus_space.9 bus_space_map.9 \ bus_space.9 bus_space_read_1.9 bus_space.9 bus_space_read_2.9 \ bus_space.9 bus_space_read_4.9 bus_space.9 bus_space_read_8.9 \ - bus_space.9 bus_space_read_multi_1.9 bus_space.9 bus_space_read_multi_2.9 \ - bus_space.9 bus_space_read_multi_4.9 bus_space.9 bus_space_read_multi_8.9 \ - bus_space.9 bus_space_read_raw_multi_2.9 bus_space.9 bus_space_read_raw_multi_4.9 \ - bus_space.9 bus_space_read_raw_multi_8.9 bus_space.9 bus_space_read_region_1.9 \ - bus_space.9 bus_space_read_region_2.9 bus_space.9 bus_space_read_region_4.9 \ - bus_space.9 bus_space_read_region_8.9 bus_space.9 bus_space_read_raw_region_2.9 \ - bus_space.9 bus_space_read_raw_region_4.9 bus_space.9 bus_space_read_raw_region_8.9 \ - bus_space.9 bus_space_set_multi_1.9 bus_space.9 bus_space_set_multi_2.9 \ - bus_space.9 bus_space_set_multi_4.9 bus_space.9 bus_space_set_multi_8.9 \ - bus_space.9 bus_space_set_region_1.9 bus_space.9 bus_space_set_region_2.9 \ - bus_space.9 bus_space_set_region_4.9 bus_space.9 bus_space_set_region_8.9 \ + bus_space.9 bus_space_read_multi_1.9 \ + bus_space.9 bus_space_read_multi_2.9 \ + bus_space.9 bus_space_read_multi_4.9 \ + bus_space.9 bus_space_read_multi_8.9 \ + bus_space.9 bus_space_read_raw_multi_2.9 \ + bus_space.9 bus_space_read_raw_multi_4.9 \ + bus_space.9 bus_space_read_raw_multi_8.9 \ + bus_space.9 bus_space_read_region_1.9 \ + bus_space.9 bus_space_read_region_2.9 \ + bus_space.9 bus_space_read_region_4.9 \ + bus_space.9 bus_space_read_region_8.9 \ + bus_space.9 bus_space_read_raw_region_2.9 \ + bus_space.9 bus_space_read_raw_region_4.9 \ + bus_space.9 bus_space_read_raw_region_8.9 \ + bus_space.9 bus_space_set_multi_1.9 \ + bus_space.9 bus_space_set_multi_2.9 \ + bus_space.9 bus_space_set_multi_4.9 \ + bus_space.9 bus_space_set_multi_8.9 \ + bus_space.9 bus_space_set_region_1.9 \ + bus_space.9 bus_space_set_region_2.9 \ + bus_space.9 bus_space_set_region_4.9 \ + bus_space.9 bus_space_set_region_8.9 \ bus_space.9 bus_space_subregion.9 bus_space.9 bus_space_unmap.9 \ bus_space.9 bus_space_write_1.9 bus_space.9 bus_space_write_2.9 \ bus_space.9 bus_space_write_4.9 bus_space.9 bus_space_write_8.9 \ - bus_space.9 bus_space_write_multi_1.9 bus_space.9 bus_space_write_multi_2.9 \ - bus_space.9 bus_space_write_multi_4.9 bus_space.9 bus_space_write_multi_8.9 \ + bus_space.9 bus_space_write_multi_1.9 \ + bus_space.9 bus_space_write_multi_2.9 \ + bus_space.9 bus_space_write_multi_4.9 \ + bus_space.9 bus_space_write_multi_8.9 \ bus_space.9 bus_space_write_raw_multi_2.9 \ bus_space.9 bus_space_write_raw_multi_4.9 \ bus_space.9 bus_space_write_raw_multi_8.9 \ diff --git a/share/man/man9/bus_space.9 b/share/man/man9/bus_space.9 index 822faf749d9..48b92a1b701 100644 --- a/share/man/man9/bus_space.9 +++ b/share/man/man9/bus_space.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: bus_space.9,v 1.8 2003/04/15 04:14:29 jmc Exp $ +.\" $OpenBSD: bus_space.9,v 1.9 2003/04/16 07:34:57 mickey Exp $ .\" $NetBSD: bus_space.9,v 1.15 2000/08/09 03:11:00 tv Exp $ .\" .\" Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -82,7 +82,7 @@ .Nm bus_space_set_region_8 , .Nm bus_space_subregion , .Nm bus_space_unmap , -.\".Nm bus_space_vaddr , +.Nm bus_space_vaddr , .Nm bus_space_write_1 , .Nm bus_space_write_2 , .Nm bus_space_write_4 , @@ -128,8 +128,8 @@ .Ft void .Fn bus_space_free "bus_space_tag_t space" "bus_space_handle_t handle" \ "bus_size_t size" -.\".Ft void * -.\".Fn bus_space_vaddr "bus_space_tag_t space" "bus_space_handle_t handle" +.Ft void * +.Fn bus_space_vaddr "bus_space_tag_t space" "bus_space_handle_t handle" .Ft u_int8_t .Fn bus_space_read_1 "bus_space_tag_t space" "bus_space_handle_t handle" \ "bus_size_t offset" @@ -556,34 +556,34 @@ This mapping method will only be useful in very rare occasions. .Pp This flag must have a value of 1 on all implementations for backward compatibility. -.\".It Dv BUS_SPACE_MAP_PREFETCHABLE -.\"Try to map the space so that accesses can be prefetched by the system, -.\"and writes can be buffered. -.\"This means, accesses should be side effect free (idempotent). -.\"The -.\".Fn bus_space_barrier -.\"methods will flush the write buffer or force actual read accesses. -.\"If this flag is not specified, the -.\"implementation should map the space so that it will not be prefetched -.\"or delayed. -.\".It Dv BUS_SPACE_MAP_LINEAR -.\"Try to map the space so that its contents can be accessed linearly via -.\"normal memory access methods (e.g. pointer dereferencing and structure -.\"accesses). The -.\".Fn bus_space_vaddr -.\"method can be used to obtain the kernel virtual address of the mapped range. -.\"This is useful when software wants to do direct access to a memory -.\"device, e.g. a frame buffer. If this flag is specified and linear -.\"mapping is not possible, the -.\".Fn bus_space_map -.\"call should fail. -.\"If this -.\"flag is not specified, the system may map the space in whatever way is -.\"most convenient. -.\"Use of this mapping method is not encouraged for normal device access; -.\"where linear access is not essential, use of the -.\".Fn bus_space_read/write -.\"methods is strongly recommended. +.It Dv BUS_SPACE_MAP_PREFETCHABLE +Try to map the space so that accesses can be prefetched by the system, +and writes can be buffered. +This means, accesses should be side effect free (idempotent). +The +.Fn bus_space_barrier +methods will flush the write buffer or force actual read accesses. +If this flag is not specified, the +implementation should map the space so that it will not be prefetched +or delayed. +.It Dv BUS_SPACE_MAP_LINEAR +Try to map the space so that its contents can be accessed linearly via +normal memory access methods (e.g. pointer dereferencing and structure +accesses). The +.Fn bus_space_vaddr +method can be used to obtain the kernel virtual address of the mapped range. +This is useful when software wants to do direct access to a memory +device, e.g. a frame buffer. If this flag is specified and linear +mapping is not possible, the +.Fn bus_space_map +call should fail. +If this +flag is not specified, the system may map the space in whatever way is +most convenient. +Use of this mapping method is not encouraged for normal device access; +where linear access is not essential, use of the +.Fn bus_space_read/write +methods is strongly recommended. .El .Pp .\"Not all combinations of flags make sense or are supported with all @@ -591,18 +591,18 @@ compatibility. .\"For instance, .Dv BUS_SPACE_MAP_CACHEABLE may be meaningless when used on many systems' I/O port spaces. -.\"and on some systems -.\".Dv BUS_SPACE_MAP_LINEAR -.\"without -.\".Dv BUS_SPACE_MAP_PREFETCHABLE -.\"may never work. -.\"When the system hardware or firmware provides hints as to how spaces should be -.\"mapped (e.g. the PCI memory mapping registers' "prefetchable" bit), those -.\"hints should be followed for maximum compatibility. -.\"On some systems, -.\"requesting a mapping that cannot be satisfied (e.g. requesting a -.\"non-prefetchable mapping when the system can only provide a prefetchable one) -.\"will cause the request to fail. +and on some systems +.Dv BUS_SPACE_MAP_LINEAR +without +.Dv BUS_SPACE_MAP_PREFETCHABLE +may never work. +When the system hardware or firmware provides hints as to how spaces should be +mapped (e.g. the PCI memory mapping registers' "prefetchable" bit), those +hints should be followed for maximum compatibility. +On some systems, +requesting a mapping that cannot be satisfied (e.g. requesting a +non-prefetchable mapping when the system can only provide a prefetchable one) +will cause the request to fail. .Pp Some implementations may keep track of use of bus space for some or all bus spaces and refuse to allow duplicate allocations. @@ -678,18 +678,18 @@ When or .Fn bus_space_free is called on a handle, all subregions of that handle become invalid. -.\".Pp -.\".It Fn bus_space_vaddr "tag" "handle" -.\".Pp -.\"This method returns the kernel virtual address of a mapped bus space if and -.\"only if it was mapped with the -.\".Dv BUS_SPACE_MAP_LINEAR -.\"flag. The range can be accessed by normal (volatile) pointer dereferences. -.\"If mapped with the -.\".Dv BUS_SPACE_MAP_PREFETCHABLE -.\"flag, the -.\".Fn bus_space_barrier -.\"method must be used to force a particular access order. +.Pp +.It Fn bus_space_vaddr "tag" "handle" +.Pp +This method returns the kernel virtual address of a mapped bus space if and +only if it was mapped with the +.Dv BUS_SPACE_MAP_LINEAR +flag. The range can be accessed by normal (volatile) pointer dereferences. +If mapped with the +.Dv BUS_SPACE_MAP_PREFETCHABLE +flag, the +.Fn bus_space_barrier +method must be used to force a particular access order. .El .Sh ALLOCATING AND FREEING BUS SPACE Some devices require or allow bus space to be allocated by the operating |