Re: [edk2-devel] [edk2-platforms][PATCH V4 15/17] Platform/ARM: Add CadenceQspiNorFlashDeviceLib for NorFlashDxe

2024-05-29 Thread Sahil Kaushal
Hi Sami, Thank you for reviewing the patch. You are right. The do-while loop is redundant and hence can be removed. Thanks, Sahil From: Sami Mujawar Date: Wednesday, 29 May 2024 at 5:06 PM To: Sahil Kaushal , devel@edk2.groups.io Cc: Ard Biesheuvel , Leif Lindholm , nd Subject: Re: [edk2

[edk2-devel] [edk2-platforms][PATCH V4 17/17] Platform/ARM/N1Sdp: Enable FaultTolerantWrite Dxe driver for N1Sdp

2024-05-29 Thread Sahil Kaushal
From: sahil This driver enables Fault Tolerant Write protocol, which provides fault tolerant write capability for block devices. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 5 + Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 1 + 2 files changed, 6 insertions(+) diff --git a

[edk2-devel] [edk2-platforms][PATCH V4 16/17] Platform/ARM/N1Sdp: Persistent storage for N1Sdp

2024-05-29 Thread Sahil Kaushal
From: sahil Enable persistent storage on QSPI flash device. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 19 ++- Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Platform/ARM/N1Sdp

[edk2-devel] [edk2-platforms][PATCH V4 15/17] Platform/ARM: Add CadenceQspiNorFlashDeviceLib for NorFlashDxe

2024-05-29 Thread Sahil Kaushal
From: sahil In N1Sdp platform, the SoC is connected to IOFPGA which has a Cadence Quad SPI (QSPI) controller. This QSPI controller manages the flash chip device via QSPI bus. This patch adds CadenceQspiNorFlashDeviceLib which is used to manage and access the above configuration. Signed-off-by

[edk2-devel] [edk2-platforms][PATCH V4 14/17] Silicon/ARM/NeoverseN1Soc: NOR flash library for N1Sdp

2024-05-29 Thread Sahil Kaushal
From: sahil Add NOR flash library, this library provides APIs for getting the list of NOR flash devices on the platform. This flash is shared between AP core and System Control Processor. The lower addresses are used to store SCP and AP boot images and higher addresses will be used for variable

[edk2-devel] [edk2-platforms][PATCH V4 13/17] Silicon/ARM/NeoverseN1Soc: Enable SCP QSPI flash region

2024-05-29 Thread Sahil Kaushal
From: sahil Enable SCP QSPI flash region access by adding it in the PlatformLibMem. This flash is shared between AP core and System Control Processor. The lower addresses are used to store SCP and AP boot images and higher addresses will be used for variable storage. Signed-off-by: sahil

[edk2-devel] [edk2-platforms][PATCH V4 12/17] Platform/ARM: Add optional provision to fetch and print NOR Flash info

2024-05-29 Thread Sahil Kaushal
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 pri

[edk2-devel] [edk2-platforms][PATCH V4 11/17] Platform/ARM/NorFlashDxe: Fix memory leak in NorFlashCreateInstance()

2024-05-29 Thread Sahil Kaushal
From: sahil This patch adds error_handler1 and error_handler2 labels in NorFlashCreateInstance() function to handle the cleanup. error_handler1: Frees just the Instance structure as the ShadowBuffer is not allocated yet. error_handler2: Frees both Instance and Instance->ShadowBuffer. Sig

[edk2-devel] [edk2-platforms][PATCH V4 10/17] Platform/ARM: Add HostControllerBaseAddress variable

2024-05-29 Thread Sahil Kaushal
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. S

[edk2-devel] [edk2-platforms][PATCH V4 09/17] Platform/ARM/NorFlashDxe: Switch from NorFlash.c to NorFlashDeviceLib

2024-05-29 Thread Sahil Kaushal
From: sahil NorFlashDeviceLib can be used to provide implementations of different NOR Flash to NorFlashDxe, i.e. NorFlashDxe links with NorFlashDeviceLib and the platforms can specify their respective NorFlashDeviceLib instances. This patch adds the following major changes: 1. Adds changes in

[edk2-devel] [edk2-platforms][PATCH V4 08/17] Platform/ARM: Add P30NorFlashDeviceLib Library

2024-05-29 Thread Sahil Kaushal
From: sahil This patch implements functions to interact with P30 NOR Flash. The code is taken from Platform/ARM/Drivers/NorFlashDxe/NorFlash.c file. Signed-off-by: sahil --- Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashDeviceLib.inf | 35 + Platform/ARM/Library/P30NorFlashDeviceLib

[edk2-devel] [edk2-platforms][PATCH V4 07/17] Platform/ARM: Create NorFlashDeviceLib library interface for flash specific functions

2024-05-29 Thread Sahil Kaushal
From: sahil NorFlashDeviceLib can be used to provide implementations of different NOR Flash to NorFlashDxe, i.e. NorFlashDxe links with NorFlashDeviceLib and the platforms can specify their respective NorFlashDeviceLib instances. This patch splits NorFlash.h and moves out the function

[edk2-devel] [edk2-platforms][PATCH V4 06/17] Platform/ARM/NorFlashDxe: Make local functions STATIC

2024-05-29 Thread Sahil Kaushal
From: sahil This patch makes local functions not being used outside NorFlash.c STATIC. Also, NorFlashWriteBuffer() is specific to a particular flash implementation and need not be implemented by other NOR flash device IPs. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.h

[edk2-devel] [edk2-platforms][PATCH V4 05/17] Platform/ARM/NorFlashDxe: Remove unimplemented functions from NorFlash.h

2024-05-29 Thread Sahil Kaushal
From: sahil This patch removes NorFlashReadCfiData() and NorFlashWrite() prototypes from NorFlash.h as these are not implemented or used anywhere in NorFlashDxe driver. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.h | 17 - 1 file changed, 17 deletions

[edk2-devel] [edk2-platforms][PATCH V4 04/17] Platform/ARM/NorFlashDxe: Move flash specific functions to NorFlash.c

2024-05-29 Thread Sahil Kaushal
From: sahil Refactoring done in this patch has two major parts: 1. Moving out NorFlashUnlockAndEraseSingleBlock and NorFlashWriteFullBlock functions from NorFlashDxe.c and NorFlashStandaloneMm.c to NorFlash.c files. 2. At the same time, we are adding NorFlashLock and NorFlashUnlock functions

[edk2-devel] [edk2-platforms][PATCH V4 03/17] Platform/ARM/NorFlashDxe: Add NorFlashCommon.h header file

2024-05-29 Thread Sahil Kaushal
From: sahil This patch splits NorFlash.h and adds NorFlashCommon.h which will have all the flash independent functions and macros. Whereas all the flash specific functions will be in NorFlash.h header file. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf

[edk2-devel] [edk2-platforms][PATCH V4 02/17] Platform/ARM/NorFlashDxe: Move NorFlashVirtualNotifyEvent

2024-05-29 Thread Sahil Kaushal
From: sahil Moving this function from NorFlash.c to NorFlashDxe.c as it is not dependent on any particular flash implementation. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.h| 14 +++ Platform/ARM/Drivers/NorFlashDxe/NorFlash.c| 44

[edk2-devel] [edk2-platforms][PATCH V4 01/17] Platform/ARM/NorFlashDxe: Move DiskIo related functions out of NorFlash.c

2024-05-29 Thread Sahil Kaushal
From: sahil Moving these functions from NorFlash.c to NorFlashBlockIoDxe.c as they are not dependent on any particular flash implementation. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.c | 129 Platform/ARM/Drivers/NorFlashDxe

[edk2-devel] [edk2-platforms][PATCH V4 00/17] Split NorFlashDxe driver and add CadenceQspiNorFlashDeviceLib library

2024-05-29 Thread Sahil Kaushal
From: sahil This patch series adds the following changes: 1. Splits the NorFlashDxe driver to introduce a NorFlashDeviceLib that implements the specifics for the respective flash. This will allow us to plug different libraries implementing functionality of various NOR Flash. The flash specific

[edk2-devel] [edk2-platforms][PATCH V3 17/17] Platform/ARM/N1Sdp: Enable FaultTolerantWrite Dxe driver for N1Sdp

2024-05-23 Thread Sahil Kaushal
From: sahil This driver enables Fault Tolerant Write protocol, which provides fault tolerant write capability for block devices. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 5 + Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 1 + 2 files changed, 6 insertions(+) diff --git a

[edk2-devel] [edk2-platforms][PATCH V3 16/17] Platform/ARM/N1Sdp: Persistent storage for N1Sdp

2024-05-23 Thread Sahil Kaushal
From: sahil Enable persistent storage on QSPI flash device. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 19 ++- Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Platform/ARM/N1Sdp

[edk2-devel] [edk2-platforms][PATCH V3 15/17] Platform/ARM: Add CadenceQspiNorFlashDeviceLib for NorFlashDxe

2024-05-23 Thread Sahil Kaushal
From: sahil In N1Sdp platform, the SoC is connected to IOFPGA which has a Cadence Quad SPI (QSPI) controller. This QSPI controller manages the flash chip device via QSPI bus. This patch adds CadenceQspiNorFlashDeviceLib which is used to manage and access the above configuration. Signed-off-by

[edk2-devel] [edk2-platforms][PATCH V3 14/17] Silicon/ARM/NeoverseN1Soc: NOR flash library for N1Sdp

2024-05-23 Thread Sahil Kaushal
From: sahil Add NOR flash library, this library provides APIs for getting the list of NOR flash devices on the platform. This flash is shared between AP core and System Control Processor. The lower addresses are used to store SCP and AP boot images and higher addresses will be used for variable

[edk2-devel] [edk2-platforms][PATCH V3 13/17] Silicon/ARM/NeoverseN1Soc: Enable SCP QSPI flash region

2024-05-23 Thread Sahil Kaushal
From: sahil Enable SCP QSPI flash region access by adding it in the PlatformLibMem. This flash is shared between AP core and System Control Processor. The lower addresses are used to store SCP and AP boot images and higher addresses will be used for variable storage. Signed-off-by: sahil

[edk2-devel] [edk2-platforms][PATCH V3 12/17] Platform/ARM: Add optional provision to fetch and print NOR Flash info

2024-05-23 Thread Sahil Kaushal
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 pri

[edk2-devel] [edk2-platforms][PATCH V3 11/17] Platform/ARM/NorFlashDxe: Fix memory leak in NorFlashCreateInstance()

2024-05-23 Thread Sahil Kaushal
From: sahil This patch adds error_handler1 and error_handler2 labels in NorFlashCreateInstance() function to handle the cleanup. error_handler1: Frees just the Instance structure as the ShadowBuffer is not allocated yet. error_handler2: Frees both Instance and Instance->ShadowBuffer. Sig

[edk2-devel] [edk2-platforms][PATCH V3 10/17] Platform/ARM: Add HostControllerBaseAddress variable

2024-05-23 Thread Sahil Kaushal
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. S

[edk2-devel] [edk2-platforms][PATCH V3 09/17] Platform/ARM/NorFlashDxe: Switch from NorFlash.c to NorFlashDeviceLib

2024-05-23 Thread Sahil Kaushal
From: sahil NorFlashDeviceLib can be used to provide implementations of different NOR Flash to NorFlashDxe, i.e. NorFlashDxe links with NorFlashDeviceLib and the platforms can specify their respective NorFlashDeviceLib instances. This patch adds the following major changes: 1. Adds changes in

[edk2-devel] [edk2-platforms][PATCH V3 08/17] Platform/ARM: Add P30NorFlashDeviceLib Library

2024-05-23 Thread Sahil Kaushal
From: sahil This patch implements functions to interact with P30 NOR Flash. The code is taken from Platform/ARM/Drivers/NorFlashDxe/NorFlash.c file. Signed-off-by: sahil --- Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashDeviceLib.inf | 35 + Platform/ARM/Library/P30NorFlashDeviceLib

[edk2-devel] [edk2-platforms][PATCH V3 07/17] Platform/ARM: Create NorFlashDeviceLib library interface for flash specific functions

2024-05-23 Thread Sahil Kaushal
From: sahil NorFlashDeviceLib can be used to provide implementations of different NOR Flash to NorFlashDxe, i.e. NorFlashDxe links with NorFlashDeviceLib and the platforms can specify their respective NorFlashDeviceLib instances. This patch splits NorFlash.h and moves out the function

[edk2-devel] [edk2-platforms][PATCH V3 06/17] Platform/ARM/NorFlashDxe: Make local functions STATIC

2024-05-23 Thread Sahil Kaushal
From: sahil This patch makes local functions not being used outside NorFlash.c STATIC. Also, NorFlashWriteBuffer() is specific to a particular flash implementation and need not be implemented by other NOR flash device IPs. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.h

[edk2-devel] [edk2-platforms][PATCH V3 05/17] Platform/ARM/NorFlashDxe: Remove unimplemented functions from NorFlash.h

2024-05-23 Thread Sahil Kaushal
From: sahil This patch removes NorFlashReadCfiData() and NorFlashWrite() prototypes from NorFlash.h as these are not implemented or used anywhere in NorFlashDxe driver. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.h | 17 - 1 file changed, 17 deletions

[edk2-devel] [edk2-platforms][PATCH V3 04/17] Platform/ARM/NorFlashDxe: Move flash specific functions to NorFlash.c

2024-05-23 Thread Sahil Kaushal
From: sahil Refactoring done in this patch has two major parts: 1. Moving out NorFlashUnlockAndEraseSingleBlock and NorFlashWriteFullBlock functions from NorFlashDxe.c and NorFlashStandaloneMm.c to NorFlash.c files. 2. At the same time, we are adding NorFlashLock and NorFlashUnlock functions

[edk2-devel] [edk2-platforms][PATCH V3 03/17] Platform/ARM/NorFlashDxe: Add NorFlashCommon.h header file

2024-05-23 Thread Sahil Kaushal
From: sahil This patch splits NorFlash.h and adds NorFlashCommon.h which will have all the flash independent functions and macros. Whereas all the flash specific functions will be in NorFlash.h header file. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf

[edk2-devel] [edk2-platforms][PATCH V3 02/17] Platform/ARM/NorFlashDxe: Move NorFlashVirtualNotifyEvent

2024-05-23 Thread Sahil Kaushal
From: sahil Moving this function from NorFlash.c to NorFlashDxe.c as it is not dependent on any particular flash implementation. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.h| 14 +++ Platform/ARM/Drivers/NorFlashDxe/NorFlash.c| 44

[edk2-devel] [edk2-platforms][PATCH V3 01/17] Platform/ARM/NorFlashDxe: Move DiskIo related functions out of NorFlash.c

2024-05-23 Thread Sahil Kaushal
From: sahil Moving these functions from NorFlash.c to NorFlashBlockIoDxe.c as they are not dependent on any particular flash implementation. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.c | 129 Platform/ARM/Drivers/NorFlashDxe

[edk2-devel] [edk2-platforms][PATCH V3 00/17] Split NorFlashDxe driver and add CadenceQspiNorFlashDeviceLib library

2024-05-23 Thread Sahil Kaushal
From: sahil This patch series adds the following changes: 1. Splits the NorFlashDxe driver to introduce a NorFlashDeviceLib that implements the specifics for the respective flash. This will allow us to plug different libraries implementing functionality of various NOR Flash. The flash specific

Re: [edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 11/14] Silicon/ARM/NeoverseN1Soc: NOR flash library for N1Sdp

2024-05-21 Thread sahil
Hi Sami, Thank you for reviewing the patches. Please find my comments inline below marked as [SAHIL]. On Thu, 16 May 2024 at 20:54, Sami Mujawar via groups.io wrote: > > Hi Sahil, > > Thank you for this patch. > > I have some suggestions marked inline below, otherwise this patc

Re: [edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 05/14] Platform/ARM: Create NorFlashDeviceLib library interface for flash specific functions

2024-05-21 Thread sahil
Hi Sami, Thank you for reviewing the patches. Please find my comments inline below marked as [SAHIL]. Also, for the documentation headers, I will try to add in NorFlashDeviceLib.h and keep it consistent with CadenceQspiNorFlashDeviceLib. On Thu, 16 May 2024 at 20:48, Sami Mujawar via groups.io

Re: [edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 12/14] Platform/ARM: Add CadenceQspiNorFlashDeviceLib for NorFlashDxe

2024-05-08 Thread sahil
Hi Pierre, Thanks for reviewing the patchset. Please find my comment inline below. On Thu, 2 May 2024 at 18:47, PierreGondois via groups.io wrote: > > Hello Sahil, > > On 4/23/24 07:56, Sahil Kaushal via groups.io wrote: > > From: sahil > > > > In N1Sdp platform,

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 12/14] Platform/ARM: Add CadenceQspiNorFlashDeviceLib for NorFlashDxe

