From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 3C7FAD811A4 for ; Fri, 19 Jan 2024 09:33:43 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=tOg/8C8Aq26kQccGLjIUVFFOQelsz8XPZ9L75IWC8IQ=; c=relaxed/simple; d=groups.io; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:Received-SPF:From:To:CC:Subject:Date:Message-ID:In-Reply-To:References:MIME-Version:NoDisclaimer:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1705656822; v=1; b=fOU42c+9lp8zIUMH+lniHprQsD1LxNHPy67GWHtJJZO8gPTKYFIyaoZ6+bwN++NOKMWgtcfr T0aIeQ+iu6ea0y0++MpYpYRoVifx/hMvigyI6yWJAPAzoCiFdv3hd5gb7XEW7lT5kZpsvoc+Qhg osMIG50jtb9dAxtZ9dH2HNuA= X-Received: by 127.0.0.2 with SMTP id AEd8YY7687511xUkTYOOH8ZH; Fri, 19 Jan 2024 01:33:42 -0800 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com (EUR05-VI1-obe.outbound.protection.outlook.com [40.107.21.83]) by mx.groups.io with SMTP id smtpd.web11.18364.1705656819815450184 for ; Fri, 19 Jan 2024 01:33:41 -0800 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=fViuszoLgpp4+M7b8Aaq+fg2fIzDJnZCBRLmrzHfbogIbqPkWqOfxayjkyjF0yTiCsxBhDz9ksvtONDkn7+Wtc6M8ixnstI3e2JshEbIV5+g3DY5tN4OSTsUl6x0qb8JfzMjuMhPaPi3i15tR0Uas96rmQ3A6Y8gUQu8XokZtw/dZseHtHmcuG0Irxm78IU+oXjWX42YXm7T6cyBHmkVc8qWo1W26kQu9inR5HgOI0ez8+oSox0Plo0OEhgxJ5XteDfYXVo6MUdRENepb3N6qhnLmWBvI3Rc/RB5oVmXgBD1VWP/hoy5mpMBtrB5cE0XO6v5N8/MU+zdwIx0zkd/6g== ARC-Message-Signature: i=2; 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=mS44w260W2hRCYgZ+sS1TtrSawONp6V4goTa/gcAdZc=; b=RKvz3TcX/JC52S46n0HRZ89l2aLnZQtd2TT70zEK4djzZcd0VT6d8bHq/cOmimlkCrTL0dXX0fwUd6k1AHATEFjcDEDeZRssuruB4g9LCrzEI27jwji+aCov4/2KQqE2Wi+W0njutms4QhlFpohp5Iqu+yy8jm/qbP9n0PJqK7Ncbma5MeSRf0o41FHRqsAtUlBsV2RqhiOaOt2YsNAV/ALhLMwzEQ1Bl+ZvQNdgkGhjpEIQVeMPwfC94KzTNo6951XDn5K/VucL4TrOHIdG7k42uw2T96XBzqJlSPqGE+VH9++H68XmJgFztpYzANz9fJIcsLm6ibTj9YubShnKhw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) X-Received: from DUZPR01CA0233.eurprd01.prod.exchangelabs.com (2603:10a6:10:4b4::17) by DU5PR08MB10513.eurprd08.prod.outlook.com (2603:10a6:10:516::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 09:33:35 +0000 X-Received: from DU2PEPF0001E9C1.eurprd03.prod.outlook.com (2603:10a6:10:4b4:cafe::42) by DUZPR01CA0233.outlook.office365.com (2603:10a6:10:4b4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:33:34 +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; pr=C X-Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by DU2PEPF0001E9C1.mail.protection.outlook.com (10.167.8.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.16 via Frontend Transport; Fri, 19 Jan 2024 09:33:34 +0000 X-Received: ("Tessian outbound 67699c3f02bc:v228"); Fri, 19 Jan 2024 09:33:34 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 71fa1da8b4c056dd X-CR-MTA-TID: 64aa7808 X-Received: from 9b9daea54dd8.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id B3A5CC4E-728E-4FEE-B6BB-40D2DDDF2BD6.1; Fri, 19 Jan 2024 09:33:23 +0000 X-Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 9b9daea54dd8.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 19 Jan 2024 09:33:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ItYY1uiHziAfNFuTcLv6F03rPz78AOgqO2Ox94h7NTsj/UFYP08zTDysgkXfP0ML9koXnVBa284zk2+SKYKMkM+h8sMuZNAtZupPVMDrSBgDhzaBifSFeLFUqxPmaC70SBuzTO2/cT8g8nkbxrB1hW1pOs3u416uxBQpzqs4hBv15CX7CKytzGrG402nxzZMJxqtFwKtmFhPUJ7BC/TJushVdscOnSwOP2h6FAYPXRYGLBVj6yRUV2aKJ73dPDRrfzxptXQoQu8xRy+7vh8ymzo3MTfqmNZ2m7WC89cu47pnOZulee0faT08UxqSrWu5pCZ2BCFVeYmyBH0ZF2fGQA== 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=mS44w260W2hRCYgZ+sS1TtrSawONp6V4goTa/gcAdZc=; b=VSYLxu9FnNxOtzjDrXFKnz+xNIjPsfN2A87ygZ0behpz437PitmTPC2C6Rw50JEglc+kHnDXCzx6NujfkyE7VaGQJWOFG6OcMGUWbNALt9xt6A5Vn+FFsTcArVxSvzpzOR4TXIY9xeBB0dhsgm6nZjtYQLEX0WGf1efHv+B/AvSnbvbhVdnoRLiQIrhc8ilLm4SJOf7gi+Gi/ZaodiMlGXZTuywSTIf5lkb5TBoXX4vhmjS2TOsMFQXL9A+7gG61AgzsHV9/RwXtsJqDgkONpE/GSvrrhGl4hkkibPnMZKhtZ+TV2rQCQJy+EvZIT0gqGVq9ifr+35Alz3zLZyJmhA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 40.67.248.234) smtp.rcpttodomain=edk2.groups.io smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) X-Received: from DU2PR04CA0052.eurprd04.prod.outlook.com (2603:10a6:10:234::27) by GV2PR08MB9952.eurprd08.prod.outlook.com (2603:10a6:150:b6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24; Fri, 19 Jan 2024 09:33:16 +0000 X-Received: from DU6PEPF0000A7E2.eurprd02.prod.outlook.com (2603:10a6:10:234:cafe::ac) by DU2PR04CA0052.outlook.office365.com (2603:10a6:10:234::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.24 via Frontend Transport; Fri, 19 Jan 2024 09:33:16 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 40.67.248.234) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 40.67.248.234 as permitted sender) receiver=protection.outlook.com; client-ip=40.67.248.234; helo=nebula.arm.com; pr=C X-Received: from nebula.arm.com (40.67.248.234) by DU6PEPF0000A7E2.mail.protection.outlook.com (10.167.8.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7202.16 via Frontend Transport; Fri, 19 Jan 2024 09:33:16 +0000 X-Received: from AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) by AZ-NEU-EX03.Arm.com (10.251.24.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 19 Jan 2024 09:33:09 +0000 X-Received: from AZ-NEU-EX04.Arm.com (10.251.24.32) by AZ-NEU-EX02.Emea.Arm.com (10.251.26.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.32; Fri, 19 Jan 2024 09:33:08 +0000 X-Received: from e129823.cambridge.arm.com (10.1.197.6) by mail.arm.com (10.251.24.32) with Microsoft SMTP Server id 15.1.2507.32 via Frontend Transport; Fri, 19 Jan 2024 09:33:08 +0000 From: "levi.yun" To: , , CC: , levi.yun Subject: [edk2-devel] [PATCH RESEND edk2-platforms v1 1/3] Platform/Arm: FVP: Add a NorFlashLib instance for StandaloneMm Date: Fri, 19 Jan 2024 09:33:03 +0000 Message-ID: <20240119093305.2258464-2-yeoreum.yun@arm.com> In-Reply-To: <20240119093305.2258464-1-yeoreum.yun@arm.com> References: <20240119093305.2258464-1-yeoreum.yun@arm.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU6PEPF0000A7E2:EE_|GV2PR08MB9952:EE_|DU2PEPF0001E9C1:EE_|DU5PR08MB10513:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ef36533-750f-4132-6c00-08dc18d1b514 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: qVPRZYDPwc8C2K1iiwPVGRodWJFMRK8vwHn/5AWXslm9VtHWbwchTpl/oBk7zXQLcjAREfyOq2dpQ2z2rghkV7Xnqm5RQjzxHFXjTSkikk8ZCuKZ9QFdr/I5XLf3VK3OOJhq5g3kS6IvhDGOgy1NT20aQF+3Ht8B3luej7h0m+VRlhPzEqyjjo2QTkUrOVHWiNgTzfQvJn/vbVzzBf7CdxB0O4eybZdzsmL40Qn1CRdnIYSVk2bjGKQMwBwQgDXy0IIcGxmqSo0NdW+XC0TMM8TtumE/gx9sEQQjqMUp22BweR9PyAGEFmrzM6PBuFKifDz40p6nMIyvJ9HwQCOPZXgc0WZXmvayI0TicnFPLygJxtzxybslRNTZi6MEfm+fAIvYnypZxFhI66nU2exTqgb5+dYhk5edsaGIFyTWZnkzAO3J7l48mRvpqWioe/5UWib3YreRmiWmmEl7d6oFWrr3ZHNcY7iSIz82/Owk1wmRf7SzDIoRX39kanIpn7BFT5uYE0kGL/hZpJfQmUnS1H96F2UHntKJwjc/EneENl89wWv4SS44hXKdBdMYNNZjHBBB/N64eCg9bGgwjOHyiSZG19VabYoLBcW98wnhVErgSlx2TgI4NB8CDXUoxDwCnXPSzy1bbR11gqGB61NOmOeYDjyDDRpNpUiB/4CWgVcU28wz7cFnRZS84AkZCzbSYKvnqUsUX+bSyV78S484Kosf63AkEMJDpRmMgtlVnN0kslm4Y1oE5c54cNfAl1+5Or7x7e2typuK7y1ukMZxSQ== X-Forefront-Antispam-Report-Untrusted: CIP:40.67.248.234;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:nebula.arm.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(136003)(396003)(346002)(39860400002)(230922051799003)(64100799003)(82310400011)(451199024)(186009)(1800799012)(36840700001)(40470700004)(46966006)(36756003)(36860700001)(2906002)(41300700001)(86362001)(81166007)(356005)(82740400003)(110136005)(70206006)(316002)(70586007)(54906003)(478600001)(6666004)(7696005)(8936002)(47076005)(26005)(4326008)(5660300002)(336012)(83380400001)(426003)(1076003)(8676002)(2616005)(40460700003)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV2PR08MB9952 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU2PEPF0001E9C1.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e35dc3e8-c8e5-48ec-31e7-08dc18d1aa1e X-Microsoft-Antispam-Message-Info: jyIQYksUxEOvYBDkJyyDdRQF6+rt37zTy7SgEufwY9Amx68IETD9rESJ4Pp1lxadLXrNtZywnodK68lPK/hXykcv5bw4vvhsjK2dZqrGJa+kOgmBP+1TPPwFPjoak2xY8fKyZtWvr3Atpc5OlgiKqzca86MpIzSaPyM2a1f6Pkw8kRA6X5QczT6uCj6KubAjgHmjqCgicJk1gOYTJ5AQGsGMlNAnoIV043j8VHs4VXA5FyI/pqvu1ylyKgLrL0X3OoS/VK7LjRvN3ysrxvM3yPcoM4QxcpaTkKxm8GzLrrM5uyuPLD63XGriJ4PQDGUjnbG6IWXqTlkaDUoKgQXNnjiKk44se/lmsd/6PfsUpAITUCLAZ7dq9PZGW3o1MTld1ALi7PiFrzFVlwk4ydzOyI0j01nhAC7z5iR7Z5EMTmrfxbu/imnIMF5VXRUlIfzfMG2qR5qeEXQlAnabFoPNE5l2Yznb7BXSN/PQEwirugn8B9cmvGhcGgMK/sBORl4GSTI/ESqAdglBG6ETP8FJTNnjEKuaGdDmoc26rukVsq7eXrZ2teqj+6jh42uHOjrgowROSHUOQuhQqmbCJL6n+F+5F0btX3QB2aHPg8TXyqgJNVoP2kCsDhsRUiHgeJy0bx7QzmO3+NErZUfobXpr6iAw89Cv2WGK7Opcayz5lmi37VniBAZqw/ayBDNwq/XM04LLlEJ56dpOv4V4L1y7v91avMA78ixHUKaINITYQZYJtUujfQ+MljoO05bxWQUd X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:33:34.5013 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ef36533-750f-4132-6c00-08dc18d1b514 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: DU2PEPF0001E9C1.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU5PR08MB10513 Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,yeoreum.yun@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: QQAJK5mYeP4QxvLSMYI0XRrfx7686176AA= Content-Transfer-Encoding: quoted-printable Content-Type: text/plain X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=fOU42c+9; spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); arc=reject ("signature check failed: fail, {[1] = sig:microsoft.com:reject}") The NOR Flash1 is used for UEFI Variable storage. When Standalone MM is enabled the variable storage is managed in the secure world by Standalone MM. Therefore, add a new instance of NorFlashLib for that has the NOR Flash1 definitions for Standalone MM. Also, disable the NOR Flash1 definitions from the Normal world NorFlashLib instance when Standalone MM is enabled using the ENABLE_STMM build flag. Signed-off-by: levi.yun --- Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpres= s.c | 34 ++-------------- Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVExpres= sLib.inf | 3 +- Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashInfo.c = | 42 ++++++++++++++++++++ Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashStMmInfo.c= | 28 +++++++++++++ Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashStMmLib.in= f | 30 ++++++++++++++ 5 files changed, 106 insertions(+), 31 deletions(-) diff --git a/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFla= shArmVExpress.c b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/N= orFlashArmVExpress.c index ec5ac8cc625fa3037edf63551baa43dab327ec5b..9b71df991a7a288f63f7dc2f50f= fba251beaf8f2 100644 --- a/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVE= xpress.c +++ b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVE= xpress.c @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2011-2014, ARM Ltd. All rights reserved.
+ Copyright (c) 2011-2024, ARM Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @@ -12,34 +12,8 @@ #include #include -#define NOR_FLASH_DEVICE_COUNT 4 - -NOR_FLASH_DESCRIPTION mNorFlashDevices[NOR_FLASH_DEVICE_COUNT] =3D { - { // BootMon - ARM_VE_SMB_NOR0_BASE, - ARM_VE_SMB_NOR0_BASE, - SIZE_256KB * 255, - SIZE_256KB, - }, - { // BootMon non-volatile storage - ARM_VE_SMB_NOR0_BASE, - ARM_VE_SMB_NOR0_BASE + SIZE_256KB * 255, - SIZE_64KB * 4, - SIZE_64KB, - }, - { // UEFI - ARM_VE_SMB_NOR1_BASE, - ARM_VE_SMB_NOR1_BASE, - SIZE_256KB * 255, - SIZE_256KB, - }, - { // UEFI Variable Services non-volatile storage - ARM_VE_SMB_NOR1_BASE, - ARM_VE_SMB_NOR1_BASE + SIZE_256KB * 255, - SIZE_64KB * 3, //FIXME: Set 3 blocks because I did not succeed to copy= 4 blocks into the ARM Versatile Express NOR Flash in the last NOR Flash. I= t should be 4 blocks - SIZE_64KB, - } -}; +extern NOR_FLASH_DESCRIPTION mNorFlashDevices[]; +extern UINT32 mNorFlashCount; EFI_STATUS NorFlashPlatformInitialization ( @@ -68,7 +42,7 @@ NorFlashPlatformGetDevices ( } *NorFlashDevices =3D mNorFlashDevices; - *Count =3D NOR_FLASH_DEVICE_COUNT; + *Count =3D mNorFlashCount; return EFI_SUCCESS; } diff --git a/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFla= shArmVExpressLib.inf b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpress= Lib/NorFlashArmVExpressLib.inf index c9fbd80d47eb865b81e85bb513a44f7c18b58927..1a656836675876b492cdb33f3bf= 6bfc0b76d15b7 100644 --- a/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVE= xpressLib.inf +++ b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashArmVE= xpressLib.inf @@ -1,6 +1,6 @@ #/** @file # -# Copyright (c) 2011, ARM Ltd. All rights reserved.
+# Copyright (c) 2011-2024, ARM Ltd. All rights reserved.
# SPDX-License-Identifier: BSD-2-Clause-Patent # #**/ @@ -15,6 +15,7 @@ [Defines] [Sources.common] NorFlashArmVExpress.c + NorFlashInfo.c [Packages] MdePkg/MdePkg.dec diff --git a/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFla= shInfo.c b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlash= Info.c new file mode 100644 index 0000000000000000000000000000000000000000..fd515305fbbf1bbbfe5213329a8= 8e40ed5b3f7a6 --- /dev/null +++ b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashInfo.= c @@ -0,0 +1,42 @@ +/** @file + + Copyright (c) 2011-2024, Arm Ltd. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + **/ + +#include +#include +#include + +NOR_FLASH_DESCRIPTION mNorFlashDevices[] =3D { + { // BootMon + ARM_VE_SMB_NOR0_BASE, + ARM_VE_SMB_NOR0_BASE, + SIZE_256KB * 255, + SIZE_256KB, + }, + { // BootMon non-volatile storage + ARM_VE_SMB_NOR0_BASE, + ARM_VE_SMB_NOR0_BASE + SIZE_256KB * 255, + SIZE_64KB * 4, + SIZE_64KB, + }, +#ifndef ENABLE_UEFI_SECURE_VARIABLE + { // UEFI + ARM_VE_SMB_NOR1_BASE, + ARM_VE_SMB_NOR1_BASE, + SIZE_256KB * 255, + SIZE_256KB, + }, + { // UEFI Variable Services non-volatile storage + ARM_VE_SMB_NOR1_BASE, + ARM_VE_SMB_NOR1_BASE + SIZE_256KB * 255, + SIZE_64KB * 3, //FIXME: Set 3 blocks because I did not succeed to copy= 4 blocks into the ARM Versatile Express NOR Flash in the last NOR Flash. I= t should be 4 blocks + SIZE_64KB, + }, +#endif +}; + +UINT32 mNorFlashCount =3D ARRAY_SIZE(mNorFlashDevices); diff --git a/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFla= shStMmInfo.c b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorF= lashStMmInfo.c new file mode 100644 index 0000000000000000000000000000000000000000..165e265e2c47a4ab66326fcc924= c3aeaeaf68c62 --- /dev/null +++ b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashStMmI= nfo.c @@ -0,0 +1,28 @@ +/** @file + + Copyright (c) 2024, Arm Limited. All rights reserved.
+ + SPDX-License-Identifier: BSD-2-Clause-Patent + + **/ + +#include +#include +#include + +NOR_FLASH_DESCRIPTION mNorFlashDevices[] =3D { + { + ARM_VE_SMB_NOR1_BASE, + ARM_VE_SMB_NOR1_BASE, + SIZE_256KB * 255, + SIZE_256KB, + }, + { // UEFI Variable Services non-volatile storage + ARM_VE_SMB_NOR1_BASE, + ARM_VE_SMB_NOR1_BASE + SIZE_256KB * 255, + SIZE_64KB * 4, + SIZE_64KB, + }, +}; + +UINT32 mNorFlashCount =3D ARRAY_SIZE (mNorFlashDevices); diff --git a/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFla= shStMmLib.inf b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/Nor= FlashStMmLib.inf new file mode 100644 index 0000000000000000000000000000000000000000..79f3723d62a36577c1242f87265= b7fc1c07cbee1 --- /dev/null +++ b/Platform/ARM/VExpressPkg/Library/NorFlashArmVExpressLib/NorFlashStMmL= ib.inf @@ -0,0 +1,30 @@ +## @file +# StandaloneMM instance of NOR Flash library. +# +# Copyright (c) 2024, ARM Limited. All rights reserved. +# SPDX-License-Identifier: BSD-2-Clause-Patent +# +## + +[Defines] + INF_VERSION =3D 0x0001001A + BASE_NAME =3D NorFlashStMmLib + FILE_GUID =3D 011baec0-ae08-11ee-93fa-bb327a85ca4a + MODULE_TYPE =3D MM_STANDALONE + VERSION_STRING =3D 1.0 + PI_SPECIFICATION_VERSION =3D 0x00010032 + LIBRARY_CLASS =3D NorFlashPlatformLib + +[Sources.common] + NorFlashArmVExpress.c + NorFlashStMmInfo.c + +[Packages] + MdePkg/MdePkg.dec + Platform/ARM/ARM.dec + Platform/ARM/VExpressPkg/ArmVExpressPkg.dec + +[LibraryClasses] + BaseLib + DebugLib + IoLib -- Guid("CE165669-3EF3-493F-B85D-6190EE5B9759") IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you. -=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 (#114036): https://edk2.groups.io/g/devel/message/114036 Mute This Topic: https://groups.io/mt/103827103/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-