Home | History | Annotate | Download | only in AcpiTables
      1 /** @file
      2 
      3   Serial Port Console Redirection Table
      4    2000 - 2014 Microsoft Corporation. All rights reserved.
      5   http://go.microsoft.com/fwlink/?linkid=403368
      6 
      7   Copyright (c) 2014 - 2016, AMD Inc. All rights reserved.
      8 
      9   This program and the accompanying materials
     10   are licensed and made available under the terms and conditions of the BSD License
     11   which accompanies this distribution.  The full text of the license may be found at
     12   http://opensource.org/licenses/bsd-license.php
     13 
     14   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
     15   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
     16 
     17 **/
     18 
     19 #include <AmdStyxAcpiLib.h>
     20 #include <IndustryStandard/SerialPortConsoleRedirectionTable.h>
     21 
     22 #pragma pack(push, 1)
     23 
     24 #define EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_PL011   3
     25 
     26 STATIC EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE AcpiSpcr = {
     27   //
     28   // Header
     29   //
     30   AMD_ACPI_HEADER (EFI_ACPI_5_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNATURE,
     31                    EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE,
     32                    2), /* New MS definition for PL011 support */
     33   //
     34   // InterfaceType
     35   //
     36   EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_PL011,
     37   //
     38   // Reserved[3]
     39   //
     40   {EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE},
     41   //
     42   // BaseAddress
     43   //
     44   AMD_GASN(FixedPcdGet64(PcdSerialRegisterBase)),
     45   //
     46   // InterruptType
     47   //
     48   0,
     49   //
     50   // Irq
     51   //
     52   0,
     53   //
     54   // GlobalSystemInterrupt
     55   //
     56   0x148,
     57   //
     58   // BaudRate
     59   //
     60   EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200,
     61   //
     62   // Parity
     63   //
     64   EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY,
     65   //
     66   // StopBits
     67   //
     68   EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1,
     69   //
     70   // FlowControl
     71   //
     72   0,
     73   //
     74   // TerminalType
     75   //
     76   EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI,
     77   //
     78   // Language
     79   //
     80   EFI_ACPI_RESERVED_BYTE,
     81   //
     82   // PciDeviceId
     83   //
     84   0xFFFF,
     85   //
     86   // PciVendorId
     87   //
     88   0xFFFF,
     89   //
     90   // PciBusNumber
     91   //
     92   0x00,
     93   //
     94   // PciDeviceNumber
     95   //
     96   0x00,
     97   //
     98   // PciFunctionNumber
     99   //
    100   0x00,
    101   //
    102   // PciFlags
    103   //
    104   0,
    105   //
    106   // PciSegment
    107   //
    108   0,
    109   //
    110   // Reserved2
    111   //
    112   EFI_ACPI_RESERVED_DWORD
    113 };
    114 
    115 #pragma pack(pop)
    116 
    117 EFI_ACPI_DESCRIPTION_HEADER *
    118 SpcrHeader (
    119   VOID
    120   )
    121 {
    122   return &AcpiSpcr.Header;
    123 }
    124 
    125