From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail05.groups.io (mail05.groups.io [45.79.224.7]) by spool.mail.gandi.net (Postfix) with ESMTPS id 10A88AC0BAB for ; Wed, 24 Apr 2024 09:51:38 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=lK5BMNV8h7p/XWQu0kGxO5gDlqZSUUzKTE4QHwvXr5c=; c=relaxed/simple; d=groups.io; h=Received-SPF:From:To:CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References:In-Reply-To:Accept-Language:msip_labels:Authentication-Results-Original:nodisclaimer:MIME-Version:Original-Authentication-Results:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Resent-Date:Resent-From:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Language:Content-Type:Content-Transfer-Encoding; s=20240206; t=1713952297; v=1; b=PncRDFrFJd1x6zF3kewTLfg/WcdGs13Tr10qYLf+VveJTDie3sDkMrVT9unEHkiWk48ksi+u sesK5gnGAPe+UGuRP0FEHP95tkpGtjbE/Eje0xu5+Iz12g3AUcjG//31zTdnhNq561IYLQ+p+qy dLXMG6snQdDM4nMpfZmkHtBEdhYY8WZztZ90sagERjIYV2MujY3g8bJ+/jqE75qtaF9Y57u1XW1 s2TmeeGMbI84oeSTu6Wki1ioNSdcEQyiXXWlcoc+/7qtQpZQbzkDmjlna0QEUdqYDdLIbh2gL9p RfNpa/4RWlHPRMqcJRq8NYAxK51dsO+9RqIgYdmDvjkMg== X-Received: by 127.0.0.2 with SMTP id QTKAYY7687511xLAQoPLKNqZ; Wed, 24 Apr 2024 02:51:37 -0700 X-Received: from EUR04-VI1-obe.outbound.protection.outlook.com (EUR04-VI1-obe.outbound.protection.outlook.com [40.107.8.83]) by mx.groups.io with SMTP id smtpd.web11.12492.1713952296278484213 for ; Wed, 24 Apr 2024 02:51:36 -0700 X-Received: from AM0PR03CA0108.eurprd03.prod.outlook.com (2603:10a6:208:69::49) by PAXPR08MB7549.eurprd08.prod.outlook.com (2603:10a6:102:24c::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.22; Wed, 24 Apr 2024 09:51:31 +0000 X-Received: from AM3PEPF00009BA0.eurprd04.prod.outlook.com (2603:10a6:208:69:cafe::e1) by AM0PR03CA0108.outlook.office365.com (2603:10a6:208:69::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.33 via Frontend Transport; Wed, 24 Apr 2024 09:51:31 +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=arm.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 AM3PEPF00009BA0.mail.protection.outlook.com (10.167.16.25) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7519.19 via Frontend Transport; Wed, 24 Apr 2024 09:51:31 +0000 X-Received: ("Tessian outbound 01a47eb2eb85:v313"); Wed, 24 Apr 2024 09:51:31 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: bbb5a91a56851e2b X-CR-MTA-TID: 64aa7808 X-Received: from 5452e4f1c682.2 by 64aa7808-outbound-1.mta.getcheckrecipient.com id A7E504CE-3473-4D8E-B9E0-3173B3190798.1; Wed, 24 Apr 2024 09:51:20 +0000 X-Received: from EUR03-DBA-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id 5452e4f1c682.2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 24 Apr 2024 09:51:20 +0000 X-Received: from AM0PR08MB4289.eurprd08.prod.outlook.com (2603:10a6:208:148::12) by GV1PR08MB8082.eurprd08.prod.outlook.com (2603:10a6:150:96::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Wed, 24 Apr 2024 09:51:16 +0000 X-Received: from AM0PR08MB4289.eurprd08.prod.outlook.com ([fe80::4a5d:48:bf49:a524]) by AM0PR08MB4289.eurprd08.prod.outlook.com ([fe80::4a5d:48:bf49:a524%7]) with mapi id 15.20.7472.044; Wed, 24 Apr 2024 09:51:16 +0000 From: "levi.yun" To: "devel@edk2.groups.io" , Sahil Kaushal CC: Ard Biesheuvel , =?koi8-r?Q?Leif_Lindholm_=9A?= , Sami Mujawar Subject: Re: [edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 09/14] Platform/ARM: Add optional provision to fetch and print NOR Flash info Thread-Topic: [edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 09/14] Platform/ARM: Add optional provision to fetch and print NOR Flash info Thread-Index: AQHalY/wVNk78NUUZESJJakEyG4PGLF3LsOn Date: Wed, 24 Apr 2024 09:51:16 +0000 Message-ID: References: <20240423055638.1271531-1-Sahil.Kaushal@arm.com> <20240423055638.1271531-10-Sahil.Kaushal@arm.com> In-Reply-To: <20240423055638.1271531-10-Sahil.Kaushal@arm.com> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; x-ms-traffictypediagnostic: AM0PR08MB4289:EE_|GV1PR08MB8082:EE_|AM3PEPF00009BA0:EE_|PAXPR08MB7549:EE_ X-MS-Office365-Filtering-Correlation-Id: b0dc11a5-f7b4-4c1c-7755-08dc64441ebd x-checkrecipientrouted: true nodisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-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YySnCFCCavrnBO2ns4ik4dh4tflH/MFfjoQcmyDhlzcRtG9X?= =?koi8-r?Q?TBueCJWJkqZioX+cyr6yCkoSsfTFPB15p0/G6DdrN3EgctyIizVJ999QSTi/Ao?= =?koi8-r?Q?irgGagEDKIiL7pd6HgxUc2G7pLo3WeTvbT85exwHkKnfyoszbguPhvCvAKsy+J?= =?koi8-r?Q?E+NbTMDYH6EF303iEIw3KbHwGEz7a9E3KFdPkU49WsUTAzcpKWxusOsjLjpHu4?= =?koi8-r?Q?kpk+aPcqRK+QNRZ5O3l/FUzuJK9uNtlt513/vFX/4i36NHuJyfGsQunud8QLKS?= =?koi8-r?Q?bIg9Jqm76I9s0WboxbEfXWqblUvGazwvZil02VbIbxXNaQnw2jBAraGB2NUOFr?= =?koi8-r?Q?5UzUUc92yXoQ9bL7e9cRSgPC9n85Ni9TU9bwdQBhmtgPh0ZBaUzA38AC0Rf7En?= =?koi8-r?Q?q96DgXQCuM5aGWc85AFthr4B9H7TWJxpYqHLW9dmNo+GALc1piVytf6lQK4LeV?= =?koi8-r?Q?Cg=3D=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR08MB4289.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(366007)(1800799015)(38070700009);DIR:OUT;SFP:1101; MIME-Version: 1.0 X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8082 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF00009BA0.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 45b016f4-ff08-45e6-24f1-08dc644415b9 X-Microsoft-Antispam-Message-Info: =?koi8-r?Q?+9bxCvdxUs5PdD3fFS0bRAPtUTNcipt5mN4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2DwlSZSZh2MizVxBEKAiI+V0wS/7uEgI?= =?koi8-r?Q?FCO8cnSDvkLAt7Kp3cvI9+RkM3torBDjg+f5vhMYw4I8m3dYMEsji3KCCgRQk0?= =?koi8-r?Q?bSlJu/IU9lJomnWjhPaE/e5Ls7jIWMBLwJ/p45tUPunEwt4TkRjhuu5YJCac1+?= =?koi8-r?Q?+xx4fog9okwWS/JiUelzDpjFB8rotHuABnqgSoCH8E8jkaf2YMGG4li0sZVeTp?= =?koi8-r?Q?KRbFdSEdN/kAvzHN7QZE0D9P4L5aJYa8OcjwU6G1UB2MyX+nHTL5eIl7UWirFW?= =?koi8-r?Q?aQRxUuTv5HrpHmkv5C/mdvyJHB0RX11GOm8c3Wp7us2V4fzGrOEjN5Nj7KcmQo?= =?koi8-r?Q?mk4N9MHhP1HWsOqe0rC6mMbO3MIvlPYobLNhTwiUtmbo95Yb/eXwsARCyljaQD?= =?koi8-r?Q?EA94GixkMU2jPKPUIxAP8bOCJK5UbTUJRwvaPOi4M4BEOe29aRkaK30UKFm/Lf?= =?koi8-r?Q?O1d2RbjZm2jz2vvr/h1PR+0/MjxaqFwVIKtr05ht6T/G?= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Apr 2024 09:51:31.5429 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b0dc11a5-f7b4-4c1c-7755-08dc64441ebd 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: AM3PEPF00009BA0.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR08MB7549 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 Resent-Date: Wed, 24 Apr 2024 02:51:36 -0700 Resent-From: yeoreum.yun@arm.com Reply-To: devel@edk2.groups.io,yeoreum.yun@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: O2uOUrFW5UnizRbpoi6ZKjX4x7686176AA= Content-Language: en-GB Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20240206 header.b=PncRDFrF; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=arm.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 45.79.224.7 as permitted sender) smtp.mailfrom=bounce@groups.io Reviewed-by: levi.yun ________________________________________ From: devel@edk2.groups.io on behalf of Sahil Kausha= l via groups.io Sent: 23 April 2024 06:56 To: devel@edk2.groups.io Cc: Ard Biesheuvel; Leif Lindholm ; Sami Mujawar; Sahil Kaushal Subject: [edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 09/14] Platfor= m/ARM: Add optional provision to fetch and print NOR Flash info From: sahil This patch adds an optional functionality in NorFlashDxe to fetch and print NOR Flash information from NorFlashInfoLib using its JEDEC ID. NOR Flash libraries will implement a function "NorFlashReadID" which will fetch and return JEDEC ID. This JEDEC ID can be then used to print NOR Flash info using NorFlashInfoLib. If this functionality is not needed then the function can just return EFI_UNSUPPORTED. Signed-off-by: sahil --- Platform/ARM/SgiPkg/SgiPlatform.dsc.inc | 2 ++ Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc | 2 ++ Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc | 2 ++ Platform/ARM/JunoPkg/ArmJuno.dsc | 2 ++ Platform/ARM/VExpressPkg/PlatformStandaloneMm.dsc | 2 ++ Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf | 1 + Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf | 1 + Platform/ARM/Include/Library/NorFlashDeviceLib.h | 6 ++++= ++ Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c | 19 ++++= +++++++++++++++ Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c | 19 ++++= +++++++++++++++ Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashDeviceLib.c | 18 ++++= ++++++++++++++ 11 files changed, 74 insertions(+) diff --git a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc b/Platform/ARM/SgiPkg/= SgiPlatform.dsc.inc index 3dcf422eab4b..aef7cba5449e 100644 --- a/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatform.dsc.inc @@ -36,6 +36,8 @@ LcdPlatformLib|Platform/ARM/SgiPkg/Library/HdLcdArmSgiLib/HdLcdArmSgiLib= .inf NorFlashDeviceLib|Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashD= eviceLib.inf NorFlashPlatformLib|Platform/ARM/SgiPkg/Library/NorFlashLib/NorFlashLib.= inf + # NOR flash support + NorFlashInfoLib|EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.inf HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSy= stemLib.inf TimerLib|ArmPkg/Library/ArmArchTimerLib/ArmArchTimerLib.inf diff --git a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc b/Platform/ARM/SgiPk= g/SgiPlatformMm.dsc.inc index ab0e2a957a1b..02d684adaebd 100644 --- a/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc +++ b/Platform/ARM/SgiPkg/SgiPlatformMm.dsc.inc @@ -65,6 +65,8 @@ IntrinsicLib|CryptoPkg/Library/IntrinsicLib/IntrinsicLib.inf NorFlashDeviceLib|Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashD= eviceLib.inf NorFlashPlatformLib|Platform/ARM/SgiPkg/Library/NorFlashLib/StandaloneMm= NorFlashLib.inf + # NOR flash support + NorFlashInfoLib|EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.inf OpensslLib|CryptoPkg/Library/OpensslLib/OpensslLib.inf RngLib|MdePkg/Library/BaseRngLibTimerLib/BaseRngLibTimerLib.inf PlatformSecureLib|SecurityPkg/Library/PlatformSecureLibNull/PlatformSecu= reLibNull.inf diff --git a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc b/Platform/ARM/VE= xpressPkg/ArmVExpress.dsc.inc index 70ff049d3248..4e208c539a88 100644 --- a/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc +++ b/Platform/ARM/VExpressPkg/ArmVExpress.dsc.inc @@ -95,6 +95,8 @@ ArmPlatformSysConfigLib|Platform/ARM/VExpressPkg/Library/ArmVExpressSysC= onfigLib/ArmVExpressSysConfigLib.inf NorFlashDeviceLib|Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashD= eviceLib.inf NorFlashPlatformLib|Platform/ARM/VExpressPkg/Library/NorFlashArmVExpress= Lib/NorFlashArmVExpressLib.inf + # NOR flash support + NorFlashInfoLib|EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.inf ResetSystemLib|ArmPkg/Library/ArmSmcPsciResetSystemLib/ArmSmcPsciResetSy= stemLib.inf # ARM PL031 RTC Driver diff --git a/Platform/ARM/JunoPkg/ArmJuno.dsc b/Platform/ARM/JunoPkg/ArmJun= o.dsc index 81d2cbe4359f..946b8680c8c2 100644 --- a/Platform/ARM/JunoPkg/ArmJuno.dsc +++ b/Platform/ARM/JunoPkg/ArmJuno.dsc @@ -42,6 +42,8 @@ NorFlashDeviceLib|Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashD= eviceLib.inf NorFlashPlatformLib|Platform/ARM/JunoPkg/Library/NorFlashJunoLib/NorFlas= hJunoLib.inf + # NOR flash support + NorFlashInfoLib|EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.inf CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/Customize= dDisplayLib.inf diff --git a/Platform/ARM/VExpressPkg/PlatformStandaloneMm.dsc b/Platform/A= RM/VExpressPkg/PlatformStandaloneMm.dsc index a5805da49c92..ee71bbb1fc09 100644 --- a/Platform/ARM/VExpressPkg/PlatformStandaloneMm.dsc +++ b/Platform/ARM/VExpressPkg/PlatformStandaloneMm.dsc @@ -102,6 +102,8 @@ !if $(ENABLE_UEFI_SECURE_VARIABLE) =3D=3D TRUE NorFlashDeviceLib|Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashD= eviceLib.inf NorFlashPlatformLib|Platform/ARM/VExpressPkg/Library/NorFlashArmVExpress= Lib/NorFlashStMmLib.inf + # NOR flash support + NorFlashInfoLib|EmbeddedPkg/Library/NorFlashInfoLib/NorFlashInfoLib.inf VarCheckLib|MdeModulePkg/Library/VarCheckLib/VarCheckLib.inf VariableFlashInfoLib|MdeModulePkg/Library/BaseVariableFlashInfoLib/BaseV= ariableFlashInfoLib.inf AuthVariableLib|SecurityPkg/Library/AuthVariableLib/AuthVariableLib.inf diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf b/Platform/AR= M/Drivers/NorFlashDxe/NorFlashDxe.inf index 6522968d6c5a..4ab4d6a26926 100644 --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf @@ -35,6 +35,7 @@ HobLib IoLib NorFlashDeviceLib + NorFlashInfoLib NorFlashPlatformLib UefiBootServicesTableLib UefiDriverEntryPoint diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf b/Pl= atform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf index eb86d423f106..8b583f77d927 100644 --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf @@ -37,6 +37,7 @@ MemoryAllocationLib MmServicesTableLib NorFlashDeviceLib + NorFlashInfoLib NorFlashPlatformLib StandaloneMmDriverEntryPoint diff --git a/Platform/ARM/Include/Library/NorFlashDeviceLib.h b/Platform/AR= M/Include/Library/NorFlashDeviceLib.h index 29b8b8901525..1e61f7c935ae 100644 --- a/Platform/ARM/Include/Library/NorFlashDeviceLib.h +++ b/Platform/ARM/Include/Library/NorFlashDeviceLib.h @@ -154,4 +154,10 @@ NorFlashUnlock ( IN EFI_TPL OriginalTPL ); +EFI_STATUS +NorFlashReadID ( + IN NOR_FLASH_INSTANCE *Instance, + OUT UINT8 *JedecId // Maximum length of JedecId can be up= to 6 bytes. + ); + #endif /* NOR_FLASH_DEVICE_LIB_H_ */ diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c b/Platform/ARM/= Drivers/NorFlashDxe/NorFlashDxe.c index f5c0dadf84e0..1084f4731ce4 100644 --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -112,6 +113,8 @@ NorFlashCreateInstance ( { EFI_STATUS Status; NOR_FLASH_INSTANCE *Instance; + NOR_FLASH_INFO *FlashInfo; + UINT8 JedecId[6]; ASSERT (NorFlashInstance !=3D NULL); @@ -138,6 +141,22 @@ NorFlashCreateInstance ( return EFI_OUT_OF_RESOURCES; } + Status =3D NorFlashReadID (Instance, JedecId); + if (EFI_ERROR (Status) && (Status !=3D EFI_UNSUPPORTED)) { + FreePool (Instance); + return Status; + } + + if (Status =3D=3D EFI_SUCCESS) { + Status =3D NorFlashGetInfo (JedecId, &FlashInfo, TRUE); + if (EFI_ERROR (Status)) { + FreePool (Instance); + return Status; + } + + NorFlashPrintInfo (FlashInfo); + } + if (SupportFvb) { NorFlashFvbInitialize (Instance); diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c b/Plat= form/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c index ef9bed37d140..a621b29f34e2 100644 --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c @@ -10,6 +10,7 @@ #include #include #include +#include #include "NorFlashCommon.h" @@ -106,6 +107,8 @@ NorFlashCreateInstance ( { EFI_STATUS Status; NOR_FLASH_INSTANCE *Instance; + NOR_FLASH_INFO *FlashInfo; + UINT8 JedecId[6]; ASSERT (NorFlashInstance !=3D NULL); @@ -132,6 +135,22 @@ NorFlashCreateInstance ( return EFI_OUT_OF_RESOURCES; } + Status =3D NorFlashReadID (Instance, JedecId); + if (EFI_ERROR (Status) && (Status !=3D EFI_UNSUPPORTED)) { + FreePool (Instance); + return Status; + } + + if (Status =3D=3D EFI_SUCCESS) { + Status =3D NorFlashGetInfo (JedecId, &FlashInfo, TRUE); + if (EFI_ERROR (Status)) { + FreePool (Instance); + return Status; + } + + NorFlashPrintInfo (FlashInfo); + } + if (SupportFvb) { NorFlashFvbInitialize (Instance); diff --git a/Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashDeviceLib= .c b/Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashDeviceLib.c index d68e237e2e26..5f8f137482ee 100644 --- a/Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashDeviceLib.c +++ b/Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashDeviceLib.c @@ -947,3 +947,21 @@ NorFlashReset ( SEND_NOR_COMMAND (Instance->DeviceBaseAddress, 0, P30_CMD_READ_ARRAY); return EFI_SUCCESS; } + +/** + Read JEDEC ID of NOR flash device. + + @param[in] Instance NOR flash Instance of variable sto= re region. + @param[out] JedecId JEDEC ID of NOR flash device. + Maximum length of JedecId can be u= pto 6 bytes. + + @retval EFI_UNSUPPORTED JEDEC ID retrievel not implemented= . +**/ +EFI_STATUS +NorFlashReadID ( + IN NOR_FLASH_INSTANCE *Instance, + OUT UINT8 *JedecId + ) +{ + return EFI_UNSUPPORTED; +} -- 2.25.1 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#118159): https://edk2.groups.io/g/devel/message/118159 Mute This Topic: https://groups.io/mt/105690944/7717249 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [yeoreum.yun@arm.com] -=3D-=3D-=3D-=3D-=3D-=3D 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 (#118194): https://edk2.groups.io/g/devel/message/118194 Mute This Topic: https://groups.io/mt/105690944/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-