From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR02-AM5-obe.outbound.protection.outlook.com (EUR02-AM5-obe.outbound.protection.outlook.com [40.107.0.79]) by mx.groups.io with SMTP id smtpd.web12.6242.1636122133548664322 for ; Fri, 05 Nov 2021 07:22:14 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=6Zvfs+aR; spf=pass (domain: arm.com, ip: 40.107.0.79, mailfrom: khasim.mohammed@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iJZSCscgD6malb9b6nEwptbMnTA4VWohSfmxP3j7qD8=; b=6Zvfs+aRnuiPIYmK12Bz5wIm48+j7iiTT69t91xs6zFZm1/UVuvtydFjA7/whwUkWkK50FeDCT3W/Kn/qKLOWr/WwUF2ms300trvmftkYDn7O+gyWND+KEtQnFhWwkkGwTIu/pHstUiZAN/kC1QVJIS/bv1rEm60wy6APCZ7uqc= Received: from AM5PR0701CA0003.eurprd07.prod.outlook.com (2603:10a6:203:51::13) by HE1PR0802MB2300.eurprd08.prod.outlook.com (2603:10a6:3:c5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.19; Fri, 5 Nov 2021 14:22:10 +0000 Received: from VE1EUR03FT035.eop-EUR03.prod.protection.outlook.com (2603:10a6:203:51:cafe::36) by AM5PR0701CA0003.outlook.office365.com (2603:10a6:203:51::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4690.4 via Frontend Transport; Fri, 5 Nov 2021 14:22:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT035.mail.protection.outlook.com (10.152.18.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.14 via Frontend Transport; Fri, 5 Nov 2021 14:22:09 +0000 Received: ("Tessian outbound e7ce0d853b63:v108"); Fri, 05 Nov 2021 14:22:09 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: dc6a7277484a800a X-CR-MTA-TID: 64aa7808 Received: from 8c3471d2b6b7.3 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B63A7324-C78E-42FC-979C-84031A5081EB.1; Fri, 05 Nov 2021 14:21:57 +0000 Received: from EUR04-DB3-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 8c3471d2b6b7.3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 05 Nov 2021 14:21:57 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bEVa1GvM+7daAYOkO52OXCvkhE2PNW/4z3QU/PZf0KOcIcTbZ72sBit+nEnCfmEo25e+LpEsG4/A1/BUItrlqVLxVcNqelHHVMAp/VGmoPRTP1zA9DTReRHPqAWyN9GCYwTIBrLC6Em0lnLyoZGDR9nvZzbeF5STRAxn2JGipgwtfqQBsMwXVsxOGGnYgAuCI1lGFGmqpc5ryXbzmOEu2xCAbyz+zrbmV+wwo5t4yoG75zfG1Pk2BKMJE24RdMBm8bUofGIa3B9kVmsspR0/RERMHBMR67Ofd8Evvugm3JfedXnekerjg3mb7BbMGxO9stAIXKU4QgLRnuKTrgfkIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iJZSCscgD6malb9b6nEwptbMnTA4VWohSfmxP3j7qD8=; b=YbSv+DRdoZRoOtKclShyv6j/jHqqxK3aRCHPoMTobUFkBC/rEHzYbMnbNBl9JzHSDBUgbZNYb+3EwakDINGssdU0MYl1ujP4KTm8cSx8cK5sfRmqkcaIrUqKEYfpI+qaxDTMXxky4aomdBw7vrW4SAii151LkfuIh0yPjroueZ2YiBpdcRIo77HqJ95s+zvX2dt8pcXFg4mY8i5WhXfg+xtJeQfhtXSOQFd0PM0UdlBEFH4l8+hOCn5K0iWg1EGo35mi3mJKdmrhP3MvYSl4q0FBEwQsOBDIoRIhKX9RsfrmWsJ+IOcPoN+pOUnuZL+yKreD3oMd44Pi8AVMvuSVMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=iJZSCscgD6malb9b6nEwptbMnTA4VWohSfmxP3j7qD8=; b=6Zvfs+aRnuiPIYmK12Bz5wIm48+j7iiTT69t91xs6zFZm1/UVuvtydFjA7/whwUkWkK50FeDCT3W/Kn/qKLOWr/WwUF2ms300trvmftkYDn7O+gyWND+KEtQnFhWwkkGwTIu/pHstUiZAN/kC1QVJIS/bv1rEm60wy6APCZ7uqc= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) by PA4PR08MB6094.eurprd08.prod.outlook.com (2603:10a6:102:f0::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4649.19; Fri, 5 Nov 2021 14:21:51 +0000 Received: from PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::d02e:f1e5:1354:622e]) by PA4PR08MB5902.eurprd08.prod.outlook.com ([fe80::d02e:f1e5:1354:622e%9]) with mapi id 15.20.4669.011; Fri, 5 Nov 2021 14:21:51 +0000 From: "Khasim Mohammed" To: devel@edk2.groups.io Cc: nd@arm.com, Khasim Syed Mohammed , Chandni Cherukuri Subject: [PATCH v5 2/7] Silicon/ARM/NeoverseN1Soc: Define new PCDs and configure memory map Date: Fri, 5 Nov 2021 19:51:22 +0530 Message-Id: <20211105142127.21616-2-khasim.mohammed@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211105142127.21616-1-khasim.mohammed@arm.com> References: <20211105142127.21616-1-khasim.mohammed@arm.com> X-ClientProxiedBy: BMXPR01CA0045.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::31) To PA4PR08MB5902.eurprd08.prod.outlook.com (2603:10a6:102:e0::10) MIME-Version: 1.0 Received: from e116623.arm.com (217.140.105.53) by BMXPR01CA0045.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:c::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4669.10 via Frontend Transport; Fri, 5 Nov 2021 14:21:50 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7dd74b47-9fb9-48b5-9104-08d9a067a75a X-MS-TrafficTypeDiagnostic: PA4PR08MB6094:|HE1PR0802MB2300: X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:9508;OLM:9508; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: N9A2kb+qsVgH/lYXIAJ7OcXYUAY5kXqsfUL1VQYF2fw8slg+W6zJtZxpSWDr9T/uqyMM2uOvGKlCthG1i1F1EWXbXS5f7+n0xF6lvDnPCO/VyGwCF2Kk67UkD42OOXE0RABg/DgIp/LKhLl75ACo7j0LRpVKfEkj5o9wV2XAFL3WLxtbPI3VQDdtunTkK+WOKFvpKYEZaJLXXixG/viNFOsozxJSsxlySxFG0UYmMKNlMj79RS8t/3wsvuZ7rPvQeqWPL/5nTB/WSIT4D8YIy++eOlYQcYduZxxS6mttRDxbyC4MVq+o4kow54hruljAXMBR3zDD1+9LM+A3Nx2aGDm+2LoClU2scsbxlJwlP0m4apXh9mC3TSpPYxEllxI8k8Mm02Rmn46daOWb/fcotTbDCl99/+TURC/OEMMN86rc06mIK1U3HvEG0kFrAgZmcUZOtgn+cz7a8U1w1vh75siXs4euyyLyZI17CBX3j0OsOSpCbOgnzQ53YodVGrxEDFJ4am/XJ+BYnSW+YMB4YrGVoxQ6kaU+vF8Guzn2EJdtAW0oeWfZAJCe1B9/psqK/vKp+8mLCpDRXHeiD2oTbH0l7q7yThLtniHBZ1c3N2gHg19TvtsUaBlvobzZc/DIt2mdZhjZI7/YmhrfJ0wkG00L3OGExk5JAadVFqkRl9faKnBHRzT0/I3CU9WgUo9cHj23qJfjR2NtMlL0a7axZQ== X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR08MB5902.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(54906003)(6486002)(38350700002)(19627235002)(6666004)(52116002)(5660300002)(7696005)(316002)(6916009)(26005)(8936002)(2906002)(66476007)(1076003)(38100700002)(8676002)(66556008)(2616005)(83380400001)(956004)(30864003)(508600001)(66946007)(86362001)(4326008)(186003)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR08MB6094 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Return-Path: Khasim.Mohammed@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 15a4af4a-873c-449b-228b-08d9a0679c50 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: g3i9rjSL5RLjSX08dA1ROTxv18LctFOwUwKzh+uyhZ0ntCciIc65Pab0mGL/ZoOKDGR4T1Jzwskzc/P4ap077MjeEhjCLOT+ygpWjNlc+VYLIttVCAnrWaMv7xLmZemh+VDz9RH2p1VuKIhCit3Zzmor647/rjN1/RB1D9m6/iKxwgXOTEQcC8vYMWWOsrnMXJwlGWuoN+H9hFvRfh8cDVUY6t9Q4+TRiRz/KIC53r8YfBFsgRIeIo2HIhP+0rVClkMeM/CdSW/TB96b6omYKZNWSQGsaZeTr65HkhNClKXcDomZco9pUWLGyHeL89i5f5LvSfkELP8y66YZkQoxeYXWTiI7jDHU2bEeGtYIAgIYdZQ/3beMp8tyXnzKJOI5LIyZ+aB6hZSjl96DMhKyjzSGseRm6S6yYw/1pbjwckmRIH1lz5sKAoBt69w9Wodwhd6se9+ANL6vFp4VNhQINrMOCDSGTNyIVyjsJCGNL54waIOY1npf1sP2vJH2Q9BXrAlLpcqUTxCkWJP/Cptma+CR6FD6NCy5u69KDeR6LulcS3LN+UM1Y+H+boBKEUeNuMu0H+/0XAA4OBsKGXAIK0+vSZZeZGPWe4eybE+jJSHmxeEuKhXuasmnU5sw1mGhZolVKhTs+aMMWyH4iyedZCij1zwvQF6HwRwwhyKTd0ciA+gkvww1Sfaioqj/MVf7iyx8cwEcEaHMWkfgKChfBw== X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(36840700001)(46966006)(1076003)(83380400001)(336012)(82310400003)(47076005)(70586007)(2906002)(86362001)(508600001)(81166007)(70206006)(7696005)(6486002)(30864003)(956004)(4326008)(356005)(2616005)(19627235002)(8936002)(8676002)(5660300002)(316002)(54906003)(36860700001)(6666004)(26005)(6916009)(186003)(36756003);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2021 14:22:09.8012 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7dd74b47-9fb9-48b5-9104-08d9a067a75a X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d;Ip=[63.35.35.123];Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT035.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0802MB2300 Content-Type: text/plain This patch introduces new PCDs required to enable chip to chip interface and corresponding memory map is updated. Signed-off-by: Chandni Cherukuri Signed-off-by: Khasim Syed Mohammed --- .../Library/PlatformLib/PlatformLib.inf | 28 +++++-- .../Library/PlatformLib/PlatformLibMem.c | 84 ++++++++++++++++--- Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec | 35 +++++++- 3 files changed, 125 insertions(+), 22 deletions(-) diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf index 166c9e0444..8e2154aadf 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf @@ -1,6 +1,7 @@ ## @file +# Platform Library for N1Sdp. # -# Copyright (c) 2018-2020, ARM Limited. All rights reserved. +# Copyright (c) 2018-2021, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -29,13 +30,17 @@ AArch64/Helper.S | GCC [FixedPcd] - gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress - - gArmTokenSpaceGuid.PcdSystemMemoryBase - gArmTokenSpaceGuid.PcdSystemMemorySize - gArmTokenSpaceGuid.PcdArmPrimaryCore - gArmTokenSpaceGuid.PcdArmPrimaryCoreMask - + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMax + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMin + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixExpressBaseAddress + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Base + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Size + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Base + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Size + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseAddress + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseSize + gArmNeoverseN1SocTokenSpaceGuid.PcdDramBlock2Base + gArmNeoverseN1SocTokenSpaceGuid.PcdExtMemorySpace gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMax gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMin gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32Base @@ -45,7 +50,12 @@ gArmNeoverseN1SocTokenSpaceGuid.PcdPcieRootPortConfigBaseAddress gArmNeoverseN1SocTokenSpaceGuid.PcdPcieRootPortConfigBaseSize - gArmNeoverseN1SocTokenSpaceGuid.PcdDramBlock2Base + gArmTokenSpaceGuid.PcdArmPrimaryCore + gArmTokenSpaceGuid.PcdArmPrimaryCoreMask + gArmTokenSpaceGuid.PcdSystemMemoryBase + gArmTokenSpaceGuid.PcdSystemMemorySize + + gEfiMdePkgTokenSpaceGuid.PcdPciExpressBaseAddress [Guids] gEfiHobListGuid ## CONSUMES ## SystemTable diff --git a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c index f9b3d03753..1c4a445c5e 100644 --- a/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c +++ b/Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c @@ -1,9 +1,9 @@ /** @file -* -* Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. -* -* SPDX-License-Identifier: BSD-2-Clause-Patent -* + + Copyright (c) 2018 - 2021, ARM Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + **/ #include @@ -13,7 +13,7 @@ #include // The total number of descriptors, including the final "end-of-table" descriptor. -#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 13 +#define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 19 /** Returns the Virtual Memory Map of the platform. @@ -21,21 +21,23 @@ This Virtual Memory Map is used by MemoryInitPei Module to initialize the MMU on your platform. - @param[out] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR describing - a Physical-to-Virtual Memory mapping. This array - must be ended by a zero-filled entry. + @param[in] VirtualMemoryMap Array of ARM_MEMORY_REGION_DESCRIPTOR describing + a Physical-to-Virtual Memory mapping. This array + must be ended by a zero-filled entry. **/ VOID ArmPlatformGetVirtualMemoryMap ( IN ARM_MEMORY_REGION_DESCRIPTOR **VirtualMemoryMap ) { - UINTN Index = 0; + UINTN Index; ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable; EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttributes; NEOVERSEN1SOC_PLAT_INFO *PlatInfo; UINT64 DramBlock2Size; + UINT64 RemoteDdrSize; + Index = 0; PlatInfo = (NEOVERSEN1SOC_PLAT_INFO *)NEOVERSEN1SOC_PLAT_INFO_STRUCT_BASE; DramBlock2Size = ((UINT64)(PlatInfo->LocalDdrSize - NEOVERSEN1SOC_DRAM_BLOCK1_SIZE / SIZE_1GB) * @@ -55,6 +57,24 @@ ArmPlatformGetVirtualMemoryMap ( FixedPcdGet64 (PcdDramBlock2Base), DramBlock2Size); + if (PlatInfo->MultichipMode == 1) { + RemoteDdrSize = ((PlatInfo->RemoteDdrSize - 2) * SIZE_1GB); + + BuildResourceDescriptorHob ( + EFI_RESOURCE_SYSTEM_MEMORY, + ResourceAttributes, + FixedPcdGet64 (PcdExtMemorySpace) + FixedPcdGet64 (PcdSystemMemoryBase), + PcdGet64 (PcdSystemMemorySize) + ); + + BuildResourceDescriptorHob ( + EFI_RESOURCE_SYSTEM_MEMORY, + ResourceAttributes, + FixedPcdGet64 (PcdExtMemorySpace) + FixedPcdGet64 (PcdDramBlock2Base), + RemoteDdrSize + ); + } + ASSERT (VirtualMemoryMap != NULL); Index = 0; @@ -114,6 +134,32 @@ ArmPlatformGetVirtualMemoryMap ( VirtualMemoryTable[Index].Length = PcdGet64 (PcdPcieMmio64Size); VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; + // CCIX RC Configuration Space + VirtualMemoryTable[++Index].PhysicalBase = PcdGet32 (PcdCcixRootPortConfigBaseAddress); + VirtualMemoryTable[Index].VirtualBase = PcdGet32 (PcdCcixRootPortConfigBaseAddress); + VirtualMemoryTable[Index].Length = PcdGet32 (PcdCcixRootPortConfigBaseSize); + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; + + // CCIX ECAM Configuration Space + VirtualMemoryTable[++Index].PhysicalBase = PcdGet32 (PcdCcixExpressBaseAddress); + VirtualMemoryTable[Index].VirtualBase = PcdGet32 (PcdCcixExpressBaseAddress); + VirtualMemoryTable[Index].Length = (FixedPcdGet32 (PcdCcixBusMax) - + FixedPcdGet32 (PcdCcixBusMin) + 1) * + SIZE_1MB; + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; + + // CCIX MMIO32 Memory Space + VirtualMemoryTable[++Index].PhysicalBase = PcdGet32 (PcdCcixMmio32Base); + VirtualMemoryTable[Index].VirtualBase = PcdGet32 (PcdCcixMmio32Base); + VirtualMemoryTable[Index].Length = PcdGet32 (PcdCcixMmio32Size); + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; + + // CCIX MMIO64 Memory Space + VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdCcixMmio64Base); + VirtualMemoryTable[Index].VirtualBase = PcdGet64 (PcdCcixMmio64Base); + VirtualMemoryTable[Index].Length = PcdGet64 (PcdCcixMmio64Size); + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; + // SubSystem Pheripherals - UART0 VirtualMemoryTable[++Index].PhysicalBase = NEOVERSEN1SOC_UART0_BASE; VirtualMemoryTable[Index].VirtualBase = NEOVERSEN1SOC_UART0_BASE; @@ -138,6 +184,24 @@ ArmPlatformGetVirtualMemoryMap ( VirtualMemoryTable[Index].Length = NEOVERSEN1SOC_EXP_PERIPH_BASE0_SZ; VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_DEVICE; + if (PlatInfo->MultichipMode == 1) { + //Remote DDR (2GB) + VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdExtMemorySpace) + + PcdGet64 (PcdSystemMemoryBase); + VirtualMemoryTable[Index].VirtualBase = PcdGet64 (PcdExtMemorySpace) + + PcdGet64 (PcdSystemMemoryBase); + VirtualMemoryTable[Index].Length = PcdGet64 (PcdSystemMemorySize); + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_THROUGH; + + //Remote DDR + VirtualMemoryTable[++Index].PhysicalBase = PcdGet64 (PcdExtMemorySpace) + + PcdGet64 (PcdDramBlock2Base); + VirtualMemoryTable[Index].VirtualBase = PcdGet64 (PcdExtMemorySpace) + + PcdGet64 (PcdDramBlock2Base); + VirtualMemoryTable[Index].Length = RemoteDdrSize; + VirtualMemoryTable[Index].Attributes = ARM_MEMORY_REGION_ATTRIBUTE_WRITE_THROUGH; + } + // End of Table VirtualMemoryTable[++Index].PhysicalBase = 0; VirtualMemoryTable[Index].VirtualBase = 0; diff --git a/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec b/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec index 54b793a937..eea2d58402 100644 --- a/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec +++ b/Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec @@ -1,5 +1,7 @@ +## @file +# Describes the entire platform configuration. # -# Copyright (c) 2018 - 2020, ARM Limited. All rights reserved. +# Copyright (c) 2018 - 2021, ARM Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -33,8 +35,8 @@ gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMax|17|UINT32|0x00000005 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieBusMin|0|UINT32|0x00000006 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoBase|0x0|UINT32|0x00000007 - gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoMaxBase|0x00FFFFFF|UINT32|0x00000008 - gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoSize|0x01000000|UINT32|0x00000009 + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoMaxBase|0x001FFFF|UINT32|0x00000008 + gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoSize|0x020000|UINT32|0x00000009 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieIoTranslation|0x75200000|UINT32|0x0000000A gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32Base|0x71200000|UINT32|0x0000000B gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio32MaxBase|0x751FFFFF|UINT32|0x0000000C @@ -44,3 +46,30 @@ gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64MaxBase|0x28FFFFFFFF|UINT64|0x00000010 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64Size|0x2000000000|UINT64|0x00000011 gArmNeoverseN1SocTokenSpaceGuid.PcdPcieMmio64Translation|0x0|UINT64|0x00000012 + + # CCIX + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusCount|18|UINT32|0x00000016 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMax|17|UINT32|0x00000017 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixBusMin|0|UINT32|0x00000018 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixExpressBaseAddress|0x68000000|UINT32|0x00000019 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoBase|0x0|UINT32|0x0000001A + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoMaxBase|0x01FFFF|UINT32|0x0000001B + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoSize|0x020000|UINT32|0x0000001C + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixIoTranslation|0x6D200000|UINT32|0x00000001D + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Base|0x69200000|UINT32|0x0000001E + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32MaxBase|0x6D1FFFFF|UINT32|0x00000001F + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Size|0x04000000|UINT32|0x00000020 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio32Translation|0x0|UINT32|0x00000021 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Base|0x2900000000|UINT64|0x00000022 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64MaxBase|0x48FFFFFFFF|UINT64|0x00000023 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Size|0x2000000000|UINT64|0x00000024 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixMmio64Translation|0x0|UINT64|0x00000025 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseAddress|0x62000000|UINT32|0x00000026 + gArmNeoverseN1SocTokenSpaceGuid.PcdCcixRootPortConfigBaseSize|0x00001000|UINT32|0x00000027 + + gArmNeoverseN1SocTokenSpaceGuid.PcdExtMemorySpace|0x40000000000|UINT64|0x00000029 + + # Remote Chip PCIe + gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieIoTranslation|0x40075200000|UINT64|0x0000004A + gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieMmio32Translation|0x40000000000|UINT64|0x0000004B + gArmNeoverseN1SocTokenSpaceGuid.PcdRemotePcieMmio64Translation|0x40000000000|UINT64|0x0000004C -- 2.17.1