/** @file

  @copyright
  Copyright 1999 - 2019 Intel Corporation. <BR>

  SPDX-License-Identifier: BSD-2-Clause-Patent
**/

//
// Statements that include other files
//
#include <Acpi/Mcfg.h>

//
// MCFG Table definition
//
EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE Mcfg = {
  {{EFI_ACPI_6_2_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_SIGNATURE,
  sizeof (EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE),
  EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_REVISION,
  //
  // Checksum will be updated at runtime
  //
  0x00,
  //
  // It is expected that these values will be programmed at runtime
  //
  {' ',
  ' ',
  ' ',
  ' ',
  ' ',
  ' '},

  0,
  EFI_ACPI_OEM_MCFG_REVISION,
  0,
  0},
  //
  // Beginning of MCFG specific fields
  //
  EFI_ACPI_RESERVED_QWORD},
  //
  // Sample Memory Mapped Configuration Space Base Address Structure
  //
  // 0x0,                                                              // Base Address
  // 0x0,                                                              // PCI Segment Group Number
  // 0x0,                                                              // Start Bus Number
  // 0x0,                                                              // End Bus Number
  // EFI_ACPI_RESERVED_DWORD,                                          // Reserved
  //
  // Memory Mapped Configuration Space Base Address Structure
  //
#if EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_BASE_ADDRESS_STRUCTURE_COUNT > 0
  {{0x0,                    // Base Address, will be updated by AcpiPlatform
  0x0,                      // PCI Segment Group Number
  0x0,                      // Start Bus Number
  0xff,                     // End Bus Number
  EFI_ACPI_RESERVED_DWORD}} // Reserved
#endif // EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_BASE_ADDRESS_STRUCTURE_COUNT
};

VOID*
ReferenceAcpiTable (
  VOID
  )

{
  //
  // Reference the table being generated to prevent the optimizer from removing the
  // data structure from the exeutable
  //
  return (VOID*)&Mcfg;
}
