/** @file * Serial Port Console Redirection Table (SPCR) * * Copyright (c) 2016, Hisilicon Limited. All rights reserved. * Copyright (c) 2016 Linaro Limited. All rights reserved. * * This program and the accompanying materials * are licensed and made available under the terms and conditions of the BSD License * which accompanies this distribution. The full text of the license may be found at * http://opensource.org/licenses/bsd-license.php * * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. * * Based on the files under ArmPlatformPkg/ArmJunoPkg/AcpiTables/ * **/ #include #include #include #include #include "Hi1616Platform.h" #define SPCR_FLOW_CONTROL_NONE 0 STATIC EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE Spcr = { ARM_ACPI_HEADER (EFI_ACPI_5_1_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE, EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE, EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_REVISION), // UINT8 InterfaceType; EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_PL011_UART, // UINT8 Reserved1[3]; { EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE }, // EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE BaseAddress; ARM_GAS32 (FixedPcdGet64 (PcdSerialRegisterBase)), // UINT8 InterruptType; EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC, // UINT8 Irq; 0, // Not used on ARM // UINT32 GlobalSystemInterrupt; 807, // UINT8 BaudRate; EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200, // UINT8 Parity; EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY, // UINT8 StopBits; EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1, // UINT8 FlowControl; SPCR_FLOW_CONTROL_NONE, // UINT8 TerminalType; EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI, // UINT8 Reserved2; EFI_ACPI_RESERVED_BYTE, // UINT16 PciDeviceId; 0xFFFF, // UINT16 PciVendorId; 0xFFFF, // UINT8 PciBusNumber; 0x00, // UINT8 PciDeviceNumber; 0x00, // UINT8 PciFunctionNumber; 0x00, // UINT32 PciFlags; 0x00000000, // UINT8 PciSegment; 0x00, // UINT32 Reserved3; EFI_ACPI_RESERVED_DWORD }; // // Reference the table being generated to prevent the optimizer from removing the // data structure from the executable // VOID* CONST ReferenceAcpiTable = &Spcr;