2024-04-23 Thread Sahil Kaushal
From: sahil In N1Sdp platform, the SoC is connected to IOFPGA which has a Cadence Quad SPI (QSPI) controller. This QSPI controller manages the flash chip device via QSPI bus. This patch adds CadenceQspiNorFlashDeviceLib which is used to manage and access the above configuration. Signed-off-by

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 14/14] Platform/ARM/N1Sdp: Enable FaultTolerantWrite Dxe driver for N1Sdp

2024-04-23 Thread Sahil Kaushal
From: sahil This driver enables Fault Tolerant Write protocol, which provides fault tolerant write capability for block devices. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 5 + Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 1 + 2 files changed, 6 insertions(+) diff --git a

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 13/14] Platform/ARM/N1Sdp: Persistent storage for N1Sdp

2024-04-23 Thread Sahil Kaushal
From: sahil Enable persistent storage on QSPI flash device. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 19 ++- Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 2 ++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Platform/ARM/N1Sdp

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 09/14] Platform/ARM: Add optional provision to fetch and print NOR Flash info

2024-04-23 Thread Sahil Kaushal
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

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 07/14] Platform/ARM/NorFlashDxe: Switch from NorFlash.c to NorFlashDeviceLib

2024-04-23 Thread Sahil Kaushal
From: sahil NorFlashDeviceLib can be used to provide implementations of different NOR Flash to NorFlashDxe, i.e. NorFlashDxe links with NorFlashDeviceLib and the platforms can specify their respective NorFlashDeviceLib instances. This patch adds the following major changes: 1. Adds changes in

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 05/14] Platform/ARM: Create NorFlashDeviceLib library interface for flash specific functions

