From nobody Thu May 16 17:08:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75851+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75851+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1622293012; cv=none; d=zohomail.com; s=zohoarc; b=WS2mos6Slc2wHXYKtQqnyjxth9co+RdGLY4kM5YMhm7NNa7ywAJQ4uwXvwv15SFgkbSnp7/Q+qs370hMZUKPgJ9YuzsX1kCY3tuV+Z1oS0956KDdQPUPBZ4uSMJe7fNOpZzAo0Tu6Hh/0nG65JhcrVWKIocLzYZlkms2A8b+MZM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622293012; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=L/dKOJDl2tFF9HhrmatTFmRcZI1hKpAP31zYfjAzc1M=; b=nLLwvu3kz5GEx6i7LJw3w8uoWpc9oOPbJ2w7OLt+SRYFEP/VrVqxtIgzcQjRxbQAEBvtGYp1vd25pgUw6VcDXt+n3rYsOOTLi2qBVzlklB2C+0iMh6Az1LovbjsZHzG7HqV2AqQ8HRN0Infju4T6VksivrmlCZe1QOwaqI+bIDQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75851+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622293012541815.4099154246985; Sat, 29 May 2021 05:56:52 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id 3sUZYY1788612xG2WRB8c7y9; Sat, 29 May 2021 05:56:52 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.20403.1622293011581263185 for ; Sat, 29 May 2021 05:56:51 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 16F9811D4; Sat, 29 May 2021 05:56:51 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DC3D03F73B; Sat, 29 May 2021 05:56:49 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v1 1/5] Platform/Sgi: Enable PrimeCell GPIO Date: Sat, 29 May 2021 18:26:30 +0530 Message-Id: <20210529125634.30833-2-pranav.madhu@arm.com> In-Reply-To: <20210529125634.30833-1-pranav.madhu@arm.com> References: <20210529125634.30833-1-pranav.madhu@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pranav.madhu@arm.com X-Gm-Message-State: 569WDdxPNj7EylTebkNJDwu5x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622293012; bh=+v52A5J/0EtgACN1Ium4Zl9d0sHAGInK5eSdgrofqW4=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=mPIFfSU4MPdSbQu0phLfCbijZpWIFAkuLnkVdkFHneM/Hj/tdInRpi4yG+MEMQEafUa 4HfKsFrHzj9xzkvmOmUGbVNxEraqmpqWsM9weqimsRbnMnUnU8+qO2o4Q4bk2GRn9jS4P 7q2NmXp7gL9+qLVy2XeMNfCI4xfR+tMkNso= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The HW-Reduced ACPI model has specific requirements for GPIO controllers. Arm's reference design Platforms has PrimeCell GPIO (PL061) integrated in the RoS subsystem to provide GPIO support. Add GPIO device entry and also add GPIO signalled ACPI event template for reference. Signed-off-by: Pranav Madhu --- Platform/ARM/SgiPkg/SgiPlatform.dec | 5 ++ Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc | 5 ++ Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc | 5 ++ Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 4 ++ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 4 ++ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 4 ++ Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 4 ++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 4 ++ Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf | 4 ++ Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf | 4 ++ Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 5 ++ Platform/ARM/SgiPkg/AcpiTables/SsdtEvents.asl | 67 +++++++++++++= +++++++ 12 files changed, 115 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiP= latform.dec index af08ed153eae..e0aabc566d88 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -76,5 +76,10 @@ gArmSgiTokenSpaceGuid.PcdSmmuBase|0|UINT32|0x0000001D gArmSgiTokenSpaceGuid.PcdSmmuSize|0|UINT32|0x0000001E =20 + # GPIO Controller + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress|0|UINT32|0x0000001F + gArmSgiTokenSpaceGuid.PcdGpioController0Size|0|UINT32|0x00000020 + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt|0|UINT32|0x00000021 + [Ppis] gNtFwConfigDtInfoPpiGuid =3D { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0= x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } } diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc b/Platform/ARM/SgiPkg= /SgiMemoryMap.dsc.inc index d3d650323891..a567af8537ec 100644 --- a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc @@ -54,3 +54,8 @@ # SMMU gArmSgiTokenSpaceGuid.PcdSmmuBase|0x4F000000 gArmSgiTokenSpaceGuid.PcdSmmuSize|0x01000000 + + # GPIO Controller + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress|0x1C1D0000 + gArmSgiTokenSpaceGuid.PcdGpioController0Size|0x00010000 + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt|136 diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc b/Platform/ARM/SgiPk= g/SgiMemoryMap2.dsc.inc index c593156e17be..5c137c0991e7 100644 --- a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc @@ -54,3 +54,8 @@ # SMMU gArmSgiTokenSpaceGuid.PcdSmmuBase|0x40000000 gArmSgiTokenSpaceGuid.PcdSmmuSize|0x10000000 + + # GPIO controller + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress|0x0C1D0000 + gArmSgiTokenSpaceGuid.PcdGpioController0Size|0x00010000 + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt|392 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf index 04ef2bfcaa26..56b80f418398 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf @@ -26,6 +26,7 @@ RdE1Edge/Pptt.aslc Spcr.aslc Ssdt.asl + SsdtEvents.asl =20 [Packages] ArmPkg/ArmPkg.dec @@ -51,6 +52,9 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf index eecb64186473..fa6692bc86f6 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf @@ -26,6 +26,7 @@ RdN1Edge/Pptt.aslc Spcr.aslc Ssdt.asl + SsdtEvents.asl =20 [Packages] ArmPkg/ArmPkg.dec @@ -51,6 +52,9 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index 617519d9dd38..d0ee125fa1de 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -28,6 +28,7 @@ RdN1EdgeX2/Srat.aslc Spcr.aslc Ssdt.asl + SsdtEvents.asl =20 [Packages] ArmPkg/ArmPkg.dec @@ -60,6 +61,9 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/A= RM/SgiPkg/AcpiTables/RdN2AcpiTables.inf index c1282a3422ab..232b58eb012f 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf @@ -26,6 +26,7 @@ Spcr.aslc Ssdt.asl SsdtRos.asl + SsdtEvents.asl =20 [Packages] ArmPkg/ArmPkg.dec @@ -51,6 +52,9 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf index 58468096de4f..5713ef1ce3a9 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf @@ -26,6 +26,7 @@ Spcr.aslc Ssdt.asl SsdtRos.asl + SsdtEvents.asl =20 [Packages] ArmPkg/ArmPkg.dec @@ -51,6 +52,9 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdSmmuBase diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf b/Platform/A= RM/SgiPkg/AcpiTables/RdV1AcpiTables.inf index a3e558cf1535..e7b702962abe 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf @@ -26,6 +26,7 @@ RdV1/Pptt.aslc Spcr.aslc Ssdt.asl + SsdtEvents.asl =20 [Packages] ArmPkg/ArmPkg.dec @@ -51,6 +52,9 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf index ffda4f925b19..901391fba70e 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf @@ -28,6 +28,7 @@ RdV1Mc/Srat.aslc Spcr.aslc Ssdt.asl + SsdtEvents.asl =20 [Packages] ArmPkg/ArmPkg.dec @@ -60,6 +61,9 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf index b1ee16e98ea3..d59aefde735b 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf @@ -25,6 +25,8 @@ Sgi575/Pptt.aslc Spcr.aslc Ssdt.asl + SsdtRos.asl + SsdtEvents.asl =20 [Packages] ArmPkg/ArmPkg.dec @@ -50,6 +52,9 @@ gArmTokenSpaceGuid.PcdPciBusMin gArmTokenSpaceGuid.PcdPciBusMax =20 + gArmSgiTokenSpaceGuid.PcdGpioController0BaseAddress + gArmSgiTokenSpaceGuid.PcdGpioController0Size + gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress diff --git a/Platform/ARM/SgiPkg/AcpiTables/SsdtEvents.asl b/Platform/ARM/S= giPkg/AcpiTables/SsdtEvents.asl new file mode 100644 index 000000000000..28c7ce4e7f3c --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/SsdtEvents.asl @@ -0,0 +1,67 @@ +/** @file + Secondary System Description Table (SSDT) for hardware reduced events. + + Arm Reference Design platforms implement the HW-Reduced ACPI model and d= o not + support legacy ACPI Fixed Hardware interfaces. + + GPIO Signalled ACPI event is one of the methods for signalling events in + HW-Reduced ACPI model. In this method, ACPI events can be signaled when = a GPIO + Interrupt is received by OSPM and that GPIO Interrupt Connection is list= ed in + a GPIO controller device=E2=80=99s _AEI object. + + Copyright (c) 2021, ARM Limited. All rights reserved. + SPDX-License-Identifier: BSD-2-Clause-Patent + + @par Specification Reference: + - ACPI 6.4, Chapter 5.6.5, GPIO-signaled ACPI Events + - Arm Base Boot Requirements 1.0, Issue F, Chapter 8.5.3, GPIO control= lers +**/ + +#include "SgiAcpiHeader.h" + +DefinitionBlock("SsdtEvent.aml", "SSDT", 2, "ARMLTD", "ARMSGI", EFI_ACPI_A= RM_OEM_REVISION) { + /* GPIO Controller 0 device. Use _AEI object to configure pin 0 for + signalling HW-Reduced events and the _L00 method to handle the event + generated by pin 0. + */ + Device (\_SB.GPI0) + { + Name (_HID, "ARMH0061") /* PrimeCell GPIO */ + Name (_UID, 0) + + /* Resource setting for GPIO controller 0 */ + Name (_CRS, ResourceTemplate () { + Memory32Fixed ( + ReadWrite, + FixedPcdGet32 (PcdGpioController0BaseAddress), + FixedPcdGet32 (PcdGpioController0Size) + ) + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { + FixedPcdGet32 (PcdGpioController0Interrupt) + } + }) + + /* ACPI Event information for GPIO controller 0 */ + Name (_AEI, ResourceTemplate() { + GpioInt (Level, ActiveHigh, Exclusive, PullDown, , "\\_SB.GPI0") {0} + }) + + /* Event handler for pin0 */ + Method (_L00) { + Printf ("GPIO0 Pin0 Toggled") + Store (1, INC0) + } + + /* Mapping for interrupt clear register */ + OperationRegion ( + GIO0, + SystemMemory, + FixedPcdGet32 (PcdGpioController0BaseAddress), + FixedPcdGet32 (PcdGpioController0Size) + ) + Field (GIO0, ByteAcc, NoLock, Preserve) { + Offset (0x41C), /* WO Intr clear on writing 1 to resp bit */ + INC0, 8 + } + } +} --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75851): https://edk2.groups.io/g/devel/message/75851 Mute This Topic: https://groups.io/mt/83169532/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 17:08:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75852+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75852+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1622293014; cv=none; d=zohomail.com; s=zohoarc; b=dTaI5RqT7f1zyjFSP1Wp6VkU5/jP+Tnrw5OJpptUXNtdvQKJ+d9gbXG/flYQDkgCtbfIzZWtBZXWU/spcVCGA0SdEP6yeTv8Qy6SekSE3zB/6j2S+ZveldrXMvZBRXbNsWIl9vHI3a6EOCjjmwvxGujPXH0CMr+HxAEjQzZIkL8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622293014; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=ZZsSqc944W5g98Mk3h1aIGHPJ6p8THk2lLMA5x5X0c8=; b=mnL7rsoPX8qbJjAonstJrtv4S1jlYsByT5NbUljb3crSWsMKWKjsmPNGzclsAiEAQTfPMgPABb6bqkGK3nShGSXwPTwT5biyvUksdL0tUmjRgEStfn0NSIPr5ODyzRoALgfouqP1aKVr6hgF7Fqzua1BbLXmCGPGvHEApezpeyo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75852+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622293014743886.836002412701; Sat, 29 May 2021 05:56:54 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id rRQLYY1788612x3nFG4EWZY5; Sat, 29 May 2021 05:56:54 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.20427.1622293013132374624 for ; Sat, 29 May 2021 05:56:53 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B4121101E; Sat, 29 May 2021 05:56:52 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 850C23F73B; Sat, 29 May 2021 05:56:51 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v1 2/5] Platform/Sgi: Add GED support Date: Sat, 29 May 2021 18:26:31 +0530 Message-Id: <20210529125634.30833-3-pranav.madhu@arm.com> In-Reply-To: <20210529125634.30833-1-pranav.madhu@arm.com> References: <20210529125634.30833-1-pranav.madhu@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pranav.madhu@arm.com X-Gm-Message-State: KUe73bOU0l3Qns0vQBLTM2Uzx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622293014; bh=kgkHOggE8pm8P311vXjCsdMSQtRDhk9ouq4SKYly66I=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=HquLBblUl3l+Zz2mWuDlLkPYtI9rpeNwNHNABeqVl1RwkI8/KkOONM6nyIl8ebN0haG YeQ9rrjsEulZiaKP4N7S28gHUpJNzQTbB7LgAascCr2TfpK8kwoa2uX0nS23dUGxK90rp /fFERlFthWnGDQH+ba2y/V2kM92Vl2lxim0= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add ACPI Generic Event Device (GED) support for Arm's reference design platforms. The SP804 dual-timer interrupt is used as the event source for GED. Signed-off-by: Pranav Madhu --- Platform/ARM/SgiPkg/SgiPlatform.dec | 5 ++ Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc | 5 ++ Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc | 5 ++ Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf | 3 ++ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 3 ++ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 3 ++ Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 3 ++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 3 ++ Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf | 3 ++ Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf | 3 ++ Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 3 ++ Platform/ARM/SgiPkg/AcpiTables/SsdtEvents.asl | 49 +++++++++++++= +++++++ 12 files changed, 88 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiP= latform.dec index e0aabc566d88..ffbbb24f1c33 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -81,5 +81,10 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Size|0|UINT32|0x00000020 gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt|0|UINT32|0x00000021 =20 + # SP804 Dual Timer + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress|0|UINT32|0x00000022 + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize|0|UINT32|0x00000023 + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt|0|UINT32|0x00000024 + [Ppis] gNtFwConfigDtInfoPpiGuid =3D { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0= x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } } diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc b/Platform/ARM/SgiPkg= /SgiMemoryMap.dsc.inc index a567af8537ec..76707be73d7b 100644 --- a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc @@ -51,6 +51,11 @@ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv|93 gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv|94 =20 + # SP804 dual timer + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress|0x1C110000 + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize|0x00010000 + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt|230 + # SMMU gArmSgiTokenSpaceGuid.PcdSmmuBase|0x4F000000 gArmSgiTokenSpaceGuid.PcdSmmuSize|0x01000000 diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc b/Platform/ARM/SgiPk= g/SgiMemoryMap2.dsc.inc index 5c137c0991e7..2d612f9b9674 100644 --- a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc @@ -51,6 +51,11 @@ gArmSgiTokenSpaceGuid.PcdWdogWS0Gsiv|110 gArmSgiTokenSpaceGuid.PcdWdogWS1Gsiv|111 =20 + # SP804 dual timer + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress|0x0C110000 + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize|0x00010000 + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt|486 + # SMMU gArmSgiTokenSpaceGuid.PcdSmmuBase|0x40000000 gArmSgiTokenSpaceGuid.PcdSmmuSize|0x10000000 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf index 56b80f418398..8c34c2fa73e4 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdE1EdgeAcpiTables.inf @@ -57,6 +57,9 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf index fa6692bc86f6..8d46b001444c 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf @@ -57,6 +57,9 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index d0ee125fa1de..473c9eff0f55 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -66,6 +66,9 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/A= RM/SgiPkg/AcpiTables/RdN2AcpiTables.inf index 232b58eb012f..c537db45e08f 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf @@ -57,6 +57,9 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf index 5713ef1ce3a9..6bbc3fc230ae 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf @@ -58,6 +58,9 @@ gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv gArmSgiTokenSpaceGuid.PcdSmmuBase + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf b/Platform/A= RM/SgiPkg/AcpiTables/RdV1AcpiTables.inf index e7b702962abe..d461cbe54c68 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf @@ -57,6 +57,9 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf index 901391fba70e..3b699b0acbb8 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf @@ -66,6 +66,9 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf index d59aefde735b..3ee66b1dfd5a 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf @@ -57,6 +57,9 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress + gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize + gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress gArmSgiTokenSpaceGuid.PcdVirtioBlkSize gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/SsdtEvents.asl b/Platform/ARM/S= giPkg/AcpiTables/SsdtEvents.asl index 28c7ce4e7f3c..58efe62c93ea 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/SsdtEvents.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/SsdtEvents.asl @@ -9,12 +9,20 @@ Interrupt is received by OSPM and that GPIO Interrupt Connection is list= ed in a GPIO controller device=E2=80=99s _AEI object. =20 + Interrupt Signalled ACPI event is another method of signalling events in + HW-Reduced ACPI model. In this method, ACPI event is generated when an + interrupt is received by the OSPM which is listed in the Generic Event D= evice + (GED) _CRS object. + Copyright (c) 2021, ARM Limited. All rights reserved. SPDX-License-Identifier: BSD-2-Clause-Patent =20 @par Specification Reference: - ACPI 6.4, Chapter 5.6.5, GPIO-signaled ACPI Events - Arm Base Boot Requirements 1.0, Issue F, Chapter 8.5.3, GPIO control= lers + - ACPI 6.4, Chapter 5.6.9, Interrupt-signaled ACPI events + - Arm Base Boot Requirements 1.0, Issue F, Chapter 8.5.4 Generic Event + Devices **/ =20 #include "SgiAcpiHeader.h" @@ -64,4 +72,45 @@ DefinitionBlock("SsdtEvent.aml", "SSDT", 2, "ARMLTD", "A= RMSGI", EFI_ACPI_ARM_OEM INC0, 8 } } + + /* ACPI GED object Template. Arm's reference design platforms include a = SP804 + dual timer which is implemented as part of the RoS sub-system. The SP= 804 + interrupt is used in GED as interrupt source. */ + Device (\_SB.GED0) { + Name (_HID, "ACPI0013") + Name (_UID, 0) + + /* Resource setting for GED */ + Name (_CRS, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { + FixedPcdGet32 (PcdSp804DualTimerInterrupt) + } + }) + + Method (_STA, 0x0, NotSerialized) { + return (0xF); + } + + /* Register map for interrupt clear register */ + OperationRegion ( + DTIM, + SystemMemory, + FixedPcdGet32 (PcdSp804DualTimerBaseAddress), + FixedPcdGet32 (PcdSp804DualTimerSize)) + Field (DTIM, DWordAcc, NoLock, Preserve) { + Offset (0x0C), + T1IC, 32, /* 0x0C Timer 1 Interrupt clear */ + } + + /* GED event handler */ + Method (_EVT, 1, Serialized) { + switch (ToInteger (Arg0)) + { + case (FixedPcdGet32 (PcdSp804DualTimerInterrupt)) { + Store (0x01, T1IC) + } + } + } + } /* Device (\_SB.GED0) */ + } --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75852): https://edk2.groups.io/g/devel/message/75852 Mute This Topic: https://groups.io/mt/83169533/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 17:08:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75853+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75853+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1622293022; cv=none; d=zohomail.com; s=zohoarc; b=E2+cbOdCLfUQPzT2ng46epMjIPH5uWq+0r6sqRNyfE+tS0etVhQkbXhJa/gg5LsLpLTl9P0BXOnj6g+Q5MWshub+JxikvKXU6/ueJM4bHxl8XNzyPuaI5pzkosEWgAImG0J35mzLqfeDsznabHQt448Ni6zzHSa82uDgFAlyTtI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622293022; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=In3h8rqczuXjNIAEtOJlXZHxhNE1rciO8c/aAbqXLk8=; b=BOZbD1DB9XrFbGg7nLOS0+t4quaAr2oEhfQYLM5Ox/USY4ebYEzRn6bO3isPTxqBxCFVTV7aWuKWZovaprGxYcjAMSw1sJkIAhFaALLNjLD4kSb6RaS8FXCHA16KJRhTiDlXaAh+exyOeUpLIa2WOHvTa+7U2Dhs5TnMkTRjfIY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75853+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622293022599471.53234580657943; Sat, 29 May 2021 05:57:02 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Yy9FYY1788612xc8SLX2vDxh; Sat, 29 May 2021 05:57:01 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.20467.1622293014750678662 for ; Sat, 29 May 2021 05:56:54 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5CCA411D4; Sat, 29 May 2021 05:56:54 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 2E00C3F73B; Sat, 29 May 2021 05:56:52 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v1 3/5] Platform/Sgi: define the macro ENABLE_GOP Date: Sat, 29 May 2021 18:26:32 +0530 Message-Id: <20210529125634.30833-4-pranav.madhu@arm.com> In-Reply-To: <20210529125634.30833-1-pranav.madhu@arm.com> References: <20210529125634.30833-1-pranav.madhu@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pranav.madhu@arm.com X-Gm-Message-State: f9h2L0cbOwT5wV5rOG3B32ASx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622293021; bh=wTzdNOKDNk5N7e0jOm91Pgf/yA1NDBH8OUNBmsM2EXM=; h=Cc:Date:From:Reply-To:Subject:To; b=Lj2Tyt8b1mBtVuiDlD3CaY+lGDGWr3hhByG8sWxEmaeaXad49IzVkuOSTiHsHpl7RQn +e95H7CsynL/piHMRhSVymPbq05ekhmg9+Ng8REFAD9o7q1g7PM3uGNejqpbknWesnMPR VhtNl+JLVagzO4McvpYT0V9jGLG+h+sbWaQ= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Thomas Abraham Define and use the global macro ENABLE_GOP to enable the use of the Graphics Output Protocol (GOP). Enabling this macro allows GOP protocol to be used for display on the HDLCD controller of the platform. This macro is set to false by default for the all supported platforms. Signed-off-by: Thomas Abraham Signed-off-by: Pranav Madhu --- Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 5 +++++ Platform/ARM/SgiPkg/SgiPlatform.fdf | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/= SgiPlatform.dsc.inc index e4aee7a09acf..2851cf180c0e 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -14,6 +14,9 @@ # Secure boot requires secure storage to be enabled as well. DEFINE SECURE_BOOT_ENABLE =3D FALSE =20 + # To allow HDLCD display using the Graphics Output Protocol, set this to= TRUE. + DEFINE ENABLE_GOP =3D FALSE + [BuildOptions] *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES =20 @@ -234,7 +237,9 @@ ArmPkg/Drivers/ArmGic/ArmGicDxe.inf ArmPkg/Drivers/TimerDxe/TimerDxe.inf ArmPkg/Drivers/GenericWatchdogDxe/GenericWatchdogDxe.inf +!if $(ENABLE_GOP) =3D=3D TRUE ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf +!endif ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiP= latform.fdf index d94e4633e36c..8227ae03330c 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf @@ -153,7 +153,9 @@ READ_LOCK_STATUS =3D TRUE INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf =20 # Graphics Output Protocol +!if $(ENABLE_GOP) =3D=3D TRUE INF ArmPlatformPkg/Drivers/LcdGraphicsOutputDxe/LcdGraphicsOutputDxe.inf +!endif =20 INF Platform/ARM/Drivers/BootMonFs/BootMonFs.inf INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75853): https://edk2.groups.io/g/devel/message/75853 Mute This Topic: https://groups.io/mt/83169535/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 17:08:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75854+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75854+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1622293023; cv=none; d=zohomail.com; s=zohoarc; b=d2EW5oRp+9teZDZltzTjHhqUj00KlEafLlbeLFzU1II4WZZ68kZnH60RL1k1v/ACOfWj37E3FZpnGKRga43mV0t7Jql0ectYgGbXYSdN3mB/F4wEWAU/0tcjwqHSz3bqzPKLplwtn8XcKMkOfO6s+jYmfdoVqVb1joEeQdlK0X8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622293023; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=cwXQdSOloadydv+0grX+LdLly3McT6NsfYrAEchVoqs=; b=IvhSvVcCKKujfcc8l0dyi/dZjIm2aH21d5+uNfO4QBZ8TUr/JvtebgkbUMZgi0QyymPezDeIzmPT3zXKzf9S9Z1EJMaUZEBlnPMKkGnzexurWI9DikSZEwi4SVhbKxdq54oGJaNoU4ytTB+mF9eP+p1tNrzZLJ5ydBwdXm9bzRE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75854+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622293023961944.6856345576942; Sat, 29 May 2021 05:57:03 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id Kgv3YY1788612xrOUFDSHvqw; Sat, 29 May 2021 05:57:03 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.20343.1622293016620681656 for ; Sat, 29 May 2021 05:56:56 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 3F051101E; Sat, 29 May 2021 05:56:56 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id CAF2C3F73B; Sat, 29 May 2021 05:56:54 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v1 4/5] Platform/Sgi: update _OSC control method to control LPI and CPPC Date: Sat, 29 May 2021 18:26:33 +0530 Message-Id: <20210529125634.30833-5-pranav.madhu@arm.com> In-Reply-To: <20210529125634.30833-1-pranav.madhu@arm.com> References: <20210529125634.30833-1-pranav.madhu@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pranav.madhu@arm.com X-Gm-Message-State: XANjyrb3OGgQvJvhMgpqOSMzx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622293023; bh=LdjfSmPRvaiZzknYcFDPf+lVYiI5I175M77KEU7twdQ=; h=Cc:Date:From:Reply-To:Subject:To; b=gYBGt+dg5cVqLcsHOkL+ZSHKkAES594SoxfgrODi544pciUrFLfSpd9aoTVII7xvjBO OD20ON+I6zZDYaPKgZ4iuTJk1ZSWUTBbfAs54LKZzX/c1nG7hCLs2GrpmQflOFWAC1yhR EIo1Y4F3A2ZgOiIeSUrMidt2tT5F53o/OuA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Define and use the global macro LPI_EN and CPPC_EN to enable low power idle and CPPC support for reference design platforms. Update platform wide _OSC control method to enable/disable low power idle and CPPC support based on pcd PcdOscLpiEnable and PcdOscCppcEnable. The pcds are controlled by the global macros LPI_EN and CPPC_EN. Signed-off-by: Pranav Madhu --- Platform/ARM/SgiPkg/SgiPlatform.dec | 4 ++++ Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 14 ++++++++++++++ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf | 1 + Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf | 1 + Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 2 ++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf | 2 ++ Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf | 2 ++ Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf | 2 ++ Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf | 1 + Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h | 2 ++ Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl | 8 ++++++++ Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Dsdt.asl | 8 ++++++++ Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl | 15 +++++++++++++= ++ Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl | 15 +++++++++++++= ++ Platform/ARM/SgiPkg/AcpiTables/RdV1/Dsdt.asl | 15 +++++++++++++= ++ Platform/ARM/SgiPkg/AcpiTables/RdV1Mc/Dsdt.asl | 15 +++++++++++++= ++ Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl | 8 ++++++++ 17 files changed, 115 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiP= latform.dec index ffbbb24f1c33..8cd818a9bf64 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -86,5 +86,9 @@ gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize|0|UINT32|0x00000023 gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt|0|UINT32|0x00000024 =20 + # ACPI platform wide _OSC + gArmSgiTokenSpaceGuid.PcdOscLpiEnable|0|UINT32|0x00000025 + gArmSgiTokenSpaceGuid.PcdOscCppcEnable|0|UINT32|0x00000026 + [Ppis] gNtFwConfigDtInfoPpiGuid =3D { 0x6f606eb3, 0x9123, 0x4e15, { 0xa8, 0= x9b, 0x0f, 0xac, 0x66, 0xef, 0xd0, 0x17 } } diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/= SgiPlatform.dsc.inc index 2851cf180c0e..7e37732fb93c 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -17,6 +17,10 @@ # To allow HDLCD display using the Graphics Output Protocol, set this to= TRUE. DEFINE ENABLE_GOP =3D FALSE =20 + # To enable LPI and CPPC power management functionality, set this to TRU= E. + DEFINE LPI_EN =3D FALSE + DEFINE CPPC_EN =3D FALSE + [BuildOptions] *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES =20 @@ -108,6 +112,16 @@ gArmSgiTokenSpaceGuid.PcdDramBlock2Base|0x8080000000 gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0x180000000 =20 +!if $(LPI_EN) =3D=3D TRUE + # Allow use of LPI in the response to _OSC method call + gArmSgiTokenSpaceGuid.PcdOscLpiEnable|1 +!endif + +!if $(CPPC_EN) =3D=3D TRUE + # Allow use of CPPC in the response to _OSC method call + gArmSgiTokenSpaceGuid.PcdOscCppcEnable|1 +!endif + # NV Storage PCDs. Use base of 0x08000000 for NOR0, 0xC0000000 for NOR 1 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x01400000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x01400000 diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf index 8d46b001444c..ce89aa93ea7b 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeAcpiTables.inf @@ -57,6 +57,7 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdOscLpiEnable gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf b/Plat= form/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf index 473c9eff0f55..1999bc1553e9 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2AcpiTables.inf @@ -66,6 +66,7 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdOscLpiEnable gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/A= RM/SgiPkg/AcpiTables/RdN2AcpiTables.inf index c537db45e08f..25be2e276e85 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf @@ -57,6 +57,8 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdOscLpiEnable + gArmSgiTokenSpaceGuid.PcdOscCppcEnable gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf b/Platfo= rm/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf index 6bbc3fc230ae..4b36c3e5ceb2 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1AcpiTables.inf @@ -57,6 +57,8 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdOscLpiEnable + gArmSgiTokenSpaceGuid.PcdOscCppcEnable gArmSgiTokenSpaceGuid.PcdSmmuBase gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf b/Platform/A= RM/SgiPkg/AcpiTables/RdV1AcpiTables.inf index d461cbe54c68..97a87462932b 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1AcpiTables.inf @@ -57,6 +57,8 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdOscLpiEnable + gArmSgiTokenSpaceGuid.PcdOscCppcEnable gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf index 3b699b0acbb8..deaca3719ae4 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1McAcpiTables.inf @@ -66,6 +66,8 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdOscLpiEnable + gArmSgiTokenSpaceGuid.PcdOscCppcEnable gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf b/Platform= /ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf index 3ee66b1dfd5a..a1bd71fde761 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575AcpiTables.inf @@ -57,6 +57,7 @@ gArmSgiTokenSpaceGuid.PcdGpioController0Interrupt gArmSgiTokenSpaceGuid.PcdGtFrame0Gsiv gArmSgiTokenSpaceGuid.PcdGtFrame1Gsiv + gArmSgiTokenSpaceGuid.PcdOscLpiEnable gArmSgiTokenSpaceGuid.PcdSp804DualTimerBaseAddress gArmSgiTokenSpaceGuid.PcdSp804DualTimerSize gArmSgiTokenSpaceGuid.PcdSp804DualTimerInterrupt diff --git a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h b/Platform/ARM/Sgi= Pkg/Include/SgiAcpiHeader.h index 7b8c16b172c0..d75d54055436 100644 --- a/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h +++ b/Platform/ARM/SgiPkg/Include/SgiAcpiHeader.h @@ -37,6 +37,8 @@ =20 // ACPI OSC for Platform-Wide Capability #define OSC_CAP_CPPC_SUPPORT (1U << 5) +#define OSC_CAP_CPPC2_SUPPORT (1U << 6) +#define OSC_CAP_PLAT_COORDINATED_LPI (1U << 7) #define OSC_CAP_OS_INITIATED_LPI (1U << 8) =20 #pragma pack(1) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl b/Platform/AR= M/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl index a2258f61aeca..bd8efa544a59 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1Edge/Dsdt.asl @@ -29,6 +29,14 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", And (CAP0, Not (OSC_CAP_OS_INITIATED_LPI), CAP0) Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } + + If (And (CAP0, OSC_CAP_PLAT_COORDINATED_LPI)) { + if (LEqual (FixedPcdGet32 (PcdOscLpiEnable), Zero)) { + And (CAP0, Not (OSC_CAP_PLAT_COORDINATED_LPI), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + } Else { And (STS0, Not (OSC_STS_MASK), STS0) Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Dsdt.asl b/Platform/= ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Dsdt.asl index 5807658e7815..9cb2b175418c 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN1EdgeX2/Dsdt.asl @@ -31,6 +31,14 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", "= ARMSGI", And (CAP0, Not (OSC_CAP_OS_INITIATED_LPI), CAP0) Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } + + If (And (CAP0, OSC_CAP_PLAT_COORDINATED_LPI)) { + if (LEqual (FixedPcdGet32 (PcdOscLpiEnable), Zero)) { + And (CAP0, Not (OSC_CAP_PLAT_COORDINATED_LPI), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + } Else { And (STS0, Not (OSC_STS_MASK), STS0) Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl b/Platform/ARM/Sg= iPkg/AcpiTables/RdN2/Dsdt.asl index a318ef48ded9..ccd98f829652 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl @@ -30,11 +30,26 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } =20 + If (And (CAP0, OSC_CAP_PLAT_COORDINATED_LPI)) { + if (LEqual (FixedPcdGet32 (PcdOscLpiEnable), Zero)) { + And (CAP0, Not (OSC_CAP_PLAT_COORDINATED_LPI), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + If (And (CAP0, OSC_CAP_CPPC_SUPPORT)) { /* CPPC revision 1 and below not supported */ And (CAP0, Not (OSC_CAP_CPPC_SUPPORT), CAP0) Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } + + If (And (CAP0, OSC_CAP_CPPC2_SUPPORT)) { + if (LEqual (FixedPcdGet32 (PcdOscCppcEnable), Zero)) { + And (CAP0, Not (OSC_CAP_CPPC2_SUPPORT), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + } Else { And (STS0, Not (OSC_STS_MASK), STS0) Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl b/Platform/AR= M/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl index 411eff84334a..b6decc77f480 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2Cfg1/Dsdt.asl @@ -36,11 +36,26 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } =20 + If (And (CAP0, OSC_CAP_PLAT_COORDINATED_LPI)) { + if (LEqual (FixedPcdGet32 (PcdOscLpiEnable), Zero)) { + And (CAP0, Not (OSC_CAP_PLAT_COORDINATED_LPI), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + If (And (CAP0, OSC_CAP_CPPC_SUPPORT)) { /* CPPC revision 1 and below not supported */ And (CAP0, Not (OSC_CAP_CPPC_SUPPORT), CAP0) Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } + + If (And (CAP0, OSC_CAP_CPPC2_SUPPORT)) { + if (LEqual (FixedPcdGet32 (PcdOscCppcEnable), Zero)) { + And (CAP0, Not (OSC_CAP_CPPC2_SUPPORT), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + } Else { And (STS0, Not (OSC_STS_MASK), STS0) Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1/Dsdt.asl b/Platform/ARM/Sg= iPkg/AcpiTables/RdV1/Dsdt.asl index 0f632673d050..db9c19780e16 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1/Dsdt.asl @@ -30,11 +30,26 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } =20 + If (And (CAP0, OSC_CAP_PLAT_COORDINATED_LPI)) { + if (LEqual (FixedPcdGet32 (PcdOscLpiEnable), Zero)) { + And (CAP0, Not (OSC_CAP_PLAT_COORDINATED_LPI), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + If (And (CAP0, OSC_CAP_CPPC_SUPPORT)) { /* CPPC revision 1 and below not supported */ And (CAP0, Not (OSC_CAP_CPPC_SUPPORT), CAP0) Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } + + If (And (CAP0, OSC_CAP_CPPC2_SUPPORT)) { + if (LEqual (FixedPcdGet32 (PcdOscCppcEnable), Zero)) { + And (CAP0, Not (OSC_CAP_CPPC2_SUPPORT), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + } Else { And (STS0, Not (OSC_STS_MASK), STS0) Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdV1Mc/Dsdt.asl b/Platform/ARM/= SgiPkg/AcpiTables/RdV1Mc/Dsdt.asl index 622d522532a3..e084d82de7c0 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/RdV1Mc/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/RdV1Mc/Dsdt.asl @@ -30,11 +30,26 @@ DefinitionBlock ("DsdtTable.aml", "DSDT", 2, "ARMLTD", = "ARMSGI", Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } =20 + If (And (CAP0, OSC_CAP_PLAT_COORDINATED_LPI)) { + if (LEqual (FixedPcdGet32 (PcdOscLpiEnable), Zero)) { + And (CAP0, Not (OSC_CAP_PLAT_COORDINATED_LPI), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + If (And (CAP0, OSC_CAP_CPPC_SUPPORT)) { /* CPPC revision 1 and below not supported */ And (CAP0, Not (OSC_CAP_CPPC_SUPPORT), CAP0) Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } + + If (And (CAP0, OSC_CAP_CPPC2_SUPPORT)) { + if (LEqual (FixedPcdGet32 (PcdOscCppcEnable), Zero)) { + And (CAP0, Not (OSC_CAP_CPPC2_SUPPORT), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + } Else { And (STS0, Not (OSC_STS_MASK), STS0) Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) diff --git a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl b/Platform/ARM/= SgiPkg/AcpiTables/Sgi575/Dsdt.asl index e879a681fabf..a292d20d8afb 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/Sgi575/Dsdt.asl @@ -28,6 +28,14 @@ DefinitionBlock("DsdtTable.aml", "DSDT", 2, "ARMLTD", "A= RMSGI", EFI_ACPI_ARM_OEM And (CAP0, Not (OSC_CAP_OS_INITIATED_LPI), CAP0) Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) } + + If (And (CAP0, OSC_CAP_PLAT_COORDINATED_LPI)) { + if (LEqual (FixedPcdGet32 (PcdOscLpiEnable), Zero)) { + And (CAP0, Not (OSC_CAP_PLAT_COORDINATED_LPI), CAP0) + Or (STS0, OSC_STS_CAPABILITY_MASKED, STS0) + } + } + } Else { And (STS0, Not (OSC_STS_MASK), STS0) Or (STS0, Or (OSC_STS_FAILURE, OSC_STS_UNRECOGNIZED_REV), STS0) --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75854): https://edk2.groups.io/g/devel/message/75854 Mute This Topic: https://groups.io/mt/83169537/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- From nobody Thu May 16 17:08:49 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+75855+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75855+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1622293024; cv=none; d=zohomail.com; s=zohoarc; b=ZgGMvFlsDhUtgA05Nf0aY3C6lL2Mn1NRZyKalbksoFJliK8uJcev0ygYujzkrOdgvATYkbBgX93kUKX/Pj/gIpzz3mnYhJq07DsKd1RYThtm9l1ZEqD7u9nIxhyCxKLZLmjKjpg/IRv9EOt4K23KYxAWigFhN3LRFbI13kguHFY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1622293024; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=R61lYAQwgqXlVR3VfCMz9qgQmBLRrRD6tKZjoBf77iM=; b=nY2snREO+DU2bxoQD6rKjZrHsl7bknGgS3u86DZBiF1AMd78nOAlKHSNfoCgKW1OazvJ2rr3wJIq+nwAxdzWDhGQNbOQLRVfxB4NIsSWKn4JXwbmkBiDJB7JyS7SXf5BP3cCdomcfm34ecmMStHK36Ld//2w2LB/FlBG0lgS6+E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+75855+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1622293024307875.4880292851643; Sat, 29 May 2021 05:57:04 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id U3atYY1788612x4JsBsaK7Mx; Sat, 29 May 2021 05:57:04 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.20481.1622293018419037995 for ; Sat, 29 May 2021 05:56:58 -0700 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E5466101E; Sat, 29 May 2021 05:56:57 -0700 (PDT) X-Received: from usa.arm.com (a074742.blr.arm.com [10.162.16.32]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id AD57C3F73B; Sat, 29 May 2021 05:56:56 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v1 5/5] Platform/Sgi: Cleanup build options for StandaloneMM context Date: Sat, 29 May 2021 18:26:34 +0530 Message-Id: <20210529125634.30833-6-pranav.madhu@arm.com> In-Reply-To: <20210529125634.30833-1-pranav.madhu@arm.com> References: <20210529125634.30833-1-pranav.madhu@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,pranav.madhu@arm.com X-Gm-Message-State: sB14VzVSEJyIwaBhcbN5kbuax1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1622293024; bh=YLdEYQfocTCZPRQjFe/skOd2tBJcjzX4JdW27/1CEVo=; h=Cc:Date:From:Reply-To:Subject:To; b=NBA2dw3dGnkw30QDUwPQchT3gKqNSXf6u76MLlJVVDHWxjqVbb0inUq6NPoBVtZmtVM FO+9986k75QYt1g6put6Mq0qXbvRRLzYmLCWAuSt5oIdh3OBNUlbH9rlGvpSYJDQ4UuMe mLkL2d9zBXSizH4IwyoN5zg2wDZWKsvjglM= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" From: Omkar Anand Kulkarni The Arm reference design platforms support only AArch64 mode for StandaloneMM execution context. So cleanup the existing build options specified for StandaloneMM. Signed-off-by: Omkar Anand Kulkarni Signed-off-by: Pranav Madhu --- Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc b/Platform/ARM/SgiPk= g/SgiPlatformMm.dsc.inc index 6839ec35da8a..2b461d5afbcb 100644 --- a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc @@ -144,7 +144,5 @@ # ##########################################################################= ######################### [BuildOptions.AARCH64] - GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 -march=3Darmv8-a+= nofp - -[BuildOptions] - *_*_*_CC_FLAGS =3D -D DISABLE_NEW_DEPRECATED_INTERFACES + GCC:*_*_*_CC_FLAGS =3D -mstrict-align -march=3Darmv8-a+nofp -D DISABLE_N= EW_DEPRECATED_INTERFACES + GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 --=20 2.17.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#75855): https://edk2.groups.io/g/devel/message/75855 Mute This Topic: https://groups.io/mt/83169538/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-