aboutsummaryrefslogtreecommitdiff
path: root/replication.c
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2024-10-28 17:23:08 +0100
committerCédric Le Goater <clg@redhat.com>2024-11-04 11:33:13 +0100
commitc078298301a8c72fe12da85d94372689196628bc (patch)
tree947f1a5c34962ce1452739de08b0117c496b03d5 /replication.c
parentdeb771d8f3b3e3721d45ad51b6c3364b907ce891 (diff)
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 <clg@kaod.org> Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Fixes: c8cb19876d3e ("hw/sd/sdcard: Support boot area in emmc image") Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Cédric Le Goater <clg@redhat.com>
Diffstat (limited to 'replication.c')
0 files changed, 0 insertions, 0 deletions