Lines Matching +full:in +full:- +full:functions

5 .\" Redistribution and use in source and binary forms, with or without
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
16 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 .\" Redistribution and use in source and binary forms, with or without
37 .\" 2. Redistributions in binary form must reproduce the above copyright
38 .\" notice, this list of conditions and the following disclaimer in the
44 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
48 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
50 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
143 .Nd "bus space manipulation functions"
626 functions exist to allow device drivers
627 machine-independent access to bus memory and register areas.
629 functions and types described in this document can be used by including
636 For instance, a device which is mapped in one system's I/O space may be
637 mapped in memory space on a second system.
640 creating a non-linear register space).
642 driver may need to access the same type of device in multiple ways in a
646 functions is to allow a single driver source file to manipulate a set
651 Not all buses have to implement all functions described in this
654 Unimplemented functions should cause
655 compile-time errors if possible.
657 All of the interface definitions described in this document are shown as
659 functions.
661 (type-checked) versions of these interfaces, but may implement them as
663 Machine-dependent types, variables, and functions
664 should be marked clearly in
667 machine-independent types and functions, and, if possible, should be
668 given names which make the machine-dependence clear.
671 machine-dependent code.
684 A range in bus space is described by a bus address and a bus size.
686 bus address describes the start of the range in bus space.
688 size describes the size of the range in bytes.
700 All of the bus space access functions require one bus space tag
703 The bus space tag specifies the space, each handle specifies a region in
706 Offsets are given in bytes, though buses
710 accessed is in the mapped region that the handle describes.
729 Correctly-written drivers will include all
735 functions should
742 written must point to properly-aligned data).
746 functions given below all assume that
756 Functions which return
758 or which return data read from bus space (i.e., functions which
761 if given invalid arguments, and in that case their behaviour is undefined.
762 Functions which take a count of bytes have undefined results if the specified
766 Several types are defined in
770 functions by drivers.
783 type is used to describe sizes of ranges in bus space.
790 functions, describing sizes when mapping regions and
797 contents are machine-dependent and should be considered opaque by
798 machine-independent code.
801 functions to name the space on which they are operating.
807 contents are machine-dependent and should be considered opaque by
808 machine-independent code.
814 version of these functions and may or may not apply to the
824 functions provide these capabilities.
826 Some drivers need to be able to pass a subregion of already-mapped bus
840 and fills in the bus space handle pointed to by
845 it will return non-zero and leave the bus space handle pointed
854 .Bl -tag -width ".Dv BUS_SPACE_MAP_CACHEABLE"
875 flag is not specified, the system may map the space in whatever way is
878 Try to map the space using non-posted device memory.
901 non-cacheable mapping when the system can only provide a cacheable one)
907 for bus spaces which have no notion of slot-specific space addressing,
909 (e.g.\& PCI memory and I/O spaces co-existing with ISA memory and
914 If space in those areas is accessed, the results are
915 bus-dependent.
946 new handle to some subregion of an already-mapped region of bus space.
957 returns zero and fills in the bus
960 If unsuccessful, it returns non-zero and leaves the bus space handle
977 being done on the space, and will result in undefined behaviour.
986 version of these functions and may or may not apply to the
998 functions provide these capabilities.
1007 zero, fills in the bus address pointed to by
1009 with the bus space address of the allocated region, and fills in
1013 If unsuccessful, it returns non-zero and leaves the bus address pointed to by
1034 constraint, if non-zero, ensures that the region is allocated so that
1035 .Fa "first address in region"
1039 .Fa "last address in region"
1054 parameter is the same as the like-named parameter to
1103 families of functions provide
1112 family of functions reads a 1, 2, 4, or 8 byte data item from
1130 functions may be executed out
1136 These functions will never fail.
1147 family of functions writes a 1, 2, 4, or 8 byte data item to the offset
1167 functions may be executed
1173 These functions will never fail.
1183 family of functions is that they provide no protection against
1186 In such a situation, the system typically would panic due to a kernel-mode
1192 family of functions provide a mechanism to handle these exceptions
1199 the peek and poke functions provide the ability to read and
1202 All of the constraints specified in the descriptions of the
1206 functions also apply to
1220 responding to the operation at the specified offset in the bus space.
1221 A non-zero return value indicates that the kernel intercepted a
1225 non-existent hardware is accessed.
1226 In such cases, these functions will always return zero and the value of
1235 functions are not re-entrant and should not, therefore, be used
1237 This constraint may be removed at some point in the future.
1239 .Bl -ohang -compact
1247 family of functions cautiously read a 1, 2, 4, or 8 byte data item from
1254 The data item read is stored in the location pointed to by
1258 to be NULL, in which case the data item will be discarded after being read.
1267 family of functions cautiously write a 1, 2, 4, or 8 byte data item
1278 In order to allow high-performance buffering implementations to avoid bus
1301 .Bl -tag -width ".Dv BUS_SPACE_BARRIER_WRITE"
1308 Those flags can be combined (or-ed together) to enforce ordering on both
1315 Example: Consider a hypothetical device with two single-byte ports, one
1316 write-only input port (at offset 0) and a read-only output port (at
1324 .Bd -literal
1344 the data bytes are written to the device correctly and in order.
1354 second read is issued, ensuring that data is read correctly and in order.
1356 The barriers in the example above are specified to cover the absolute
1363 Some devices use buffers which are mapped as regions in bus space.
1372 families of functions are provided.
1375 or to set all locations in a region of bus space to contain a single
1379 family of functions and the
1381 family of functions allow drivers to perform these operations.
1388 family of functions reads
1416 functions may be executed in any order.
1425 functions.
1427 These functions will never fail.
1438 family of functions reads
1467 functions may be
1468 executed in any order.
1477 functions.
1479 These functions will never fail.
1494 family of functions copies
1496 1, 2, 4, or 8 byte data items in bus space
1523 functions may be executed in any order.
1532 functions.
1537 functions.
1539 These functions will never fail.
1550 family of functions writes the given
1555 data items in bus space starting at byte offset
1577 functions may be
1578 executed in any order.
1587 functions.
1589 These functions will never fail.
1595 Some devices implement single locations in bus space which are to be read
1604 families of functions are provided.
1611 family of functions reads
1622 Each successive data item is read from the same location in bus
1638 functions may be
1645 functions read the same bus space location multiple times, they
1649 These functions will never fail.
1660 family of functions reads
1671 Each successive data item is written to the same location in
1687 functions may be executed out of order with respect to other pending
1693 functions write the same bus space location multiple times, they
1697 These functions will never fail.
1732 functions may be executed out of order with respect to other pending
1738 functions write the same bus space location multiple times, they
1742 These functions will never fail.
1747 .Sh STREAM FUNCTIONS
1750 functions imply a host byte-order and a bus byte-order and take care of
1753 for which the caller may want to use multi-word, yet untranslated access.
1756 functions.
1758 .Bl -tag -compact -width Fn
1797 These functions are defined just as their non-stream counterparts,
1798 except that they provide no byte-order translation.
1815 functions were introduced in a different form (memory and I/O spaces
1816 were accessed via different sets of functions) in
1818 The functions were merged to work on generic
1820 early in the
1834 version was imported in
1837 .An -nosplit
1851 developers and the user community played a significant role in development.