PlatformSerialPortLib.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /** @file
  2. Header file of Serial port hardware definition.
  3. Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
  4. SPDX-License-Identifier: BSD-2-Clause-Patent
  5. **/
  6. #ifndef __PLATFORM_SERIAL_PORT_LIB_H_
  7. #define __PLATFORM_SERIAL_PORT_LIB_H_
  8. #include <Base.h>
  9. #include <Library/BaseLib.h>
  10. #include <Library/IoLib.h>
  11. #include <Library/PcdLib.h>
  12. #include <Library/SerialPortLib.h>
  13. //
  14. // UART Register Offsets
  15. //
  16. #define BAUD_LOW_OFFSET 0x00
  17. #define BAUD_HIGH_OFFSET 0x01
  18. #define IER_OFFSET 0x01
  19. #define LCR_SHADOW_OFFSET 0x01
  20. #define FCR_SHADOW_OFFSET 0x02
  21. #define IR_CONTROL_OFFSET 0x02
  22. #define FCR_OFFSET 0x02
  23. #define EIR_OFFSET 0x02
  24. #define BSR_OFFSET 0x03
  25. #define LCR_OFFSET 0x03
  26. #define MCR_OFFSET 0x04
  27. #define LSR_OFFSET 0x05
  28. #define MSR_OFFSET 0x06
  29. //
  30. // UART Register Bit Defines
  31. //
  32. #define LSR_TXRDY 0x20
  33. #define LSR_RXDA 0x01
  34. #define DLAB 0x01
  35. #define UART_DATA 8
  36. #define UART_STOP 1
  37. #define UART_PARITY 0
  38. #define UART_BREAK_SET 0
  39. VOID
  40. InitializeSio (
  41. VOID
  42. );
  43. #endif