Spcr.aslc 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /** @file
  2. Serial Port Console Redirection Table (SPCR)
  3. SPCR table provides information about the configuration and use of the serial
  4. port or non-legacy UART interface. This table list the non-secure UART
  5. instance in the compute subsystem on the reference design platforms as the
  6. available serial port.
  7. Copyright (c) 2018 - 2022, Arm Limited. All rights reserved.
  8. SPDX-License-Identifier: BSD-2-Clause-Patent
  9. @par Specification Reference:
  10. - https://docs.microsoft.com/en-us/windows-hardware/drivers/serports/
  11. serial-port-console-redirection-table
  12. **/
  13. #include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
  14. #include <Library/AcpiLib.h>
  15. #include "SgiAcpiHeader.h"
  16. STATIC EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE Spcr = {
  17. ARM_ACPI_HEADER (
  18. EFI_ACPI_6_4_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE,
  19. EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE,
  20. EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION
  21. ),
  22. // UINT8 InterfaceType;
  23. EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_PL011_UART,
  24. // UINT8 Reserved1[3];
  25. {
  26. EFI_ACPI_RESERVED_BYTE,
  27. EFI_ACPI_RESERVED_BYTE,
  28. EFI_ACPI_RESERVED_BYTE
  29. },
  30. // EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE BaseAddress;
  31. ARM_GAS32 (FixedPcdGet64 (PcdSerialRegisterBase)),
  32. // UINT8 InterruptType;
  33. EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC,
  34. // UINT8 Irq;
  35. 0,
  36. // UINT32 GlobalSystemInterrupt;
  37. FixedPcdGet32 (PL011UartInterrupt),
  38. // UINT8 BaudRate;
  39. EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200,
  40. // UINT8 Parity;
  41. EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY,
  42. // UINT8 StopBits;
  43. EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1,
  44. // UINT8 FlowControl;
  45. 0,
  46. // UINT8 TerminalType;
  47. EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI,
  48. // UINT8 Reserved2;
  49. EFI_ACPI_RESERVED_BYTE,
  50. // UINT16 PciDeviceId;
  51. 0xFFFF,
  52. // UINT16 PciVendorId;
  53. 0xFFFF,
  54. // UINT8 PciBusNumber;
  55. 0x00,
  56. // UINT8 PciDeviceNumber;
  57. 0x00,
  58. // UINT8 PciFunctionNumber;
  59. 0x00,
  60. // UINT32 PciFlags;
  61. 0x00000000,
  62. // UINT8 PciSegment;
  63. 0x00,
  64. // UINT32 Reserved3;
  65. EFI_ACPI_RESERVED_DWORD
  66. };
  67. //
  68. // Reference the table being generated to prevent the optimizer from removing the
  69. // data structure from the executable
  70. //
  71. VOID* CONST ReferenceAcpiTable = &Spcr;