1 /* 2 * Copyright (c) 2013 Linaro Limited 3 * 4 * All rights reserved. This program and the accompanying materials 5 * are made available under the terms of the BSD License which accompanies 6 * this distribution, and is available at 7 * http://opensource.org/licenses/bsd-license.php 8 * 9 * Contributors: 10 * Yi Li - yi.li (at) linaro.org 11 */ 12 13 #include <IndustryStandard/Acpi.h> 14 #include "Pv660Platform.h" 15 16 #define ACPI_5_0_MCFG_VERSION 0x1 17 18 #pragma pack(1) 19 typedef struct 20 { 21 UINT64 ullBaseAddress; 22 UINT16 usSegGroupNum; 23 UINT8 ucStartBusNum; 24 UINT8 ucEndBusNum; 25 UINT32 Reserved2; 26 }EFI_ACPI_5_0_MCFG_CONFIG_STRUCTURE; 27 28 typedef struct 29 { 30 EFI_ACPI_DESCRIPTION_HEADER Header; 31 UINT64 Reserved1; 32 }EFI_ACPI_5_0_MCFG_TABLE_CONFIG; 33 34 typedef struct 35 { 36 EFI_ACPI_5_0_MCFG_TABLE_CONFIG Acpi_Table_Mcfg; 37 EFI_ACPI_5_0_MCFG_CONFIG_STRUCTURE Config_Structure[2]; 38 }EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE; 39 #pragma pack() 40 41 EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE Mcfg= 42 { 43 { 44 { 45 EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE, 46 sizeof (EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_TABLE), 47 ACPI_5_0_MCFG_VERSION, 48 0x00, // Checksum will be updated at runtime 49 {EFI_ACPI_ARM_OEM_ID}, 50 EFI_ACPI_ARM_OEM_TABLE_ID, 51 EFI_ACPI_ARM_OEM_REVISION, 52 EFI_ACPI_ARM_CREATOR_ID, 53 EFI_ACPI_ARM_CREATOR_REVISION 54 }, 55 0x0000000000000000, //Reserved 56 }, 57 { 58 59 { 60 0x0000022000000000, //Base Address 61 0x0001, //Segment Group Number 62 0x40, //Start Bus Number 63 0x7f, //End Bus Number 64 0x00000000, //Reserved 65 }, 66 { 67 0x0000024000000000, //Base Address 68 0x0002, //Segment Group Number 69 0x80, //Start Bus Number 70 0xbf, //End Bus Number 71 0x00000000, //Reserved 72 }, 73 } 74 }; 75 76 // 77 // Reference the table being generated to prevent the optimizer from removing the 78 // data structure from the executable 79 // 80 VOID* CONST ReferenceAcpiTable = &Mcfg; 81