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 1D14BAC0EE8 for ; Thu, 16 May 2024 15:22:54 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=01O/Zofuo3sbnF+drkUjp8d6wdIpWgWys85DDAwIr7s=; c=relaxed/simple; d=groups.io; h=Received-SPF:Authentication-Results-Original:Message-ID:Date:User-Agent:Subject:To:Cc:References:From:In-Reply-To:MIME-Version:NoDisclaimer: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=1715872973; v=1; b=cuWHcN3q2KNHHD7p9R4Hcf8h5zH7k0yEeSUF78ysqOXrLmPOXdSCzcDbilcqOXqlXODelb9V GaBj4TXrpNIsp6F5+UXomC6jXLMCCRfHFjqLeTZCmfpX5wsESWfqIIXcws8Z6oiEnCJsTpqIxVz qt/4+o3X6mVCrn5CuEKZ7uup2e80pVRT4wEGjic10DnQ9A5nb2xV3nVryqCISZwxEdQPV2SmYcH kGUgX76i96NY/65IUhqa0YeohR9YbkaQZduNE+GgYDw5nPUGKS6vmF8f1cDHk2RVs/aFHbhjHcF 75/W4UjQUG2boiPi80C7Rog7KvIkx6LX2p4BPK80yR4ig== X-Received: by 127.0.0.2 with SMTP id U7qcYY7687511xW3OVejBgOc; Thu, 16 May 2024 08:22:53 -0700 X-Received: from EUR01-VE1-obe.outbound.protection.outlook.com (EUR01-VE1-obe.outbound.protection.outlook.com [40.107.14.80]) by mx.groups.io with SMTP id smtpd.web10.16822.1715872972277902124 for ; Thu, 16 May 2024 08:22:52 -0700 X-Received: from AS4P189CA0013.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5d7::16) by AS8PR08MB6662.eurprd08.prod.outlook.com (2603:10a6:20b:397::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.27; Thu, 16 May 2024 15:22:47 +0000 X-Received: from AMS0EPF000001A2.eurprd05.prod.outlook.com (2603:10a6:20b:5d7:cafe::77) by AS4P189CA0013.outlook.office365.com (2603:10a6:20b:5d7::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.28 via Frontend Transport; Thu, 16 May 2024 15:22:47 +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 AMS0EPF000001A2.mail.protection.outlook.com (10.167.16.235) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7587.21 via Frontend Transport; Thu, 16 May 2024 15:22:46 +0000 X-Received: ("Tessian outbound 85e363419cbe:v315"); Thu, 16 May 2024 15:22:46 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 94e45735cf7751c7 X-CR-MTA-TID: 64aa7808 X-Received: from eaf4e636a9b4.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 0AE6C17C-2C66-477E-9E9A-10DC8517FBB0.1; Thu, 16 May 2024 15:22:40 +0000 X-Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id eaf4e636a9b4.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Thu, 16 May 2024 15:22:40 +0000 Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) by DBBPR08MB10604.eurprd08.prod.outlook.com (2603:10a6:10:536::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7587.27; Thu, 16 May 2024 15:22:37 +0000 X-Received: from AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::1e13:dc65:224e:219c]) by AS8PR08MB6806.eurprd08.prod.outlook.com ([fe80::1e13:dc65:224e:219c%5]) with mapi id 15.20.7587.028; Thu, 16 May 2024 15:22:37 +0000 Message-ID: <518c29cb-9266-431e-bc3d-8e7e896e9637@arm.com> Date: Thu, 16 May 2024 16:22:36 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 08/14] Platform/ARM: Add HostRegisterBaseAddress variable To: Sahil Kaushal , devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , sahil , "nd@arm.com" References: <20240423055638.1271531-1-Sahil.Kaushal@arm.com> <20240423055638.1271531-9-Sahil.Kaushal@arm.com> From: "Sami Mujawar" In-Reply-To: <20240423055638.1271531-9-Sahil.Kaushal@arm.com> X-ClientProxiedBy: LO4P123CA0162.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:188::23) To AS8PR08MB6806.eurprd08.prod.outlook.com (2603:10a6:20b:39b::12) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: AS8PR08MB6806:EE_|DBBPR08MB10604:EE_|AMS0EPF000001A2:EE_|AS8PR08MB6662:EE_ X-MS-Office365-Filtering-Correlation-Id: 6b87ad26-85ee-4b79-0769-08dc75bc0a74 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230031|376005|1800799015|366007; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B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ANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS8PR08MB6806.eurprd08.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376005)(1800799015)(366007);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10604 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: AMS0EPF000001A2.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b76e57f5-4725-4ec1-a68d-08dc75bc04ad X-Microsoft-Antispam-Message-Info: =?utf-8?B?Wnd3b1FLalZOdE0vU2VaeHJONHMyc3ZjVVNvRmh2NHY4T1ZXcE5oelowc2NE?= =?utf-8?B?ZFpTNkRvSkVWaVZSaUJtSUlrYzE2V3hIb3BBTEdpc0NLOXpVcHR5Z29iSU1P?= =?utf-8?B?Q3owbWovcWlUeFEyczhLK1A1TFFFb1FESGcwQk4xNTZUWWhhSjZCQ0lHS0Jq?= =?utf-8?B?QXJ4d2RDTGIxRHNodkNZTTRrb2wxbmhBWWRVQTFJSzdCMnJQcWE4eHNTUWNF?= =?utf-8?B?bER1U1h0R1NoTmFUb3lQalNPOXU5bnNxbnVkTWwydEFFbmRpQkJ6ZzlmZm05?= =?utf-8?B?emNOVnNGNUJqNVJSdW1GUmd1L1VXY1VxUy8yMGZaVW9HTFhPT3pWQlBWdk5X?= =?utf-8?B?N3RFNEkrMjZhYlN6bG1SVDRUYTNFS01iWGpoaFlFZXE3My9uT2tnQ1dZVXhl?= =?utf-8?B?NWNMNExvWHJHUFdFc0RlVDFjcE1NNkE5ajQrMnRaN3F1TGx0NHJid3hYNk4x?= =?utf-8?B?d1MrT2l3RURmNS9jR0RIaDNFTmRyZ3Y4QUhpQ1czdHhzaGhPRENNUXNOTytl?= =?utf-8?B?eHh2VThlWlgwOFdUODhFNFF0Z0Ey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ZzZLOUNIeHhnYlplV3NEYm13d3BYRGx6Ynk0a2Mzc0JwbHhxdlJjelV4?= =?utf-8?B?NzIxN1Y1b2hMOHorWmwxOHV6S1lLZTY5UlA4TjZ0MmtDQ3JLencydGZKL2ZH?= =?utf-8?B?RjBlMnJUMWhzVUVLT3Y3VWNKbWxvTTVYVGs2UE9hMFhhMnBGU0swdVJrZzJO?= =?utf-8?B?THZ2YUwwUXk2a2lYRUljUTZDMlZaSk1rT2V4clpoODhPYW9FSFRCR0NwbFNY?= =?utf-8?B?SzNYNDlkaFdaeGJvWTRHRCtTTE5mb0pOdFpOVnk5MnFjWXR6c05uN2xXcExC?= =?utf-8?B?OG90dVdXYXRSOEEzcVhMNWh2UUIvZzhzQ0FIYnhza0JTd0NDSVVQbHphSmtv?= =?utf-8?B?SGdMTndZNVlvZCtUMEZYYmNRS2J4SHlrbnlWUXI1cmRkbGJpbStxOG42RkEr?= =?utf-8?Q?5mxHDpTV1XcjP?= X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2024 15:22:46.8507 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b87ad26-85ee-4b79-0769-08dc75bc0a74 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: AMS0EPF000001A2.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR08MB6662 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: Thu, 16 May 2024 08:22:52 -0700 Resent-From: sami.mujawar@arm.com Reply-To: devel@edk2.groups.io,sami.mujawar@arm.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: z1QXC7zbwYoE5fcQvyfMXMGex7686176AA= Content-Language: en-GB Content-Type: text/plain; charset=UTF-8; format=flowed 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=cuWHcN3q; 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 Hi Sahil, Thank you for this patch. I have a minor comment marked inline as [SAMI]. With that fixed, Reviewed-by: Sami Mujawar Regards, Sami Mujawar On 23/04/2024 06:56 am, Sahil Kaushal wrote: > From: sahil > > This variable holds the QSPI controller's base address. > It is defined in ARM.dec as well with the default value of 0x0. > In case a platform is not using it, they can just ignore this > variable and the default value of 0x0 will be propogated and > the variable will not be used. > > Signed-off-by: sahil > --- > Platform/ARM/ARM.dec | 3 ++ > Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf | 3 ++ > Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf | 2 ++ > Platform/ARM/Drivers/NorFlashDxe/NorFlashCommon.h | 1 + > Platform/ARM/Include/Library/NorFlashDeviceLib.h | 1 + > Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c | 34 ++++++++= +++++++++--- > Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c | 12 ++++--- > 7 files changed, 48 insertions(+), 8 deletions(-) > > diff --git a/Platform/ARM/ARM.dec b/Platform/ARM/ARM.dec > index 86d1fcb4878e..a5e28c372903 100644 > --- a/Platform/ARM/ARM.dec > +++ b/Platform/ARM/ARM.dec > @@ -26,3 +26,6 @@ > =20 > > [PcdsFeatureFlag.common] > > gPlatformArmTokenSpaceGuid.PcdNorFlashCheckBlockLocked|FALSE|BOOLEAN|= 0x0000001 > > + > > +[PcdsFixedAtBuild.common] > > + gPlatformArmTokenSpaceGuid.PcdNorFlashRegBaseAddress|0x0|UINT32|0x0000= 0002 > > diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf b/Platform/= ARM/Drivers/NorFlashDxe/NorFlashDxe.inf > index de160025b632..6522968d6c5a 100644 > --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf > +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf > @@ -65,5 +65,8 @@ > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase > > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize > > =20 > > +[FixedPcd] > > + gPlatformArmTokenSpaceGuid.PcdNorFlashRegBaseAddress > > + > > [Depex] > > gEfiCpuArchProtocolGuid > > diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf b/= Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf > index d9e7de07165c..eb86d423f106 100644 > --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf > +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.inf > @@ -59,5 +59,7 @@ > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareBase > > gEfiMdeModulePkgTokenSpaceGuid.PcdFlashNvStorageFtwSpareSize > > =20 > > + gPlatformArmTokenSpaceGuid.PcdNorFlashRegBaseAddress > > + > > [Depex] > > TRUE > > diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashCommon.h b/Platform= /ARM/Drivers/NorFlashDxe/NorFlashCommon.h > index 7fcb949843e8..98464e4868b1 100644 > --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashCommon.h > +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashCommon.h > @@ -34,6 +34,7 @@ > // > > EFI_STATUS > > NorFlashCreateInstance ( > > + IN UINTN HostRegisterBase, > > IN UINTN NorFlashDeviceBase, > > IN UINTN NorFlashRegionBase, > > IN UINTN NorFlashSize, > > diff --git a/Platform/ARM/Include/Library/NorFlashDeviceLib.h b/Platform/= ARM/Include/Library/NorFlashDeviceLib.h > index e5017130a091..29b8b8901525 100644 > --- a/Platform/ARM/Include/Library/NorFlashDeviceLib.h > +++ b/Platform/ARM/Include/Library/NorFlashDeviceLib.h > @@ -29,6 +29,7 @@ struct _NOR_FLASH_INSTANCE { > UINT32 Signature; > > EFI_HANDLE Handle; > > =20 > > + UINTN HostRegisterBaseAddress; [SAMI] HostControllerBaseAddress ? Also, can you add doxygen=20 documentation for this field, please? Also mention that this is optional=20 if there is no Host Controller present. > > UINTN DeviceBaseAddress; > > UINTN RegionBaseAddress; > > UINTN Size; > > diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c b/Platform/AR= M/Drivers/NorFlashDxe/NorFlashDxe.c > index 1c12572ab663..f5c0dadf84e0 100644 > --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c > +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.c > @@ -1,6 +1,6 @@ > /** @file NorFlashDxe.c > > =20 > > - Copyright (c) 2011 - 2021, Arm Limited. All rights reserved.
> > + Copyright (c) 2011 - 2024, Arm Limited. All rights reserved.
> > =20 > > SPDX-License-Identifier: BSD-2-Clause-Patent > > =20 > > @@ -30,6 +30,7 @@ NOR_FLASH_INSTANCE mNorFlashInstanceTemplate =3D { > NOR_FLASH_SIGNATURE, // Signature > > NULL, // Handle ... NEED TO BE FILLED > > =20 > > + 0, // HostRegisterBaseAddress ... NEED TO BE FILLED [SAMI] Should the documentation also say that this is optional? > > 0, // DeviceBaseAddress ... NEED TO BE FILLED > > 0, // RegionBaseAddress ... NEED TO BE FILLED > > 0, // Size ... NEED TO BE FILLED > > @@ -99,6 +100,7 @@ NOR_FLASH_INSTANCE mNorFlashInstanceTemplate =3D { > =20 > > EFI_STATUS > > NorFlashCreateInstance ( > > + IN UINTN HostRegisterBase, [SAMI] Please update appropriately. > > IN UINTN NorFlashDeviceBase, > > IN UINTN NorFlashRegionBase, > > IN UINTN NorFlashSize, > > @@ -118,9 +120,10 @@ NorFlashCreateInstance ( > return EFI_OUT_OF_RESOURCES; > > } > > =20 > > - Instance->DeviceBaseAddress =3D NorFlashDeviceBase; > > - Instance->RegionBaseAddress =3D NorFlashRegionBase; > > - Instance->Size =3D NorFlashSize; > > + Instance->HostRegisterBaseAddress =3D HostRegisterBase; > > + Instance->DeviceBaseAddress =3D NorFlashDeviceBase; > > + Instance->RegionBaseAddress =3D NorFlashRegionBase; > > + Instance->Size =3D NorFlashSize; > > =20 > > Instance->BlockIoProtocol.Media =3D &Instance->Media; > > Instance->Media.MediaId =3D Index; > > @@ -184,6 +187,27 @@ NorFlashInitialise ( > UINT32 Index; > > NOR_FLASH_DESCRIPTION *NorFlashDevices; > > BOOLEAN ContainVariableStorage; > > + EFI_PHYSICAL_ADDRESS HostRegisterBaseAddress; > > + > > + // Register host register region if available > > + HostRegisterBaseAddress =3D PcdGet32 (PcdNorFlashRegBaseAddress); > > + > > + if (HostRegisterBaseAddress !=3D 0) { > > + Status =3D gDS->AddMemorySpace ( > > + EfiGcdMemoryTypeMemoryMappedIo, > > + HostRegisterBaseAddress, > > + SIZE_4KB, > > + EFI_MEMORY_UC | EFI_MEMORY_RUNTIME > > + ); > > + ASSERT_EFI_ERROR (Status); > > + > > + Status =3D gDS->SetMemorySpaceAttributes ( > > + HostRegisterBaseAddress, > > + SIZE_4KB, > > + EFI_MEMORY_UC | EFI_MEMORY_RUNTIME > > + ); > > + ASSERT_EFI_ERROR (Status); > > + } > > =20 > > Status =3D NorFlashPlatformInitialization (); > > if (EFI_ERROR (Status)) { > > @@ -215,6 +239,7 @@ NorFlashInitialise ( > } > > =20 > > Status =3D NorFlashCreateInstance ( > > + HostRegisterBaseAddress, > > NorFlashDevices[Index].DeviceBaseAddress, > > NorFlashDevices[Index].RegionBaseAddress, > > NorFlashDevices[Index].Size, > > @@ -368,6 +393,7 @@ NorFlashVirtualNotifyEvent ( > UINTN Index; > > =20 > > for (Index =3D 0; Index < mNorFlashDeviceCount; Index++) { > > + EfiConvertPointer (0x0, (VOID **)&mNorFlashInstances[Index]->HostReg= isterBaseAddress); > > EfiConvertPointer (0x0, (VOID **)&mNorFlashInstances[Index]->Device= BaseAddress); > > EfiConvertPointer (0x0, (VOID **)&mNorFlashInstances[Index]->Region= BaseAddress); > > =20 > > diff --git a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c b/Pl= atform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c > index 85198b98e8a8..ef9bed37d140 100644 > --- a/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c > +++ b/Platform/ARM/Drivers/NorFlashDxe/NorFlashStandaloneMm.c > @@ -1,6 +1,6 @@ > /** @file NorFlashStandaloneMm.c > > =20 > > - Copyright (c) 2011 - 2021, Arm Limited. All rights reserved.
> > + Copyright (c) 2011 - 2024, Arm Limited. All rights reserved.
> > Copyright (c) 2020, Linaro, Ltd. All rights reserved.
> > =20 > > SPDX-License-Identifier: BSD-2-Clause-Patent > > @@ -24,6 +24,7 @@ NOR_FLASH_INSTANCE mNorFlashInstanceTemplate =3D { > NOR_FLASH_SIGNATURE, // Signature > > NULL, // Handle ... NEED TO BE FILLED > > =20 > > + 0, // HostRegisterBaseAddress ... NEED TO BE FILLED > > 0, // DeviceBaseAddress ... NEED TO BE FILLED > > 0, // RegionBaseAddress ... NEED TO BE FILLED > > 0, // Size ... NEED TO BE FILLED > > @@ -93,6 +94,7 @@ NOR_FLASH_INSTANCE mNorFlashInstanceTemplate =3D { > =20 > > EFI_STATUS > > NorFlashCreateInstance ( > > + IN UINTN HostRegisterBase, > > IN UINTN NorFlashDeviceBase, > > IN UINTN NorFlashRegionBase, > > IN UINTN NorFlashSize, > > @@ -112,9 +114,10 @@ NorFlashCreateInstance ( > return EFI_OUT_OF_RESOURCES; > > } > > =20 > > - Instance->DeviceBaseAddress =3D NorFlashDeviceBase; > > - Instance->RegionBaseAddress =3D NorFlashRegionBase; > > - Instance->Size =3D NorFlashSize; > > + Instance->HostRegisterBaseAddress =3D HostRegisterBase; > > + Instance->DeviceBaseAddress =3D NorFlashDeviceBase; > > + Instance->RegionBaseAddress =3D NorFlashRegionBase; > > + Instance->Size =3D NorFlashSize; > > =20 > > Instance->BlockIoProtocol.Media =3D &Instance->Media; > > Instance->Media.MediaId =3D Index; > > @@ -194,6 +197,7 @@ NorFlashInitialise ( > } > > =20 > > Status =3D NorFlashCreateInstance ( > > + PcdGet32 (PcdNorFlashRegBaseAddress), > > NorFlashDevices[Index].DeviceBaseAddress, > > NorFlashDevices[Index].RegionBaseAddress, > > NorFlashDevices[Index].Size, > -=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 (#118964): https://edk2.groups.io/g/devel/message/118964 Mute This Topic: https://groups.io/mt/105690943/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-