NAME | SYNOPSIS | FEATURES | DESCRIPTION | EXTENDED DESCRIPTION | Allowed Calling Contexts | ATTRIBUTES | SEE ALSO
#include <dki/dki.h>uint16_f loadSwapEieio_16(uint16_f * addr);
DKI
Provides access to PowerPC DKI I/O routines, optimized to facilitate byte swapping and synchronization of input/output.
The PowerPC DKI provides specific I/O routines to handle byte swapping and synchronization of I/O. These services are based on PowerPC specific instructions to store/load with byte swapping, and to enforce in-order execution of I/O.
Typically, these services are intended to be used by a host bus driver to handle different byte ordering between the PowerPC bus and the host bus, or to enforce sequential execution of I/O. PowerPC specific I/O services are defined below as sets of routines where the _xx suffix indicates the bit length of the data on which the service applies. This suffix may take one of the following values:
for 16-bit data
for 32-bit data
loadSwapEieio_xx loads data from a given address and returns the corresponding byte swapped value. A PowerPC eieio instruction is issued after the data is read, to enforce execution of subsequent I/O sequentially with respect to the current load. The addr argument specifies the address to read from.
loadSwapSync_xx behaves like loadSwapEieio_xx but issues a PowerPC isync instruction after that data is read. This ensures that all possible exceptions are taken into account before returning.
storeSwapEieio_xx stores, at a given address, the value byte swapped. A PowerPC eieio instruction is issued after the data is written, to enforce execution of subsequent I/O sequentially with respect to the current store. The addr argument specifies the address to write to.
storeSwapSync_xx behaves like storeSwapEieio_xx but issues a PowerPC isync instruction after that data is read. This ensures that all possible exceptions are taken into account before returning.
swapEieio_xx swaps in place the bytes of the data stored at a given address. A PowerPC eieio instruction is issued between reading the data and re-writing the byte-swapped data, to enforce execution in order. The addr argument specifies the address of the data to byte-swap.
ioSync enforces context synchronization, completion of all instructions, and completion of all exceptions before returning.
eieio enforces execution in order of I/O and is mapped to the corresponding PowerPC assembler instruction. This routine is intended for use in managing shared data structures, in doing memory-mapped I/O, and in preventing load/store combining operations in main memory. Refer to PowerPC programming manuals for more details.
The following table specifies the contexts in which a caller is allowed to invoke each service:
Services | Base level | DKI thread | Interrupt | Blocking |
loadSwapEieio_xx | + | + | + | - |
loadSwapSync_xx | + | + | + | - |
storeSwapEieio_xx | + | + | + | - |
storeSwapSync_xx | + | + | + | - |
swapEieio_xx | + | + | + | - |
ioSync | + | + | + | - |
eieio | + | + | + | - |
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
NAME | SYNOPSIS | FEATURES | DESCRIPTION | EXTENDED DESCRIPTION | Allowed Calling Contexts | ATTRIBUTES | SEE ALSO