2024-04-23 Thread Sahil Kaushal
From: sahil NorFlashDeviceLib can be used to provide implementations of different NOR Flash to NorFlashDxe, i.e. NorFlashDxe links with NorFlashDeviceLib and the platforms can specify their respective NorFlashDeviceLib instances. This patch splits NorFlash.h and moves out the function

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 08/14] Platform/ARM: Add HostRegisterBaseAddress variable

2024-04-23 Thread Sahil Kaushal
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. S

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 10/14] Silicon/ARM/NeoverseN1Soc: Enable SCP QSPI flash region

2024-04-23 Thread Sahil Kaushal
From: sahil Enable SCP QSPI flash region access by adding it in the PlatformLibMem. This flash is shared between AP core and System Control Processor. The lower addresses are used to store SCP and AP boot images and higher addresses will be used for variable storage. Signed-off-by: sahil

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 04/14] Platform/ARM/NorFlashDxe: Move flash specific functions to NorFlash.c

2024-04-23 Thread Sahil Kaushal
From: sahil Refactoring done in this patch has two major parts: 1. Moving out NorFlashUnlockAndEraseSingleBlock and NorFlashWriteFullBlock functions from NorFlashDxe.c and NorFlashStandaloneMm.c to NorFlash.c files. 2. At the same time, we are adding NorFlashLock and NorFlashUnlock functions

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 11/14] Silicon/ARM/NeoverseN1Soc: NOR flash library for N1Sdp

