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.67]) by mx.groups.io with SMTP id smtpd.web11.10078.1621951046006007514 for ; Tue, 25 May 2021 06:57:26 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@armh.onmicrosoft.com header.s=selector2-armh-onmicrosoft-com header.b=l+FSFw9J; spf=pass (domain: arm.com, ip: 40.107.21.67, mailfrom: sami.mujawar@arm.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qIzs29/IBS6vUpneOAYcY9Iws5fndfHbmFsHQNEQqMM=; b=l+FSFw9Jzp1Og+LRsnh6BdWzCUmQDZJ8qA1/AFS74/6N4iP328J2YM5PlYdyDv9tjG/nLyQekgHxp9t0TZRJ3ugP00EPJG708rK5JOzgE+D7PL+3DQ+S04R2G0NhRoiQ3ZAcXtBAXglIJHDrtKK9yMdPd/APK2qOT0DLBBKKWVw= Received: from AM6PR04CA0023.eurprd04.prod.outlook.com (2603:10a6:20b:92::36) by DB7PR08MB3003.eurprd08.prod.outlook.com (2603:10a6:5:1b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.25; Tue, 25 May 2021 13:57:23 +0000 Received: from VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com (2603:10a6:20b:92:cafe::82) by AM6PR04CA0023.outlook.office365.com (2603:10a6:20b:92::36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Tue, 25 May 2021 13:57:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; edk2.groups.io; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com;edk2.groups.io; dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by VE1EUR03FT043.mail.protection.outlook.com (10.152.19.122) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Tue, 25 May 2021 13:57:22 +0000 Received: ("Tessian outbound 6c8a2be3c2e7:v92"); Tue, 25 May 2021 13:57:22 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 68f3520c7f0711ae X-CR-MTA-TID: 64aa7808 Received: from c112461fea67.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0ADFD661-FB86-4DED-BCF6-13728F5A9D98.1; Tue, 25 May 2021 13:57:11 +0000 Received: from EUR01-DB5-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id c112461fea67.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Tue, 25 May 2021 13:57:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f7858v9fmG2KZHaxzRYlL62QHPxrFq9+GPpPUySgF26riWHr2BGXbYwP8kDpkMgNdvNNp0jARjOo6bug8irGSOIPpnSuxOJZowgP9DjScDGPUtYnGnntwfeqxVq79q8uoni8NeTJ81QRCbE/rshQdEtNFcmYOTM9qd5wjZIBZ3gF87wqez2Yh9wS59vvClGSDnu5SV1upiEvkFiu3d4aS0hBIQsBAVd0dpbMdGmLjHwSvqsri7VCNO5/UUUocM7OeFCLBklQks/GN7e5xWfkNMecpVhn9KRITYkip+2YNRwuVjTTql2upoCLv2xUXdB/9jzmN7/40qeYvnqq97aXqw== 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=qIzs29/IBS6vUpneOAYcY9Iws5fndfHbmFsHQNEQqMM=; b=kIZ+LZt7D+IfC8FN+DgXR8Jx4wqCh1MMNMtTM3gGz4ny/7x2sDA2yUUg4ok/QJMPHTwxHKK6bNdE0LTOhFSl16ec8pbjlOE3vvHZzWlW1MiD9+BsnAT3MMuhS1e1s3Y/qTo3q4qeQ54VQw4DFcvm16rOfw+VzqEjofmTl4Hs4rHw1HQ3j2bGKgxHNQSV8pOop/K2jGh8kBrffYPmkDdEbrrX+Ie+lMK/F5utgcGTEhZiuVO0Vg3/FuJYY5JFUuTT0IC6m3AfJ4EKYDUHloGdltvyBy7oY1I/pU5cd4TUolfsUPdXqnKv/42QYI1qBvJt6f7auGq2UzOCasPow44sEw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector2-armh-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qIzs29/IBS6vUpneOAYcY9Iws5fndfHbmFsHQNEQqMM=; b=l+FSFw9Jzp1Og+LRsnh6BdWzCUmQDZJ8qA1/AFS74/6N4iP328J2YM5PlYdyDv9tjG/nLyQekgHxp9t0TZRJ3ugP00EPJG708rK5JOzgE+D7PL+3DQ+S04R2G0NhRoiQ3ZAcXtBAXglIJHDrtKK9yMdPd/APK2qOT0DLBBKKWVw= Authentication-Results-Original: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by AM6PR08MB3224.eurprd08.prod.outlook.com (2603:10a6:209:47::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27; Tue, 25 May 2021 13:57:09 +0000 Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::80cb:878d:c8f1:2688%7]) with mapi id 15.20.4150.027; Tue, 25 May 2021 13:57:09 +0000 Subject: Re: [edk2-platforms][PATCH V1 2/3] Platform/Sgi: add StandaloneMM usable NorFlashPlatformLib To: Sayanta Pattanayak , devel@edk2.groups.io Cc: Ard Biesheuvel , nd@arm.com References: <20210524172300.28754-1-sayanta.pattanayak@arm.com> <20210524172300.28754-3-sayanta.pattanayak@arm.com> From: "Sami Mujawar" Message-ID: <6698738e-5183-24ea-9978-fb16fc2d47dc@arm.com> Date: Tue, 25 May 2021 14:57:08 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0.1 In-Reply-To: <20210524172300.28754-3-sayanta.pattanayak@arm.com> X-Originating-IP: [217.140.106.52] X-ClientProxiedBy: LO2P265CA0258.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::30) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [10.1.196.43] (217.140.106.52) by LO2P265CA0258.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:8a::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.23 via Frontend Transport; Tue, 25 May 2021 13:57:09 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6730e391-fcaf-4f81-b7ca-08d91f850546 X-MS-TrafficTypeDiagnostic: AM6PR08MB3224:|DB7PR08MB3003: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: x-checkrecipientrouted: true NoDisclaimer: true X-MS-Oob-TLC-OOBClassifiers: OLM:8882;OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: Q4e34BjwvhQuEhhv3wEhQf3m/8+OWw0e5eNVbWDULE2q6umBMz0CdsuBK7A2fVixbNjK5MFJP4V0oHfbej/r8CAJHvN1AWUw+aCv7zIjHKSEtPqPDTcrGDAYfWpoD0Yv6lvbgk3YYwuqs+lV9VSXVF8wYlX1NPd8HdxPe0/SqaGbOvw/bLKyeTl5pzFmLOBqfnxWrW2hT6PxiFUoCYSrixh/8HCjrKYz2SAQHLIuw9zsxRDqHtTAxToaWRrUOsuYusAWmDNMrw6CdTIAU2+GQ86XFhdacYs6pfCaWpOf1J4mZdTL9UJq6VoM4nT3WQIukh/XCFixMh8gKXVMHvn6Jno1h869+osALnbgkVRkJbeEC6EtKGWk9JVvxl8PtVWE7uycIb+jfdfpQZxbP4tWak2NqGc/+1zQXbc51qEfZCmtv9LRBMKybyfG2wi/xnMKY9XlDDLipzk5+fkLKzu3FhE/jAIpEd6kSj7/wo9cpBlODAICVniRStWpaXQyau7UlP5QvsummtDBWSAFlAoIccApRpynzWOM1vLKHKC5WQA3oRIGE8xrVWFJ+Ro0pJA68NeUqoT210r6BE1hUqnPT+vdIO1R/t4eSM+CL1ewdJ9jklQOSSFDliH0tgTqNwrRtVonNohf42YduJBU9LoP2i3y8gnNi4aeRSGawBI6vd7thXHvpliEG41w5PA2uUHxmqg5NMPHMmsWdgntEPTYwfsrBYjecu1vml4rj9AUMbU= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(366004)(66946007)(956004)(86362001)(19627235002)(36756003)(16526019)(186003)(52116002)(66556008)(44832011)(38350700002)(2906002)(66476007)(6486002)(5660300002)(38100700002)(83380400001)(31686004)(8936002)(31696002)(53546011)(16576012)(26005)(4326008)(2616005)(498600001)(8676002)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 2OYyJAFTwXdWaewgSIVgnnl4Z/7mJhVuVI+mwUiUV4c1hsK4JqbdhJcc8NRkWdX7xp+ooiRiHO7sKPXk2See2Uh3MXMZeY1fOEYLlcKFlz1djHmiBTaUNnljZaqmSCuFLXGvzvRQL63H+pGvxHC98R5axHAsf4XmgU91jh+OD1GWGTEYpoimdwGSDmQs/pz2sUIagUGaidOhroonw32RE3iNliolE0a6nTK4kOKgn50X1aXI+bZnvuO1DUAhBCUjOd1rm68A58tFxVcDz7Kn4p6+57OoABVGVpsHg72fD4hVz2yuHkYJ7JqrH9GRc4kaL2B1CA/ZrdWvhIHGRYlrNzVSxQDX4pcw1yFmlmDK9W6zITXyNYCMuBdh/Jo1/JmAfFND+F98rS7qtvkU4oS+sjXLjq2Wg1zzmNyEPvIdSdMAnBfD3wDX70OXT+4VXwuq8rPOJO1sQcRYxWpCXNtDiYCjJJggbhiCNqMDoT6dVNgYVHeXYBkp4FSDovol2dd6KYGInvO2fafeWaN85s2loky19keXMgVm+KXghN7HI5ebrzIMtIHGny2etZPjgBMiujUsxjnqDb1noL8GI2NIuor0yJnZ0Z8HvcgCoijqw8ImP4jxswX7Sul1sv+1uXQdrO82En63olE7ZsjkLuY7B1WGHd0nbS8hAk/8ZTVfoF161RUBn4oLWzuPOWBieyHhIKSzubg1JA7FGd+lWIn6yEGwqBdEb2V4IAMxb36RYq3b9icYMCMYOUIVa+HxCFE/ X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR08MB3224 Original-Authentication-Results: arm.com; dkim=none (message not signed) header.d=none;arm.com; dmarc=none action=none header.from=arm.com; Return-Path: Sami.Mujawar@arm.com X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Office365-Filtering-Correlation-Id-Prvs: 296c4747-d9b3-4422-9bfa-08d91f84fd53 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MJCCELC/JV96WyCMn953k7EfNu8UlgIXeCQ8zBSLaVHlm5nOTcSr4b7B+7Sy8B7gck0tjw1Y6e0V4oFadVh73yaJtwDX/K/SOGeShcZ99SSxlipgcfM92/zmHaXOhjH4Mr+R959Oj+6mpauGxb3VaujgY2I67nTIOPr5e52s8Yzm9hS6zifnhe6nrOHjiROOG94mYS7I8mBAhJD8chkmP2wGqZ2SvzORytdA5SGtw4OOsu+1ddULTH2M5TSMr+xqj5xvOKCgwTh+WswdxSvA3WnD5hqSfsYuIByvoLsDHOcFpcNqPNKxDhseVoDm9AYjeFSin+8dCn/gHeGGV5PNcGNjjqg3yLXnL1SZV2MjXaMjJSIdrNMWO6tHX6DHetZYLR0nXFQOvk0ekeK63hikeCJaoQkuYRHERKVsR9YBUaelBObAiC/mU9sPZ3VVmagNu1Jtq+KM+V0RgikjpHUihDghgRYAYKB2h5RyqYbfCdq18IhlBe32kpsN4jjDh1pK0KeQKHKpuKhy8wd/yPdF8xv3enoFef4PK2hgN5OSlWjth0zRqFJ5Cc5hunv0WqwMcF06MnQdTe/u71YDJYI3/SUrH+isiHTZKOyucDoFhXNcqm4UXLhqzu4uNsiWGgtTNpddhilXZj7rlZa7fj62Gk0iWEk7Wes8WkR3UItyFFOUXUg5/68mZTzV4/w/CHCj X-Forefront-Antispam-Report: CIP:63.35.35.123;CTRY:IE;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:64aa7808-outbound-1.mta.getcheckrecipient.com;PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com;CAT:NONE;SFS:(4636009)(136003)(39860400002)(396003)(346002)(376002)(46966006)(36840700001)(6486002)(26005)(70206006)(70586007)(2906002)(36756003)(36860700001)(19627235002)(956004)(44832011)(2616005)(81166007)(356005)(4326008)(53546011)(336012)(186003)(16526019)(316002)(16576012)(5660300002)(31686004)(8936002)(82740400003)(83380400001)(478600001)(8676002)(82310400003)(31696002)(47076005)(86362001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 May 2021 13:57:22.7998 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6730e391-fcaf-4f81-b7ca-08d91f850546 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: VE1EUR03FT043.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR08MB3003 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB Hi Sayanta, I have a minor suggestion maked inline as [SAMI]. Otherwise this patch looks good to me. With that addressed. Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 24/05/2021 06:22 PM, Sayanta Pattanayak wrote: > Add the NorFlashPlatformLib library instance that can be linked with > MM_STANDALONE modules that implement a secure variable storage. The > third instance of the NOR flash is used as the non-volatile storage. > > Signed-off-by: Sayanta Pattanayak > --- > Platform/ARM/SgiPkg/SgiPlatform.dec | 1 + > Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf | 33 ++++++++ > Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.c | 82 ++++++++++++++++++++ > 3 files changed, 116 insertions(+) > > diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dec b/Platform/ARM/SgiPkg/SgiPlatform.dec > index 3effd49592ea..af08ed153eae 100644 > --- a/Platform/ARM/SgiPkg/SgiPlatform.dec > +++ b/Platform/ARM/SgiPkg/SgiPlatform.dec > @@ -54,6 +54,7 @@ > > gArmSgiTokenSpaceGuid.PcdSmcCs0Base|0|UINT64|0x0000000C > gArmSgiTokenSpaceGuid.PcdSmcCs1Base|0|UINT64|0x0000000D > + gArmSgiTokenSpaceGuid.PcdSmcCs2Base|0|UINT64|0x00001000 > gArmSgiTokenSpaceGuid.PcdSysPeriphBase|0x00000000|UINT64|0x0000000E > gArmSgiTokenSpaceGuid.PcdSysPeriphSysRegBase|0x0|UINT64|0x0000000F > > diff --git a/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf b/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf > new file mode 100644 > index 000000000000..96bbf1e42313 > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.inf > @@ -0,0 +1,33 @@ > +## @file > +# StandaloneMM instance of NOR Flash library. > +# > +# Copyright (c) 2021, ARM Limited. All rights reserved. > +# SPDX-License-Identifier: BSD-2-Clause-Patent > +# > +## > + > +[Defines] > + INF_VERSION = 0x0001001A > + BASE_NAME = NorFlashMmLib > + FILE_GUID = 2ce22190-b933-4d1e-99ba-8bf1f0768255 > + MODULE_TYPE = MM_STANDALONE > + VERSION_STRING = 1.0 > + PI_SPECIFICATION_VERSION = 0x00010032 > + LIBRARY_CLASS = NorFlashPlatformLib > + > +[Sources.common] > + StandaloneMmNorFlashLib.c > + > +[Packages] > + ArmPlatformPkg/ArmPlatformPkg.dec > + MdePkg/MdePkg.dec > + Platform/ARM/SgiPkg/SgiPlatform.dec > + > +[LibraryClasses] > + BaseLib > + DebugLib > + IoLib > + > +[FixedPcd] > + gArmSgiTokenSpaceGuid.PcdSysPeriphSysRegBase > + gArmSgiTokenSpaceGuid.PcdSmcCs2Base > diff --git a/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.c b/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.c > new file mode 100644 > index 000000000000..3e5a5612c17e > --- /dev/null > +++ b/Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMmNorFlashLib.c > @@ -0,0 +1,82 @@ > +/** @file > +* NOR flash platform library to be used in StandaloneMM context > +* > +* This file provides platform callbacks for the NOR flash module that executes > +* in the StandaloneMM context. The third NOR flash instance of 64MB size on the > +* reference design platform is assigned to be used in the StandaloneMM context. > +* > +* Copyright (c) 2021, ARM Ltd. All rights reserved. > +* > +* SPDX-License-Identifier: BSD-2-Clause-Patent > +* > +**/ > + > +#include > +#include > +#include > +#include > +#include > + > +// > +// 64MB NOR flash connected to CS2 is assigned to be used in StandaloneMM > +// context. > +// > +STATIC NOR_FLASH_DESCRIPTION mNorFlashDevices[] = { [SAMI] Minor - Can we add the CONST qualifier? > + { > + // NOR-Flash2 assigned for secure storage. > + FixedPcdGet64 (PcdSmcCs2Base), > + FixedPcdGet64 (PcdSmcCs2Base), > + SIZE_256KB * 256, > + SIZE_256KB, > + }, > +}; > + > +/** Allow access to NOR flash > + > + On the reference design platforms, the access to NOR flash has to be > + explicitly permitted by writing to the FLASH_RWEN bit of the SYSPH_SYS_REG > + register. > + > + @retval EFI_SUCCESS Initialize required to access NOR flash is complete. > + > +**/ > +EFI_STATUS > +NorFlashPlatformInitialization ( > + VOID > + ) > +{ > + UINT64 SysRegFlash; > + > + SysRegFlash = FixedPcdGet64 (PcdSysPeriphSysRegBase) + SGI_SYSPH_SYS_REG_FLASH; > + MmioOr32 (SysRegFlash, SGI_SYSPH_SYS_REG_FLASH_RWEN); > + return EFI_SUCCESS; > +} > + > +/** Returns the list of available NOR flash devices > + > + For the StandaloneMM execution context, return the list of available NOR > + flash devices that are available for use. > + > + @param[in] NorFlashDevices Pointer to array of NOR flash devices. > + @param[in] Count Number of elements in the NOR flash devices > + array. > + > + @retval EFI_SUCCESS Valid set of NOR flash devices is returned. > + @retval EFI_INVALID_PARAMETER Pointers to NOR flash devices and/or count is > + invalid. > + > +**/ > +EFI_STATUS > +NorFlashPlatformGetDevices ( > + OUT NOR_FLASH_DESCRIPTION **NorFlashDevices, > + OUT UINT32 *Count > + ) > +{ > + if ((NorFlashDevices == NULL) || (Count == NULL)) { > + return EFI_INVALID_PARAMETER; > + } > + > + *NorFlashDevices = mNorFlashDevices; > + *Count = ARRAY_SIZE (mNorFlashDevices); > + return EFI_SUCCESS; > +}