/* Read NumBytes bytes of data from the address specified by PAddress into Buffer. */
EFI_STATUS EFIAPI LibFvbFlashDeviceRead(IN UINTN PAddress, IN OUT UINTN *NumBytes, OUT UINT8 *Buffer)
/* Read NumBytes bytes of data from the address specified by PAddress into Buffer. */
EFI_STATUS EFIAPI LibFvbFlashDeviceRead(IN UINTN PAddress, IN OUT UINTN *NumBytes, OUT UINT8 *Buffer)
{
  EFI_STATUS  Status;
  UINT32      ByteCount;
  UINT32      RgnSize;
  UINT32      AddrOffset;
  Status = SpiGetRegionAddress (FlashRegionBios, NULL, &RgnSize);
  if (EFI_ERROR (Status)) {
    return Status;
  }
  AddrOffset = (UINT32)((UINT32)PAddress + RgnSize);
  ByteCount  = (UINT32)*NumBytes;
  return SpiFlashRead (FlashRegionBios, AddrOffset, ByteCount, Buffer);
}