Commit Graph

5 Commits

Author SHA1 Message Date
Laszlo Ersek aff463c825 Vlv2TbltDevicePkg/FvbRuntimeDxe: correct NumOfLba vararg type in EraseBlocks()
According to the PI spec, Volume 3,
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.EraseBlocks():

> The variable argument list is a list of tuples. Each tuple describes a
> range of LBAs to erase and consists of the following:
> * An EFI_LBA that indicates the starting LBA
> * A UINTN that indicates the number of blocks to erase

(NB, in edk2, EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL is a typedef to
EFI_FIRMWARE_VOLUME_BLOCK2_PROTOCOL.)

In this driver, the NumOfLba local variable is defined with type UINTN,
but the TYPE argument passed to VA_ARG() is UINT32. Fix the mismatch.

Cc: David Wei <david.wei@intel.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Mang Guo <mang.guo@intel.com>
Reported-by: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
2017-05-26 14:41:13 +08:00
Gary Lin e80cb37ee7 Vlv2TbltDevicePkg/FvbRuntimeDxe: Remove unused variables
Fix the following errors from gcc:

Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c: In function ‘FvbWriteBlock’:
Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c:368:44: error: variable ‘FwhInstance’ set but not used [-Werror=unused-but-set-variable]

Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c: In function ‘FvbEraseBlock’:
Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c:448:44: error: variable ‘FwhInstance’ set but not used [-Werror=unused-but-set-variable]

Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c: In function ‘FvbInitialize’:
Vlv2TbltDevicePkg/FvbRuntimeDxe/FvbService.c:1028:41: error: variable ‘FvHeaderValid’ set but not used [-Werror=unused-but-set-variable]

Cc: David Wei <david.wei@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Gary Lin <glin@suse.com>
2016-08-03 16:09:44 +08:00
Laszlo Ersek ba53301f50 Vlv2TbltDevicePkg: fix ASSERT_EFI_ERROR() typos
A number of code locations use

  ASSERT_EFI_ERROR (BooleanExpression)

instead of

  ASSERT (BooleanExpression)

Fix them.

Cc: David Wei <david.wei@intel.com>
Cc: Tim He <tim.he@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: David Wei <david.wei@intel.com>
Reviewed-by: Giri P Mudusuru <giri.p.mudusuru@intel.com>
2016-07-01 15:04:55 +08:00
Star Zeng abbe4e57f4 Vlv2TbltDevicePkg FvbRuntimeDxe: Fix CalculateCheckSum16 input incorrect length
The input length should be "The size, in bytes, of Buffer.",
the divide sizeof (UINT16) operation is not needed and incorrect.

Cc: David Wei <david.wei@intel.com>
Cc: Tim He <tim.he@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: David Wei <david.wei@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18563 6f19259b-4bc3-4df7-8a09-765794883524
2015-09-30 04:39:34 +00:00
David Wei 3cbfba02fe Upload BSD-licensed Vlv2TbltDevicePkg and Vlv2DeviceRefCodePkg to
https://svn.code.sf.net/p/edk2/code/trunk/edk2/, 

which are for MinnowBoard MAX open source project.


Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: David Wei <david.wei@intel.com>
Reviewed-by: Mike Wu <mike.wu@intel.com>
Reviewed-by: Hot Tian <hot.tian@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16599 6f19259b-4bc3-4df7-8a09-765794883524
2015-01-12 09:37:20 +00:00