/** Reads an 8-bit I/O port. Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized. If 8-bit I/O port operations are not supported, then ASSERT(). @param Port The I/O port to read. @return The value read. **/ UINT8 EFIAPI IoRead8 ( IN UINTN Port ) { return (UINT8)IoReadWorker (Port, EfiCpuIoWidthUint8); }
/** Reads an 8-bit I/O port. Reads the 8-bit I/O port specified by Port. The 8-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized. If 8-bit I/O port operations are not supported, then ASSERT(). @param Port The I/O port to read. @return The value read. **/ UINT8 EFIAPI IoRead8 ( IN UINTN Port ) { return (UINT8)IoReadWorker (Port, SMM_IO_UINT8); }
/** Reads a 64-bit I/O port. Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized. If Port is not aligned on a 64-bit boundary, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT(). @param Port The I/O port to read. @return The value read. **/ UINT64 EFIAPI IoRead64 ( IN UINTN Port ) { // // Make sure Port is aligned on a 64-bit boundary. // ASSERT ((Port & 7) == 0); return IoReadWorker (Port, EfiCpuIoWidthUint64); }
/** Reads a 32-bit I/O port. Reads the 32-bit I/O port specified by Port. The 32-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized. If Port is not aligned on a 32-bit boundary, then ASSERT(). If 32-bit I/O port operations are not supported, then ASSERT(). @param Port The I/O port to read. @return The value read. **/ UINT32 EFIAPI IoRead32 ( IN UINTN Port ) { // // Make sure Port is aligned on a 32-bit boundary. // ASSERT ((Port & 3) == 0); return (UINT32)IoReadWorker (Port, EfiCpuIoWidthUint32); }
/** Reads a 16-bit I/O port. Reads the 16-bit I/O port specified by Port. The 16-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized. If Port is not aligned on a 16-bit boundary, then ASSERT(). If 16-bit I/O port operations are not supported, then ASSERT(). @param Port The I/O port to read. @return The value read. **/ UINT16 EFIAPI IoRead16 ( IN UINTN Port ) { // // Make sure Port is aligned on a 16-bit boundary. // ASSERT ((Port & 1) == 0); return (UINT16)IoReadWorker (Port, EfiCpuIoWidthUint16); }
/** Reads a 64-bit I/O port. Reads the 64-bit I/O port specified by Port. The 64-bit read value is returned. This function must guarantee that all I/O read and write operations are serialized. If Port is not aligned on a 64-bit boundary, then ASSERT(). If 64-bit I/O port operations are not supported, then ASSERT(). @param Port The I/O port to read. @return The value read. **/ UINT64 EFIAPI IoRead64 ( IN UINTN Port ) { // // Make sure Port is aligned on a 64-bit boundary. // ASSERT ((Port & 7) == 0); return IoReadWorker (Port, SMM_IO_UINT64); }