From nobody Sat Apr 27 17:51:59 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+69191+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+69191+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1608300474; cv=none; d=zohomail.com; s=zohoarc; b=Vn0qeDON3txcqHmknBJefYDxwgfDNOOIAsQf/nOejh9Y1d+YQVixQRMn5bX0bYGJ+ZshK3x+7lt+OaVq4mtV/+Cxj6JjUDNFw3AstZkRrce0KDu9TR1zLbdg73m2wEQAOpl/0dHpjR4+PtZysFE6FxjHX3xEsPzlBCs2zsEEYwg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608300474; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=HFeoxEgICOHZk9B0NOg/SuFZTdKcx8yMOmkVgODALq4=; b=LKqIbE9M0qcxeSNiy/L6Ji9xgoI+fgFE3J4teYXt1qCcCMJY1aTDRmbB6EnzoSgri1uZS3S7if8+ctpaQaE9ILLFYGHt9Cjp4tHS006lL3xfmXlN4o5ML+daPUhEyc0ZmoIzTCDeiYHdzOQKa9fj14/ffv5b1Uie3Zfwe6LiAC4= 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+69191+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 1608300473957360.3687729436218; Fri, 18 Dec 2020 06:07:53 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id UlvDYY1788612xOz9g5II1GH; Fri, 18 Dec 2020 06:07:50 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web08.10342.1608300469757402108 for ; Fri, 18 Dec 2020 06:07:49 -0800 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 680FD1FB; Fri, 18 Dec 2020 06:07:49 -0800 (PST) X-Received: from usa.arm.com (a073440-lin.blr.arm.com [10.162.16.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id E6AEB3F66B; Fri, 18 Dec 2020 06:07:46 -0800 (PST) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Thomas Abraham , Vijayenthiran Subramaniam , Aditya Angadi Subject: [edk2-devel] [PATCH][edk2-platforms 1/5] Platform/ARM/SgiPkg: Use PCD for base addresses Date: Fri, 18 Dec 2020 19:37:22 +0530 Message-Id: <20201218140726.23670-2-aditya.angadi@arm.com> In-Reply-To: <20201218140726.23670-1-aditya.angadi@arm.com> References: <20201218140726.23670-1-aditya.angadi@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,aditya.angadi@arm.com X-Gm-Message-State: FSNj2uyfTEnFl198eDzdj4tHx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608300470; bh=XPBShOacR4CnazdsPTUrCKI3vBvKzAUCV+O8p4v8kO4=; h=Cc:Date:From:Reply-To:Subject:To; b=A72VPM8XXH+uFqGMrSXXY2bek2LBKzKZDbehYEWTBzHeOVtAefFaoK0sa2Rb3fUL/2u 3xE92HYAONW024ZutnhDz8+Mzc6HoxO27osgQBMNDICG/XE6WGbu7I782sOc7CgEDyeSn i/M/WvSTdJFcg4QEwoqKpPVH76fRg8XjZXI= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Certain base addresses have been specified using macros. But the upcoming derivative platforms that have to be supported under the SgiPkg have changes in some of those base addresses and so these macros are not applicable on those upcoming platforms. So convert the affected macros into PCDs and let the platform description file choose the appropriate set of PCDs that is applicable for the platform. In addition to this, use the PCDs to replace existing uses of the macros that have been converted into PCDs. Signed-off-by: Aditya Angadi Reviewed-by: Ard Biesheuvel --- Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl | 2 +- Platform/ARM/SgiPkg/Include/SgiPlatform.h | 32 ------------- Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.c | 12 ++--- Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf | 7 ++- Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf | 9 ++++ Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c | 34 +++++++-----= -- Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc | 1 + Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc | 1 + Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc | 1 + Platform/ARM/SgiPkg/RdV1/RdV1.dsc | 1 + Platform/ARM/SgiPkg/RdV1Mc/RdV1Mc.dsc | 1 + Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc | 1 + Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc | 49 ++++++++++++= ++++++++ Platform/ARM/SgiPkg/SgiPlatform.dec | 5 ++ Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 20 -------- 15 files changed, 100 insertions(+), 76 deletions(-) diff --git a/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl b/Platform/ARM/SgiP= kg/AcpiTables/SsdtRos.asl index 458a711cfd31..55a8ed04d5aa 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl @@ -25,7 +25,7 @@ DefinitionBlock ("SsdtRosTable.aml", "SSDT", 1, "ARMLTD",= "ARMSGI", FixedPcdGet64 (PcdSerialDbgRegisterBase), 0x1000 ) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 147 } + Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { Fixed= PcdGet32 (PL011UartInterrupt) } }) } =20 diff --git a/Platform/ARM/SgiPkg/Include/SgiPlatform.h b/Platform/ARM/SgiPk= g/Include/SgiPlatform.h index f5174c12b89a..d6ab585cce80 100644 --- a/Platform/ARM/SgiPkg/Include/SgiPlatform.h +++ b/Platform/ARM/SgiPkg/Include/SgiPlatform.h @@ -13,26 +13,6 @@ // Platform Memory Map **************************************************************************= **********/ =20 -// Expansion AXI - SMC Chip Select 0 -#define SGI_EXP_SMC_CS0_BASE 0x08000000 -#define SGI_EXP_SMC_CS0_SZ SIZE_64MB - -// Expansion AXI - SMC Chip Select 1 -#define SGI_EXP_SMC_CS1_BASE 0x0C000000 -#define SGI_EXP_SMC_CS1_SZ SIZE_64MB - -// Expansion AXI - SMSC 91C111 (Ethernet) -#define SGI_EXP_SMSC91X_BASE 0x18000000 -#define SGI_EXP_SMSC91X_SZ SIZE_64MB - -// Expansion AXI - System peripherals -#define SGI_EXP_SYS_PERIPH_BASE 0x1C000000 -#define SGI_EXP_SYS_PERIPH_SZ SIZE_2MB - -// Base address of system peripherals -#define SGI_EXP_SYSPH_SYSTEM_REGISTERS 0x1C010000 -#define SGI_EXP_SYSPH_VIRTIO_BLOCK_BASE 0x1C130000 - // Sub System Peripherals - UART0 #define SGI_SUBSYS_UART0_BASE 0x2A400000 #define SGI_SUBSYS_UART0_SZ 0x00010000 @@ -45,18 +25,6 @@ #define SGI_SUBSYS_GENERIC_WDOG_BASE 0x2A440000 #define SGI_SUBSYS_GENERIC_WDOG_SZ SIZE_128KB =20 -// Expansion AXI - Platform Peripherals - HDLCD1 -#define SGI_EXP_PLAT_PERIPH_HDLCD1_BASE 0x7FF60000 -#define SGI_EXP_PLAT_PERIPH_HDLCD1_SZ SIZE_64KB - -// Expansion AXI - Platform Peripherals - UART0 -#define SGI_EXP_PLAT_PERIPH_UART0_BASE 0x7FF70000 -#define SGI_EXP_PLAT_PERIPH_UART0_SZ SIZE_64KB - -// Expansion AXI - Platform Peripherals - UART1 -#define SGI_EXP_PLAT_PERIPH_UART1_BASE 0x7FF80000 -#define SGI_EXP_PLAT_PERIPH_UART1_SZ SIZE_64KB - // Register offsets into the System Registers Block #define SGI_SYSPH_SYS_REG_FLASH 0x4C #define SGI_SYSPH_SYS_REG_FLASH_RWEN 0x1 diff --git a/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.c b/Platfo= rm/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.c index e3bf2726b557..b5dfae28d10a 100644 --- a/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.c +++ b/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.c @@ -1,6 +1,6 @@ /** @file =20 - Copyright (c) 2018, ARM Ltd. All rights reserved. + Copyright (c) 2020, ARM Ltd. All rights reserved. =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -14,14 +14,14 @@ =20 STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[] =3D { { - SGI_EXP_SMC_CS0_BASE, - SGI_EXP_SMC_CS0_BASE, + FixedPcdGet64 (PcdSmcCs0Base), + FixedPcdGet64 (PcdSmcCs0Base), SIZE_256KB * 256, SIZE_256KB, }, { - SGI_EXP_SMC_CS1_BASE, - SGI_EXP_SMC_CS1_BASE, + FixedPcdGet64 (PcdSmcCs1Base), + FixedPcdGet64 (PcdSmcCs1Base), SIZE_256KB * 256, SIZE_256KB, }, @@ -34,7 +34,7 @@ NorFlashPlatformInitialization ( { UINT64 SysRegFlash; =20 - SysRegFlash =3D SGI_EXP_SYSPH_SYSTEM_REGISTERS + SGI_SYSPH_SYS_REG_FLASH; + SysRegFlash =3D FixedPcdGet64 (PcdSysPeriphSysRegBase) + SGI_SYSPH_SYS_R= EG_FLASH; MmioOr32 (SysRegFlash, SGI_SYSPH_SYS_REG_FLASH_RWEN); return EFI_SUCCESS; } diff --git a/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf b/Plat= form/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf index a1439c10d1fa..74486eacd009 100644 --- a/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf +++ b/Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.inf @@ -1,6 +1,6 @@ #/** @file # -# Copyright (c) 2018, ARM Ltd. All rights reserved. +# Copyright (c) 2020, ARM Ltd. All rights reserved. =20 # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -26,3 +26,8 @@ [LibraryClasses] BaseLib DebugLib IoLib + +[FixedPcd] + gArmSgiTokenSpaceGuid.PcdSysPeriphSysRegBase + gArmSgiTokenSpaceGuid.PcdSmcCs0Base + gArmSgiTokenSpaceGuid.PcdSmcCs1Base diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Plat= form/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf index 464a7cde4513..2ed0ff1fb62e 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf @@ -19,6 +19,7 @@ [Packages] MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec Platform/ARM/SgiPkg/SgiPlatform.dec + Platform/ARM/VExpressPkg/ArmVExpressPkg.dec StandaloneMmPkg/StandaloneMmPkg.dec =20 [LibraryClasses] @@ -39,6 +40,7 @@ [Sources.AARCH64] [FixedPcd] gArmPlatformTokenSpaceGuid.PcdClusterCount gArmPlatformTokenSpaceGuid.PcdCoreCount + gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase =20 gArmSgiTokenSpaceGuid.PcdDramBlock2Base gArmSgiTokenSpaceGuid.PcdDramBlock2Size @@ -63,8 +65,15 @@ [FixedPcd] =20 gArmTokenSpaceGuid.PcdMmBufferBase gArmTokenSpaceGuid.PcdMmBufferSize + gArmSgiTokenSpaceGuid.PcdSmcCs0Base + gArmSgiTokenSpaceGuid.PcdSmcCs1Base + gArmSgiTokenSpaceGuid.PcdSysPeriphBase + + gArmVExpressTokenSpaceGuid.PcdLan91xDxeBaseAddress =20 gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase =20 [Guids] gArmSgiPlatformIdDescriptorGuid diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/Pla= tform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c index e30819c5cd55..ecca91e0f51b 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c @@ -106,27 +106,29 @@ ArmPlatformGetVirtualMemoryMap ( } =20 // Expansion AXI - SMC Chip Select 0 (NOR Flash) - VirtualMemoryTable[Index].PhysicalBase =3D SGI_EXP_SMC_CS0_BASE; - VirtualMemoryTable[Index].VirtualBase =3D SGI_EXP_SMC_CS0_BASE; + VirtualMemoryTable[Index].PhysicalBase =3D FixedPcdGet64 (PcdSmcCs0Ba= se); + VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdSmcCs0Ba= se); VirtualMemoryTable[Index].Length =3D SIZE_64MB; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 // Expansion AXI - SMC Chip Select 1 (NOR Flash) - VirtualMemoryTable[++Index].PhysicalBase =3D SGI_EXP_SMC_CS1_BASE; - VirtualMemoryTable[Index].VirtualBase =3D SGI_EXP_SMC_CS1_BASE; + VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdSmcCs1Ba= se); + VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdSmcCs1Ba= se); VirtualMemoryTable[Index].Length =3D SIZE_64MB; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 +#if defined (EDK2_ENABLE_SMSC_91X) // Expansion AXI - SMSC 91X (Ethernet) - VirtualMemoryTable[++Index].PhysicalBase =3D SGI_EXP_SMSC91X_BASE; - VirtualMemoryTable[Index].VirtualBase =3D SGI_EXP_SMSC91X_BASE; - VirtualMemoryTable[Index].Length =3D SGI_EXP_SMSC91X_SZ; + VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet32 (PcdLan91xDx= eBaseAddress); + VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet32 (PcdLan91xDx= eBaseAddress); + VirtualMemoryTable[Index].Length =3D SIZE_64MB; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; +#endif =20 // Expansion AXI - System Peripherals - VirtualMemoryTable[++Index].PhysicalBase =3D SGI_EXP_SYS_PERIPH_BASE; - VirtualMemoryTable[Index].VirtualBase =3D SGI_EXP_SYS_PERIPH_BASE; - VirtualMemoryTable[Index].Length =3D SGI_EXP_SYS_PERIPH_SZ; + VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdSysPerip= hBase); + VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdSysPerip= hBase); + VirtualMemoryTable[Index].Length =3D SIZE_32MB; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 // Sub System Peripherals - Generic Watchdog @@ -142,15 +144,15 @@ ArmPlatformGetVirtualMemoryMap ( VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 // Expansion AXI - Platform Peripherals - HDLCD1 - VirtualMemoryTable[++Index].PhysicalBase =3D SGI_EXP_PLAT_PERIPH_HDLCD1= _BASE; - VirtualMemoryTable[Index].VirtualBase =3D SGI_EXP_PLAT_PERIPH_HDLCD1= _BASE; - VirtualMemoryTable[Index].Length =3D SGI_EXP_PLAT_PERIPH_HDLCD1= _SZ; + VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet32 (PcdArmHdLcd= Base); + VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet32 (PcdArmHdLcd= Base); + VirtualMemoryTable[Index].Length =3D SIZE_64KB; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 // Expansion AXI - Platform Peripherals - UART1 - VirtualMemoryTable[++Index].PhysicalBase =3D SGI_EXP_PLAT_PERIPH_UART1_= BASE; - VirtualMemoryTable[Index].VirtualBase =3D SGI_EXP_PLAT_PERIPH_UART1_= BASE; - VirtualMemoryTable[Index].Length =3D SGI_EXP_PLAT_PERIPH_UART1_= SZ; + VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdSerialRe= gisterBase); + VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdSerialRe= gisterBase); + VirtualMemoryTable[Index].Length =3D SIZE_64KB; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 // DDR - (2GB - 16MB) diff --git a/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc b/Platform/ARM/SgiPk= g/RdE1Edge/RdE1Edge.dsc index a108b4eab0d8..26ab7e6ef6b8 100644 --- a/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc +++ b/Platform/ARM/SgiPkg/RdE1Edge/RdE1Edge.dsc @@ -24,6 +24,7 @@ [Defines] =20 # include common definitions from SgiPlatform.dsc !include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +!include Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc =20 ##########################################################################= ###### # diff --git a/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc b/Platform/ARM/SgiPk= g/RdN1Edge/RdN1Edge.dsc index a59a6c5b8f3a..7d397438bfff 100644 --- a/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc +++ b/Platform/ARM/SgiPkg/RdN1Edge/RdN1Edge.dsc @@ -24,6 +24,7 @@ [Defines] =20 # include common definitions from SgiPlatform.dsc !include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +!include Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc =20 ##########################################################################= ###### # diff --git a/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc b/Platform/ARM/S= giPkg/RdN1EdgeX2/RdN1EdgeX2.dsc index 1cb41d119e3e..5c87a0ca9b3c 100644 --- a/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc +++ b/Platform/ARM/SgiPkg/RdN1EdgeX2/RdN1EdgeX2.dsc @@ -24,6 +24,7 @@ [Defines] =20 # include common definitions from SgiPlatform.dsc !include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +!include Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc =20 ##########################################################################= ###### # diff --git a/Platform/ARM/SgiPkg/RdV1/RdV1.dsc b/Platform/ARM/SgiPkg/RdV1/R= dV1.dsc index 223f4815c122..e8ee0e8769a8 100644 --- a/Platform/ARM/SgiPkg/RdV1/RdV1.dsc +++ b/Platform/ARM/SgiPkg/RdV1/RdV1.dsc @@ -24,6 +24,7 @@ [Defines] =20 # include common definitions from SgiPlatform.dsc !include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +!include Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc =20 ##########################################################################= ###### # diff --git a/Platform/ARM/SgiPkg/RdV1Mc/RdV1Mc.dsc b/Platform/ARM/SgiPkg/Rd= V1Mc/RdV1Mc.dsc index f138d4c43885..c2fcc0df4571 100644 --- a/Platform/ARM/SgiPkg/RdV1Mc/RdV1Mc.dsc +++ b/Platform/ARM/SgiPkg/RdV1Mc/RdV1Mc.dsc @@ -24,6 +24,7 @@ [Defines] =20 # include common definitions from SgiPlatform.dsc !include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +!include Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc =20 ##########################################################################= ###### # diff --git a/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc b/Platform/ARM/SgiPkg/Sg= i575/Sgi575.dsc index 60e2a88bb591..a8675368415b 100644 --- a/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc +++ b/Platform/ARM/SgiPkg/Sgi575/Sgi575.dsc @@ -24,6 +24,7 @@ [Defines] =20 # include common definitions from SgiPlatform.dsc !include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +!include Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc =20 ##########################################################################= ###### # diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc b/Platform/ARM/SgiPkg= /SgiMemoryMap.dsc.inc new file mode 100644 index 000000000000..2549c3129b0f --- /dev/null +++ b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc @@ -0,0 +1,49 @@ +# +# Copyright (c) 2020, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +[PcdsFixedAtBuild.common] + # System Peripherals + gArmSgiTokenSpaceGuid.PcdSmcCs0Base|0x08000000 + gArmSgiTokenSpaceGuid.PcdSmcCs1Base|0x0C000000 + gArmSgiTokenSpaceGuid.PcdSysPeriphBase|0x1C000000 + gArmSgiTokenSpaceGuid.PcdSysPeriphSysRegBase|0x1C010000 + + # Non-Volatile variable storage + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0x0C000000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0x0D400= 000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0x0E800000 + + # PL011 - Serial Terminal + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF80000 + + # PL370 - HDLCD1 + gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase|0x7FF60000 + + # PL011 - Serial Debug UART + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase|0x7FF80000 + gArmPlatformTokenSpaceGuid.PL011UartInterrupt|147 + + # PL031 RealTimeClock + gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C170000 + + # Virtio Disk + gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1C130000 + gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x10000 + gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202 + + # Ethernet +!ifdef EDK2_ENABLE_SMSC_91X + gArmVExpressTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x18000000 +!endif + gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress|0x1C150000 + gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|204 + + # PCIe + gArmTokenSpaceGuid.PcdPciMmio32Base|0x70000000 + gArmTokenSpaceGuid.PcdPciMmio32Size|0x07800000 + gArmTokenSpaceGuid.PcdPciMmio64Base|0x5000000000 + gArmTokenSpaceGuid.PcdPciMmio64Size|0x3000000000 + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x60000000 diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiP= latform.dec index dac7fdc308b1..3f0d38a013f2 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dec +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec @@ -52,5 +52,10 @@ [PcdsFixedAtBuild] # GIC gArmSgiTokenSpaceGuid.PcdGicSize|0|UINT64|0x0000000A =20 + gArmSgiTokenSpaceGuid.PcdSmcCs0Base|0|UINT64|0x0000000C + gArmSgiTokenSpaceGuid.PcdSmcCs1Base|0|UINT64|0x0000000D + gArmSgiTokenSpaceGuid.PcdSysPeriphBase|0x00000000|UINT64|0x0000000E + gArmSgiTokenSpaceGuid.PcdSysPeriphSysRegBase|0x0|UINT64|0x0000000F + [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 f5f9f144eee9..2beab1f07278 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -93,11 +93,8 @@ [PcdsFixedAtBuild.common] gArmSgiTokenSpaceGuid.PcdDramBlock2Size|0x180000000 =20 # NV Storage PCDs. Use base of 0x08000000 for NOR0, 0xC0000000 for NOR 1 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0C000000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x01400000 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0D400000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x01400000 - gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0E800000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x01400000 =20 # Stacks for MPCores in Normal World @@ -117,17 +114,11 @@ [PcdsFixedAtBuild.common] gArmTokenSpaceGuid.PcdPciIoBase|0x0 gArmTokenSpaceGuid.PcdPciIoSize|0x00800000 gArmTokenSpaceGuid.PcdPciIoTranslation|0x77800000 - gArmTokenSpaceGuid.PcdPciMmio32Base|0x70000000 - gArmTokenSpaceGuid.PcdPciMmio32Size|0x07800000 gArmTokenSpaceGuid.PcdPciMmio32Translation|0x0 - gArmTokenSpaceGuid.PcdPciMmio64Base|0x500000000 - gArmTokenSpaceGuid.PcdPciMmio64Size|0x300000000 gArmTokenSpaceGuid.PcdPciMmio64Translation|0x0 - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x60000000 gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize|24 =20 ## PL011 - Serial Terminal - gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x7FF80000 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 gEfiMdePkgTokenSpaceGuid.PcdUartDefaultReceiveFifoDepth|0 gArmPlatformTokenSpaceGuid.PL011UartInteger|4 @@ -137,13 +128,9 @@ [PcdsFixedAtBuild.common] gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase|0x7FF60000 =20 ## PL011 - Serial Debug UART - gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase|0x7FF80000 gArmPlatformTokenSpaceGuid.PcdSerialDbgUartClkInHz|7372800 gArmPlatformTokenSpaceGuid.PcdSerialDbgUartBaudRate|115200 - gArmPlatformTokenSpaceGuid.PL011UartInterrupt|147 =20 - ## PL031 RealTimeClock - gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x1C170000 =20 # List of Device Paths that support BootMonFs gArmBootMonFsTokenSpaceGuid.PcdBootMonFsSupportedDevicePaths|L"VenHw(93E= 34C7E-B50E-11DF-9223-2443DFD72085,00)" @@ -157,17 +144,10 @@ [PcdsFixedAtBuild.common] gEmbeddedTokenSpaceGuid.PcdTimerPeriod|1000 =20 # Virtio Disk - gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x1c130000 gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x10000 - gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202 =20 # Ethernet / Virtio Network -!ifdef EDK2_ENABLE_SMSC_91X - gArmVExpressTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x18000000 -!endif - gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress|0x1c150000 gArmSgiTokenSpaceGuid.PcdVirtioNetSize|0x10000 - gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|204 =20 # # Set the base address and size of the buffer used --=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 (#69191): https://edk2.groups.io/g/devel/message/69191 Mute This Topic: https://groups.io/mt/79061404/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 Sat Apr 27 17:51:59 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+69192+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+69192+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1608300478; cv=none; d=zohomail.com; s=zohoarc; b=j5Q701sLEY+iAajI5mwJ9dULFUQZpspWpsaXO+F8LibZaPs2Cpw2hd89Y1GJHQHTR/wbUgFDvR2HgZmxJ661CEkc88RS2HOXq2QL19AgWhTiDzuKBx7xYLu2AYDt+ZCJqeXl+k11x62QckVkbFiUh/pKeJaPisRmWwDPgx+ub6s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608300478; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=1pTjs/6Muw/lcYpxOllE+vobL1LO1Bwnwij5o3Dd3Zk=; b=nw5f9hewmA7p241g5q2KNba67aCTWiQz9Zk3a9WB56SQ4elqAYyR/0YrFhK+f4X4pvnnXcXzJvV6Ff3ZWY+LaF9AoB7os07qACHJtP7AMix2V4sxjpJpdyfawMLxYV6I3dKfs1+0kzPec0p8/CSHK68nLx/hyECeqA7HS5dgYpM= 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+69192+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 1608300478073524.1114263741497; Fri, 18 Dec 2020 06:07:58 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id IosvYY1788612xn8LiyXctS8; Fri, 18 Dec 2020 06:07:55 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10349.1608300472480333498 for ; Fri, 18 Dec 2020 06:07:52 -0800 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 24989101E; Fri, 18 Dec 2020 06:07:52 -0800 (PST) X-Received: from usa.arm.com (a073440-lin.blr.arm.com [10.162.16.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id DF2113F66B; Fri, 18 Dec 2020 06:07:49 -0800 (PST) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Thomas Abraham , Vijayenthiran Subramaniam , Aditya Angadi Subject: [edk2-devel] [PATCH][edk2-platforms 2/5] Platform/ARM/SgiPkg: remove the use of SMSC Lan91x controller Date: Fri, 18 Dec 2020 19:37:23 +0530 Message-Id: <20201218140726.23670-3-aditya.angadi@arm.com> In-Reply-To: <20201218140726.23670-1-aditya.angadi@arm.com> References: <20201218140726.23670-1-aditya.angadi@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,aditya.angadi@arm.com X-Gm-Message-State: VIQAli9Zjj89qO0EfL121kzRx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608300475; bh=r/6BQ9bsbdolZNJ+S1z22AmP9yBNPnxZZCx0SNSccDw=; h=Cc:Date:From:Reply-To:Subject:To; b=DNDABSJEVVgTICF+PKxOWiZlb+phLusezvW9pKeKS2tSm+8mO8CYrJINUPPwF/g6TWb AgqNfZ7c4o7ln4/RnqjO50+0nDA67t0Ls9lKaDcytHeAbPYziX8b2fPOxaeAI/7010Cu1 W1MG28vZzLN9JKpFiTJmsCxb4zKab9sgUxA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Virtio network is supported for all the platforms in SgiPkg and so remove the use of SMSC Lan91x controller from all the platforms. Signed-off-by: Aditya Angadi Reviewed-by: Ard Biesheuvel --- Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl | 17 ------------= ----- Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf | 3 --- Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c | 10 +--------- Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc | 3 --- Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 5 +---- Platform/ARM/SgiPkg/SgiPlatform.fdf | 4 ---- 6 files changed, 2 insertions(+), 40 deletions(-) diff --git a/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl b/Platform/ARM/SgiP= kg/AcpiTables/SsdtRos.asl index 55a8ed04d5aa..785f426fc29b 100644 --- a/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl +++ b/Platform/ARM/SgiPkg/AcpiTables/SsdtRos.asl @@ -29,23 +29,6 @@ DefinitionBlock ("SsdtRosTable.aml", "SSDT", 1, "ARMLTD"= , "ARMSGI", }) } =20 - // SMSC 91C111 - Device (ETH0) { - Name (_HID, "LNRO0003") - Name (_UID, Zero) - Name (_STA, 0xF) - Name (_CRS, ResourceTemplate () { - Memory32Fixed (ReadWrite, 0x18000000, 0x1000) - Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive) { 111 } - }) - Name (_DSD, Package() { - ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), - Package() { - Package(2) {"reg-io-width", 4 }, - } - }) - } - // VIRTIO DISK Device (VR00) { Name (_HID, "LNRO0005") diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf b/Plat= form/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf index 2ed0ff1fb62e..333247d0d808 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLib.inf @@ -19,7 +19,6 @@ [Packages] MdeModulePkg/MdeModulePkg.dec MdePkg/MdePkg.dec Platform/ARM/SgiPkg/SgiPlatform.dec - Platform/ARM/VExpressPkg/ArmVExpressPkg.dec StandaloneMmPkg/StandaloneMmPkg.dec =20 [LibraryClasses] @@ -69,8 +68,6 @@ [FixedPcd] gArmSgiTokenSpaceGuid.PcdSmcCs1Base gArmSgiTokenSpaceGuid.PcdSysPeriphBase =20 - gArmVExpressTokenSpaceGuid.PcdLan91xDxeBaseAddress - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64 gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase diff --git a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c b/Pla= tform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c index ecca91e0f51b..9bdc63b9e3d4 100644 --- a/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c +++ b/Platform/ARM/SgiPkg/Library/PlatformLib/PlatformLibMem.c @@ -17,7 +17,7 @@ =20 // Total number of descriptors, including the final "end-of-table" descrip= tor. #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS \ - (11 + (FixedPcdGet32 (PcdChipCount) * 2)) + (10 + (FixedPcdGet32 (PcdChipCount) * 2)) =20 /** Returns the Virtual Memory Map of the platform. @@ -117,14 +117,6 @@ ArmPlatformGetVirtualMemoryMap ( VirtualMemoryTable[Index].Length =3D SIZE_64MB; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; =20 -#if defined (EDK2_ENABLE_SMSC_91X) - // Expansion AXI - SMSC 91X (Ethernet) - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet32 (PcdLan91xDx= eBaseAddress); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet32 (PcdLan91xDx= eBaseAddress); - VirtualMemoryTable[Index].Length =3D SIZE_64MB; - VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUT= E_DEVICE; -#endif - // Expansion AXI - System Peripherals VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdSysPerip= hBase); VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdSysPerip= hBase); diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc b/Platform/ARM/SgiPkg= /SgiMemoryMap.dsc.inc index 2549c3129b0f..e423a6b50c91 100644 --- a/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiMemoryMap.dsc.inc @@ -35,9 +35,6 @@ [PcdsFixedAtBuild.common] gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|202 =20 # Ethernet -!ifdef EDK2_ENABLE_SMSC_91X - gArmVExpressTokenSpaceGuid.PcdLan91xDxeBaseAddress|0x18000000 -!endif gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress|0x1C150000 gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|204 =20 diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/= SgiPlatform.dsc.inc index 2beab1f07278..ed7c7d6c4581 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -262,10 +262,7 @@ [Components.common] PcdLib|MdePkg/Library/DxePcdLib/DxePcdLib.inf } =20 - # SMSC LAN 91C111 / Virtio Network -!ifdef EDK2_ENABLE_SMSC_91X - Platform/ARM/VExpressPkg/Drivers/Lan91xDxe/Lan91xDxe.inf -!endif + # Virtio Network OvmfPkg/VirtioNetDxe/VirtioNet.inf =20 # diff --git a/Platform/ARM/SgiPkg/SgiPlatform.fdf b/Platform/ARM/SgiPkg/SgiP= latform.fdf index 546021a8bf33..da23804828e5 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.fdf +++ b/Platform/ARM/SgiPkg/SgiPlatform.fdf @@ -182,10 +182,6 @@ [FV.FvMain] # Networking stack # !include NetworkPkg/Network.fdf.inc - -!ifdef EDK2_ENABLE_SMSC_91X - INF Platform/ARM/VExpressPkg/Drivers/Lan91xDxe/Lan91xDxe.inf -!endif INF OvmfPkg/VirtioNetDxe/VirtioNet.inf =20 [FV.FVMAIN_COMPACT] --=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 (#69192): https://edk2.groups.io/g/devel/message/69192 Mute This Topic: https://groups.io/mt/79061405/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 Sat Apr 27 17:51:59 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+69193+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+69193+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1608300538; cv=none; d=zohomail.com; s=zohoarc; b=P6GUFn+pwcGBwu/ngZm4zxBom5AFShg5xVmfZ1kYKEZVJtMAy7fSHBK94oQ4N1PGsyPG5Ul/R/VEPsKivqQHVPSPpwb3be1LrnqiVL4Ah8siUiRb7xKxbG6xs3LqyLswkYsOskEYRgB6NMqNCw+I4iE6gRT1FaFS2sQBRCetbmc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608300538; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=4GYvNQuRqKJs7Eama7K17oQC8L8D1ildHCCsYnsXxoA=; b=K8INKBHzefvSZjIl4UjOjIDFDbJ5Fr2jPkAvR0yVfUdXcbxpuqT4RJzBWOiHz8rW73POq/L7piknYOyJ9sz/HFOG/uZ+92bPbUZ7M7LtGMahgUIHHQKbuUU884jPotLDXdthlpcG9HOizy851RSCDBJZwupo2df9wsSgIATFZLY= 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+69193+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 1608300538603758.9655991955749; Fri, 18 Dec 2020 06:08:58 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id cEFmYY1788612xz4y4Y5Idnb; Fri, 18 Dec 2020 06:08:55 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web09.10443.1608300475153194166 for ; Fri, 18 Dec 2020 06:07:55 -0800 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 D3B211FB; Fri, 18 Dec 2020 06:07:54 -0800 (PST) X-Received: from usa.arm.com (a073440-lin.blr.arm.com [10.162.16.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 9AC343F66B; Fri, 18 Dec 2020 06:07:52 -0800 (PST) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Thomas Abraham , Vijayenthiran Subramaniam , Aditya Angadi Subject: [edk2-devel] [PATCH][edk2-platforms 3/5] Platform/ARM/SgiPkg: Define base address PCD for derivative platforms Date: Fri, 18 Dec 2020 19:37:24 +0530 Message-Id: <20201218140726.23670-4-aditya.angadi@arm.com> In-Reply-To: <20201218140726.23670-1-aditya.angadi@arm.com> References: <20201218140726.23670-1-aditya.angadi@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,aditya.angadi@arm.com X-Gm-Message-State: 6G4hXm0qrhAjmzKSjQMctraMx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608300535; bh=VvDFZHLiPJvySZRkGmaVW5t34JHxLntBaGLrzJI1du4=; h=Cc:Date:From:Reply-To:Subject:To; b=Tr+xELO8kwCKXlCSO7Ew7Sf/c2X2vhIa1ugPm8usfJFr/j2PK2qeuQngE7tVjAcSmy9 fBXvBWcS4lx4S9B3H2wHuSldB8wNkeloD625Ly2GmaPRuMuKmkNyojFnGeoaOTG7UB5MR 0AodJZM6tO9/xkslCXrPsT23iP4MGpbTrK4= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The upcoming derivative platforms to be supported under SgiPkg have changes in the base address for some of the components. Define PCDs for those base address in a different includeable platform description file so that it can be included in platforms that have and updated memory map. Signed-off-by: Aditya Angadi Reviewed-by: Ard Biesheuvel --- Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc | 46 ++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc b/Platform/ARM/SgiPk= g/SgiMemoryMap2.dsc.inc new file mode 100644 index 000000000000..41291eddfe74 --- /dev/null +++ b/Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc @@ -0,0 +1,46 @@ +# +# Copyright (c) 2020, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +[PcdsFixedAtBuild.common] + # System Peripherals + gArmSgiTokenSpaceGuid.PcdSmcCs0Base|0x08000000 + gArmSgiTokenSpaceGuid.PcdSmcCs1Base|0x1050000000 + gArmSgiTokenSpaceGuid.PcdSysPeriphBase|0x0C000000 + gArmSgiTokenSpaceGuid.PcdSysPeriphSysRegBase|0x0C010000 + + # Non-Volatile variable storage + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase64|0x1050000= 000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase64|0x10514= 00000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase64|0x1052800= 000 + + # PL011 - Serial Terminal + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x0EF70000 + + # PL370 - HDLCD1 + gArmPlatformTokenSpaceGuid.PcdArmHdLcdBase|0x0EF60000 + + # PL011 - Serial Debug UART + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase|0x0EF70000 + gArmPlatformTokenSpaceGuid.PL011UartInterrupt|403 + + # PL031 RealTimeClock + gArmPlatformTokenSpaceGuid.PcdPL031RtcBase|0x0C170000 + + # Virtio Disk + gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress|0x0C130000 + gArmSgiTokenSpaceGuid.PcdVirtioBlkSize|0x10000 + gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt|458 + + # Ethernet + gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress|0x0C150000 + gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt|460 + + # PCIe + gArmTokenSpaceGuid.PcdPciMmio32Base|0x60000000 + gArmTokenSpaceGuid.PcdPciMmio32Size|0x10000000 + gArmTokenSpaceGuid.PcdPciMmio64Base|0x4000000000 + gArmTokenSpaceGuid.PcdPciMmio64Size|0x4000000000 + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress|0x1010000000 --=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 (#69193): https://edk2.groups.io/g/devel/message/69193 Mute This Topic: https://groups.io/mt/79061407/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 Sat Apr 27 17:51:59 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+69194+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+69194+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1608300660; cv=none; d=zohomail.com; s=zohoarc; b=mNVlgjvtEgyKbcH9ghKd02sEl3Wf6yYa3Pu6dU5qFMnDt52GGvy7jm43NPO+Ujw8i5aJCzMgCyOTl/H3+JR2s4Eema9dJlh82IG6pK+PvmCfJoFgus+ypu6qK6Qx21LyuQ0EO0oaTt9grpNvIIwB5pYnBzZkRTVZhmL4Jh9wpZE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608300660; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=BbyuxaGonL3j65N8VZ+rDKvuJGCvCdI8DYOpxhzZ5fo=; b=k0osU4r5/HA3E9LoQA+7ZFQQWiMFh3Mgl2iRXVWWBHMEUlmxyIR/kSeixps384sQ97eflp1glKKJzZbvQ1l4Gh/KYfjtYdGuGlZBFhRJPURd5wCWF701PejYcxjovIr8SwiMk6jFDFk9hB3hovhmUc28cltzhOaaFucapi5oUr0= 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+69194+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 1608300660007826.768857916753; Fri, 18 Dec 2020 06:11:00 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id BqXLYY1788612xcH1UDddCcI; Fri, 18 Dec 2020 06:10:58 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web12.10391.1608300477878132645 for ; Fri, 18 Dec 2020 06:07:58 -0800 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 8F3501FB; Fri, 18 Dec 2020 06:07:57 -0800 (PST) X-Received: from usa.arm.com (a073440-lin.blr.arm.com [10.162.16.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 568B83F66B; Fri, 18 Dec 2020 06:07:55 -0800 (PST) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Thomas Abraham , Vijayenthiran Subramaniam , Aditya Angadi Subject: [edk2-devel] [PATCH][edk2-platforms 4/5] Platform/ARM/SgiPkg: Add ACPI tables for RD-N2 platform Date: Fri, 18 Dec 2020 19:37:25 +0530 Message-Id: <20201218140726.23670-5-aditya.angadi@arm.com> In-Reply-To: <20201218140726.23670-1-aditya.angadi@arm.com> References: <20201218140726.23670-1-aditya.angadi@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,aditya.angadi@arm.com X-Gm-Message-State: rMhvkA4iGS3Li0ydJiZ789xdx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608300658; bh=DbvK5fkOx51v57VxaKODdIh1J2QTgNmlhZqnVuFsaUc=; h=Cc:Date:From:Reply-To:Subject:To; b=OPhcV2rtJwIm06UG1Aw2EoS/gorTcPXrNldD2klbKq32vsgQMvDZnl3uNLvJ2cmJxbd 5am1vxGzt+TR9AT6lZxlV8rNRBGNtzbD7S6NpT0SrIWEWanjdKvgwhsHgFhUKPwNrQx5I 3xUP8j1iBZSdbpqZXLgOhKPUUOO1xZvoT8c= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Add Madt and Dsdt ACPI tables that are specific for RD-N2 platform. Reuse the rest of the shared ACPI tables in SgiPkg. Signed-off-by: Aditya Angadi Reviewed-by: Ard Biesheuvel --- Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl | 112 ++++++++++++++++ Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc | 137 ++++++++++++++++++= ++ Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf | 60 +++++++++ 3 files changed, 309 insertions(+) diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl b/Platform/ARM/Sg= iPkg/AcpiTables/RdN2/Dsdt.asl new file mode 100644 index 000000000000..8688fd8d6b90 --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Dsdt.asl @@ -0,0 +1,112 @@ +/** @file +* Differentiated System Description Table Fields (DSDT) +* +* Copyright (c) 2020, Arm Ltd. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include "SgiPlatform.h" +#include "SgiAcpiHeader.h" + +DefinitionBlock ("DsdtTable.aml", "DSDT", 1, "ARMLTD", "ARMSGI", + EFI_ACPI_ARM_OEM_REVISION) { + Scope (_SB) { + Device (CP00) { // Neoverse N2 core 0 + Name (_HID, "ACPI0007") + Name (_UID, 0) + Name (_STA, 0xF) + } + + Device (CP01) { // Neoverse N2 core 1 + Name (_HID, "ACPI0007") + Name (_UID, 1) + Name (_STA, 0xF) + } + + Device (CP02) { // Neoverse N2 core 2 + Name (_HID, "ACPI0007") + Name (_UID, 2) + Name (_STA, 0xF) + } + + Device (CP03) { // Neoverse N2 core 3 + Name (_HID, "ACPI0007") + Name (_UID, 3) + Name (_STA, 0xF) + } + + Device (CP04) { // Neoverse N2 core 4 + Name (_HID, "ACPI0007") + Name (_UID, 4) + Name (_STA, 0xF) + } + + Device (CP05) { // Neoverse N2 core 5 + Name (_HID, "ACPI0007") + Name (_UID, 5) + Name (_STA, 0xF) + } + + Device (CP06) { // Neoverse N2 core 6 + Name (_HID, "ACPI0007") + Name (_UID, 6) + Name (_STA, 0xF) + } + + Device (CP07) { // Neoverse N2 core 7 + Name (_HID, "ACPI0007") + Name (_UID, 7) + Name (_STA, 0xF) + } + + Device (CP08) { // Neoverse N2 core 8 + Name (_HID, "ACPI0007") + Name (_UID, 8) + Name (_STA, 0xF) + } + + Device (CP09) { // Neoverse N2 core 9 + Name (_HID, "ACPI0007") + Name (_UID, 9) + Name (_STA, 0xF) + } + + Device (CP10) { // Neoverse N2 core 10 + Name (_HID, "ACPI0007") + Name (_UID, 10) + Name (_STA, 0xF) + } + + Device (CP11) { // Neoverse N2 core 11 + Name (_HID, "ACPI0007") + Name (_UID, 11) + Name (_STA, 0xF) + } + + Device (CP12) { // Neoverse N2 core 12 + Name (_HID, "ACPI0007") + Name (_UID, 12) + Name (_STA, 0xF) + } + + Device (CP13) { // Neoverse N2 core 13 + Name (_HID, "ACPI0007") + Name (_UID, 13) + Name (_STA, 0xF) + } + + Device (CP14) { // Neoverse N2 core 14 + Name (_HID, "ACPI0007") + Name (_UID, 14) + Name (_STA, 0xF) + } + + Device (CP15) { // Neoverse N2 core 15 + Name (_HID, "ACPI0007") + Name (_UID, 15) + Name (_STA, 0xF) + } + } // Scope(_SB) +} diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc b/Platform/ARM/S= giPkg/AcpiTables/RdN2/Madt.aslc new file mode 100644 index 000000000000..dbb23683113a --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2/Madt.aslc @@ -0,0 +1,137 @@ +/** @file +* Multiple APIC Description Table (MADT) +* +* Copyright (c) 2020, Arm Limited. All rights reserved. +* +* SPDX-License-Identifier: BSD-2-Clause-Patent +* +**/ + +#include "SgiPlatform.h" +#include "SgiAcpiHeader.h" +#include +#include +#include +#include + +#define CORE_CNT (FixedPcdGet32 (PcdClusterCount) * \ + FixedPcdGet32 (PcdCoreCount)) + +// Multiple APIC Description Table +#pragma pack (1) + +typedef struct { + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_HEADER Header; + EFI_ACPI_6_2_GIC_STRUCTURE GicInterfaces[CORE= _CNT]; + EFI_ACPI_6_2_GIC_DISTRIBUTOR_STRUCTURE GicDistributor; + EFI_ACPI_6_2_GICR_STRUCTURE GicRedistributor; + EFI_ACPI_6_2_GIC_ITS_STRUCTURE GicIts[6]; +} EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE; + +#pragma pack () + +STATIC EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE Madt =3D { + { + ARM_ACPI_HEADER ( + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE, + EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_REVISION + ), + // MADT specific fields + 0, // LocalApicAddress + 0 // Flags + }, + { + // Format: EFI_ACPI_6_2_GICC_STRUCTURE_INIT(GicId, AcpiCpuUid, Mpidr, = Flags, + // PmuIrq, GicBase, GicVBase, + // GicHBase, GsivId, GicRBase, + // Efficiency) + // Note: The GIC Structure of the primary CPU must be the first entry + // (see note in 5.2.12.14 GICC Structure of ACPI v6.2). + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core0 + 0, 0, GET_MPID(0x0, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core1 + 0, 1, GET_MPID(0x100, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core2 + 0, 2, GET_MPID(0x200, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core3 + 0, 3, GET_MPID(0x300, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core4 + 0, 4, GET_MPID(0x400, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core5 + 0, 5, GET_MPID(0x500, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core6 + 0, 6, GET_MPID(0x600, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core7 + 0, 7, GET_MPID(0x700, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core8 + 0, 8, GET_MPID(0x800, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core9 + 0, 9, GET_MPID(0x900, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core10 + 0, 10, GET_MPID(0xa00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core11 + 0, 11, GET_MPID(0xb00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core12 + 0, 12, GET_MPID(0xc00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core13 + 0, 13, GET_MPID(0xd00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core14 + 0, 14, GET_MPID(0xe00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + EFI_ACPI_6_2_GICC_STRUCTURE_INIT( // Neoverse N2 core15 + 0, 15, GET_MPID(0xf00, 0x0), EFI_ACPI_6_2_GIC_ENABLED, 23, + FixedPcdGet32 (PcdGicDistributorBase), + 0x2c020000, 0x2c010000, 25, 0 /* GicRBase */, 0 /* Efficiency */), + }, + // GIC Distributor Entry + EFI_ACPI_6_2_GIC_DISTRIBUTOR_INIT(0, FixedPcdGet32 (PcdGicDistributorBas= e), + 0, 3), + // GIC Redistributor + EFI_ACPI_6_2_GIC_REDISTRIBUTOR_INIT(FixedPcdGet32 (PcdGicRedistributorsB= ase), + SIZE_16MB), + // GIC ITS + { + EFI_ACPI_6_2_GIC_ITS_INIT(0, 0x30040000), + EFI_ACPI_6_2_GIC_ITS_INIT(1, 0x30080000), + EFI_ACPI_6_2_GIC_ITS_INIT(2, 0x300C0000), + EFI_ACPI_6_2_GIC_ITS_INIT(3, 0x30100000), + EFI_ACPI_6_2_GIC_ITS_INIT(4, 0x30140000), + EFI_ACPI_6_2_GIC_ITS_INIT(5, 0x30180000), + }, +}; + +// +// Reference the table being generated to prevent the optimizer from remov= ing +// the data structure from the executable +// +VOID* CONST ReferenceAcpiTable =3D &Madt; diff --git a/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf b/Platform/A= RM/SgiPkg/AcpiTables/RdN2AcpiTables.inf new file mode 100644 index 000000000000..63fc249bb77b --- /dev/null +++ b/Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf @@ -0,0 +1,60 @@ +## @file +# ACPI table data and ASL sources required to boot the platform. +# +# Copyright (c) 2020, Arm Ltd. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D RdN2AcpiTables + FILE_GUID =3D c712719a-0aaf-438c-9cdd-35ab4d60207d = # gArmSgiAcpiTablesGuid + MODULE_TYPE =3D USER_DEFINED + VERSION_STRING =3D 1.0 + +[Sources] + Dbg2.aslc + Fadt.aslc + Gtdt.aslc + Iort.aslc + Mcfg.aslc + RdN2/Dsdt.asl + RdN2/Madt.aslc + Spcr.aslc + Ssdt.asl + SsdtRos.asl + +[Packages] + ArmPkg/ArmPkg.dec + ArmPlatformPkg/ArmPlatformPkg.dec + EmbeddedPkg/EmbeddedPkg.dec + MdePkg/MdePkg.dec + Platform/ARM/SgiPkg/SgiPlatform.dec + +[FixedPcd] + gArmPlatformTokenSpaceGuid.PcdSerialDbgRegisterBase + gArmPlatformTokenSpaceGuid.PL011UartInterrupt + gArmPlatformTokenSpaceGuid.PcdCoreCount + gArmPlatformTokenSpaceGuid.PcdClusterCount + + gArmTokenSpaceGuid.PcdArmArchTimerSecIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerHypIntrNum + gArmTokenSpaceGuid.PcdArmArchTimerVirtIntrNum + gArmTokenSpaceGuid.PcdGicDistributorBase + gArmTokenSpaceGuid.PcdGicRedistributorsBase + gArmTokenSpaceGuid.PcdGenericWatchdogControlBase + gArmTokenSpaceGuid.PcdGenericWatchdogRefreshBase + gArmTokenSpaceGuid.PcdPciBusMin + gArmTokenSpaceGuid.PcdPciBusMax + + gArmSgiTokenSpaceGuid.PcdVirtioBlkBaseAddress + gArmSgiTokenSpaceGuid.PcdVirtioBlkSize + gArmSgiTokenSpaceGuid.PcdVirtioBlkInterrupt + gArmSgiTokenSpaceGuid.PcdVirtioNetBaseAddress + gArmSgiTokenSpaceGuid.PcdVirtioNetSize + gArmSgiTokenSpaceGuid.PcdVirtioNetInterrupt + + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress --=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 (#69194): https://edk2.groups.io/g/devel/message/69194 Mute This Topic: https://groups.io/mt/79061411/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 Sat Apr 27 17:51:59 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+69195+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+69195+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1608300548; cv=none; d=zohomail.com; s=zohoarc; b=f7mDx/BN7V+ZrmHdqpZ22X7Xnyp4R7aohUFPKuID7PswbIXYG+ZhEb3Xbek2BMVF7hi3sLT3ME+tUkYVA/rug4fG0Ngiy9beWfGdJu4hqZLR6jWwIBzpoim44XXjkQocVkN6hIbrKAwaCrwGA0g2MzMVfS43/k3ka8lLdFMd7vk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1608300548; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=rpPX9krlAZjJGrkl98R0zF9qVXQS+pgdKtYMN1iSZhg=; b=POrlkCPvxfXn/LQ8y8zmfpIkH0LoOBmokz0VfPpk+6jpuDnKwkUCPFTs11Wo2UTn3+oULjrVQ9oRLLyVdkajFxNVR9RM06Du+E9t8upv5LpeQZh31QDNY+2+gBxvWlBPbm2oRpPQ7C0kFqnhsdHJdwEd275/4h9LOvUhRiMaVxc= 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+69195+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 1608300548472175.47701268667686; Fri, 18 Dec 2020 06:09:08 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id uiDkYY1788612xD1fO45cUH7; Fri, 18 Dec 2020 06:09:06 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.10356.1608300480554932669 for ; Fri, 18 Dec 2020 06:08:05 -0800 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 4A8E61FB; Fri, 18 Dec 2020 06:08:00 -0800 (PST) X-Received: from usa.arm.com (a073440-lin.blr.arm.com [10.162.16.34]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 117DD3F66B; Fri, 18 Dec 2020 06:07:57 -0800 (PST) From: "Aditya Angadi" To: devel@edk2.groups.io Cc: Leif Lindholm , Ard Biesheuvel , Sami Mujawar , Thomas Abraham , Vijayenthiran Subramaniam , Aditya Angadi Subject: [edk2-devel] [PATCH][edk2-platforms 5/5] Platform/ARM/SgiPkg: Add initial support for RD-N2 platform Date: Fri, 18 Dec 2020 19:37:26 +0530 Message-Id: <20201218140726.23670-6-aditya.angadi@arm.com> In-Reply-To: <20201218140726.23670-1-aditya.angadi@arm.com> References: <20201218140726.23670-1-aditya.angadi@arm.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: 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,aditya.angadi@arm.com X-Gm-Message-State: bFEdOU8iDXeYKRdCkCcYZ3gUx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1608300546; bh=BTFaEmVqueImYbkrqKBg0r+KQ1kqUsLdd99k+fI74IU=; h=Cc:Date:From:Reply-To:Subject:To; b=iWCikdb82oAGVclnMLkuySFT5+umJh9UmzwjFt93yt3Rs5hg5TjbaICq9Pz/FjA56tS T4YijCRPPlDs4vqBMzEFPDFfo2nLequ8n0m/xcv6iNTu31xkb8mXA/wqsMlHfo/DdbEuS LDN01tqNkWcrSYqkLl2O4dbcEGF0or62WjU= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" Arm's RD-N2 platform is built using 16 Neoverse N2 cores and connected to 8GB of RAM. Add initial platform support for this platform. Signed-off-by: Aditya Angadi Reviewed-by: Ard Biesheuvel --- Platform/ARM/SgiPkg/RdN2/RdN2.dsc | 52 ++++++++++++++++++++ Platform/ARM/SgiPkg/RdN2/RdN2.fdf.inc | 10 ++++ 2 files changed, 62 insertions(+) diff --git a/Platform/ARM/SgiPkg/RdN2/RdN2.dsc b/Platform/ARM/SgiPkg/RdN2/R= dN2.dsc new file mode 100644 index 000000000000..55614574e308 --- /dev/null +++ b/Platform/ARM/SgiPkg/RdN2/RdN2.dsc @@ -0,0 +1,52 @@ +# +# Copyright (c) 2020, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +##########################################################################= ###### +# +# Defines Section - statements that will be processed to create a Makefile. +# +##########################################################################= ###### +[Defines] + PLATFORM_NAME =3D RdN2 + PLATFORM_GUID =3D c84a59cc-2103-4750-9d69-fe0f03d84465 + PLATFORM_VERSION =3D 0.1 + DSC_SPECIFICATION =3D 0x0001001B + OUTPUT_DIRECTORY =3D Build/$(PLATFORM_NAME) + SUPPORTED_ARCHITECTURES =3D AARCH64|ARM + BUILD_TARGETS =3D NOOPT|DEBUG|RELEASE + SKUID_IDENTIFIER =3D DEFAULT + FLASH_DEFINITION =3D Platform/ARM/SgiPkg/SgiPlatform.fdf + BOARD_DXE_FV_COMPONENTS =3D Platform/ARM/SgiPkg/RdN2/RdN2.fdf.inc + BUILD_NUMBER =3D 1 + +# include common definitions from SgiPlatform.dsc +!include Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +!include Platform/ARM/SgiPkg/SgiMemoryMap2.dsc.inc + +##########################################################################= ###### +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +##########################################################################= ###### + +[PcdsFixedAtBuild.common] + # GIC Base Addresses + gArmTokenSpaceGuid.PcdGicDistributorBase|0x30000000 + gArmTokenSpaceGuid.PcdGicRedistributorsBase|0x301C0000 + gArmSgiTokenSpaceGuid.PcdGicSize|0x200000 + + # ARM Cores and Clusters + gArmPlatformTokenSpaceGuid.PcdCoreCount|1 + gArmPlatformTokenSpaceGuid.PcdClusterCount|16 + +##########################################################################= ###### +# +# Components Section - list of all EDK II Modules needed by this Platform +# +##########################################################################= ###### + +[Components.common] + Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTables.inf diff --git a/Platform/ARM/SgiPkg/RdN2/RdN2.fdf.inc b/Platform/ARM/SgiPkg/Rd= N2/RdN2.fdf.inc new file mode 100644 index 000000000000..ebd6ed90530c --- /dev/null +++ b/Platform/ARM/SgiPkg/RdN2/RdN2.fdf.inc @@ -0,0 +1,10 @@ +# +# Copyright (c) 2020, ARM Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +# Per-platform additional content of the DXE phase firmware volume + + # ACPI support + INF RuleOverride=3DACPITABLE Platform/ARM/SgiPkg/AcpiTables/RdN2AcpiTabl= es.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 (#69195): https://edk2.groups.io/g/devel/message/69195 Mute This Topic: https://groups.io/mt/79061417/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-