Lines Matching +full:system +full:- +full:bus
143 .Nd "bus space manipulation functions"
627 machine-independent access to bus memory and register areas.
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.
638 On a third system, architectural
640 creating a non-linear register space).
643 single system or architecture.
647 of devices on different system architectures, and to allow a single driver
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
718 in the bus space read and write stream.
729 Correctly-written drivers will include all
736 try to make minimal assumptions about what the system allows.
738 they should expect that the system requires bus space addresses being
740 offset is a multiple of the access size), and that the system does
742 written must point to properly-aligned data).
753 system to halt, either intentionally (via panic) or unintentionally (by
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"
857 prefetched by the system.
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.
894 When the system hardware or firmware provides hints as to how spaces should be
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
991 system for device use.
993 operating system should free it for use by other devices.
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
1097 The simplest way to access bus space is to read or write a single data
1117 of the bus space specified by
1119 The location being read must lie within the bus space region specified by
1126 be read, on others it may cause a system crash.
1152 of the bus space specified by
1155 the bus space region specified by
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
1193 gracefully without the risk of crashing the system.
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.
1235 functions are not re-entrant and should not, therefore, be used
1239 .Bl -ohang -compact
1252 of the bus space specified by
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
1324 .Bd -literal
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.
1366 system or from mbufs to be output to a network.
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
1402 All locations being read must lie within the bus
1412 read, on others it may cause a system crash.
1423 individual bus space locations executed by the
1443 and writes them to bus space starting at byte offset
1447 of the bus space specified
1453 All locations being written must lie within the bus space region
1463 written, on others it may cause a system crash.
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.
1512 lie within the bus space region specified by their respective handles.
1519 a system crash.
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
1564 locations being written must lie within the bus space region specified
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
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
1634 read, on others it may cause a system crash.
1645 functions read the same bus space location multiple times, they
1646 place an implicit read barrier between each successive read of that bus
1665 and writes them into bus space at byte offset
1669 of the bus space specified by
1673 The location being written must lie within the bus space
1683 written, on others it may cause a system crash.
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
1728 written, on others it may cause a system crash.
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