X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=ArmPlatformPkg%2FDrivers%2FNorFlashDxe%2FNorFlashFvbDxe.c;h=3ea858f46ffba8244b98cce7feba32dd3d741ed9;hp=12a861267a86e8846e963c1bc0b96fbbaa653d0b;hb=ce69cc776cfcc4a0869907cd4263fd134064dbaf;hpb=7a85e8474127ae6df47337a04797b2b443b57682 diff --git a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c index 12a861267a..3ea858f46f 100644 --- a/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c +++ b/ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashFvbDxe.c @@ -628,10 +628,16 @@ FvbEraseBlocks ( } // How many Lba blocks are we requested to erase? - NumOfLba = VA_ARG (Args, UINT32); + NumOfLba = VA_ARG (Args, UINTN); // All blocks must be within range - DEBUG ((DEBUG_BLKIO, "FvbEraseBlocks: Check if: ( StartingLba=%ld + NumOfLba=%d - 1 ) > LastBlock=%ld.\n", Instance->StartLba + StartingLba, NumOfLba, Instance->Media.LastBlock)); + DEBUG (( + DEBUG_BLKIO, + "FvbEraseBlocks: Check if: ( StartingLba=%ld + NumOfLba=%Lu - 1 ) > LastBlock=%ld.\n", + Instance->StartLba + StartingLba, + (UINT64)NumOfLba, + Instance->Media.LastBlock + )); if ((NumOfLba == 0) || ((Instance->StartLba + StartingLba + NumOfLba - 1) > Instance->Media.LastBlock)) { VA_END (Args); DEBUG ((EFI_D_ERROR, "FvbEraseBlocks: ERROR - Lba range goes past the last Lba.\n")); @@ -656,7 +662,7 @@ FvbEraseBlocks ( } // How many Lba blocks are we requested to erase? - NumOfLba = VA_ARG (Args, UINT32); + NumOfLba = VA_ARG (Args, UINTN); // Go through each one and erase it while (NumOfLba > 0) {