PSD PORT IO
From EDM2
Perform local port I/O.
Some platforms have some non MP specific system ports localized on a per- processor basis. If a local I/O operation may block before completion, I/O can be routed to a specific CPU for processing. This should be done, because an operation which started on one processor is not guaranteed to complete on that processor if execution is blocked. This function gets invoked as the result of a device driver calling DevHelp_Port_IO.
- Mode
- Called in Kernel, and Interrupt Mode.
Syntax
PSD_PORT_IO keywords
Parameters
- Entry
- Pointer to a PORT_IO structure.
ulong_t port; (Input) ulong_t data; (Input/Output) ulong_t flags; (Input)
- port
- indicates which port to read to, or write from.
- data
- contains the data read from a read request, or the data to write if a write request. If the request uses less the 4 bytes the least significant portion of the data variable is used.
- flags
- indicate what operation to perform.
- IO_READ_BYTE Read a byte from the port
- IO_READ_WORD Read a word from the port
- IO_READ_DWORD Read a dword from the port
- IO_WRITE_BYTE Write a byte to the port
- IO_WRITE_WORD Write a word to the port
- IO_WRITE_DWORD Write a dword to the port
Return Code
- NO_ERROR
- if the I/O was successful.
- -1
- if the I/O wasn't successful.
Remarks
- Optional: the function is not required.
- The OS/2 kernel provides default handling for that specific function.
- The function can not call a PSD help that may block.
Notes: If the I/O performed is to a non-local port, the I/O should be handled as a regular I/O request.
If device drivers or applications access the local ports directly, instead of using the documented interfaces problems may occur.
Structure
typedef struct port_io_s { ulong_t port; (Input) ulong_t data; (Input/Output) ulong_t flags; (Input) } PORT_IO;