From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.52]) by mx.groups.io with SMTP id smtpd.web11.2060.1588225889856930466 for ; Wed, 29 Apr 2020 22:51:30 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="body hash did not verify" header.i=@nxp1.onmicrosoft.com header.s=selector2-nxp1-onmicrosoft-com header.b=YSPHN20P; spf=pass (domain: oss.nxp.com, ip: 40.107.21.52, mailfrom: pankaj.bansal@oss.nxp.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WwctUFazEOCJ0EGV49kL58ghP2/7oIxcOkvXSwSOApuWRJHYa4EG0CsRVY5nbSZYamColHmWrq8n9BK5q7SsJ33tFVmwQl4VFasbgxZYyFmUaiR/emErPLZbuZewjh5Hjx+Mul/xsr1ZO2nfid+c5diJj6rjw2ZLjNvexfRiAekHuBFS6eLsEeLpzAz2V8PVo9CyEBBruQqAqLGK1lGl7vqe7rywKLi5iCQlfOyIzCy489404cVWDWrx0R2RauggzAPppUt39z+FuC1zWpJUY3RaN0OTlLjUYx7Yz8EDP602qY9Dt/TXc1YqnqwftTliukE/45e44irs91tmdG7INg== 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-SenderADCheck; bh=BYTQxey2zHcoiOnb7p1rb+MV6JFr6UZsfFpvBWAShmU=; b=C/TzUdSRlA/J/ghXlU9+JC+P/rfdbKw7XPMEy65FRYTcjrM97DW+wHzUcKLVX8Pw6wtrLq559l3yNcEVKUMmEEtqIo0NkgBlf87GPeOeT0WRNkkvTjtCymWNRJvI/aXfAW+RjVexr6uZf/I6M+RfMaTWFBJuNIOSoUDhll92NiCpbBK5yWV+6tgOGqpDVqFbgltJGa91n5F0L0oAwNsHO5DCC9pVDIHCaKT8ekntEvoVRZIH9HGITWRRaLmDuf086Wy5YuW1O8tE1eP5wvwut/scj+fi/Z6apuUjpNlDfrR7IrK0YRRLh3hGzVA1IaxqNng1k7UuYEBOz2SyPk7AMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BYTQxey2zHcoiOnb7p1rb+MV6JFr6UZsfFpvBWAShmU=; b=YSPHN20PwfvsAYjsoZpFHNdu0LKmuTIO77G3K7v0bjVlbqjRnPaRYGr5hIqvBGUlo5SUU1sh+MlRra5I0zbgHtAcOVAHmie23A94YR6pz7jnQ/9Dr7IGamrV7xZ7GlNT1YMbjR5YaJcxytvCI8tVnfPBKuHuqaCCeMy8sISNLWE= Authentication-Results: nuviainc.com; dkim=none (message not signed) header.d=none;nuviainc.com; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) by VI1PR04MB4429.eurprd04.prod.outlook.com (2603:10a6:803:6e::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Thu, 30 Apr 2020 05:51:27 +0000 Received: from VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::45c4:8846:5327:9513]) by VI1PR04MB5933.eurprd04.prod.outlook.com ([fe80::45c4:8846:5327:9513%7]) with mapi id 15.20.2958.020; Thu, 30 Apr 2020 05:51:27 +0000 From: "Pankaj Bansal" To: Leif Lindholm , Meenakshi Aggarwal , Michael D Kinney , devel@edk2.groups.io, Varun Sethi , Samer El-Haj-Mahmoud , Jon Nettleton , Ard Biesheuvel Subject: [PATCH edk2-platforms v4 09/24] Silicon/NXP: Remove unnecessary PCDs Date: Fri, 1 May 2020 11:19:40 +0530 Message-ID: <20200501054955.13025-10-pankaj.bansal@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200501054955.13025-1-pankaj.bansal@oss.nxp.com> References: <20200501054955.13025-1-pankaj.bansal@oss.nxp.com> X-ClientProxiedBy: SG2PR03CA0131.apcprd03.prod.outlook.com (2603:1096:4:91::35) To VI1PR04MB5933.eurprd04.prod.outlook.com (2603:10a6:803:ec::16) Return-Path: pankaj.bansal@oss.nxp.com MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from uefi-workstation.ap.freescale.net (92.120.0.69) by SG2PR03CA0131.apcprd03.prod.outlook.com (2603:1096:4:91::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2979.14 via Frontend Transport; Thu, 30 Apr 2020 05:51:24 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [92.120.0.69] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: cb9a645c-cf7a-4aec-7327-08d7ecca85d4 X-MS-TrafficTypeDiagnostic: VI1PR04MB4429:|VI1PR04MB4429: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:10000; X-Forefront-PRVS: 0389EDA07F X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5933.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFTY:;SFS:(4636009)(136003)(376002)(39860400002)(346002)(366004)(396003)(6512007)(26005)(16526019)(5660300002)(6666004)(478600001)(30864003)(186003)(2906002)(110136005)(52116002)(6486002)(316002)(8676002)(6506007)(66476007)(19627235002)(86362001)(2616005)(66946007)(44832011)(956004)(66556008)(1076003)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HPv0ZAcBNotjhl9dt2nUaFVugFtUINLqeFK75lZx6cZd849MpvKXyIL6p51O6zReSIUeDCVg/F6CSVHL0J/FwbtRsvC+0hkKwqahwNpzV1ONhIAMHkX69q6Xp5zADoVDdyQg3G6Wzr6tNxI6pQqfONds8MHtIH7t14Aa3OkQhtHPE5Z2GjJ8uDDud0eWCwDXa5K1TdKTgLlAIIximSKbAfAaj9Xlida0C0sCLl+ylLQVReuPnWKgeiciH0MEv/vh1TJfSNtMExRCkAtAzebiMB6Iv3EpXKXtUkBXIbVDwDFXRhOaw6XaL22zA/Dhl/vU0SjrFWyGr5K4fOOpVeEN8jGg3x1ZTW1eFvoK3SR/9ZEj8gNPPA9s/hal5TVfK9D1lz9+uS+4HoYCYw+l03XTm0bV/Jt0+fH3hbAh7ph6A5iRcB70R34pJppFZu1bP4ei X-MS-Exchange-AntiSpam-MessageData: W0ADP9XaLtPicNXUIYPETrkWc0/BlhvzYj0Y2wq8dzQEAdEFrWlVNXda6VbuSIv4teSxRSaN9l82mfhmEqVRkKaqT2sQisQLbSM1JJwhMcWaBvlLPJ2xXEwjmMj5kvorGcq37LYDAGo6VSHwlh+sngrnB3AhqgliPR77XYNpKFZzXydEz/5jQbpXkMXZ4o5fYWLpa4W57S8CEAiqivBSLSLINU8Ag2QzQMLo9j68e6IwrGdJUPpEZqIrJOP2XKEi9fPBjOaw33T/kLy1nK4BeE1uPFeA2tAGUxImwgWJpyqcIzA7PapX9CIZzMa3DUzaPjpLEb0d6eoT4YsUOxfyn5xlXANqF4G7RaUxzOURWGNXk4Txdbjt84KxzbKd0zyALUZ/rsaTBGYoSL7nWZwEcJ7WskR9wPAcHYx67lFoHws8IhYGwetLdrQq5Z7Z9IxOkvHv6+xHYNCZISzLNpNkrqoNqCpqVLXlYZPFuH/QVwfA8vo5OpCd1Oqr6086dFPGE1kj4E9jh4dy/1DREYEBgFHIzGE1qhEvdfeZGt0pTdU/7nZxU29GOL+RUeqN/hTq/QCFwcNcaWYQIL2ZzER3dJts6l/IQlEcn4G6Epod9wJiVEK+z60eRM5hmKwivNOIH6FcKR/qsB96i1PT5Wgs4kqA0Tc4cxJA4kLs9RZJilX7VgJIwQsvhKPURh53SdboreQb1yahAL/udx2LJrVvWjUkXRQBaCq73LVA6xBPp62i9AmdU3iVs5hpKMu7tzZSQilSNNPwzopTYdMTSzYxSTAHROCkQuqeyDqneqtroek= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb9a645c-cf7a-4aec-7327-08d7ecca85d4 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 Apr 2020 05:51:27.0905 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w5AePOC+lHIDEC2y0XnfOssofCj/PgJBMa/h9yy7F1d5VuHiSJBhFEzfc+XxAfwYpkkuCuWRCyFATesNhfNEiw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB4429 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain From: Pankaj Bansal The memory map of an SOC is fixed in hardware. it doesn't change with platform that uses SOC. So, there is no need to keep PCDs for these values and we can use macros for these in SOC header file. Any Platform using the SOC, can make use of the SOC header file. Signed-off-by: Pankaj Bansal Reviewed-by: Leif Lindholm --- Notes: V4: - No change =20 V3: - No change Silicon/NXP/NxpQoriqLs.dec | 47 ---= --------- Silicon/NXP/LS1043A/LS1043A.dsc.inc | 26 ---= ---- Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.inf | 10 +-- Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf | 21 +--= --- Silicon/NXP/Library/SocLib/LS1043aSocLib.inf | 1 - Silicon/NXP/Include/Chassis2/NxpSoc.h | 2 + Silicon/NXP/LS1043A/Include/Soc.h | 44 +++= ++++++++ Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c | 15 ++-= - Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/NxpQoriqLsMem.c | 79 +++= ++++++----------- Silicon/NXP/Library/SocLib/Chassis2/Soc.c | 2 +- 10 files changed, 97 insertions(+), 150 deletions(-) diff --git a/Silicon/NXP/NxpQoriqLs.dec b/Silicon/NXP/NxpQoriqLs.dec index bc604e586283..841d403f6f10 100644 --- a/Silicon/NXP/NxpQoriqLs.dec +++ b/Silicon/NXP/NxpQoriqLs.dec @@ -22,53 +22,6 @@ gNxpNonDiscoverableI2cMasterGuid =3D { 0x5f2c099c, 0x54a3, 0x4dd4, {0x9e= , 0xc5, 0xe9, 0x12, 0x8c, 0x36, 0x81, 0x6a}} =20 [PcdsFixedAtBuild.common] - # - # Pcds for I2C Controller - # - gNxpQoriqLsTokenSpaceGuid.PcdI2cSpeed|0|UINT32|0x00000001 - gNxpQoriqLsTokenSpaceGuid.PcdNumI2cController|0|UINT32|0x00000002 - - # - # Pcds for base address and size - # - gNxpQoriqLsTokenSpaceGuid.PcdGutsBaseAddr|0x0|UINT64|0x00000100 - gNxpQoriqLsTokenSpaceGuid.PcdClkBaseAddr|0x0|UINT64|0x00000103 - gNxpQoriqLsTokenSpaceGuid.PcdDdrBaseAddr|0x0|UINT64|0x00000105 - gNxpQoriqLsTokenSpaceGuid.PcdSdxcBaseAddr|0x0|UINT64|0x00000106 - gNxpQoriqLsTokenSpaceGuid.PcdScfgBaseAddr|0x0|UINT64|0x00000107 - gNxpQoriqLsTokenSpaceGuid.PcdI2c0BaseAddr|0x0|UINT64|0x00000108 - gNxpQoriqLsTokenSpaceGuid.PcdI2cSize|0x0|UINT32|0x00000109 - gNxpQoriqLsTokenSpaceGuid.PcdDcsrBaseAddr|0x0|UINT64|0x0000010A - gNxpQoriqLsTokenSpaceGuid.PcdDcsrSize|0x0|UINT64|0x0000010B - gNxpQoriqLsTokenSpaceGuid.PcdSataBaseAddr|0x0|UINT32|0x0000010C - gNxpQoriqLsTokenSpaceGuid.PcdSataSize|0x0|UINT32|0x0000010D - gNxpQoriqLsTokenSpaceGuid.PcdQmanSwpBaseAddr|0x0|UINT64|0x0000010E - gNxpQoriqLsTokenSpaceGuid.PcdQmanSwpSize|0x0|UINT64|0x0000010F - gNxpQoriqLsTokenSpaceGuid.PcdBmanSwpBaseAddr|0x0|UINT64|0x00000110 - gNxpQoriqLsTokenSpaceGuid.PcdBmanSwpSize|0x0|UINT64|0x00000111 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp1BaseAddr|0x0|UINT64|0x00000112 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp1BaseSize|0x0|UINT64|0x00000113 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp2BaseAddr|0x0|UINT64|0x00000114 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp2BaseSize|0x0|UINT64|0x00000115 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp3BaseAddr|0x0|UINT64|0x00000116 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp3BaseSize|0x0|UINT64|0x00000117 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp4BaseAddr|0x0|UINT64|0x0000118 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp4BaseSize|0x0|UINT64|0x0000119 - gNxpQoriqLsTokenSpaceGuid.PcdQspiRegionBaseAddr|0x0|UINT64|0x0000011A - gNxpQoriqLsTokenSpaceGuid.PcdQspiRegionSize|0x0|UINT64|0x0000011B - gNxpQoriqLsTokenSpaceGuid.PcdQspiRegion2BaseAddr|0x0|UINT64|0x0000011C - gNxpQoriqLsTokenSpaceGuid.PcdQspiRegion2Size|0x0|UINT64|0x0000011D - gNxpQoriqLsTokenSpaceGuid.PcdCcsrBaseAddr|0x0|UINT64|0x00000122 - gNxpQoriqLsTokenSpaceGuid.PcdCcsrSize|0x0|UINT64|0x00000123 - - # - # IFC PCDs - # - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion1BaseAddr|0x0|UINT64|0x00000190 - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion1Size|0x0|UINT64|0x00000191 - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion2BaseAddr|0x0|UINT64|0x00000192 - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion2Size|0x0|UINT64|0x00000193 - # # Platform PCDs # diff --git a/Silicon/NXP/LS1043A/LS1043A.dsc.inc b/Silicon/NXP/LS1043A/LS10= 43A.dsc.inc index f6ada08dad9d..7690e4caa593 100644 --- a/Silicon/NXP/LS1043A/LS1043A.dsc.inc +++ b/Silicon/NXP/LS1043A/LS1043A.dsc.inc @@ -26,32 +26,6 @@ [PcdsFixedAtBuild.common] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x021c0500 =20 - # - # CCSR Address Space and other attached Memories - # - gNxpQoriqLsTokenSpaceGuid.PcdCcsrBaseAddr|0x01000000 - gNxpQoriqLsTokenSpaceGuid.PcdCcsrSize|0x0F000000 - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion1BaseAddr|0x60000000 - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion1Size|0x20000000 - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion2BaseAddr|0x0620000000 - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion2Size|0x00E0000000 - gNxpQoriqLsTokenSpaceGuid.PcdQmanSwpBaseAddr|0x0500000000 - gNxpQoriqLsTokenSpaceGuid.PcdQmanSwpSize|0x0080000000 - gNxpQoriqLsTokenSpaceGuid.PcdBmanSwpBaseAddr|0x0508000000 - gNxpQoriqLsTokenSpaceGuid.PcdBmanSwpSize|0x0080000000 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp1BaseAddr|0x4000000000 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp1BaseSize|0x800000000 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp2BaseAddr|0x4800000000 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp2BaseSize|0x800000000 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp3BaseAddr|0x5000000000 - gNxpQoriqLsTokenSpaceGuid.PcdPciExp3BaseSize|0x800000000 - gNxpQoriqLsTokenSpaceGuid.PcdGutsBaseAddr|0x01EE0000 - gNxpQoriqLsTokenSpaceGuid.PcdI2c0BaseAddr|0x02180000 - gNxpQoriqLsTokenSpaceGuid.PcdI2cSize|0x10000 - gNxpQoriqLsTokenSpaceGuid.PcdNumI2cController|4 - gNxpQoriqLsTokenSpaceGuid.PcdQspiRegionBaseAddr|0x40000000 - gNxpQoriqLsTokenSpaceGuid.PcdQspiRegionSize|0x20000000 - # # Big Endian IPs # diff --git a/Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.inf= b/Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.inf index d689cf4db58e..038d48949a39 100644 --- a/Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.inf +++ b/Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.inf @@ -2,7 +2,7 @@ # # Component description file for LS1043 DXE platform driver. # -# Copyright 2018-2019 NXP +# Copyright 2018-2020 NXP # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -21,9 +21,10 @@ =20 [Packages] ArmPkg/ArmPkg.dec - MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec + MdePkg/MdePkg.dec Silicon/Maxim/Library/Ds1307RtcLib/Ds1307RtcLib.dec + Silicon/NXP/LS1043A/LS1043A.dec Silicon/NXP/NxpQoriqLs.dec =20 [LibraryClasses] @@ -43,10 +44,5 @@ gEdkiiNonDiscoverableDeviceProtocolGuid ## PRODUCES gDs1307RealTimeClockLibI2cMasterProtocolGuid ## PRODUCES =20 -[FixedPcd] - gNxpQoriqLsTokenSpaceGuid.PcdI2c0BaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdI2cSize - gNxpQoriqLsTokenSpaceGuid.PcdNumI2cController - [Depex] TRUE diff --git a/Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/ArmPlatformLib.= inf b/Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf index f7ae74afc6ca..7563a1c43630 100644 --- a/Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf +++ b/Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/ArmPlatformLib.inf @@ -1,7 +1,7 @@ # @file # # Copyright (c) 2016, Freescale Semiconductor, Inc. All rights reserved. -# Copyright 2017, 2019 NXP +# Copyright 2017, 2019-2020 NXP # # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -19,6 +19,7 @@ ArmPlatformPkg/ArmPlatformPkg.dec EmbeddedPkg/EmbeddedPkg.dec MdePkg/MdePkg.dec + Silicon/NXP/LS1043A/LS1043A.dec Silicon/NXP/NxpQoriqLs.dec =20 [LibraryClasses] @@ -35,21 +36,3 @@ =20 [FixedPcd] gArmTokenSpaceGuid.PcdArmPrimaryCore - gNxpQoriqLsTokenSpaceGuid.PcdCcsrBaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdCcsrSize - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion1BaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion1Size - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion2BaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdIfcRegion2Size - gNxpQoriqLsTokenSpaceGuid.PcdQmanSwpBaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdQmanSwpSize - gNxpQoriqLsTokenSpaceGuid.PcdBmanSwpBaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdBmanSwpSize - gNxpQoriqLsTokenSpaceGuid.PcdPciExp1BaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdPciExp1BaseSize - gNxpQoriqLsTokenSpaceGuid.PcdPciExp2BaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdPciExp2BaseSize - gNxpQoriqLsTokenSpaceGuid.PcdPciExp3BaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdPciExp3BaseSize - gNxpQoriqLsTokenSpaceGuid.PcdQspiRegionBaseAddr - gNxpQoriqLsTokenSpaceGuid.PcdQspiRegionSize diff --git a/Silicon/NXP/Library/SocLib/LS1043aSocLib.inf b/Silicon/NXP/Lib= rary/SocLib/LS1043aSocLib.inf index f75a8d19f5a5..b7c7fc78cc8f 100644 --- a/Silicon/NXP/Library/SocLib/LS1043aSocLib.inf +++ b/Silicon/NXP/Library/SocLib/LS1043aSocLib.inf @@ -36,5 +36,4 @@ [FixedPcd] gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString gNxpQoriqLsTokenSpaceGuid.PcdGurBigEndian - gNxpQoriqLsTokenSpaceGuid.PcdGutsBaseAddr gNxpQoriqLsTokenSpaceGuid.PcdPlatformFreqDiv diff --git a/Silicon/NXP/Include/Chassis2/NxpSoc.h b/Silicon/NXP/Include/Ch= assis2/NxpSoc.h index 74330b6205e7..6812beafe447 100644 --- a/Silicon/NXP/Include/Chassis2/NxpSoc.h +++ b/Silicon/NXP/Include/Chassis2/NxpSoc.h @@ -12,6 +12,8 @@ =20 #define CLK_FREQ 100000000 =20 +#define CHASSIS2_DCFG_ADDRESS 0x1EE0000 + /* SMMU Defintions */ #define SMMU_BASE_ADDR 0x09000000 #define SMMU_REG_SCR0 (SMMU_BASE_ADDR + 0x0) diff --git a/Silicon/NXP/LS1043A/Include/Soc.h b/Silicon/NXP/LS1043A/Includ= e/Soc.h new file mode 100644 index 000000000000..441871757d67 --- /dev/null +++ b/Silicon/NXP/LS1043A/Include/Soc.h @@ -0,0 +1,44 @@ +/** @file + + Copyright 2020 NXP + + SPDX-License-Identifier: BSD-2-Clause-Patent + +**/ +#ifndef SOC_H__ +#define SOC_H__ + +/** + Soc Memory Map +**/ +#define LS1043A_DRAM0_PHYS_ADDRESS 0x80000000 +#define LS1043A_DRAM0_SIZE SIZE_2GB +#define LS1043A_DRAM1_PHYS_ADDRESS 0x880000000 +#define LS1043A_DRAM1_SIZE 0x780000000 // 30 GB + +#define LS1043A_CCSR_PHYS_ADDRESS 0x1000000 +#define LS1043A_CCSR_SIZE 0xF000000 + +#define LS1043A_IFC0_PHYS_ADDRESS 0x60000000 +#define LS1043A_IFC0_SIZE SIZE_512MB +#define LS1043A_IFC1_PHYS_ADDRESS 0x620000000 +#define LS1043A_IFC1_SIZE 0xE0000000 // 3.5 GB + +#define LS1043A_QSPI_PHYS_ADDRESS 0x40000000 +#define LS1043A_QSPI_SIZE SIZE_512MB + +#define LS1043A_QMAN_SW_PORTAL_PHYS_ADDRESS 0x500000000 +#define LS1043A_QMAN_SW_PORTAL_SIZE SIZE_128MB +#define LS1043A_BMAN_SW_PORTAL_PHYS_ADDRESS 0x508000000 +#define LS1043A_BMAN_SW_PORTAL_SIZE SIZE_128MB + +#define LS1043A_PCI0_PHYS_ADDRESS 0x4000000000 +#define LS1043A_PCI1_PHYS_ADDRESS 0x4800000000 +#define LS1043A_PCI2_PHYS_ADDRESS 0x5000000000 +#define LS1043A_PCI_SIZE SIZE_32GB + +#define LS1043A_I2C0_PHYS_ADDRESS 0x2180000 +#define LS1043A_I2C_SIZE 0x10000 +#define LS1043A_I2C_NUM_CONTROLLERS 4 + +#endif // SOC_H__ diff --git a/Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c b= /Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c index f89dcdeff3c1..62c400eb1a58 100644 --- a/Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c +++ b/Platform/NXP/LS1043aRdbPkg/Drivers/PlatformDxe/PlatformDxe.c @@ -1,7 +1,7 @@ /** @file LS1043 DXE platform driver. =20 - Copyright 2018-2019 NXP + Copyright 2018-2020 NXP =20 SPDX-License-Identifier: BSD-2-Clause-Patent =20 @@ -14,6 +14,7 @@ #include #include #include +#include =20 #include =20 @@ -22,7 +23,7 @@ typedef struct { UINT8 EndDesc; } ADDRESS_SPACE_DESCRIPTOR; =20 -STATIC ADDRESS_SPACE_DESCRIPTOR mI2cDesc[FixedPcdGet64 (PcdNumI2cControlle= r)]; +STATIC ADDRESS_SPACE_DESCRIPTOR mI2cDesc[LS1043A_I2C_NUM_CONTROLLERS]; =20 STATIC EFI_STATUS @@ -65,19 +66,19 @@ PopulateI2cInformation ( { UINT32 Index; =20 - for (Index =3D 0; Index < FixedPcdGet32 (PcdNumI2cController); Index++) = { + for (Index =3D 0; Index < ARRAY_SIZE (mI2cDesc); Index++) { mI2cDesc[Index].StartDesc.Desc =3D ACPI_ADDRESS_SPACE_DESCRIPTOR; mI2cDesc[Index].StartDesc.Len =3D sizeof (EFI_ACPI_ADDRESS_SPACE_DESCR= IPTOR) - 3; mI2cDesc[Index].StartDesc.ResType =3D ACPI_ADDRESS_SPACE_TYPE_MEM; mI2cDesc[Index].StartDesc.GenFlag =3D 0; mI2cDesc[Index].StartDesc.SpecificFlag =3D 0; mI2cDesc[Index].StartDesc.AddrSpaceGranularity =3D 32; - mI2cDesc[Index].StartDesc.AddrRangeMin =3D FixedPcdGet64 (PcdI2c0BaseA= ddr) + - (Index * FixedPcdGet32 (PcdI2= cSize)); + mI2cDesc[Index].StartDesc.AddrRangeMin =3D LS1043A_I2C0_PHYS_ADDRESS + + (Index * LS1043A_I2C_SIZE); mI2cDesc[Index].StartDesc.AddrRangeMax =3D mI2cDesc[Index].StartDesc.A= ddrRangeMin + - FixedPcdGet32 (PcdI2cSize) - = 1; + LS1043A_I2C_SIZE - 1; mI2cDesc[Index].StartDesc.AddrTranslationOffset =3D 0; - mI2cDesc[Index].StartDesc.AddrLen =3D FixedPcdGet32 (PcdI2cSize); + mI2cDesc[Index].StartDesc.AddrLen =3D LS1043A_I2C_SIZE; =20 mI2cDesc[Index].EndDesc =3D ACPI_END_TAG_DESCRIPTOR; } diff --git a/Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/NxpQoriqLsMem.c= b/Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/NxpQoriqLsMem.c index c6c256da0727..f5fa308551aa 100644 --- a/Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/NxpQoriqLsMem.c +++ b/Platform/NXP/LS1043aRdbPkg/Library/PlatformLib/NxpQoriqLsMem.c @@ -6,7 +6,7 @@ * * Copyright (c) 2011, ARM Limited. All rights reserved. * Copyright (c) 2016, Freescale Semiconductor, Inc. All rights reserved. -* Copyright 2017, 2019 NXP +* Copyright 2017, 2019-2020 NXP * * SPDX-License-Identifier: BSD-2-Clause-Patent * @@ -16,7 +16,7 @@ #include #include #include -#include +#include =20 #define MAX_VIRTUAL_MEMORY_MAP_DESCRIPTORS 25 =20 @@ -38,7 +38,6 @@ ArmPlatformGetVirtualMemoryMap ( { UINTN Index; ARM_MEMORY_REGION_DESCRIPTOR *VirtualMemoryTable; - DRAM_INFO DramInfo; =20 Index =3D 0; =20 @@ -51,24 +50,20 @@ ArmPlatformGetVirtualMemoryMap ( return; } =20 - if (GetDramBankInfo (&DramInfo)) { - DEBUG ((DEBUG_ERROR, "Failed to get DRAM information, exiting...\n")); - return; - } + VirtualMemoryTable[Index].PhysicalBase =3D LS1043A_DRAM0_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_DRAM0_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_DRAM0_SIZE; + VirtualMemoryTable[Index++].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE= _WRITE_BACK; =20 - - for (Index =3D 0; Index < DramInfo.NumOfDrams; Index++) { - // DRAM1 (Must be 1st entry) - VirtualMemoryTable[Index].PhysicalBase =3D DramInfo.DramRegion[Index].= BaseAddress; - VirtualMemoryTable[Index].VirtualBase =3D DramInfo.DramRegion[Index].= BaseAddress; - VirtualMemoryTable[Index].Length =3D DramInfo.DramRegion[Index].= Size; - VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE= _WRITE_BACK; - } + VirtualMemoryTable[Index].PhysicalBase =3D LS1043A_DRAM1_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_DRAM1_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_DRAM1_SIZE; + VirtualMemoryTable[Index++].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE= _WRITE_BACK; =20 // CCSR Space - VirtualMemoryTable[Index].PhysicalBase =3D FixedPcdGet64 (PcdCcsrBaseAdd= r); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdCcsrBaseAdd= r); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdCcsrSize); + VirtualMemoryTable[Index].PhysicalBase =3D LS1043A_CCSR_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_CCSR_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_CCSR_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; =20 // IFC region 1 @@ -85,51 +80,51 @@ ArmPlatformGetVirtualMemoryMap ( // For write transactions from non-core masters (like system= DMA), the address // should be 16 byte aligned and the data size should be = multiple of 16 bytes. // - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdIfcRegion= 1BaseAddr); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdIfcRegion1B= aseAddr); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdIfcRegion1S= ize); + VirtualMemoryTable[++Index].PhysicalBase =3D LS1043A_IFC0_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_IFC0_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_IFC0_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; =20 // QMAN SWP - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdQmanSwpBa= seAddr); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdQmanSwpBase= Addr); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdQmanSwpSize= ); + VirtualMemoryTable[++Index].PhysicalBase =3D LS1043A_QMAN_SW_PORTAL_PHYS= _ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_QMAN_SW_PORTAL_PHYS_A= DDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_QMAN_SW_PORTAL_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_U= NCACHED_UNBUFFERED; =20 // BMAN SWP - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdBmanSwpBa= seAddr); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdBmanSwpBase= Addr); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdBmanSwpSize= ); + VirtualMemoryTable[++Index].PhysicalBase =3D LS1043A_BMAN_SW_PORTAL_PHYS= _ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_BMAN_SW_PORTAL_PHYS_A= DDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_QMAN_SW_PORTAL_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_U= NCACHED_UNBUFFERED; =20 // IFC region 2 - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdIfcRegion= 2BaseAddr); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdIfcRegion2B= aseAddr); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdIfcRegion2S= ize); + VirtualMemoryTable[++Index].PhysicalBase =3D LS1043A_IFC1_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_IFC1_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_IFC1_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; =20 // PCIe1 - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdPciExp1Ba= seAddr); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdPciExp1Base= Addr); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdPciExp1Base= Size); + VirtualMemoryTable[++Index].PhysicalBase =3D LS1043A_PCI0_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_PCI0_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_PCI_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; =20 // PCIe2 - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdPciExp2Ba= seAddr); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdPciExp2Base= Addr); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdPciExp2Base= Size); + VirtualMemoryTable[++Index].PhysicalBase =3D LS1043A_PCI1_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_PCI1_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_PCI_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; =20 // PCIe3 - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdPciExp3Ba= seAddr); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdPciExp3Base= Addr); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdPciExp3Base= Size); + VirtualMemoryTable[++Index].PhysicalBase =3D LS1043A_PCI2_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_PCI2_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_PCI_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_D= EVICE; =20 // QSPI region - VirtualMemoryTable[++Index].PhysicalBase =3D FixedPcdGet64 (PcdQspiRegio= nBaseAddr); - VirtualMemoryTable[Index].VirtualBase =3D FixedPcdGet64 (PcdQspiRegionB= aseAddr); - VirtualMemoryTable[Index].Length =3D FixedPcdGet64 (PcdQspiRegionS= ize); + VirtualMemoryTable[++Index].PhysicalBase =3D LS1043A_QSPI_PHYS_ADDRESS; + VirtualMemoryTable[Index].VirtualBase =3D LS1043A_QSPI_PHYS_ADDRESS; + VirtualMemoryTable[Index].Length =3D LS1043A_QSPI_SIZE; VirtualMemoryTable[Index].Attributes =3D ARM_MEMORY_REGION_ATTRIBUTE_U= NCACHED_UNBUFFERED; =20 // End of Table diff --git a/Silicon/NXP/Library/SocLib/Chassis2/Soc.c b/Silicon/NXP/Librar= y/SocLib/Chassis2/Soc.c index d992e53546f4..98ca2e162f7b 100644 --- a/Silicon/NXP/Library/SocLib/Chassis2/Soc.c +++ b/Silicon/NXP/Library/SocLib/Chassis2/Soc.c @@ -34,7 +34,7 @@ GetSysInfo ( CCSR_GUR *GurBase; UINTN SysClk; =20 - GurBase =3D (VOID *)PcdGet64 (PcdGutsBaseAddr); + GurBase =3D (CCSR_GUR *)CHASSIS2_DCFG_ADDRESS; SysClk =3D CLK_FREQ; =20 SetMem (PtrSysInfo, sizeof (SYS_INFO), 0); --=20 2.17.1