/* Reads an 8-bit register. If UseMmio is TRUE, then the value is read from MMIO space. If UseMmio is FALSE, then the value is read from I/O space. The parameter Offset is added to the base address of the register. */
UINT8 SerialPortReadRegister(UINTN Base, UINTN Offset, BOOLEAN UseMmio, UINT8 RegisterStride)
/* Reads an 8-bit register. If UseMmio is TRUE, then the value is read from MMIO space. If UseMmio is FALSE, then the value is read from I/O space. The parameter Offset is added to the base address of the register. */
UINT8 SerialPortReadRegister(UINTN Base, UINTN Offset, BOOLEAN UseMmio, UINT8 RegisterStride)
{
  if (UseMmio) {
    return MmioRead8 (Base + Offset * RegisterStride);
  } else {
    return IoRead8 (Base + Offset * RegisterStride);
  }
}