2024-04-23 Thread Sahil Kaushal
From: sahil Add NOR flash library, this library provides APIs for getting the list of NOR flash devices on the platform. Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc/Library/NorFlashLib/NorFlashLib.inf | 34 ++ Silicon/ARM/NeoverseN1Soc/Library/NorFlashLib/NorFlashLib.c | 65

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 01/14] Platform/ARM/NorFlashDxe: Move DiskIo related functions out of NorFlash.c

2024-04-23 Thread Sahil Kaushal
From: sahil Moving these functions from NorFlash.c to NorFlashBlockIoDxe.c as they are not dependent on any particular flash implementation. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.c | 129 Platform/ARM/Drivers/NorFlashDxe

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 03/14] Platform/ARM/NorFlashDxe: Add NorFlashCommon.h header file

2024-04-23 Thread Sahil Kaushal
From: sahil This patch splits NorFlash.h and adds NorFlashCommon.h which will have all the flash independent functions and macros. Whereas all the flash specific functions will be in NorFlash.h header file. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlashDxe.inf

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 06/14] Platform/ARM: Add P30NorFlashDeviceLib Library

2024-04-23 Thread Sahil Kaushal
From: sahil This patch implements functions to interact with P30 NOR Flash. The code is taken from Platform/ARM/Drivers/NorFlashDxe/NorFlash.c file. Signed-off-by: sahil --- Platform/ARM/Library/P30NorFlashDeviceLib/P30NorFlashDeviceLib.inf | 35 + Platform/ARM/Library/P30NorFlashDeviceLib

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 02/14] Platform/ARM/NorFlashDxe: Move NorFlashVirtualNotifyEvent

