From nobody Fri May 3 13:03:24 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+76379+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+76379+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1623407677; cv=none; d=zohomail.com; s=zohoarc; b=E4l2m1pH7oXi3GEO7znGxuO2zsFeIpmp7KUhKTHVGvRm2uqbg9bpENOIsXduOXiIftGLpkJtZpbIKdJHqtcMmXgbVQHZ8AMH3MZLE1x4OJD1v2/Sz/fOou/w/f/k/DIiet/LcVEsiA4T/jlc9RMWH4Lvoml1/RqsQhHHo9y2kec= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623407677; 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=Ns52j2emWVUYWhkr1j7HBUbicqfB1EcbyEOspZnV8n8=; b=GU9ZClTgDsiXYBkpq7o9TWDDCW8bUBtI4FHLkOuOPzoFoU34jng+7IJHm/MGWRMm+ZTetAxCPK0aKuT8f/dVQmLCRxyuK3efSOl4MqNAFTDQ2gld1BBkX8dWFT3fPmNL7+aHGZWFX7UHHiUurSMiszA0A9qRuvCQ5AhEuIGvTWo= 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+76379+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623407677842693.5480895782952; Fri, 11 Jun 2021 03:34:37 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id mtyLYY1788612xn1gxMHabwK; Fri, 11 Jun 2021 03:34:37 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.6596.1623407671854317976 for ; Fri, 11 Jun 2021 03:34:32 -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 6F026143D; Fri, 11 Jun 2021 03:34:31 -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 443193F694; Fri, 11 Jun 2021 03:34:30 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v2 1/5] Platform/Sgi: Enable PrimeCell GPIO Date: Fri, 11 Jun 2021 16:04:17 +0530 Message-Id: <20210611103421.32518-2-pranav.madhu@arm.com> In-Reply-To: <20210611103421.32518-1-pranav.madhu@arm.com> References: <20210611103421.32518-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: vBVxzTO29g7WWFahxmU5UhWRx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623407677; bh=0gCqAuCRaEraa98P1XAhSYA7qUSWnKdVYgUMsH8NiaE=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=UF6XMPpK65Vz65xWYiYLayzhwJmdv9kzMGL8C+JLFkQqfgXAph9vuwULuHlS/zq1f6S dTYCu+L2swQ34+INZr5ZdK79cf24eID6dYPKGngu/aekK3hMAAv3zwLgmNV1rbl40Wyee uves9nhMcjOwL8C2f4tW4/sjgtC/W9cpvO0= 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 Reviewed-by: Sami Mujawar Reviewed-by: Thomas Abraham --- 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 (#76379): https://edk2.groups.io/g/devel/message/76379 Mute This Topic: https://groups.io/mt/83465455/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 Fri May 3 13:03:24 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+76380+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+76380+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1623407674; cv=none; d=zohomail.com; s=zohoarc; b=LEpAJa/xV+p6qhzMiA/Il4yEMTiIDchTN04t75ehsSqrs6iIJYpC1pxetvT/DgtMlzkjTdlVhBC05zamyGS5S0TptS45+bhMuLfEpxQxraAMjdSNS+rnUaGYIvaZdMy3DypYWDw+vcJmj0YKEfeno/Kahe9pErrQxAXnkcd36EA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623407674; 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=SX1EwoAri/HwYr7c07I6KzZk1gT2KZcraBYhCCIkvxI=; b=XIapuv18xK9UojpmXKueiLRbvVhb2IavtTrg/18+i0oD8iSYQyyMoEIT0otz9PVcjTzreBFJniexNBU7J6/50yY77kgpiB8rA/Qb2ombF9L8ZqQFpBOr3sv6xrQIlP9a/rJAuM5yXF1poDlRGVwciP7mKiP7X+78XYMVwXSWtrw= 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+76380+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623407674454659.1010620025456; Fri, 11 Jun 2021 03:34:34 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id qREdYY1788612x6G3gWK0ZDN; Fri, 11 Jun 2021 03:34:34 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.6359.1623407673438209707 for ; Fri, 11 Jun 2021 03:34:33 -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 1256B1396; Fri, 11 Jun 2021 03:34:33 -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 DB86B3F694; Fri, 11 Jun 2021 03:34:31 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v2 2/5] Platform/Sgi: Add GED support Date: Fri, 11 Jun 2021 16:04:18 +0530 Message-Id: <20210611103421.32518-3-pranav.madhu@arm.com> In-Reply-To: <20210611103421.32518-1-pranav.madhu@arm.com> References: <20210611103421.32518-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: eqI8rPtn8xsposqrUzCpsB3Nx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623407674; bh=31JsZfP88WdTcbomieusVc/yxP++BWoa355aAmeVhEQ=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=q4XyUrfJ/Dp57sbCADn5qzYHhKTNloVeC74kuPGqUWpYczDxtPtv1a1uR0Vg6j1cVkx ER+A5oocVhDx3p44WWYutXGJzVRpzG3CVFGExZPzhCQL3iJvmCeS0RO0FJJdZzpCpu7ct UWghoDBGJeJf+OxiuvEgFrYmsHrQUpF5pvc= 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 Reviewed-by: Sami Mujawar Reviewed-by: Thomas Abraham --- 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 (#76380): https://edk2.groups.io/g/devel/message/76380 Mute This Topic: https://groups.io/mt/83465457/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 Fri May 3 13:03:24 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+76381+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+76381+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1623407681; cv=none; d=zohomail.com; s=zohoarc; b=NDm+bNRd4P6oGtdxIN7r6RKqbJkE0mwZTC1FVof4hRq0BWS5IaJ60dGULhUbOaQ3S0g+Zhnjaih5BW+R3WQgX1wDFSDIIO2EpkSt1nGeioao8uq5SPwPc0x9uIJIFbFtQ2gQLEWJwgYLLvMEdnp7dvKMUjhSSpWEScziyLjk0Dw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623407681; 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=zZpxtimbbmntHjCbUi2bZpe7ESCZVJKH9QN2ahpLalQ=; b=D1Uc7UzmcCwPvC4o1OYazZS6CRHq0CBZQtcLkFHtCQzPk+nchbBWZJdhFjMffJaxdHC4flVJlC9z6QgsFaM5esGy8J4fZbKKz1qOCTztLFQ+/lAY73qQL5K1+HyGHJ9f3aYfCltQvSdVu7P4YMOqhl2Bo1QuPnX/FqnnLLHjD10= 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+76381+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623407681035843.2843410614215; Fri, 11 Jun 2021 03:34:41 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id DaLAYY1788612xMa9MwnKmYz; Fri, 11 Jun 2021 03:34:40 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.6683.1623407675162147878 for ; Fri, 11 Jun 2021 03:34:35 -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 A91D6143D; Fri, 11 Jun 2021 03:34:34 -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 7E83C3F694; Fri, 11 Jun 2021 03:34:33 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v2 3/5] Platform/Sgi: define the macro ENABLE_GOP Date: Fri, 11 Jun 2021 16:04:19 +0530 Message-Id: <20210611103421.32518-4-pranav.madhu@arm.com> In-Reply-To: <20210611103421.32518-1-pranav.madhu@arm.com> References: <20210611103421.32518-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: Al75KDxMsAOK8MS0iaGaCl0lx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623407680; bh=M3ZgTBC8PPsNgkrIp3iOl/yQlZn1Mgvk3de+80KuwCU=; h=Cc:Date:From:Reply-To:Subject:To; b=ue2buoN63dHM+3kEY6QHZwKzk49j6rPU8qMIu/PhOM9jgGoTHlV8aL9T63euPR+srcz ed7rhoM+dNjP63L39eeSNXqRbcNcLgPNXWWq6NRKU6AGC9KrAoRezlKoJCBLnO6noD3Jg vj6F7PU58tFRu+OfSA8B/Q9wt6cYXpBrDxA= 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 Reviewed-by: Sami Mujawar --- 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 (#76381): https://edk2.groups.io/g/devel/message/76381 Mute This Topic: https://groups.io/mt/83465458/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 Fri May 3 13:03:24 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+76382+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+76382+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1623407678; cv=none; d=zohomail.com; s=zohoarc; b=H9x/yWaJWD+S3uutzqCelL6nvTRRX1e+aE2YICWwyRvyhezcGSdj8sJQGDnocNc77VQFvocN9Ms6U+PUwltgyGIHH9OR/UXGlXfXj7jMePQaW9qSuozfRdA9C4XFnAhqB8u9GYboRxAuxKHX+xUeAtFiBDPQAjXWp1X5FKqXHFo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623407678; 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=qCbm7TgtFh2MCqwjXdCOnUDhfrSbVY9DBdwglikCWIQ=; b=ixIOR9izavK2xkSWA/xf51wWi6h7YV28czS5stWO5jdgMWWLLHBb0VMSSqHZscAZ7YDcQWXrcZukIGR1nnOHvcR8caiAr+gDA7uaE0OEt7IIYmtqSjCJOu/exPGWzex2qDdqZrPgIBfAdZQKqOBhO98jdgEaaxISw/UHLDYj5y0= 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+76382+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623407678033427.2611529073371; Fri, 11 Jun 2021 03:34:38 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id T7PAYY1788612xHyNeaOBd5G; Fri, 11 Jun 2021 03:34:37 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.6684.1623407676979806404 for ; Fri, 11 Jun 2021 03:34:37 -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 869E21396; Fri, 11 Jun 2021 03:34:36 -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 216603F694; Fri, 11 Jun 2021 03:34:34 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v2 4/5] Platform/Sgi: update _OSC control method to control LPI and CPPC Date: Fri, 11 Jun 2021 16:04:20 +0530 Message-Id: <20210611103421.32518-5-pranav.madhu@arm.com> In-Reply-To: <20210611103421.32518-1-pranav.madhu@arm.com> References: <20210611103421.32518-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: Eh9a1jo0Rz1aq4QaesEBD7V4x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623407677; bh=XUTY0vP2IqFgduDZsDNqiuo5UC2OqBv4ANA7DJzI2QA=; h=Cc:Date:From:Reply-To:Subject:To; b=Kx+JRWuNS5d3KDh52q0Wa5Mrc1i5H4hYK+vZryqVL42pz+R2fFujexrSIMl3pPRC1bN CXbJrNYgNp68zmc2stmQkIVpFwW50MrCXfWnCm9lCCWeMt/5AulxzfFJ8SwaZWPfN9Z08 GCw519SK4X8pSXIvpfkkgihTcD9IG0aJUjE= 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 Reviewed-by: Sami Mujawar Reviewed-by: Thomas Abraham --- 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 (#76382): https://edk2.groups.io/g/devel/message/76382 Mute This Topic: https://groups.io/mt/83465459/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 Fri May 3 13:03:24 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+76383+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+76383+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1623407684; cv=none; d=zohomail.com; s=zohoarc; b=JH1yUnJ+gCJ8cLZ71BF0jqXGOYAy0qfRso3Q8f9UP7iGudCaNrW0KasMCYAUwYsxRS0zXCp4QbzyZrFNmkOB/q6alRsr11MgJHeTPqyC+COt6vGfc5vQU6Y++T0e8SAHdnt4JtCadv8+G/V9kjmbOZs4OFgqbT0bgEYRN966QKU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623407684; 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=bN4Atnt/Z+SAWBOPX4f7nKnmVfo4vfPrWfkIDC6Mciw=; b=i23suj3edGMYKWLqkVEMld64OL5dEaqnPf6Dn00m2KOfWw3En6w1e3ukM/R+vLWyeRL3p+7PIV7THnnnQjpjLx2ZJ9hnalp8XKspM1SHbVRRDzAg7TjQ1fOXWCCMvYdEa6IPVHikiSrluJ6Qls0BXbYRXIORuZYogCUzNxBGmSU= 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+76383+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1623407684637646.6241194275349; Fri, 11 Jun 2021 03:34:44 -0700 (PDT) Return-Path: X-Received: by 127.0.0.2 with SMTP id RyZKYY1788612xbeLJWy8Agk; Fri, 11 Jun 2021 03:34:44 -0700 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web10.6525.1623407678686501961 for ; Fri, 11 Jun 2021 03:34:38 -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 32F161396; Fri, 11 Jun 2021 03:34:38 -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 F2EAF3F694; Fri, 11 Jun 2021 03:34:36 -0700 (PDT) From: "Pranav Madhu" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Sami Mujawar Subject: [edk2-devel] [edk2-platforms][PATCH v2 5/5] Platform/Sgi: Cleanup build options for StandaloneMM context Date: Fri, 11 Jun 2021 16:04:21 +0530 Message-Id: <20210611103421.32518-6-pranav.madhu@arm.com> In-Reply-To: <20210611103421.32518-1-pranav.madhu@arm.com> References: <20210611103421.32518-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: xixdEN9v2gzknu0KWLPVjNq2x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1623407684; bh=9KW7xmWsbyNr2XxAtrIj73eTO6sWmksqnli2th6aqLw=; h=Cc:Date:From:Reply-To:Subject:To; b=RG4QE7Rs/GvNI4GzXQbNt5QQGHxfhM20QaCaZWvm+cDFQeWE/vX9xCc5hCacON9di6q kUUpw0jMkQE3vAZPmCG7em92Kb9ZxxecaZ7lViyc501Rh7xRsxawOKXJUL1fuRn4fCzym c+YLA5fDJSLDF8jqayUA25bjRDEjUSOHLto= 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 Reviewed-by: Sami Mujawar Reviewed-by: Thomas Abraham --- 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 (#76383): https://edk2.groups.io/g/devel/message/76383 Mute This Topic: https://groups.io/mt/83465460/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-