summaryrefslogtreecommitdiffstats
path: root/UefiPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c
diff options
context:
space:
mode:
Diffstat (limited to 'UefiPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c')
-rw-r--r--UefiPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c49
1 files changed, 22 insertions, 27 deletions
diff --git a/UefiPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c b/UefiPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c
index 065841bc93..5a27043285 100644
--- a/UefiPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c
+++ b/UefiPayloadPkg/Library/FlashDeviceLib/FlashDeviceLib.c
@@ -27,7 +27,6 @@ LibFvbFlashDeviceInit (
return SpiConstructor ();
}
-
/**
Read NumBytes bytes of data from the address specified by
PAddress into Buffer.
@@ -44,15 +43,15 @@ LibFvbFlashDeviceInit (
EFI_STATUS
EFIAPI
LibFvbFlashDeviceRead (
- IN UINTN PAddress,
- IN OUT UINTN *NumBytes,
- OUT UINT8 *Buffer
+ IN UINTN PAddress,
+ IN OUT UINTN *NumBytes,
+ OUT UINT8 *Buffer
)
{
- EFI_STATUS Status;
- UINT32 ByteCount;
- UINT32 RgnSize;
- UINT32 AddrOffset;
+ EFI_STATUS Status;
+ UINT32 ByteCount;
+ UINT32 RgnSize;
+ UINT32 AddrOffset;
Status = SpiGetRegionAddress (FlashRegionBios, NULL, &RgnSize);
if (EFI_ERROR (Status)) {
@@ -66,7 +65,6 @@ LibFvbFlashDeviceRead (
return SpiFlashRead (FlashRegionBios, AddrOffset, ByteCount, Buffer);
}
-
/**
Write NumBytes bytes of data from Buffer to the address specified by
PAddresss.
@@ -83,15 +81,15 @@ LibFvbFlashDeviceRead (
EFI_STATUS
EFIAPI
LibFvbFlashDeviceWrite (
- IN UINTN PAddress,
- IN OUT UINTN *NumBytes,
- IN UINT8 *Buffer
+ IN UINTN PAddress,
+ IN OUT UINTN *NumBytes,
+ IN UINT8 *Buffer
)
{
- EFI_STATUS Status;
- UINT32 ByteCount;
- UINT32 RgnSize;
- UINT32 AddrOffset;
+ EFI_STATUS Status;
+ UINT32 ByteCount;
+ UINT32 RgnSize;
+ UINT32 AddrOffset;
Status = SpiGetRegionAddress (FlashRegionBios, NULL, &RgnSize);
if (EFI_ERROR (Status)) {
@@ -105,7 +103,6 @@ LibFvbFlashDeviceWrite (
return SpiFlashWrite (FlashRegionBios, AddrOffset, ByteCount, Buffer);
}
-
/**
Erase the block starting at PAddress.
@@ -121,13 +118,13 @@ LibFvbFlashDeviceWrite (
EFI_STATUS
EFIAPI
LibFvbFlashDeviceBlockErase (
- IN UINTN PAddress,
- IN UINTN LbaLength
+ IN UINTN PAddress,
+ IN UINTN LbaLength
)
{
- EFI_STATUS Status;
- UINT32 RgnSize;
- UINT32 AddrOffset;
+ EFI_STATUS Status;
+ UINT32 RgnSize;
+ UINT32 AddrOffset;
Status = SpiGetRegionAddress (FlashRegionBios, NULL, &RgnSize);
if (EFI_ERROR (Status)) {
@@ -140,7 +137,6 @@ LibFvbFlashDeviceBlockErase (
return SpiFlashErase (FlashRegionBios, AddrOffset, (UINT32)LbaLength);
}
-
/**
Lock or unlock the block starting at PAddress.
@@ -155,11 +151,10 @@ LibFvbFlashDeviceBlockErase (
EFI_STATUS
EFIAPI
LibFvbFlashDeviceBlockLock (
- IN UINTN PAddress,
- IN UINTN LbaLength,
- IN BOOLEAN Lock
+ IN UINTN PAddress,
+ IN UINTN LbaLength,
+ IN BOOLEAN Lock
)
{
return EFI_SUCCESS;
}
-