2024-04-23 Thread Sahil Kaushal
From: sahil Moving this function from NorFlash.c to NorFlashDxe.c as it is not dependent on any particular flash implementation. Signed-off-by: sahil --- Platform/ARM/Drivers/NorFlashDxe/NorFlash.h| 14 +++ Platform/ARM/Drivers/NorFlashDxe/NorFlash.c| 44

[edk2-devel] [PATCH RESEND edk2-platforms][PATCH V2 00/14] Split NorFlashDxe driver and add CadenceQspiNorFlashDeviceLib library

2024-04-23 Thread Sahil Kaushal
From: sahil This patch series adds the following changes: 1. Splits the NorFlashDxe driver to introduce a NorFlashDeviceLib that implements the specifics for the respective flash. This will allow us to plug different libraries implementing functionality of various NOR Flash. The flash specific

Re: [edk2-devel] [edk2-platforms][PATCH V4 4/4] Silicon/ARM/NeoverseN1Soc: Consume N1SdpNtFwConfigPei supplied data

2024-01-23 Thread sahil
Hi All, Please find the links to previous discussions below : V1 - https://edk2.groups.io/g/devel/topic/96088980#100022 V2 - https://edk2.groups.io/g/devel/topic/96671861#103652 V3 - https://edk2.groups.io/g/devel/topic/100912169#112452 Thanks, Sahil On Thu, 4 Jan 2024 at 18:46, sahil wrote

Re: [edk2-devel] [edk2-platforms][PATCH V4 3/4] Platform/ARM/N1Sdp: Enable N1SdpNtFwConfigPei PEI module for N1Sdp

2024-01-23 Thread sahil
Hi All, Please find the links to previous discussions below : V1 - https://edk2.groups.io/g/devel/topic/96088980#100022 V2 - https://edk2.groups.io/g/devel/topic/96671861#103652 V3 - https://edk2.groups.io/g/devel/topic/100912169#112452 Thanks, Sahil On Thu, 4 Jan 2024 at 18:46, sahil wrote

