From nobody Mon Apr 29 21:44:46 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1514460237412414.43508639886454; Thu, 28 Dec 2017 03:23:57 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 399A5221DB2A2; Thu, 28 Dec 2017 03:18:58 -0800 (PST) Received: from mail-wr0-x22d.google.com (mail-wr0-x22d.google.com [IPv6:2a00:1450:400c:c0c::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 0C54A221DB29A for ; Thu, 28 Dec 2017 03:18:55 -0800 (PST) Received: by mail-wr0-x22d.google.com with SMTP id f8so28149872wre.4 for ; Thu, 28 Dec 2017 03:23:52 -0800 (PST) Received: from localhost.localdomain ([105.137.110.132]) by smtp.gmail.com with ESMTPSA id h27sm21165170wrb.35.2017.12.28.03.23.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Dec 2017 03:23:48 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::22d; helo=mail-wr0-x22d.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=9QGV/H5sVc0Oi9TJ3QoNtgIKiCWuC13nJ0HcgfTTBPg=; b=XvEB+6aJepnjPJ0NahowplN1AhFI0PMZCgTZegbQLodhwNLi82gN8YA+24sD4vYhtX ymlITnkGlzOAJnaOBLkgZopuZQtfdgprBc4+2C1YCp5xZ8PcRLhtYHVtlK+xSgqrrlhC QBVm/EpMVqoVCbNTRlX3cLfTW7wYhBW1QNHeM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9QGV/H5sVc0Oi9TJ3QoNtgIKiCWuC13nJ0HcgfTTBPg=; b=hefXGiWLhSqIijvFf4Y+mhEmcpgNNSAkFcb1bnF/BvZ5xKJpuXZ1aijNUTpd6ZER/+ Ap09kFI2KvBZ1DQx3Pbx6FO6Iq0/pVrCj7wX6vPbchDMnQKV2L8UXVJtHi4D+shGl9Ey yKlk+T0set6oOF08X0SXo2v9WyZN5QDnAXXFAnXfdP8wH+cx4rJxUjJ3CwQfixsWF5wX hlEvxpNmZFF3tzVkiP9RLR0LJwRdy5GhKnQGatVAfrp4Ja5A0fIf7sM13ginzcW2q069 4EwDeIs5sdR/x4UwKWpO9W9r5m8GONppplORRzCiYNTZ79TgKDj9N8Y3X1W8NNXIOCHg /kYw== X-Gm-Message-State: AKGB3mJUhWAr4dNt6nZrbBdjvpwjdFVTim3GgvA6MXPbSQw1+a1ZSsG8 nrFnK6ypExfxfP2IRvJrCwkSZPQgND8= X-Google-Smtp-Source: ACJfBotNoI0WO1GkV+t3THXC15YfMNgpp0wR76I1Vxf9223zJv2rr5eGJKwrs4Kygqa/8s+x8Kd7dw== X-Received: by 10.223.195.138 with SMTP id p10mr16434698wrf.74.1514460229459; Thu, 28 Dec 2017 03:23:49 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 28 Dec 2017 11:23:41 +0000 Message-Id: <20171228112341.1864-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH edk2-platforms] Platform/Socionext/SynQuacerEvalBoard: add ACPI support X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: masahisa.kojima@linaro.org, leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Enable ACPI support for the SynQuacerEvalBoard platform: add descriptions of the CPUs, the GIC, the serial port, the timers and the second PCIe RC, including the MSI routing via the GICv3 ITS. Also add descriptions of the ethernet and MMC platform devices. Note that PCIe support is limited to the RC that is connected to the M.2 slot, and only supports MMIO BARs and only a single bus. This is all we can support on the non-ECAM compliant root complex implementation, and also works around the lack of ACPI support for the pre-ITS. However, it should be sufficient for running the EVB with a NVME SSD installed. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel --- Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc | 18 ++ Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf | 13 ++ Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl | 127 +++++++= ++++++ Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h | 73 ++++++++ Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf | 64 +++++++ Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl | 191 +++++++= +++++++++++++ Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc | 91 +++++++= +++ Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc | 93 +++++++= +++ Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc | 96 +++++++= +++ Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc | 182 +++++++= ++++++++++++ Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc | 55 ++++++ Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc | 128 +++++++= ++++++ 12 files changed, 1131 insertions(+) diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc b= /Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc index 1e6beb489048..4c2193724b83 100644 --- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc +++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.dsc @@ -219,7 +219,15 @@ [PcdsFeatureFlag] =20 gEfiMdeModulePkgTokenSpaceGuid.PcdSupportUpdateCapsuleReset|TRUE =20 + gEfiMdeModulePkgTokenSpaceGuid.PcdInstallAcpiSdtProtocol|TRUE + [PcdsFixedAtBuild.common] + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemId|"SNI " + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemTableId|0x52434155514e59= 53 # SYNQUACR + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision|0x20171228 + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorId|0x4f524e4c # LNRO + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision|1 + !ifdef $(FIRMWARE_VENDOR) gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVendor|L"$(FIRMWARE_VENDOR)" !endif @@ -637,3 +645,13 @@ [Components.common] SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareReportDxe.= inf SignedCapsulePkg/Universal/SystemFirmwareUpdate/SystemFirmwareUpdateDxe.= inf =20 + # + # ACPI support + # + MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf { + + # support ACPI v5.0 or later + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiExposedTableVersions|0x20 + } + MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf + Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf diff --git a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf b= /Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf index bd980548e7bb..dfadc96018c7 100644 --- a/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf +++ b/Platform/Socionext/SynQuacerEvalBoard/SynQuacerEvalBoard.fdf @@ -233,6 +233,13 @@ [FV.FvMain] SECTION UI =3D "Pkcs7TestRoot" } =20 + # + # ACPI support + # + INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf + INF MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf + INF RuleOverride =3D ACPITABLE Silicon/Socionext/SynQuacer/AcpiTables/Ac= piTables.inf + !if $(DO_X86EMU) =3D=3D TRUE # # x86 emulator @@ -462,3 +469,9 @@ [Rule.Common.PEIM.FMP_IMAGE_DESC] UI STRING=3D"$(MODULE_NAME)" Optional VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R) } + +[Rule.Common.USER_DEFINED.ACPITABLE] + FILE FREEFORM =3D $(NAMED_GUID) { + RAW ACPI |.acpi + RAW ASL |.aml + } diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl b/S= ilicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl new file mode 100644 index 000000000000..966acbc6adbd --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiSsdtRootPci.asl @@ -0,0 +1,127 @@ +/** @file + Secondary System Description Table (SSDT) for SynQuacer PCIe RCs + + Copyright (c) 2014-2016, ARM Ltd. All rights reserved.
+ Copyright (c) 2017, Linaro Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + 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 IMP= LIED. + +**/ + +#include + +#include "AcpiTables.h" + +DefinitionBlock ("SsdtPci.aml", "SSDT", 1, "SNI", "SYNQUACR", + EFI_ACPI_OEM_REVISION) +{ + Scope (_SB) + { + Device (PCI0) + { + Name (_HID, EISAID("PNP0A08")) // PCI Express Root Bridge + Name (_CID, EISAID("PNP0A03")) // Compatible PCI Root Bridge + Name (_SEG, 0) // PCI Segment Group number + Name (_BBN, Zero) // PCI Base Bus Number + Name (_CCA, 1) // Cache Coherency Attribute + + // PCI Routing Table + Name (_PRT, Package () { + Package () { 0xFFFF, 0, Zero, 214 }, // INTA + Package () { 0xFFFF, 1, Zero, 214 }, // INTB + Package () { 0xFFFF, 2, Zero, 214 }, // INTC + Package () { 0xFFFF, 3, Zero, 214 }, // INTD + }) + // Root complex resources + Method (_CRS, 0, Serialized) { + Name (RBUF, ResourceTemplate () { + WordBusNumber ( // Bus numbers assigned to this root + ResourceProducer, + MinFixed, MaxFixed, PosDecode, + 0, // AddressGranularity + SYNQUACER_PCI_SEG1_BUSNUM_MIN, // Minimum Bus Number + SYNQUACER_PCI_SEG1_BUSNUM_MIN, // Maximum Bus Number + 0, // AddressTranslation + 1 // RangeLength - # of = Busses + ) + + DWordMemory ( // 32-bit BAR Windows + ResourceProducer, PosDecode, + MinFixed, MaxFixed, + Cacheable, ReadWrite, + 0x00000000, // Granularity + SYNQUACER_PCI_SEG1_MMIO32_MIN, // Min Base Address + SYNQUACER_PCI_SEG1_MMIO32_MAX, // Max Base Address + 0x00000000, // Translate + SYNQUACER_PCI_SEG1_MMIO32_SIZE // Length + ) + + QWordMemory ( // 64-bit BAR Windows + ResourceProducer, PosDecode, + MinFixed, MaxFixed, + Cacheable, ReadWrite, + 0x00000000, // Granularity + SYNQUACER_PCI_SEG1_MMIO64_MIN, // Min Base Address + SYNQUACER_PCI_SEG1_MMIO64_MAX, // Max Base Address + 0x00000000, // Translate + SYNQUACER_PCI_SEG1_MMIO64_SIZE // Length + ) + }) // Name (RBUF) + + Return (RBUF) + } // Method(_CRS) + + Device (RES0) + { + Name (_HID, "PNP0C02") + Name (_CRS, ResourceTemplate () + { + Memory32Fixed (ReadWrite, + SYNQUACER_PCI_SEG1_CONFIG_BASE, + SYNQUACER_PCI_SEG1_CONFIG_SIZE) + }) + } + + // + // OS Control Handoff + // + Name (SUPP, Zero) // PCI _OSC Support Field value + Name (CTRL, Zero) // PCI _OSC Control Field value + + Method(_OSC,4) + { + // Check for proper UUID + If (LEqual (Arg0, ToUUID ("33DB4D5B-1FF7-401C-9657-7441C03DD76= 6"))) + { + // Create DWord-adressable fields from the Capabilities Bu= ffer + CreateDWordField (Arg3, 0, CDW1) + CreateDWordField (Arg3, 4, CDW2) + CreateDWordField (Arg3, 8, CDW3) + + // Save Capabilities DWord2 & 3 + Store (CDW2, SUPP) + Store (CDW3, CTRL) + + // Disable PCIe and SHPC hotplug, AER and PME + And (CTRL, 0x10, CTRL) + + // Capabilities bits were masked + Or (CDW1, 0x10, CDW1) + + // Update DWORD3 in the buffer + Store (CTRL, CDW3) + Return (Arg3) + } Else { + Or (CDW1, 4, CDW1) // Unrecognized UUID + Return (Arg3) + } + } // End _OSC + } // PCI0 + } +} diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h b/Silicon/= Socionext/SynQuacer/AcpiTables/AcpiTables.h new file mode 100644 index 000000000000..dbd3ac2399df --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.h @@ -0,0 +1,73 @@ +/** @file +* +* Copyright (c) 2013-2014, ARM Limited. All rights reserved. +* Copyright (c) 2017, Linaro Limited. All rights reserved. +* +* This program and the accompanying materials are licensed and made avail= able +* 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 IM= PLIED. +* +**/ + +#ifndef __ACPITABLES_H__ +#define __ACPITABLES_H__ + +// +// ACPI table information used to initialize tables. +// +#define EFI_ACPI_OEM_ID 'S','N','I',' ',' ',' ' +#define EFI_ACPI_OEM_TABLE_ID SIGNATURE_64('S','Y','N','Q','U','A','C'= ,'R') +#define EFI_ACPI_OEM_REVISION FixedPcdGet32 (PcdAcpiDefaultOemRevision) +#define EFI_ACPI_CREATOR_ID SIGNATURE_32('L','N','R','O') +#define EFI_ACPI_CREATOR_REVISION FixedPcdGet32 (PcdAcpiDefaultCreatorRevi= sion) + +// A macro to initialise the common header part of EFI ACPI tables as defi= ned by +// EFI_ACPI_DESCRIPTION_HEADER structure. +#define __ACPI_HEADER(Signature, Type, Revision) { \ + Signature, /* UINT32 Signature */ \ + sizeof (Type), /* UINT32 Length */ \ + Revision, /* UINT8 Revision */ \ + 0, /* UINT8 Checksum */ \ + { EFI_ACPI_OEM_ID }, /* UINT8 OemId[6] */ \ + EFI_ACPI_OEM_TABLE_ID, /* UINT64 OemTableId */ \ + EFI_ACPI_OEM_REVISION, /* UINT32 OemRevision */ \ + EFI_ACPI_CREATOR_ID, /* UINT32 CreatorId */ \ + EFI_ACPI_CREATOR_REVISION /* UINT32 CreatorRevision */ \ + } + +#define EFI_ACPI_6_0_GIC_REDISTRIBUTOR_INIT(RedisRegionAddr, RedisDiscLeng= th) \ + { = \ + EFI_ACPI_6_0_GICR, = \ + sizeof (EFI_ACPI_6_0_GICR_STRUCTURE), = \ + 0, = \ + RedisRegionAddr, = \ + RedisDiscLength = \ + } + +#define EFI_ACPI_6_0_GIC_ITS_FRAME_INIT(Id, PhysAddress) = \ + { = \ + EFI_ACPI_6_0_GIC_ITS, = \ + sizeof (EFI_ACPI_6_0_GIC_ITS_STRUCTURE), = \ + 0, = \ + Id, = \ + PhysAddress, = \ + 0 = \ + } + +#define EFI_ACPI_6_0_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT(RefreshFramePhys= , \ + ControlFramePhys, WatchdogTimerGSIV, WatchdogTimerFlags) = \ + { = \ + EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG, = \ + sizeof(EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE), = \ + EFI_ACPI_RESERVED_WORD, = \ + RefreshFramePhys, = \ + ControlFramePhys, = \ + WatchdogTimerGSIV, = \ + WatchdogTimerFlags = \ + } + +#endif diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf b/Silico= n/Socionext/SynQuacer/AcpiTables/AcpiTables.inf new file mode 100644 index 000000000000..256f969739eb --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/AcpiTables.inf @@ -0,0 +1,64 @@ +## @file +# +# ACPI table data and ASL sources required to boot the platform. +# +# Copyright (c) 2014-2016, ARM Ltd. All rights reserved. +# Copyright (c) 2017, Linaro Ltd. All rights reserved. +# +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the B= SD 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 IM= PLIED. +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D SynQuacerAcpiTables + FILE_GUID =3D 7E374E25-8E01-4FEE-87F2-390C23C606CD + MODULE_TYPE =3D USER_DEFINED + VERSION_STRING =3D 1.0 + +[Sources] + AcpiTables.h + AcpiSsdtRootPci.asl + Dsdt.asl + Fadt.aslc + Gtdt.aslc + Iort.aslc + Madt.aslc + Mcfg.aslc + Spcr.aslc + +[Packages] + ArmPlatformPkg/ArmPlatformPkg.dec + ArmPkg/ArmPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + MdeModulePkg/MdeModulePkg.dec + Silicon/Socionext/SynQuacer/Drivers/Net/NetsecDxe/NetsecDxe.dec + Silicon/Socionext/SynQuacer/SynQuacer.dec + +[FixedPcd] + gArmPlatformTokenSpaceGuid.PcdClusterCount + gArmPlatformTokenSpaceGuid.PcdCoreCount + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicRedistributorsBase + + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum + + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase + + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultOemRevision + gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiDefaultCreatorRevision + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase + + gSynQuacerTokenSpaceGuid.PcdNetsecEepromBase + gSynQuacerTokenSpaceGuid.PcdNetsecPhyAddress diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl b/Silicon/Soci= onext/SynQuacer/AcpiTables/Dsdt.asl new file mode 100644 index 000000000000..ab919f985a6b --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Dsdt.asl @@ -0,0 +1,191 @@ +/** @file + Differentiated System Description Table Fields (DSDT) + + Copyright (c) 2014-2016, ARM Ltd. All rights reserved.
+ Copyright (c) 2017, Linaro Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + 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 IMP= LIED. + +**/ + +#include "AcpiTables.h" + +#include + +DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "SNI", "SYNQUACR", + EFI_ACPI_OEM_REVISION) { + Scope (_SB) { + // + // A53x4 Processor declaration + // + Device (CP00) { // A53-0: Cluster 0, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 0) + } + Device (CP01) { // A53-0: Cluster 0, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 1) + } + + Device (CP04) { // A53-0: Cluster 1, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 2) + } + Device (CP05) { // A53-0: Cluster 1, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 3) + } + + Device (CP08) { // A53-0: Cluster 2, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 4) + } + Device (CP09) { // A53-0: Cluster 2, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 5) + } + + Device (CP12) { // A53-0: Cluster 3, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 6) + } + Device (CP13) { // A53-0: Cluster 3, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 7) + } + + Device (CP16) { // A53-0: Cluster 4, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 8) + } + Device (CP17) { // A53-0: Cluster 4, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 9) + } + + Device (CP20) { // A53-0: Cluster 5, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 10) + } + Device (CP21) { // A53-0: Cluster 5, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 11) + } + + Device (CP24) { // A53-0: Cluster 6, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 12) + } + Device (CP25) { // A53-0: Cluster 6, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 13) + } + + Device (CP28) { // A53-0: Cluster 7, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 14) + } + Device (CP29) { // A53-0: Cluster 7, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 15) + } + + Device (CP32) { // A53-0: Cluster 8, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 16) + } + Device (CP33) { // A53-0: Cluster 8, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 17) + } + + Device (CP36) { // A53-0: Cluster 9, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 18) + } + Device (CP37) { // A53-0: Cluster 9, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 19) + } + + Device (CP40) { // A53-0: Cluster 10, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 20) + } + Device (CP41) { // A53-0: Cluster 10, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 21) + } + + Device (CP44) { // A53-0: Cluster 11, Cpu 0 + Name (_HID, "ACPI0007") + Name (_UID, 22) + } + Device (CP45) { // A53-0: Cluster 11, Cpu 1 + Name (_HID, "ACPI0007") + Name (_UID, 23) + } + + // UART PL011 + Device (COM0) { + Name (_HID, "ARMH0011") + Name (_CID, "PL011") + Name (_UID, Zero) + Name (_CRS, ResourceTemplate () { + Memory32Fixed (ReadWrite, FixedPcdGet32 (PcdSerialRegisterBase), 0= x1000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 95 } + }) + } + + Device (NET0) { + Name (_HID, "SCX0001") + Name (_UID, Zero) + Name (_CCA, 1) + Name (_CRS, ResourceTemplate () { + Memory32Fixed (ReadWrite, SYNQUACER_NETSEC1_BASE, + SYNQUACER_NETSEC1_BASE_SZ) + Memory32Fixed (ReadWrite, FixedPcdGet32 (PcdNetsecEepromBase), 0x1= 0000) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 208 } + }) + + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "phy-mode", "rgmii" }, + Package (2) { "phy-channel", FixedPcdGet32 (PcdNetsecPhyAddress)= }, + Package (2) { "max-speed", 1000 }, + Package (2) { "max-frame-size", 9000 }, + Package (2) { "socionext,phy-clock-frequency", 125000000 }, + } + }) + } + + Device (MMC0) { + Name (_HID, "SCX0002") + Name (_UID, Zero) + Name (_CCA, 1) + Name (_CRS, ResourceTemplate () { + Memory32Fixed (ReadWrite, SYNQUACER_EMMC_BASE, + SYNQUACER_EMMC_BASE_SZ) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 184 } + }) + + Name (_DSD, Package () // _DSD: Device-Specific Data + { + ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), + Package () { + Package (2) { "bus-width", 8 }, + Package (2) { "cap-mmc-highspeed", 0x1 }, + Package (2) { "fujitsu,cmd-dat-delay-select", 0x1 }, + } + }) + } + } // Scope (_SB) +} diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Fadt.aslc new file mode 100644 index 000000000000..74df448647d3 --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Fadt.aslc @@ -0,0 +1,91 @@ +/** @file +* Fixed ACPI Description Table (FADT) +* +* Copyright (c) 2012 - 2016, ARM Limited. All rights reserved. +* Copyright (c) 2017, Linaro Limited. All rights reserved. +* +* This program and the accompanying materials are licensed and made avail= able +* 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 IM= PLIED. +* +**/ + +#include +#include + +#include "AcpiTables.h" + +EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE Fadt =3D { + __ACPI_HEADER ( + EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE, + EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_REVISION + ), + 0, // UINT32 FirmwareCtrl + 0, // UINT32 Dsdt + EFI_ACPI_RESERVED_BYTE, // UINT8 Reserved0 + EFI_ACPI_6_0_PM_PROFILE_ENTERPRISE_SERVER, // UINT8 PreferredPmP= rofile + 0, // UINT16 SciInt + 0, // UINT32 SmiCmd + 0, // UINT8 AcpiEnable + 0, // UINT8 AcpiDisable + 0, // UINT8 S4BiosReq + 0, // UINT8 PstateCnt + 0, // UINT32 Pm1aEvtBlk + 0, // UINT32 Pm1bEvtBlk + 0, // UINT32 Pm1aCntBlk + 0, // UINT32 Pm1bCntBlk + 0, // UINT32 Pm2CntBlk + 0, // UINT32 PmTmrBlk + 0, // UINT32 Gpe0Blk + 0, // UINT32 Gpe1Blk + 0, // UINT8 Pm1EvtLen + 0, // UINT8 Pm1CntLen + 0, // UINT8 Pm2CntLen + 0, // UINT8 PmTmrLen + 0, // UINT8 Gpe0BlkLen + 0, // UINT8 Gpe1BlkLen + 0, // UINT8 Gpe1Base + 0, // UINT8 CstCnt + 0, // UINT16 PLvl2Lat + 0, // UINT16 PLvl3Lat + 0, // UINT16 FlushSize + 0, // UINT16 FlushStride + 0, // UINT8 DutyOffset + 0, // UINT8 DutyWidth + 0, // UINT8 DayAlrm + 0, // UINT8 MonAlrm + 0, // UINT8 Century + 0, // UINT16 IaPcBootArch + 0, // UINT8 Reserved1 + EFI_ACPI_6_0_HW_REDUCED_ACPI | + EFI_ACPI_6_0_LOW_POWER_S0_IDLE_CAPABLE, // UINT32 Flags + NULL_GAS, // GAS ResetReg + 0, // UINT8 ResetValue + EFI_ACPI_6_0_ARM_PSCI_COMPLIANT, // UINT16 ArmBootArchF= lags + EFI_ACPI_6_0_FIXED_ACPI_DESCRIPTION_TABLE_MINOR_REVISION, + // UINT8 MinorRevision + 0, // UINT64 XFirmwareCtrl + 0, // UINT64 XDsdt + NULL_GAS, // GAS XPm1aEvtBlk + NULL_GAS, // GAS XPm1bEvtBlk + NULL_GAS, // GAS XPm1aCntBlk + NULL_GAS, // GAS XPm1bCntBlk + NULL_GAS, // GAS XPm2CntBlk + NULL_GAS, // GAS XPmTmrBlk + NULL_GAS, // GAS XGpe0Blk + NULL_GAS, // GAS XGpe1Blk + NULL_GAS, // GAS SleepControl= Reg + NULL_GAS, // GAS SleepStatusR= eg + 0 // UINT64 HypervisorVe= ndorId +}; + +// +// Reference the table being generated to prevent the optimizer +// from removing the data structure from the executable +// +VOID* CONST ReferenceAcpiTable =3D &Fadt; diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Gtdt.aslc new file mode 100644 index 000000000000..14269ae51a64 --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Gtdt.aslc @@ -0,0 +1,93 @@ +/** @file +* Generic Timer Description Table (GTDT) +* +* Copyright (c) 2012 - 2016, ARM Limited. All rights reserved. +* Copyright (c) 2017, Linaro Limited. All rights reserved. +* +* This program and the accompanying materials are licensed and made avail= able +* 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 IM= PLIED. +* +**/ + +#include +#include +#include + +#include "AcpiTables.h" + +#define SYSTEM_TIMER_BASE_ADDRESS 0xFFFFFFFFFFFFFFFF + +#define GTDT_GLOBAL_FLAGS 0 +#define GTDT_GTIMER_FLAGS EFI_ACPI_6_0_GTDT_TIMER_FLAG_TIMER_INTERRUPT_PO= LARITY + +#pragma pack (1) + +typedef struct { + EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE Gtdt; + EFI_ACPI_6_0_GTDT_GT_BLOCK_STRUCTURE TimerBase; + EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_STRUCTURE TimerFrame; + EFI_ACPI_6_0_GTDT_SBSA_GENERIC_WATCHDOG_STRUCTURE Watchdog; +} EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLES; + +#pragma pack () + +EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLES Gtdt =3D { + { + __ACPI_HEADER( + EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLES, + EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE_REVISION + ), + SYSTEM_TIMER_BASE_ADDRESS, // UINT64 PhysicalAddre= ss + 0, // UINT32 Reserved + FixedPcdGet32 (PcdArmArchTimerSecIntrNum), // UINT32 SecurePL1Time= rGSIV + GTDT_GTIMER_FLAGS, // UINT32 SecurePL1Time= rFlags + FixedPcdGet32 (PcdArmArchTimerIntrNum), // UINT32 NonSecurePL1T= imerGSIV + GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL1T= imerFlags + FixedPcdGet32 (PcdArmArchTimerVirtIntrNum), // UINT32 VirtualTimerG= SIV + GTDT_GTIMER_FLAGS, // UINT32 VirtualTimerF= lags + FixedPcdGet32 (PcdArmArchTimerHypIntrNum), // UINT32 NonSecurePL2T= imerGSIV + GTDT_GTIMER_FLAGS, // UINT32 NonSecurePL2T= imerFlags + 0xFFFFFFFFFFFFFFFF, // UINT64 CntReadBasePh= ysicalAddress + 2, // UINT32 PlatformTimer= Count + sizeof (EFI_ACPI_6_0_GENERIC_TIMER_DESCRIPTION_TABLE) // UINT32 Platfr= omTimerOffset + }, + { + EFI_ACPI_6_0_GTDT_GT_BLOCK, // UINT8 Type + sizeof (EFI_ACPI_6_0_GTDT_GT_BLOCK_STRUCTURE) + + sizeof (EFI_ACPI_6_0_GTDT_GT_BLOCK_TIMER_STRUCTURE), + // UINT16 Length + EFI_ACPI_RESERVED_BYTE, // UINT8 Reserved + 0x2A810000, // UINT64 CntCtlBase + 1, // UINT32 GTBlockTimerCo= unt + sizeof (EFI_ACPI_6_0_GTDT_GT_BLOCK_STRUCTURE) // UINT32 GTBlockTimerOf= fset + }, + { + 0, // UINT8 GTFrameNumber + {0, 0, 0}, // UINT8 Reserved[3] + 0x2A830000, // UINT64 CntBaseX + 0xFFFFFFFFFFFFFFFF, // UINT64 CntEL0BaseX + 92, // UINT32 GTxPhysicalTim= erGSIV + 0, // UINT32 GTxPhysicalTim= erFlags + 0, // UINT32 GTxVirtualTime= rGSIV + 0, // UINT32 GTxVirtualTime= rFlags + EFI_ACPI_6_0_GTDT_GT_BLOCK_COMMON_FLAG_ALWAYS_ON_CAPABILITY + // UINT32 GTxCommonFlags + }, + EFI_ACPI_6_0_SBSA_GENERIC_WATCHDOG_STRUCTURE_INIT ( + FixedPcdGet32 (PcdGenericWatchdogRefreshBase), + FixedPcdGet32 (PcdGenericWatchdogControlBase), + 94, + 0), +}; + +// +// Reference the table being generated to prevent the optimizer +// from removing the data structure from the executable +// +VOID* CONST ReferenceAcpiTable =3D &Gtdt; diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Iort.aslc new file mode 100644 index 000000000000..8050fb923561 --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Iort.aslc @@ -0,0 +1,96 @@ +/** @file + + Copyright (c) 2017, Linaro Ltd. All rights reserved.
+ + This program and the accompanying materials are licensed and made availa= ble + 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 IMP= LIED. + +**/ + +#include + +#include "AcpiTables.h" + +#define FIELD_OFFSET(type, name) __builtin_offsetof(type, name) + +#pragma pack(1) +typedef struct { + EFI_ACPI_6_0_IO_REMAPPING_ITS_NODE Node; + UINT32 Identifiers[1]; +} SYNQUACER_ITS_NODE; + +typedef struct { + EFI_ACPI_6_0_IO_REMAPPING_RC_NODE Node; + EFI_ACPI_6_0_IO_REMAPPING_ID_TABLE RcIdMapping; +} SYNQUACER_RC_NODE; + +typedef struct { + EFI_ACPI_6_0_IO_REMAPPING_TABLE Iort; + SYNQUACER_ITS_NODE ItsNode; + SYNQUACER_RC_NODE RcNode; +} SYNQUACER_IO_REMAPPING_STRUCTURE; + +#define __SYNQUACER_ID_MAPPING(In, Num, Out, Ref, Flags) \ + { \ + In, \ + Num, \ + Out, \ + FIELD_OFFSET(SYNQUACER_IO_REMAPPING_STRUCTURE, Ref), \ + Flags \ + } + +STATIC SYNQUACER_IO_REMAPPING_STRUCTURE Iort =3D { + { + __ACPI_HEADER(EFI_ACPI_6_0_IO_REMAPPING_TABLE_SIGNATURE, + SYNQUACER_IO_REMAPPING_STRUCTURE, + EFI_ACPI_IO_REMAPPING_TABLE_REVISION), + 2, // NumNodes + sizeof(EFI_ACPI_6_0_IO_REMAPPING_TABLE), // NodeOffset + 0 // Reserved + }, { + // ItsNode + { + { + EFI_ACPI_IORT_TYPE_ITS_GROUP, // Type + sizeof(SYNQUACER_ITS_NODE), // Length + 0x0, // Revision + 0x0, // Reserved + 0x0, // NumIdMappin= gs + 0x0, // IdReference + }, + 1, + }, { + 0x0 + }, + }, { + // PciRcNode + { + { + EFI_ACPI_IORT_TYPE_ROOT_COMPLEX, // Type + sizeof(SYNQUACER_RC_NODE), // Length + 0x0, // Revision + 0x0, // Reserved + 0x1, // NumIdMappin= gs + FIELD_OFFSET(SYNQUACER_RC_NODE, RcIdMapping), // IdReference + }, + EFI_ACPI_IORT_MEM_ACCESS_PROP_CCA, // CacheCohere= nt + 0x0, // AllocationH= ints + 0x0, // Reserved + EFI_ACPI_IORT_MEM_ACCESS_FLAGS_CPM | + EFI_ACPI_IORT_MEM_ACCESS_FLAGS_DACS, // MemoryAcces= sFlags + EFI_ACPI_IORT_ROOT_COMPLEX_ATS_UNSUPPORTED, // AtsAttribute + 0x0, // PciSegmentN= umber + }, + __SYNQUACER_ID_MAPPING(0x0, 0x0, 0x0, ItsNode, + EFI_ACPI_IORT_ID_MAPPING_FLAGS_SINGLE), + } +}; + +#pragma pack() + +VOID* CONST ReferenceAcpiTable =3D &Iort; diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Madt.aslc new file mode 100644 index 000000000000..eb9009ce0bb8 --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Madt.aslc @@ -0,0 +1,182 @@ +/** @file +* Multiple APIC Description Table (MADT) +* +* Copyright (c) 2012 - 2016, ARM Limited. All rights reserved. +* Copyright (c) 2017, Linaro Limited. All rights reserved. +* +* This program and the accompanying materials are licensed and made avail= able +* 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 IM= PLIED. +* +**/ + +#include +#include +#include +#include + +#include "AcpiTables.h" + +#define CORES (FixedPcdGet32 (PcdClusterCount) * \ + FixedPcdGet32 (PcdCoreCount)) +// +// Multiple APIC Description Table +// +#pragma pack (1) + +typedef struct { + EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; + EFI_ACPI_6_0_GIC_STRUCTURE GicInterfaces[CORE= S]; + EFI_ACPI_6_0_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; + EFI_ACPI_6_0_GICR_STRUCTURE GicRedistributor; + EFI_ACPI_6_0_GIC_ITS_STRUCTURE GicIts; +} EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE; + +#pragma pack () + +EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE Madt =3D { + { + __ACPI_HEADER ( + EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE, + EFI_ACPI_6_0_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION + ), + // + // MADT specific fields + // + 0, // LocalApicAddress + 0, // Flags + }, + { + // Format: EFI_ACPI_6_0_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, = Flags, + // PmuIrq, GicBase, GicVBase, + // GicHBase, GsivId, GicRBase) + // Note: The GIC Structure of the primary CPU must be the first entry + // (see note in 5.2.12.14 GICC Structure of ACPI v6.0). + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-0 + 0, 0, GET_MPID(0, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-1 + 0, 1, GET_MPID(0, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-2 + 0, 2, GET_MPID(1, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-3 + 0, 3, GET_MPID(1, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-4 + 0, 4, GET_MPID(2, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-5 + 0, 5, GET_MPID(2, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-6 + 0, 6, GET_MPID(3, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-7 + 0, 7, GET_MPID(3, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-8 + 0, 8, GET_MPID(4, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-9 + 0, 9, GET_MPID(4, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-10 + 0, 10, GET_MPID(5, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-11 + 0, 11, GET_MPID(5, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-12 + 0, 12, GET_MPID(6, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-13 + 0, 13, GET_MPID(6, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-14 + 0, 14, GET_MPID(7, 0), EFI_ACPI_6_0_GIC_ENABLED, 23,=20 + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-15 + 0, 15, GET_MPID(7, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-16 + 0, 16, GET_MPID(8, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-17 + 0, 17, GET_MPID(8, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-18 + 0, 18, GET_MPID(9, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-19 + 0, 19, GET_MPID(9, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-20 + 0, 20, GET_MPID(10, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-21 + 0, 21, GET_MPID(10, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-22 + 0, 22, GET_MPID(11, 0), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_0_GICC_STRUCTURE_INIT( // A53-23 + 0, 23, GET_MPID(11, 1), EFI_ACPI_6_0_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + }, + // GIC Distributor Entry + EFI_ACPI_6_0_GIC_DISTRIBUTOR_INIT (0, FixedPcdGet32 (PcdGicDistributorBa= se), + 0, 3), + // GIC Redistributor + EFI_ACPI_6_0_GIC_REDISTRIBUTOR_INIT (FixedPcdGet32 (PcdGicRedistributors= Base), + 0x300000), + // GIC ITS + EFI_ACPI_6_0_GIC_ITS_FRAME_INIT(0, 0x30020000) +}; + +// +// Reference the table being generated to prevent the optimizer +// from removing the data structure from the executable +// +VOID* CONST ReferenceAcpiTable =3D &Madt; diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Mcfg.aslc new file mode 100644 index 000000000000..7b524444492e --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Mcfg.aslc @@ -0,0 +1,55 @@ +/** @file + + ACPI Memory mapped configuration space base address Description Table (M= CFG). + Implementation based on PCI Firmware Specification Revision 3.0 final dr= aft, + downloadable at http://www.pcisig.com/home + + Copyright (c) 2014 - 2016, AMD Inc. All rights reserved. + Copyright (c) 2017, 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 IMP= LIED. + +**/ + +#include +#include +#include + +#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_ALLOCAT= ION_STRUCTURE Structure; +} EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_DESCRIPTION_TABLE; + +EFI_ACPI_MEMORY_MAPPED_CONFIGURATION_SPACE_ACCESS_DESCRIPTION_TABLE Mcfg = =3D { + { + __ACPI_HEADER (EFI_ACPI_5_0_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SP= ACE_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_SEG1_CONFIG_BASE | 0x8000, + 0, + SYNQUACER_PCI_SEG1_BUSNUM_MIN, + SYNQUACER_PCI_SEG1_BUSNUM_MIN, + 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 =3D &Mcfg; diff --git a/Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc b/Silicon/Soc= ionext/SynQuacer/AcpiTables/Spcr.aslc new file mode 100644 index 000000000000..5082e391556c --- /dev/null +++ b/Silicon/Socionext/SynQuacer/AcpiTables/Spcr.aslc @@ -0,0 +1,128 @@ +/** @file + + Serial Port Console Redirection Table + (c) 2000 - 2014 Microsoft Corporation. All rights reserved. + http://go.microsoft.com/fwlink/?linkid=3D403368 + + Copyright (c) 2014 - 2016, AMD Inc. All rights reserved. + Copyright (c) 2017, Linaro Ltd. All rights reserved. + + This program and the accompanying materials are licensed and made availa= ble + 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 IMP= LIED. + +**/ + +#include +#include + +#include "AcpiTables.h" + +#pragma pack(push, 1) + +STATIC EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE Spcr =3D { + // + // Header + // + __ACPI_HEADER (EFI_ACPI_5_0_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_SIGNAT= URE, + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE, + 2), /* New MS definition for PL011 support */ + // + // InterfaceType + // + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERFACE_TYPE_ARM_PL011_= UART, + // + // Reserved[3] + // + { EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE, EFI_ACPI_RESERVED_BYTE= }, + // + // BaseAddress + // + { + EFI_ACPI_5_1_SYSTEM_MEMORY, + 32, + 0, + EFI_ACPI_5_1_DWORD, + FixedPcdGet32 (PcdSerialRegisterBase) + }, + // + // InterruptType + // + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC, + // + // Irq + // + 0, + // + // GlobalSystemInterrupt + // + 95, + // + // BaudRate + // + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200, + // + // Parity + // + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY, + // + // StopBits + // + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1, + // + // FlowControl + // + 0, + // + // TerminalType + // + EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_TERMINAL_TYPE_ANSI, + // + // Language + // + EFI_ACPI_RESERVED_BYTE, + // + // PciDeviceId + // + 0xFFFF, + // + // PciVendorId + // + 0xFFFF, + // + // PciBusNumber + // + 0x00, + // + // PciDeviceNumber + // + 0x00, + // + // PciFunctionNumber + // + 0x00, + // + // PciFlags + // + 0, + // + // PciSegment + // + 0, + // + // Reserved2 + // + EFI_ACPI_RESERVED_DWORD +}; + +#pragma pack(pop) + +// +// Reference the table being generated to prevent the optimizer from remov= ing +// the data structure from the executable +// +VOID* CONST ReferenceAcpiTable =3D &Spcr; --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel