From nobody Wed May 15 08:24:38 2024 Delivered-To: importer@patchew.org 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+114036+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1705656822387734.1821039816414; Fri, 19 Jan 2024 01:33:42 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=zq/gTyhJMXUVIDejP9bE3Y8HePKWWg6n/cC3IunD2mY=; 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=gU6zz65tgboBi3EzSngzuvqyO0OW4ENRQO3hi4OzEmzK5stmuagOT84UepUBIUwTNJp8Q0pS ig0neRlOKQPNbLKWsTtWY0e2co+pONEJAJu3HjnYoLkIhnjvwmVd+5zVcySNxv+9X608a49E04n eZfOVJfGokSJzkUAANuIizhk= X-Received: by 127.0.0.2 with SMTP id tpA6YY1788612xU4K0vylshM; 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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114036+1787277+3901457@groups.io; helo=mail02.groups.io; 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: c8stcAG8eUew4GTKwZLwKCYMx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1705656822928100001 Content-Type: text/plain; charset="utf-8" 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/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 Wed May 15 08:24:38 2024 Delivered-To: importer@patchew.org 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+114034+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1705656812511447.83151963748264; Fri, 19 Jan 2024 01:33:32 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=ELQhLOosiQQT8YYvwtFANgPq6jqOMkHvazSmMyurWJY=; 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=1705656812; v=1; b=k1JErvfjSZ4BMdv4bK1KQAxJmPc49sM5B8UPnvvRc74RVl/LQempoenDaUm3K1KwK2FA7k4v 1vthho6j9xx1DJdZaWnAkM+klDRE0AFas1u3g1lGIdLxR3cZgSavGYE5xT59oRuIG13EldcjmoS agimErpbPD5zcmcEoP3Cb0x4= X-Received: by 127.0.0.2 with SMTP id 460zYY1788612xxcPkVZEZfm; Fri, 19 Jan 2024 01:33:32 -0800 X-Received: from EUR01-DB5-obe.outbound.protection.outlook.com (EUR01-DB5-obe.outbound.protection.outlook.com [40.107.15.89]) by mx.groups.io with SMTP id smtpd.web10.18427.1705656811110428515 for ; Fri, 19 Jan 2024 01:33:31 -0800 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=AuEpBJTpFTR1mkBECyRRXU02s915RHL6IYmyH0MBe/Olh3FB/HxFYvdz8k4pzjU0wcFGw+tkwyUd27obH32A4399lIwVx2HjRS0LM0ZIaEc3GcJpDdlnOiCfCeyqOXa2owh48rlkLh4XVqt5mr+4EsWkLW6qtuZk1LV1Zg7V33kbyBG2RqzRWWnAOqZfGSUmgLxRV0Enq/8nhO/zbgNwywyyJoFytH68wHdRBQiMRj/fe/FNyz9yx1q5xal29mbiuoHYqLXY/pKmV3Am25KeJBluaI4ePUDOLUDJJxDgoqbgdgCQAWmUyOlyaQT9Vju/Sn9tLusVpqBdJeIvJwOehQ== 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=r+/YD+3SOnfEvJywQIMj1OFwXjWqLUj4z8mZc8iKOe8=; b=WsTqD5Wm0tdT0rnHX8ovfaHaM/quPWF4t/gbGqK8/J3k4/Z4dE5BggM1ieX1/dtG858gbge0552oCuRTHM4wIooHjT6OuQnecFmPIG4HdL3akNKq6mimz1Wa8brYAhBt1u2pBtru0Yny1CEifr8gzM0PKthNFIgBNYBIKkNl0RQAcbrgc1aBrw24jmd6bCtWuEHOc5mUdc4ajWI5xT6d21OiSIS4bFOmNtMPb381u5e0XLrhfcGdOW7QpbVKR/Y23G5oIZaueE1Dxiiy701XDRqIAjQk+7uD7gJzcuz/o5bLzpCr/CY0qc9SVK/uJJP+b+YEMBQXHfPOpTSZM9dY1A== 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 DU2PR04CA0251.eurprd04.prod.outlook.com (2603:10a6:10:28e::16) by DU0PR08MB8469.eurprd08.prod.outlook.com (2603:10a6:10:407::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:26 +0000 X-Received: from DB5PEPF00014B9B.eurprd02.prod.outlook.com (2603:10a6:10:28e:cafe::4e) by DU2PR04CA0251.outlook.office365.com (2603:10a6:10:28e::16) 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:26 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114034+1787277+3901457@groups.io; helo=mail02.groups.io; 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 DB5PEPF00014B9B.mail.protection.outlook.com (10.167.8.168) 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:26 +0000 X-Received: ("Tessian outbound 94d82ba85b1d:v228"); Fri, 19 Jan 2024 09:33:26 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: ecfb74cd12a9a267 X-CR-MTA-TID: 64aa7808 X-Received: from a3ca384e9b56.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 03B44A89-0BD9-48E1-AC46-A137C2CA35AD.1; Fri, 19 Jan 2024 09:33:19 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id a3ca384e9b56.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Fri, 19 Jan 2024 09:33:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CcmcJioIJpGauxbq3AS7yXUvstbc0Bzwy0hRCbAlkM4XaeJlEnuXwlREINo3mEnx7SX8RwuvALJ27ZlrjvePraLIivLRxowTBzRRW+DUaqjD2tppJmnywIhd05vqwi1w/3AUhLzqJoTlVdJKcjSCxoBDU33sG9nFwbjOqHwtJN3iMz9YfeB/9j5lWeJWOHSykf6r1+RODQ2wqJIAlJ3FCalcQoosCITTeT2qEvOOiMCPsXJBeredm+KqrPbWlHtubtHszzPYDeKUsNLMz7Zcwh7NgOgdXeT4mcUOWuCRKzvejreYFu983Cg5PPM/rQm0CouvHdGJUoQ9HYcs138zjw== 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=r+/YD+3SOnfEvJywQIMj1OFwXjWqLUj4z8mZc8iKOe8=; b=JfeIO0tk2tnKCsoxqgwzQQiMHDr4pXy69KU2H7JKO0KxDT8142LyKS5dXT6tZr6/BzHhQFzP5E5FxzFW+HAO4acDUMc8OneMNBgTD1uT9V6tCbCoDTw8oCopMx9Ce2EcQraGG+Z3bTBv+jmrB9Qjm3HtN8lMeWFbwrebozgjGcmSV2d4UwnZi3dA/1cbh1mfKLGUPty7u9BfaEJx2kr/segs2/y7cc7Axuydwt1SSN3VBTrmxRY9OGRetpg9s40EMKAVuW4mJCfiuIxCsBWPJUlq1ptymJUiB8wbXpKYqTy4X0PjvcwAvDIs9tC9TsyOn5w9bVtBIA1FDgtQsm289Q== 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 DB6PR0301CA0080.eurprd03.prod.outlook.com (2603:10a6:6:30::27) by DBBPR08MB6172.eurprd08.prod.outlook.com (2603:10a6:10:1f4::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.23; Fri, 19 Jan 2024 09:33:17 +0000 X-Received: from DU6PEPF0000A7E1.eurprd02.prod.outlook.com (2603:10a6:6:30:cafe::53) by DB6PR0301CA0080.outlook.office365.com (2603:10a6:6:30::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:17 +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 DU6PEPF0000A7E1.mail.protection.outlook.com (10.167.8.45) 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:17 +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 2/3] Platform/Arm: Enable UEFI Secure Variable support for FVP Date: Fri, 19 Jan 2024 09:33:04 +0000 Message-ID: <20240119093305.2258464-3-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: DU6PEPF0000A7E1:EE_|DBBPR08MB6172:EE_|DB5PEPF00014B9B:EE_|DU0PR08MB8469:EE_ X-MS-Office365-Filtering-Correlation-Id: e3a2ec42-d4b8-40b8-3c57-08dc18d1b02d 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: jRGR1n06YUvPGeLYiacjgzqHly0tbf4taFWYFP2+cV6rDDqlc2Abh1M99lsy+ejWmMlhknwKJ1QolUYBQmvrICb9NBSxJdqkpHw5pNUO41Q2R/jCdJEgxt06UmxiEdBooGAfJiXfisEaG5Ss1mt8uPfbd9WJ9V6EFFqTV2VKE4K9t/b2TJ8mG2k8iDFW1pgmUurivHqxxptoC22MehrJbVWMT4eA7Zznzq1AmV0sHMZtnuwL8gFrV8K93ozgex21Du1dbzhNEgos92cYa9K8qo4cB9ZteJ9Rk0oHeja/eks1jW1/8Paaa9MdFoz7IsdOboeAPogrmr35XC8Xynj1XmEZP21uemBndr3QKXrr/JqHR0IamTBD2KlpGu12Yz7RA0O/UCcMDoHyOFhWgqnXyn7yyX+DbcPG0qqX1uSF8ycpP0zg9L9gbVVMZmYjpk3BEdN2VXM+zONeXb3MWi9q/XXsjA4nCvIq4oyn23PTSNWuHwsBprFwVkd56pCvzuONVC6izXeG0vpiAr5HgkNZBH8SC8TgeeJ7f5SERogfhYq0D395lchTkYXOJNB69gajCja0JbIpfRoTZORz6IWtrjuy5gpVfEfP3XGcZKH5SAHxZ30mQM1FSfRoKw5a2CY4l9zY5XIiCAw+041C1KjZoV8vPRTrF6Z3sZZCCXCqMMHDhpZ1bxuYTkFXMtmDc8JuQlTNYEp1x1jWHY6DErD/G2KX1jEQ/DHy9IgChqqlyR3cmvhanFuFxKBZWZz8gkRq80He+pe8k4HfwWGAHB1Vxg== 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)(39860400002)(376002)(346002)(396003)(136003)(230922051799003)(1800799012)(64100799003)(186009)(82310400011)(451199024)(40470700004)(36840700001)(46966006)(40460700003)(40480700001)(336012)(1076003)(26005)(7696005)(6666004)(83380400001)(426003)(86362001)(36756003)(356005)(81166007)(2616005)(47076005)(4326008)(41300700001)(5660300002)(36860700001)(82740400003)(110136005)(2906002)(70206006)(54906003)(70586007)(8676002)(8936002)(316002)(478600001)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB6172 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB5PEPF00014B9B.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b14f0e82-453f-4caa-605c-08dc18d1aac0 X-Microsoft-Antispam-Message-Info: G4CxnhxSStXBkIaNOBdNr4LJaBIRI1hq2/pwiuaI6V1skII3rSG10VHXv+ledWCv4L/RODMT2aDg0i19C0lputq3EOaItF7MuQxdp39ZNDdGjhD1ZG9b8LJynMenuKUNCIImlHxEUcTZQLYVWxi6xdyPErG8tCStbElCsUxYKi7h85k2JwRYLnY5vK10e/wAgRUfKj4fPrd+SOtGsQyyZFQw0ktay9KO0uqKAWkN7hphRtIeWjEvwpKJeLJJ0HrLNmJDkEdzofJ8llmkhU1sJRlbQnNy273oA1r0mCKJPr10x8GDx0b4E5kl/YylXV2zE+ac3MInjwXZT8E5sTP/+0/RnrQGqcNO5OpDEuoPiHjP8yRVzCwM/dzICXxqXjl/lxOJ6eq5mf8MBcWbRqyhmkNouDRiQyXr6gLR2ZJwxlZkjuHjwv1M1FDPxXz7fv9VpdN+vFq+zGbQMuHoJqb1Y0zIp571XNcaRG6JWio4ATfJnFgxhfpWcbTivTQqrWzHNcdW2loXT7dPY6TZVKIM2nZ1uvTYy64bbHvyEQORpUYH+tZDd4I2DgZvdkixHlk8bIHtiU36U6t2eI9P+jyLVPmSflhE1rNMUB05oKhpsusdIdoli8TPQ1mj8Mwr6Lc0Tg40kT4Gevo2WWRhAEydQpmE/uCqmhkeFI4EA3P9OtlIKwajp/LDloJtz7ZhAihu66MQ/ipk4lObcr/s29LYYAAFkRLrKHZnxncaQdB1q3FqPNRUC5s6rmygVKH+W7q+ X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:33:26.2753 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e3a2ec42-d4b8-40b8-3c57-08dc18d1b02d 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: DB5PEPF00014B9B.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB8469 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: h5x1RWibXfB8h7L5Y7FlrwOmx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1705656812903100005 Content-Type: text/plain; charset="utf-8" UEFI Secure variable support can be enabled using Standalone MM for FVP RevC model. The following steps enable UEFI variable service using StandaloneMm: 1. Add MmComminucationDxe. - Enables communication with StandaloneMm. The PcdMmBufferBase & PcdBufferSize definitions are used as the NS Shared Buffer for communication. 2. Use VariableSmmRuntimeDxe - Use Standalone MM instance of Variable Runtime Dxe. 3. Disable caching of variable data as this is cached on the normal world side. This is done to prevent arbitrary accesses. Therefore, set PcdEnableVariableRuntimeCache to FALSE. 4. Although MmUnblockMemoryLib is required for supporting variable caching (which we disabled), we need a NULL instance of the MmUnblockMemoryLib for the build to succeed. Also, the Arm implementation does not support modification of the StandaloneMm memory map from normal world, so we have no real need for MmUnblockMemoryLib. Signed-off-by: levi.yun --- Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc | 49 ++++++++++++++++= +++- Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf | 9 ++++ 2 files changed, 57 insertions(+), 1 deletion(-) diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc b/Platfor= m/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc index f70a4d52ba06f570e017ab5286f06d87193753e5..e7c011cc8abe874ad24f7b6a0c8= b8d0ab0d933f7 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc +++ b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.dsc @@ -25,6 +25,15 @@ [Defines] SKUID_IDENTIFIER =3D DEFAULT FLASH_DEFINITION =3D Platform/ARM/VExpressPkg/ArmVExpress-= FVP-AArch64.fdf + # To allow the use of ueif secure variable feature, set this to TRUE. + DEFINE ENABLE_UEFI_SECURE_VARIABLE =3D FALSE + +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + DEFINE ENABLE_STMM =3D TRUE +!else + DEFINE ENABLE_STMM =3D FALSE +!endif + !ifndef ARM_FVP_RUN_NORFLASH DEFINE EDK2_SKIP_PEICORE=3D1 !endif @@ -53,6 +62,10 @@ [LibraryClasses.common] FileExplorerLib|MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf !endif +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + MmUnblockMemoryLib|MdePkg/Library/MmUnblockMemoryLib/MmUnblockMemoryLibN= ull.inf +!endif + DtPlatformDtbLoaderLib|Platform/ARM/VExpressPkg/Library/ArmVExpressDtPla= tformDtbLoaderLib/ArmVExpressDtPlatformDtbLoaderLib.inf [LibraryClasses.common.DXE_RUNTIME_DRIVER] @@ -71,7 +84,9 @@ [LibraryClasses.common.UEFI_DRIVER, LibraryClasses.common= .UEFI_APPLICATION, Libr [BuildOptions] GCC:*_*_AARCH64_PLATFORM_FLAGS =3D=3D -I$(WORKSPACE)/Platform/ARM/VExpre= ssPkg/Include/Platform/RTSM - +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + GCC:*_*_*_CC_FLAGS =3D -DENABLE_UEFI_SECURE_VARIABLE +!endif ##########################################################################= ###### # @@ -85,6 +100,11 @@ [PcdsFeatureFlag.common] # It could be set FALSE to save size. gEfiMdeModulePkgTokenSpaceGuid.PcdConOutGopSupport|TRUE +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + ## Disable Runtime Variable Cache. + gEfiMdeModulePkgTokenSpaceGuid.PcdEnableVariableRuntimeCache|FALSE +!endif + [PcdsFixedAtBuild.common] # Only one core enters UEFI, and PSCI is implemented in EL3 by ATF gArmPlatformTokenSpaceGuid.PcdCoreCount|1 @@ -92,12 +112,26 @@ [PcdsFixedAtBuild.common] # # NV Storage PCDs. Use base of 0x0C000000 for NOR1 # +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D FALSE gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0FFC0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0FFD0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0FFE0000 gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000 +!endif + + # + # Set the base address and size of the buffer used + # by MM_COMMUNICATE for communication between the + # Normal world edk2 and the StandaloneMm image at S-EL0. + # This buffer is allocated in TF-A. + # +!if $(ENABLE_STMM) =3D=3D TRUE + ## MM Communicate + gArmTokenSpaceGuid.PcdMmBufferBase|0xFF600000 + gArmTokenSpaceGuid.PcdMmBufferSize|0x10000 +!endif gArmTokenSpaceGuid.PcdVFPEnabled|1 @@ -252,6 +286,10 @@ [Components.common] MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf !endif MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf + +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf +!else MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf { NULL|EmbeddedPkg/Library/NvVarStoreFormattedLib/NvVarStoreFormattedL= ib.inf @@ -259,6 +297,8 @@ [Components.common] BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf } MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf +!endif + MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntim= eDxe.inf MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.inf EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf @@ -368,3 +408,10 @@ [Components.common] # SATA Controller # MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf + +!if $(ENABLE_STMM) =3D=3D TRUE + ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf { + + NULL|StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependen= cy.inf + } +!endif diff --git a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf b/Platfor= m/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf index e836691ddf6f9fd7e9abff97a560af6886b14ccb..612535caa7ee518a0bb083461f2= 573e182c78281 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf +++ b/Platform/ARM/VExpressPkg/ArmVExpress-FVP-AArch64.fdf @@ -80,8 +80,14 @@ [FV.FvMain] !if $(SECURE_BOOT_ENABLE) =3D=3D TRUE INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConf= igDxe.inf !endif + +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxe.inf +!else INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.i= nf +!endif + INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRu= ntimeDxe.inf INF MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.i= nf INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf @@ -168,6 +174,9 @@ [FV.FvMain] INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf INF MdeModulePkg/Application/UiApp/UiApp.inf +!if $(ENABLE_STMM) =3D=3D TRUE + INF ArmPkg/Drivers/MmCommunicationDxe/MmCommunication.inf +!endif # # PCI Support -- 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 (#114034): https://edk2.groups.io/g/devel/message/114034 Mute This Topic: https://groups.io/mt/103827100/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 Wed May 15 08:24:38 2024 Delivered-To: importer@patchew.org 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+114035+1787277+3901457@groups.io; arc=fail (BodyHash is different from the expected one); dmarc=fail(p=none dis=none) header.from=arm.com Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1705656815230417.4195418386322; Fri, 19 Jan 2024 01:33:35 -0800 (PST) Return-Path: DKIM-Signature: a=rsa-sha256; bh=6jLuVMdyG4mZ9WneksKZpvxrK0XIqZ1fgT5ehAYkHak=; 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=1705656814; v=1; b=fiUkCevUXNAy17dKg5+HRkeZ3dr/QgDs81QSpTfzOEAoiZfw/wSHsc39rjAiCr25c+/yaKpU TsSpT8oO3hpy8nj/nfmGoLsKU4TY2z4fWpOx3p15L/pOev+nysFaF0OL2U3lC408dv6EECxV+yh WjX3a53ynaElE0EvK98OHxjk= X-Received: by 127.0.0.2 with SMTP id CoLqYY1788612xR1WgauUFHu; Fri, 19 Jan 2024 01:33:34 -0800 X-Received: from EUR05-AM6-obe.outbound.protection.outlook.com (EUR05-AM6-obe.outbound.protection.outlook.com [40.107.22.55]) by mx.groups.io with SMTP id smtpd.web10.18430.1705656813940784712 for ; Fri, 19 Jan 2024 01:33:34 -0800 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=nyghSBJZLjRXIkL8J+Q3rUTlZlHQQHkp9DAUjsi/Kckg3Lxh5BTaxUDwxETd0aPyt+ds5FuGKym6YnqcThgoIZiW/uGO/7NdOiC7mi1o2VBAHQFvmnSM/1Yvn3SEWkG6ApBRprWWHCzoeyLxsvQvN16Zo+L90knL8NIeP+0H8GN7Dsv+1ACvSOynd5I9Insyah/DZ4+BnG9AkdDywZsgpsEzUCX3ylfa+oHHtAfZh6t1LPRcHuEVzLAenVGBv4h/wzF24kWPlclFwR/VtlZmRwWbvRsw7gZN+KkIrxXo5aNw4KJSUQzpBw3Qr+oyxS6R+eczfUivmuyFkw2DTpL1hw== 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=qbGEBhZyf2vu4dHvdFCMyh3OkitJ/lKKvOsqa01Wvt4=; b=Pvv0OV09+7BuU2ATvXcs7aRMngD7tt9zsC4RkFB49g28ouJwc6NXCNANKHaL/lG/tg9VLalq0PLT1NKHJXOt0xoMjdQuiJb5j7bqWXqQgzEJTnvkEv0zSK8J+xkPG7XGY82cvbhc83IdEUhp5D1QBVwFR3bDTiw/4RhtKlBFaw2vblI7pRZ5c5ByuSOG7HWSXwReyI7Wo6sg2FH7he4UAu+FpJHaXJggxGtJ7n6yERbH6eKVvE5jOmgIESP13/cfs8sfrVSBV8POsUWxX7FrhTNRV7Ae18770AqHp6ef6Kf6SOjjNHkxSL1CVuxzA5y5G8snZkylDonKVLFPgMoVBg== 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 DB7PR05CA0047.eurprd05.prod.outlook.com (2603:10a6:10:2e::24) by DB9PR08MB7676.eurprd08.prod.outlook.com (2603:10a6:10:37f::7) 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:29 +0000 X-Received: from DB1PEPF0003922D.eurprd03.prod.outlook.com (2603:10a6:10:2e:cafe::1d) by DB7PR05CA0047.outlook.office365.com (2603:10a6:10:2e::24) 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:29 +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 (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+114035+1787277+3901457@groups.io; helo=mail02.groups.io; 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 DB1PEPF0003922D.mail.protection.outlook.com (10.167.8.100) 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:29 +0000 X-Received: ("Tessian outbound a064b9944658:v228"); Fri, 19 Jan 2024 09:33:29 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 7f664d451c76b422 X-CR-MTA-TID: 64aa7808 X-Received: from c8fb62a1f2cf.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id E15E283E-86A2-433A-A478-40F95A9BBA32.1; Fri, 19 Jan 2024 09:33:23 +0000 X-Received: from EUR05-VI1-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c8fb62a1f2cf.2 (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=BUhGI2NVqqzj3q8xx9+TQ/3Bppb91qS/nfXYGm/LLtYqg3psBKcDE58bZmsk7RSv6pvQTH1BP1ZSomyO6ot7ziGiyRP6HbpR8J0dVOPA0ITtFjA2z4a7R5keGut+qHE67tuyHcH7psfJdlfzXYp7yhy/e0vhoz9s6d8pU+vDMKyQ9n8AxQzypLevwoXRoJWu96Flvv8bP3DCpFOPtvV8+3v51pudZMgRpdkKuMc4jtlUWJ6fYHuM4ReFYyG9wgHXx7nUqrxn9m/ZP6JNwRfXSFhfkVHs6UCDW6qqQUqC2N6kI/c4xr7Ad3/kpqEPqfMWlqsX2TKkDYJW2rw2vtih9g== 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=qbGEBhZyf2vu4dHvdFCMyh3OkitJ/lKKvOsqa01Wvt4=; b=nDloz1qW1Mu2PR5EgbH3s6L2LUtuU4+2kR3BYLsa0mjn947YIBTooYdr1SRrRzaDBxbqqwt+tAhCGMS4nbIYGfXNkeEbkr5najePu1SUQKaP1F0nSWyEG0wIUQqAW++LH6sy+vui10V8D3VAamQ2NK2J8BmZFcmcLN9ZEbdh9hEa3i9rQEqcxq38mqvVm/X3Xi2c9HlXoUO7wKLoaqCcSHtdC1h4M9oHBbBnaGbCo96UcgiQcqvh5vjcFpDhlXgFCdxnwETJL/uLfYKjXr8SiNn74D2/N7qp6N5JSCdpXsisALCh7zed3tnmELrLoUAhenEClcPq0qiLobqpOaXDrA== 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 DU2PR04CA0038.eurprd04.prod.outlook.com (2603:10a6:10:234::13) by DBBPR08MB5914.eurprd08.prod.outlook.com (2603:10a6:10:200::8) 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:17 +0000 X-Received: from DU6PEPF0000A7E2.eurprd02.prod.outlook.com (2603:10a6:10:234:cafe::2a) by DU2PR04CA0038.outlook.office365.com (2603:10a6:10:234::13) 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-EX04.Arm.com (10.251.24.32) 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 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 3/3] Platform/Arm: Add Standalone MM support for FVP Date: Fri, 19 Jan 2024 09:33:05 +0000 Message-ID: <20240119093305.2258464-4-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_|DBBPR08MB5914:EE_|DB1PEPF0003922D:EE_|DB9PR08MB7676:EE_ X-MS-Office365-Filtering-Correlation-Id: 3b3779ec-5b38-44df-34da-08dc18d1b1fc 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: fdHbL/3YcUd8S8YQ109duRpwu5VKXtpaBZQdJ5VrEaYZ6Tz5CqIQYMhpaGKZVgmg79Wn63adn5s0UsGc7Zz70iyrejtgk+cP6ixiPAZ2m8ZgecPkco4+CzHL5zMCjcKiT7Io62Pa4yClO97kVvifcN5PNywvOoFm+iF6RzKb/0SjOlMnS4dl2fOARfwN/O1OW96eQViTrbqVWyjPimoANfm0kFho+TDGmIMiozhSh8DEOHPd3JWq9S5SH0rZaS8S20VohSqO7/ralgLcUhoJ7v1HnugJpK6V+mpXK+bZupTFlUdHAN2qPEjSufNF3D6/PWgVqrakZcHcL9E0A7HLD6ghW1Jwt6W28rT7U6r29CITXT0razwss06UPQP3M2FaStDzdZRvirnXK6vykjG0TYTX9Lv2OJh8m0QWarzgSZyE3y0Xr5t4U7uj5XaW4GdTf5C0ME0tIMP7ZOhMgR198sQ/OzL/Crs2ndZdkiWa14eKd9iuW6nlYNvf9lknsPXA3waftMyUiZuOwB4cStqjFzBJgP/s/hxAxd/wmZqqmPXNHIjE4S103X5/AUOCN2vxD+85u0ID3GKLN6YZTso/xRBQIo6Yv4kmZxAvSXibX4XY05E5fkWQc2EmRnkVA4xg7weZTVY9KjJ5Ye+TFLnak6O6KPP+CltagG+iWaN5ukdqcUj1IW0d1VapV8OMSchJ+HMWoUhg6jUNbOe9NdZEFz97kKTe1LqbdZ4ncA44NRzKmG809uu9CrpDSoeQo4F3YpaRLFtp4EYuoctaTIt1nQ== 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)(396003)(39860400002)(346002)(136003)(376002)(230922051799003)(451199024)(82310400011)(1800799012)(64100799003)(186009)(36840700001)(46966006)(40470700004)(83380400001)(2616005)(26005)(6666004)(1076003)(7696005)(426003)(86362001)(4326008)(54906003)(8936002)(8676002)(70206006)(19627235002)(478600001)(110136005)(70586007)(356005)(336012)(36860700001)(81166007)(82740400003)(316002)(47076005)(41300700001)(40460700003)(40480700001)(30864003)(2906002)(5660300002)(36756003)(36900700001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB5914 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DB1PEPF0003922D.eurprd03.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: c72f2d3e-b644-4923-4055-08dc18d1aa8e X-Microsoft-Antispam-Message-Info: sNcS9HQgOy+QxFoCh/wio5xh9u107JN0UBhufGnVzDUExYw1N1isr5rqRN6JcMKLEp2GxFejRMi6ANJ5g1Wq2yr4LJGGcn5k1Abm9hedWYIuxhm//RKJaUOzfd3j6/7FYpuhKxmxbMWFNJ8k0IqKkVTGREtNXh3okqtgw613I77LqCkYBwqJh0j24rSx9HE5FWfKV90ssx8Ab1Xt3dsT4n9/IyE8VqGp6cVhqL0Gbe37dvg/VEkuWUtHncaB7qo7xi+BOuGsupc7WzQIGK17yb0bIoYJN/jcCH/Su59DSxo265iMIr1h7wrlwnJ8uY6TJlcHqUKysuoNTEAWUgZomtbDxnPcj/DjExVunaon7O8rOPYKl+3sLfuGzC7BqhV2Bzoun0vUa8h6AuvyGe3VQGMhwSzU2r1pRkjSJn9e2+HpcHj3cx5zdiVQzJkZ6deYL2EkSTmxxcwWPsCNA1VyekeyCzLQKsQAzJPF/nhOF6s77yzqqhwwiRFgJrNHTLdGFKG56GxohDpUvgCNsuRGzEV4jcOTBSUzljChvrD688zqBUN4q5glwMWMBhr8PnV3rp89mNMJcbMJiLxdN1altu2exlktniovOLWd4+OzQEfGFtAAXpXZV+uP8fNsCsUZXkE3/H5k7HXVJIlUU4gI6VH/3lbuyK2Rn5xtnXUXAuQPOfYA15dueyzaCN95D6M8m1TcudTXSm3NQfdxI1/fGRcftR1OngZA4+M9N9F3Rj73vVv/ZJPrr+5b01+SD6G0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2024 09:33:29.3095 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3b3779ec-5b38-44df-34da-08dc18d1b1fc 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: DB1PEPF0003922D.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7676 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: M3JIdPjHQdvytQ3A93zO9WCNx1787277AA= Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1705656816914100011 Content-Type: text/plain; charset="utf-8" Add Standalone MM support for FVP model. Signed-off-by: levi.yun --- Platform/ARM/VExpressPkg/PlatformStandaloneMm.dsc | 208 ++++++++++++++++++= ++ Platform/ARM/VExpressPkg/PlatformStandaloneMm.fdf | 106 ++++++++++ 2 files changed, 314 insertions(+) diff --git a/Platform/ARM/VExpressPkg/PlatformStandaloneMm.dsc b/Platform/A= RM/VExpressPkg/PlatformStandaloneMm.dsc new file mode 100644 index 0000000000000000000000000000000000000000..0e77b76cae698c5e0cba3ce3249= b88e4cffc98a0 --- /dev/null +++ b/Platform/ARM/VExpressPkg/PlatformStandaloneMm.dsc @@ -0,0 +1,208 @@ +## @file +# Standalone MM Platform. +# +# Copyright (c) 2024, 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 StandaloneMm + PLATFORM_GUID =3D 9A4BBA60-B4F9-47C7-9258-3BD77CAE9322 + PLATFORM_VERSION =3D 1.0 + DSC_SPECIFICATION =3D 0x0001001C +!ifdef $(EDK2_OUT_DIR) + OUTPUT_DIRECTORY =3D $(EDK2_OUT_DIR) +!else + OUTPUT_DIRECTORY =3D Build/ArmVExpress-FVP-AArch64 +!endif + SUPPORTED_ARCHITECTURES =3D AARCH64|ARM + BUILD_TARGETS =3D DEBUG|RELEASE + SKUID_IDENTIFIER =3D DEFAULT + FLASH_DEFINITION =3D Platform/ARM/VExpressPkg/PlatformStan= daloneMm.fdf + DEFINE DEBUG_MESSAGE =3D TRUE + + # To allow the use of ueif secure variable feature, set this to TRUE. + DEFINE ENABLE_UEFI_SECURE_VARIABLE =3D FALSE + + # LzmaF86 + DEFINE COMPRESSION_TOOL_GUID =3D D42AE6BD-1352-4bfb-909A-CA72A6EAE889 + +##########################################################################= ###### +# +# Library Class section - list of all Library Classes needed by this Platf= orm. +# +##########################################################################= ###### + +!include MdePkg/MdeLibs.dsc.inc + +[LibraryClasses] + # + # Basic + # + BaseLib|MdePkg/Library/BaseLib/BaseLib.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + + CacheMaintenanceLib|MdePkg/Library/BaseCacheMaintenanceLib/BaseCacheMain= tenanceLib.inf + DebugLib|MdePkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort.inf + DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseD= ebugPrintErrorLevelLib.inf + ExtractGuidedSectionLib|EmbeddedPkg/Library/PrePiExtractGuidedSectionLib= /PrePiExtractGuidedSectionLib.inf + FvLib|StandaloneMmPkg/Library/FvLib/FvLib.inf + HobLib|StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf + IoLib|MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf + MemLib|StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf + MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmCoreMemoryAlloca= tionLib/StandaloneMmCoreMemoryAllocationLib.inf + MmServicesTableLib|MdePkg/Library/StandaloneMmServicesTableLib/Standalon= eMmServicesTableLib.inf + PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf + PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeC= offExtraActionLibNull.inf + PeCoffLib|MdePkg/Library/BasePeCoffLib/BasePeCoffLib.inf + PrintLib|MdePkg/Library/BasePrintLib/BasePrintLib.inf + ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseRepor= tStatusCodeLibNull.inf + StandaloneMmCoreEntryPoint|StandaloneMmPkg/Library/StandaloneMmCoreEntry= Point/StandaloneMmCoreEntryPoint.inf + StandaloneMmDriverEntryPoint|MdePkg/Library/StandaloneMmDriverEntryPoint= /StandaloneMmDriverEntryPoint.inf + VariableMmDependency|StandaloneMmPkg/Library/VariableMmDependency/Variab= leMmDependency.inf + + # ARM PL011 UART Driver + PL011UartClockLib|ArmPlatformPkg/Library/PL011UartClockLib/PL011UartCloc= kLib.inf + PL011UartLib|ArmPlatformPkg/Library/PL011UartLib/PL011UartLib.inf + SerialPortLib|ArmPlatformPkg/Library/PL011SerialPortLib/PL011SerialPortL= ib.inf + +[LibraryClasses.AARCH64, LibraryClasses.ARM] + ArmLib|ArmPkg/Library/ArmLib/ArmBaseLib.inf + StandaloneMmMmuLib|ArmPkg/Library/StandaloneMmMmuLib/ArmMmuStandaloneMmL= ib.inf + ArmSvcLib|ArmPkg/Library/ArmSvcLib/ArmSvcLib.inf + CacheMaintenanceLib|ArmPkg/Library/ArmCacheMaintenanceLib/ArmCacheMainte= nanceLib.inf + PeCoffExtraActionLib|StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActi= onLib/StandaloneMmPeCoffExtraActionLib.inf + + NULL|ArmPkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib.inf + NULL|MdePkg/Library/BaseStackCheckLib/BaseStackCheckLib.inf + +[LibraryClasses.common.MM_CORE_STANDALONE] + HobLib|StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHo= bLib.inf + +[LibraryClasses.common.MM_STANDALONE] + MemoryAllocationLib|StandaloneMmPkg/Library/StandaloneMmMemoryAllocation= Lib/StandaloneMmMemoryAllocationLib.inf + + BaseCryptLib|CryptoPkg/Library/BaseCryptLib/SmmCryptLib.inf + IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf + OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf + RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf + PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf + SynchronizationLib|MdePkg/Library/BaseSynchronizationLib/BaseSynchroniza= tionLib.inf + TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplat= e.inf + SafeIntLib|MdePkg/Library/BaseSafeIntLib/BaseSafeIntLib.inf + + # STMM for Variable runtime service. +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + NorFlashPlatformLib|Platform/ARM/VExpressPkg/Library/NorFlashArmVExpress= Lib/NorFlashStMmLib.inf + VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf + VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseV= ariableFlashInfoLib.inf + AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf +!endif + +##########################################################################= ###### +# +# Pcd Section - list of all EDK II PCD Entries defined by this Platform +# +##########################################################################= ###### +[PcdsFixedAtBuild] + gEfiMdePkgTokenSpaceGuid.PcdDebugPrintErrorLevel|0x8000008F + gEfiMdePkgTokenSpaceGuid.PcdDebugPropertyMask|0xff + gEfiMdePkgTokenSpaceGuid.PcdDebugClearMemoryValue|0xAF + + ## PL011 - Serial Terminal. + gEfiMdeModulePkgTokenSpaceGuid.PcdSerialRegisterBase|0x1c090000 + gEfiMdePkgTokenSpaceGuid.PcdUartDefaultBaudRate|115200 + gEfiMdePkgTokenSpaceGuid.PcdMaximumGuidedExtractHandler|0x2 + + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxVariableSize|0x2000 + gEfiMdeModulePkgTokenSpaceGuid.PcdMaxAuthVariableSize|0x2800 + + # + # NV Storage PCDs. + # Use its base last 256KB block for NOR1 flash. + # NOR1 base is 0x0C000000 for and its size 64MB. + # Therefore, 0x0C000000 + 0x04000000 (64MB) - 0x40000 (256KB) =3D 0x0FFC= 0000. + # +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableBase|0x0FFC0000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageVariableSize|0x00010000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingBase|0x0FFD0000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwWorkingSize|0x00010000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase|0x0FFE0000 + gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize|0x00010000 +!endif + +##########################################################################= ######################### +# +# Components Section - list of the modules and components that will be pro= cessed by compilation +# tools and the EDK II tools to generate PE32/PE32+/C= off image files. +# +# Note: The EDK II DSC file is not used to specify how compiled binary ima= ges get placed +# into firmware volume images. This section is just a list of module= s to compile from +# source into UEFI-compliant binaries. +# It is the FDF file that contains information on combining binary f= iles into firmware +# volume images, whose concept is beyond UEFI and is described in PI= specification. +# Binary modules do not need to be listed in this section, as they s= hould be +# specified in the FDF file. For example: Shell binary (Shell_Full.e= fi), FAT binary (Fat.efi), +# Logo (Logo.bmp), and etc. +# There may also be modules listed in this section that are not requ= ired in the FDF file, +# When a module listed here is excluded from FDF file, then UEFI-com= pliant binary will be +# generated for it, but the binary will not be put into any firmware= volume. +# +##########################################################################= ######################### +[Components.common] + # + # MM Core + # + StandaloneMmPkg/Core/StandaloneMmCore.inf + StandaloneMmPkg/Library/FvLib/FvLib.inf + StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmCoreEntry= Point.inf + StandaloneMmPkg/Library/StandaloneMmCoreHobLib/StandaloneMmCoreHobLib.inf + StandaloneMmPkg/Library/StandaloneMmCoreMemoryAllocationLib/StandaloneMm= CoreMemoryAllocationLib.inf + StandaloneMmPkg/Library/StandaloneMmHobLib/StandaloneMmHobLib.inf + StandaloneMmPkg/Library/StandaloneMmMemLib/StandaloneMmMemLib.inf + StandaloneMmPkg/Library/StandaloneMmMemoryAllocationLib/StandaloneMmMemo= ryAllocationLib.inf + StandaloneMmPkg/Library/VariableMmDependency/VariableMmDependency.inf + +[Components.AARCH64, Components.ARM] + StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf + StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/StandaloneMmPeC= offExtraActionLib.inf + +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf + MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf { + + DevicePathLib|MdePkg/Library/UefiDevicePathLib/UefiDevicePathLib.inf + NULL|MdeModulePkg/Library/VarCheckUefiLib/VarCheckUefiLib.inf + NULL|MdeModulePkg/Library/VarCheckPolicyLib/VarCheckPolicyLibStandal= oneMm.inf + BaseMemoryLib|MdePkg/Library/BaseMemoryLib/BaseMemoryLib.inf + VariablePolicyLib|MdeModulePkg/Library/VariablePolicyLib/VariablePol= icyLib.inf + VariablePolicyHelperLib|MdeModulePkg/Library/VariablePolicyHelperLib= /VariablePolicyHelperLib.inf + } + MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStandalon= eMm.inf +!endif + +##########################################################################= ######################### +# +# BuildOptions Section - Define the module specific tool chain flags that = should be used as +# the default flags for a module. These flags are a= ppended to any +# standard flags that are defined by the build proc= ess. They can be +# applied for any modules or only those modules wit= h the specific +# module style (EDK or EDKII) specified in [Compone= nts] section. +# +##########################################################################= ######################### +[BuildOptions.AARCH64] + GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 -march=3Darmv8-a+= nofp -mstrict-align + GCC:*_*_AARCH64_PLATFORM_FLAGS =3D=3D -I$(WORKSPACE)/Platform/ARM/VExpre= ssPkg/Include/Platform/RTSM + GCC:*_*_*_CC_FLAGS =3D -mstrict-align + +[BuildOptions.ARM] + GCC:*_*_*_DLINK_FLAGS =3D -z common-page-size=3D0x1000 -march=3Darmv7-a + GCC:*_*_*_CC_FLAGS =3D -fno-stack-protector diff --git a/Platform/ARM/VExpressPkg/PlatformStandaloneMm.fdf b/Platform/A= RM/VExpressPkg/PlatformStandaloneMm.fdf new file mode 100644 index 0000000000000000000000000000000000000000..f4715433d107d38fd57205d5466= 07e923d0aff9b --- /dev/null +++ b/Platform/ARM/VExpressPkg/PlatformStandaloneMm.fdf @@ -0,0 +1,106 @@ +# +# Copyright (c) 2024, Arm Limited. All rights reserved. +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# + +##########################################################################= ###### +# +# FD Section +# The [FD] Section is made up of the definition statements and a +# description of what goes into the Flash Device Image. Each FD section +# defines one flash "device" image. A flash device image may be one of +# the following: Removable media bootable image (like a boot floppy +# image,) an Option ROM image (that would be "flashed" into an add-in +# card,) a System "Flash" image (that would be burned into a system's +# flash) or an Update ("Capsule") image that will be used to update and +# existing system flash. +# +##########################################################################= ###### + +[FD.BL32_AP_MM] +# See macro definition BL32_BASE in TF-A code at include/plat/arm/common/a= rm_def.h +BaseAddress =3D 0xff200000|gArmTokenSpaceGuid.PcdFdBaseAddress + +# Maximum size of BL32 Image in TF-A (see include/plat/arm/common/arm_spm.= def.h) +Size =3D 0x00300000|gArmTokenSpaceGuid.PcdFdSize + +ErasePolarity =3D 0 +BlockSize =3D 0x00001000 +NumBlocks =3D 0x300 + +# +# Limit the size of the binary to 1MB. +# If required this can be increased up to PcdFdSize. +# +0x00000000|0x00100000 +gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize +FV =3D FVMAIN_COMPACT + +[FV.FVMAIN_COMPACT] +FvAlignment =3D 16 +ERASE_POLARITY =3D 1 +MEMORY_MAPPED =3D TRUE +STICKY_WRITE =3D TRUE +LOCK_CAP =3D TRUE +LOCK_STATUS =3D TRUE +WRITE_DISABLED_CAP =3D TRUE +WRITE_ENABLED_CAP =3D TRUE +WRITE_STATUS =3D TRUE +WRITE_LOCK_CAP =3D TRUE +WRITE_LOCK_STATUS =3D TRUE +READ_DISABLED_CAP =3D TRUE +READ_ENABLED_CAP =3D TRUE +READ_STATUS =3D TRUE +READ_LOCK_CAP =3D TRUE +READ_LOCK_STATUS =3D TRUE + + INF StandaloneMmPkg/Core/StandaloneMmCore.inf + INF StandaloneMmPkg/Drivers/StandaloneMmCpu/StandaloneMmCpu.inf + +!if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE + INF Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf + INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteStand= aloneMm.inf + INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableStandaloneMm.inf +!endif + +##########################################################################= ###### +# +# Rules are use with the [FV] section's module INF type to define +# how an FFS file is created for a given INF file. The following Rule are = the default +# rules for the different module type. User can add the customized rules t= o define the +# content of the FFS file. +# +##########################################################################= ###### + + +##########################################################################= ## +# Example of a DXE_DRIVER FFS file with a Checksum encapsulation section = # +##########################################################################= ## +# +#[Rule.Common.DXE_DRIVER] +# FILE DRIVER =3D $(NAMED_GUID) { +# DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_= NAME).depex +# COMPRESS PI_STD { +# GUIDED { +# PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi +# UI STRING=3D"$(MODULE_NAME)" Optional +# VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_N= UMBER) +# } +# } +# } +# +##########################################################################= ## + +[Rule.Common.MM_CORE_STANDALONE] + FILE SEC =3D $(NAMED_GUID) RELOCS_STRIPPED FIXED { + PE32 PE32 Align =3D Auto $(INF_OUTPUT)/$(MODULE_NAME).efi + } + +[Rule.Common.MM_STANDALONE] + FILE MM_STANDALONE =3D $(NAMED_GUID) { + SMM_DEPEX SMM_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex + PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi + UI STRING=3D"$(MODULE_NAME)" Optional + VERSION STRING=3D"$(INF_VERSION)" Optional BUILD_NUM=3D$(BUILD_NUMBE= R) + } -- 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 (#114035): https://edk2.groups.io/g/devel/message/114035 Mute This Topic: https://groups.io/mt/103827101/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-