Lines Matching +full:data +full:- +full:bus
19 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
47 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
143 .Nd "bus space manipulation functions"
627 machine-independent access to bus memory and register areas.
640 creating a non-linear register space).
648 object file to manipulate a set of devices on multiple bus types on a
653 supported by the bus.
655 compile-time errors if possible.
661 (type-checked) versions of these interfaces, but may implement them as
663 Machine-dependent types, variables, and functions
667 machine-independent types and functions, and, if possible, should be
668 given names which make the machine-dependence clear.
670 Bus spaces are described by bus space tags, which can be created only by
671 machine-dependent code.
673 of bus space (e.g.\& memory space and I/O space), and thus may provide
674 multiple different bus space tags.
675 Individual buses or devices on a machine may use more than one bus space
681 space, for instance because of multiple different host bus interface
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.
687 The bus
690 addressable may require use of bus space ranges with appropriately
693 Access to regions of bus space is facilitated by use of bus space handles,
694 which are usually created by mapping a specific range of a bus space.
696 and mapping a range of bus space, the actual location of which is picked
700 All of the bus space access functions require one bus space tag
702 (a bus size).
703 The bus space tag specifies the space, each handle specifies a region in
708 The offset used to access data
709 relative to a given handle must be such that all of the data being
712 access data outside that region is an error.
718 in the bus space read and write stream.
729 Correctly-written drivers will include all
738 they should expect that the system requires bus space addresses being
742 written must point to properly-aligned data).
749 or arguments that are out of range (e.g.\& trying to access data outside of
758 or which return data read from bus space (i.e., functions which
774 type is used to describe bus addresses.
777 capable of holding the largest bus address usable by the architecture.
779 type is primarily used when mapping and unmapping bus space.
783 type is used to describe sizes of ranges in bus space.
785 unsigned integral type capable of holding the size of the largest bus
795 type is used to describe a particular bus space on a machine.
797 contents are machine-dependent and should be considered opaque by
798 machine-independent code.
805 type is used to describe a mapping of a range of bus space.
807 contents are machine-dependent and should be considered opaque by
808 machine-independent code.
809 This type is used when performing bus space
811 .Sh MAPPING AND UNMAPPING BUS SPACE
826 Some drivers need to be able to pass a subregion of already-mapped bus
834 function maps the region of bus space named by the
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"
878 Try to map the space using non-posted device memory.
901 non-cacheable mapping when the system can only provide a cacheable one)
904 Some implementations may keep track of use of bus space for some or all
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
915 bus-dependent.
919 function unmaps a region of bus space mapped with
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
983 .Sh ALLOCATING AND FREEING BUS SPACE
990 Some devices require or allow bus space to be allocated by the operating
1003 function allocates and maps a region of bus space with the size given by
1007 zero, fills in the bus address pointed to by
1009 with the bus space address of the allocated region, and fills in
1010 the bus space handle pointed to by
1013 If unsuccessful, it returns non-zero and leaves the bus address pointed to by
1015 and the bus space handle pointed to by
1034 constraint, if non-zero, ensures that the region is allocated so that
1054 parameter is the same as the like-named parameter to
1074 function unmaps and frees a region of bus space mapped
1096 .Sh READING AND WRITING SINGLE DATA ITEMS
1097 The simplest way to access bus space is to read or write a single data
1104 the ability to read and write 1, 2, 4, and 8 byte data items on buses
1112 family of functions reads a 1, 2, 4, or 8 byte data item from
1117 of the bus space specified by
1119 The location being read must lie within the bus space region specified by
1124 plus the offset should be a multiple of the size of data item being read.
1125 On some systems, not obeying this requirement may cause incorrect data to
1147 family of functions writes a 1, 2, 4, or 8 byte data item to the offset
1152 of the bus space specified by
1155 the bus space region specified by
1160 plus the offset should be a multiple of the size of data item being
1163 incorrect data to be written, on others it may cause a system crash.
1178 .Sh PROBING BUS SPACE FOR HARDWARE WHICH MAY NOT RESPOND
1186 In such a situation, the system typically would panic due to a kernel-mode
1200 write 1, 2, 4, and 8 byte data items on busses which support those
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
1222 hardware exception (e.g., bus error) when the peek or poke operation
1225 non-existent hardware is accessed.
1227 the data read by
1235 functions are not re-entrant and should not, therefore, be used
1239 .Bl -ohang -compact
1247 family of functions cautiously read a 1, 2, 4, or 8 byte data item from
1252 of the bus space specified by
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
1274 of the bus space specified by
1278 In order to allow high-performance buffering implementations to avoid bus
1287 function enforces ordering of bus space read and write operations
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
1318 Operation of the device is as follows: data bytes are written
1322 write two data bytes to the device then read those two data bytes back
1324 .Bd -literal
1344 the data bytes are written to the device correctly and in order.
1348 that all of the writes are finished before data is read.
1354 second read is issued, ensuring that data is read correctly and in order.
1357 minimum number of bus space locations.
1359 easier) to make barrier operations cover the device's whole range of bus
1363 Some devices use buffers which are mapped as regions in bus space.
1374 Drivers occasionally need to copy one region of a bus space to another,
1375 or to set all locations in a region of bus space to contain a single
1390 1, 2, 4, or 8 byte data items from bus space
1395 of the bus space specified by
1399 Each successive data item is read from an offset
1400 1, 2, 4, or 8 bytes after the previous data item (depending on which
1402 All locations being read must lie within the bus
1408 plus the offset should be a multiple of the size of data items being
1409 read and the data array pointer should be properly aligned.
1411 systems, not obeying these requirements may cause incorrect data to be
1423 individual bus space locations executed by the
1440 1, 2, 4, or 8 byte data items from the array
1443 and writes them to bus space starting at byte offset
1447 of the bus space specified
1450 Each successive data item is written to an offset 1, 2, 4,
1451 or 8 bytes after the previous data item (depending on which function is
1453 All locations being written must lie within the bus space region
1459 plus the offset should be a multiple of the size of data items being
1460 written and the data array pointer should be properly aligned.
1462 systems, not obeying these requirements may cause incorrect data to be
1475 individual bus space locations executed by the
1496 1, 2, 4, or 8 byte data items in bus space
1501 of the bus space specified by
1507 in the same bus space.
1508 Each successive data item read or written has
1509 an offset 1, 2, 4, or 8 bytes after the previous data item (depending
1512 lie within the bus space region specified by their respective handles.
1516 of data items being copied.
1518 requirement may cause incorrect data to be copied, on others it may cause
1530 individual bus space locations executed by the
1535 of bus space are handled correctly by the
1555 data items in bus space starting at byte offset
1559 of the bus space specified by
1561 Each successive data item has an offset 1, 2, 4, or 8 bytes after the
1562 previous data item (depending on which function is used).
1564 locations being written must lie within the bus space region specified
1570 plus the offset should be a multiple of the size of data items being
1573 incorrect data to be written, on others it may cause a system crash.
1585 individual bus space locations executed by the
1595 Some devices implement single locations in bus space which are to be read
1596 or written multiple times to communicate data, e.g.\& some ethernet
1613 1, 2, 4, or 8 byte data items from bus space
1618 of the bus space specified by
1622 Each successive data item is read from the same location in bus
1624 The location being read must lie within the bus space region
1630 plus the offset should be a multiple of the size of data items being
1631 read and the data array pointer should be properly aligned.
1633 systems, not obeying these requirements may cause incorrect data to be
1645 functions read the same bus space location multiple times, they
1646 place an implicit read barrier between each successive read of that bus
1662 1, 2, 4, or 8 byte data items from the array
1665 and writes them into bus space at byte offset
1669 of the bus space specified by
1671 Each successive data item is written to the same location in
1673 The location being written must lie within the bus space
1679 plus the offset should be a multiple of the size of data items being
1680 written and the data array pointer should be properly aligned.
1682 systems, not obeying these requirements may cause incorrect data to be
1693 functions write the same bus space location multiple times, they
1710 into bus space at byte offset
1714 of the bus space specified by
1718 The location being written must lie within the bus space
1724 plus the offset should be a multiple of the size of data items being
1725 written and the data array pointer should be properly aligned.
1727 systems, not obeying these requirements may cause incorrect data to be
1738 functions write the same bus space location multiple times, they
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.
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.
1837 .An -nosplit