Re: [edk2-devel] [edk2-platforms][PATCH V4 2/4] Platform/ARM/N1Sdp: Add N1SdpNtFwConfigPei PEI module

2024-01-23 Thread sahil
Hi All, Please find the links to previous discussions below : V1 - https://edk2.groups.io/g/devel/topic/96088980#100022 V2 - https://edk2.groups.io/g/devel/topic/96671861#103652 V3 - https://edk2.groups.io/g/devel/topic/100912169#112452 Thanks, Sahil On Thu, 4 Jan 2024 at 18:46, sahil wrote

Re: [edk2-devel] [edk2-platforms][PATCH V4 1/4] Silicon/ARM/NeoverseN1Soc: Extract NT_FW_CONFIG address passed by TF-A

2024-01-23 Thread sahil
Hi All, Please find the links to previous discussions below : V1 - https://edk2.groups.io/g/devel/topic/96088980#100022 V2 - https://edk2.groups.io/g/devel/topic/96671861#103652 V3 - https://edk2.groups.io/g/devel/topic/100912169#112452 Thanks, Sahil On Thu, 4 Jan 2024 at 18:46, sahil wrote

[edk2-devel] [edk2-platforms][PATCH V4 4/4] Silicon/ARM/NeoverseN1Soc: Consume N1SdpNtFwConfigPei supplied data

2024-01-04 Thread sahil
platform information from a fixed address is also removed in this patch. Signed-off-by: sahil --- Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManagerDxe.inf | 6 +++- Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLib.inf | 1

[edk2-devel] [edk2-platforms][PATCH V4 3/4] Platform/ARM/N1Sdp: Enable N1SdpNtFwConfigPei PEI module for N1Sdp

2024-01-04 Thread sahil
Incorporate N1SdpNtFwConfigPei PEI module which parses NT_FW_CONFIG and passes it to other PEI modules(as PPI) and DXE modules(as HOB). Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec | 3 +++ Platform/ARM/N1Sdp/N1SdpPlatform.dsc| 5 - Platform/ARM/N1Sdp

[edk2-devel] [edk2-platforms][PATCH V4 0/4] Add support to parse NT_FW_CONFIG

2024-01-04 Thread sahil
PEI modules(as PPI) and DXE modules(as HOB). v4: - Fixed code review comments - Split the patch into four patches sahil (4): Silicon/ARM/NeoverseN1Soc: Extract NT_FW_CONFIG address passed by TF-A Platform/ARM/N1Sdp: Add N1SdpNtFwConfigPei PEI module Platform/ARM/N1Sdp: Enable

[edk2-devel] [edk2-platforms][PATCH V4 2/4] Platform/ARM/N1Sdp: Add N1SdpNtFwConfigPei PEI module

2024-01-04 Thread sahil
This patch adds a PEI to parse NT_FW_CONFIG and pass it to other PEI modules(as PPI) and DXE modules(as HOB). Signed-off-by: sahil --- Platform/ARM/N1Sdp/Drivers/N1SdpNtFwConfigPei/NtFwConfigPei.inf | 41 ++ Platform/ARM/N1Sdp/Drivers/N1SdpNtFwConfigPei/NtFwConfigPei.c | 132

[edk2-devel] [edk2-platforms][PATCH V4 1/4] Silicon/ARM/NeoverseN1Soc: Extract NT_FW_CONFIG address passed by TF-A

2024-01-04 Thread sahil
NT_FW_CONFIG DTB contains platform information passed by TF-A boot stage. This patch enables support to first extract address of NT_FW_CONFIG and then pass it to other modules as a PPI. Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec| 5 - Silicon

[edk2-devel] [edk2-platforms][PATCH V1 5/5] Platform/ARM/N1Sdp: Enable FaultTolerantWrite Dxe driver for N1Sdp

2023-11-16 Thread sahil
Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 5 + Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 1 + 2 files changed, 6 insertions(+) diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.dsc b/Platform/ARM/N1Sdp/N1SdpPlatform.dsc index 10fe2db9e1b1..703829bbac99 100644 --- a/Platform

[edk2-devel] [edk2-platforms][PATCH V1 4/5] Platform/ARM/N1Sdp: Persistent storage for N1Sdp

2023-11-16 Thread sahil
Enable persistent storage on QSPI flash device. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dsc | 20 ++-- Platform/ARM/N1Sdp/N1SdpPlatform.fdf | 4 +++- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Platform/ARM/N1Sdp/N1SdpPlatform.dsc b

[edk2-devel] [edk2-platforms][PATCH V1 3/5] Platform/ARM/N1Sdp: NOR flash Dxe Driver for N1Sdp

