Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hw/sd/sdcard: Fix calculation of size when using eMMC boot partitions
The sd_bootpart_offset() function calculates the *runtime* offset which changes as the guest switches between accessing the main user data area and the boot partitions by writing to the EXT_CSD_PART_CONFIG_ACC_MASK bits, so it shouldn't be used to calculate the main user data area size. Instead, subtract the boot_part_size directly (twice, as there are two identical boot partitions defined by the eMMC spec). Suggested-by: Cédric Le Goater <[email protected]> Signed-off-by: Jan Luebbe <[email protected]> Fixes: c8cb198 ("hw/sd/sdcard: Support boot area in emmc image") Tested-by: Guenter Roeck <[email protected]> Reviewed-by: Cédric Le Goater <[email protected]> (cherry picked from commit c078298) Signed-off-by: Michael Tokarev <[email protected]>
- Loading branch information