summaryrefslogtreecommitdiff
path: root/Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc
blob: 089b9e95aff2345fbea82210e218fcedba0e3b8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/** @file

  ACPI Memory mapped configuration space base address Description Table (MCFG).
  Implementation based on PCI Firmware Specification Revision 3.0 final draft,
  downloadable at http://www.pcisig.com/home

  Copyright (c) 2014 - 2016, AMD Inc. All rights reserved.
  Copyright (c) 2018, 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.

**/

#include <IndustryStandard/Acpi61.h>
#include <IndustryStandard/MemoryMappedConfigurationSpaceAccessTable.h>
#include <Platform/Pcie.h>

#include "AcpiTables.h"

#pragma pack(push, 1)

typedef struct {
  EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_BASE_ADDRESS_TABLE_HEADER Header;
  EFI_ACPI_MEMORY_MAPPED_ENHANCED_CONFIGURATION_SPACE_BASE_ADDRESS_ALLOCATION_STRUCTURE Structure[2];
} EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_DESCRIPTION_TABLE;

EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_DESCRIPTION_TABLE Mcfg = {
  {
    __ACPI_HEADER (EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE,
    EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_DESCRIPTION_TABLE,
    EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_TABLE_REVISION),
    EFI_ACPI_RESERVED_QWORD
  },
  {
    {
      SYNQUACER_PCI_SEG0_CONFIG_BASE,
      0,
      SYNQUACER_PCI_SEG0_BUSNUM_MIN,
      SYNQUACER_PCI_SEG0_BUSNUM_MAX,
      EFI_ACPI_RESERVED_DWORD
    }, {
      SYNQUACER_PCI_SEG1_CONFIG_BASE,
      1,
      SYNQUACER_PCI_SEG1_BUSNUM_MIN,
      SYNQUACER_PCI_SEG1_BUSNUM_MAX,
      EFI_ACPI_RESERVED_DWORD
    }
  }
};

#pragma pack(pop)

//
// Reference the table being generated to prevent the optimizer
// from removing the data structure from the executable
//
VOID* CONST ReferenceAcpiTable = &Mcfg;