2023-11-16 Thread sahil
Add NOR flash DXE driver, this brings up NV storage on QSPI's flash device using FVB protocol. Signed-off-by: sahil --- Platform/ARM/N1Sdp/N1SdpPlatform.dec |5 +- Platform/ARM/N1Sdp/Drivers/CadenceQspiDxe/CadenceQspiDxe.inf | 72 ++ Platform/ARM/N1Sdp/Dr

[edk2-devel] [edk2-platforms][PATCH V1 2/5] Silicon/ARM/NeoverseN1Soc: NOR flash library for N1Sdp

2023-11-16 Thread sahil
Add NOR flash library, this library provides APIs for getting the list of NOR flash devices on the platform. Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc/Library/NorFlashLib/NorFlashLib.inf | 36 ++ Silicon/ARM/NeoverseN1Soc/Library/NorFlashLib/NorFlashLib.c | 52

[edk2-devel] [edk2-platforms][PATCH V1 0/5] Enable non volatile storage on N1SDP

2023-11-16 Thread sahil
/edk2-platforms/tree/n1sdp_persistent_storage sahil (5): Silicon/ARM/NeoverseN1Soc: Enable SCP QSPI flash region Silicon/ARM/NeoverseN1Soc: NOR flash library for N1Sdp Platform/ARM/N1Sdp: NOR flash Dxe Driver for N1Sdp Platform/ARM/N1Sdp: Persistent storage for N1Sdp Platform/ARM/N1Sdp

[edk2-devel] [edk2-platforms][PATCH V1 1/5] Silicon/ARM/NeoverseN1Soc: Enable SCP QSPI flash region

2023-11-16 Thread sahil
Enable SCP QSPI flash region access by adding it in the PlatformLibMem Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc/Include/NeoverseN1Soc.h | 6 +- Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c | 10 -- 2 files changed, 13 insertions(+), 3

Re: [edk2-devel] Possibility of working on task - "Add Network Block Device support"

2023-09-11 Thread Sahil
On Wednesday, September 6, 2023 11:51:31 PM IST Pedro Falcato wrote: > On Wed, Sep 6, 2023 at 7:14 PM Sahil wrote: > > Hi, > > > > I have never contributed to Tianocore. While I am comfortable with C and > > Python, I don't have much experience with firmware deve

[edk2-devel] Possibility of working on task - "Add Network Block Device support"

2023-09-06 Thread Sahil
.github.io/wiki/Tasks [2] https://github.com/tianocore/tianocore.github.io/wiki/Tasks#user-content-Network_Block_Device_NBD_client [3] https://github.com/tianocore/tianocore.github.io/wiki/Tasks-Network-Block-Device Warm regards, Sahil Github: https://github.com/valdaarhun -=-=-=-=-=-=-=-=-=

[edk2-devel] [edk2-platforms][PATCH V3 1/1] Platform/ARM/N1sdp: Add support to parse NT_FW_CONFIG

2023-08-23 Thread sahil
PEI modules(as PPI) and DXE modules(as HOB). Signed-off-by: sahil --- Notes: v3: - Fixed code review comments - Added a PEI to parse nt_fw_config Silicon/ARM/NeoverseN1Soc/NeoverseN1Soc.dec | 8 +- Platform/ARM/N1Sdp

[edk2-devel] [edk2-platforms][PATCH V2 2/2] Silicon/ARM/NeoverseN1Soc: Fix RemoteDdrSize cast

2023-05-02 Thread sahil
RemoteDdrSize calculation wraps around when booting N1Sdp in multichip mode. Casting it to UINT64 to fix the issue. Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc/Library/PlatformLib/PlatformLibMem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Silicon/ARM

[edk2-devel] [edk2-platforms][PATCH V2 1/2] Platform/ARM/N1Sdp: Fix RemoteDdrSize cast

2023-05-02 Thread sahil
RemoteDdrSize calculation wraps around when booting N1Sdp in multichip mode. Casting it to UINT64 to fix the issue. Signed-off-by: sahil Change-Id: Ic51269a8d67669684a5f056701cfbef6beb23da2 --- Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 2 +- 1

[edk2-devel] [edk2-platforms][PATCH V2 0/2] Bug fix for RemoteDdrSize calculation

2023-05-02 Thread sahil
V2 delta changes: Split the patch in two for Platform/ARM/N1Sdp and Silicon/ARM/NeoverseN1Soc sahil (2): Platform/ARM/N1Sdp: Fix RemoteDdrSize cast Silicon/ARM/NeoverseN1Soc: Fix RemoteDdrSize cast Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 2

Re: [edk2-devel] [edk2-platforms][PATCH V1 1/1] Platform/ARM/N1Sdp: Fix RemoteDdrSize cast

2023-02-07 Thread sahil
Hi Thomas/Sami, This issue arose while fixing comments during upstreaming the following patch - https://edk2.groups.io/g/devel/topic/83261392#76845 and was observed while we were testing the platform with upstream code. Thanks, Sahil On Thu, 26 Jan 2023 at 00:48, Thomas Abraham wrote: > >

