ArmPlatformPkg/NorFlashDxe: Optimise FVB protocol
- Only read what needs reading, don't read the whole block. - Don't write back buffers containing no data after an erase. - Reduce number of NOR erases when writing data. Only erase the block when required. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Harry Liebel <Harry.Liebel@arm.com> Reviewed-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15500 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
committed by
oliviermartin
parent
0fb7e718a8
commit
518c243d42
@@ -304,6 +304,13 @@ NorFlashWriteBlocks (
|
||||
IN VOID *Buffer
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
NorFlashWriteSingleWord (
|
||||
IN NOR_FLASH_INSTANCE *Instance,
|
||||
IN UINTN WordAddress,
|
||||
IN UINT32 WriteData
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
NorFlashReadBlocks (
|
||||
IN NOR_FLASH_INSTANCE *Instance,
|
||||
@@ -312,9 +319,24 @@ NorFlashReadBlocks (
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
NorFlashRead (
|
||||
IN NOR_FLASH_INSTANCE *Instance,
|
||||
IN EFI_LBA Lba,
|
||||
IN UINTN Offset,
|
||||
IN UINTN BufferSizeInBytes,
|
||||
OUT VOID *Buffer
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
NorFlashReset (
|
||||
IN NOR_FLASH_INSTANCE *Instance
|
||||
);
|
||||
|
||||
EFI_STATUS
|
||||
NorFlashUnlockSingleBlockIfNecessary (
|
||||
IN NOR_FLASH_INSTANCE *Instance,
|
||||
IN UINTN BlockAddress
|
||||
);
|
||||
|
||||
#endif /* __NOR_FLASH_DXE_H__ */
|
||||
|
Reference in New Issue
Block a user