Re: [edk2-devel] [edk2-platforms][PATCH V1 1/1] Platform/ARM/N1sdp: Add support to parse NT_FW_CONFIG

2023-02-07 Thread sahil
On Wed, 8 Feb 2023 at 10:52, Sahil wrote: > > Hi Thomas/Sami, > > This issue arose while fixing comments during upstreaming the > following patch - https://edk2.groups.io/g/devel/topic/83261392#76845 > and was observed while we were testing the platform with upstream cod

Re: [edk2-devel] [edk2-platforms][PATCH V1 1/1] Platform/ARM/N1sdp: Add support to parse NT_FW_CONFIG

2023-02-07 Thread sahil
Hi Thomas/Sami, This issue arose while fixing comments during upstreaming the following patch - https://edk2.groups.io/g/devel/topic/83261392#76845 and was observed while we were testing the platform with upstream code. Thanks, Sahil On Thu, 26 Jan 2023 at 02:17, Thomas Abraham wrote: > &

[edk2-devel] [edk2-platforms][PATCH V2 1/1] Platform/ARM/N1sdp: Add support to parse NT_FW_CONFIG

2023-02-01 Thread sahil
NT_FW_CONFIG DTB contains platform information passed by Tf-A boot stage. This information is used for Virtual memory map generation during PEI phase and passed on to DXE phase as a HOB, where it is used in ConfigurationManagerDxe. Signed-off-by: sahil --- Notes: v2: - Fixed code review

[edk2-devel] [PATCH] MdeModulePkg/SmmLockBoxLib: Remove dead code

2023-01-26 Thread Sahil Siddiq
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=4317 The "if" condition on line 554 ensures that Guid won't be NULL (or 0) on line 600. So, there will never be a situation where the "else" block on line 603 is executed. Signed-off-by: Sahil Siddiq --- MdeModule

[edk2-devel] [edk2-platforms][PATCH V1 1/1] Platform/ARM/N1sdp: Add support to parse NT_FW_CONFIG

2023-01-05 Thread sahil
NT_FW_CONFIG DTB contains platform information passed by Tf-A boot stage. This information is used for Virtual memory map generation during PEI phase and passed on to DXE phase as a HOB, where it is used in ConfigurationManagerDxe. Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc

[edk2-devel] [edk2-platforms][PATCH V1 1/1] Platform/ARM/N1Sdp: Modify IRQ ID of Debug UART and routing to IOFPGA UART1

2023-01-05 Thread sahil
From: Himanshu Sharma In DBG2 table, IRQ ID was set as 0 for the UART. This overwrote the IPI0 trigger method to "level", which prevented SGI0 to be enabled again after a CPU offline/online cycle. This patch fixes the above issue by assigning a reserved IRQ ID for the Debug UART, other than 0 an

[edk2-devel] [edk2-platforms][PATCH V1 1/1] Platform/ARM/N1Sdp: Fix RemoteDdrSize cast

2023-01-05 Thread sahil
RemoteDdrSize calculation wraps around when booting N1Sdp in multichip mode. Casting it to UINT64 to fix the issue. Signed-off-by: sahil --- Platform/ARM/N1Sdp/ConfigurationManager/ConfigurationManagerDxe/ConfigurationManager.c | 2 +- Silicon/ARM/NeoverseN1Soc/Library/PlatformLib

[edk2-devel] [edk2-platforms][PATCH V3 1/1] Silicon/ARM/NeoverseN1Soc: Update CCIX PNP ID

2022-12-08 Thread sahil
ch. 2. CCIX protocol messages flow over regular PCIe. 3. CCIX devices and root ports are natively discovered using the CCIX DVSEC. Therefore, reuse PCIe PNP ID for CCIX. Signed-off-by: sahil --- Notes: v3: - added more info regarding the change in commit message [Sami Mujawar]

[edk2-devel] [edk2-platforms][PATCH V2 1/1] Silicon/ARM/NeoverseN1Soc: Update CCIX PNP ID

2022-11-30 Thread sahil
There is no need for a separate ID for CCIX host bridge, therefore reusing PCIe PNP ID for CCIX. Signed-off-by: sahil --- Notes: v2: - removed licence fix, to be pushed separately [Leif Lindholm] Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c | 4 ++-- 1 file

[edk2-devel] [edk2-platforms][PATCH V1 1/1] Silicon/ARM/NeoverseN1Soc: Update CCIX PNP ID

2022-11-25 Thread sahil
There is no need for a separate ID for CCIX host bridge, therefore reusing PCIe PNP ID for CCIX. Also, updating the file's license to resolve error during ECC checks. Signed-off-by: sahil --- Silicon/ARM/NeoverseN1Soc/Library/PciHostBridgeLib/PciHostBridgeLib.c | 17 + 1