aboutsummaryrefslogtreecommitdiff
path: root/docs/system
diff options
context:
space:
mode:
authorJan Luebbe <jlu@pengutronix.de>2024-09-06 18:48:34 +0200
committerPeter Maydell <peter.maydell@linaro.org>2024-10-01 13:58:27 +0100
commit9601076b3b0bced7ed597d1470e3ff2f4e7177d6 (patch)
treef837a01f95c11fdc7981f7d449ef660898a1c813 /docs/system
parent89d94c040453d6dd80e116f3c87d87a808745211 (diff)
downloadqemu-9601076b3b0bced7ed597d1470e3ff2f4e7177d6.zip
qemu-9601076b3b0bced7ed597d1470e3ff2f4e7177d6.tar.gz
qemu-9601076b3b0bced7ed597d1470e3ff2f4e7177d6.tar.bz2
hw/sd/sdcard: Fix handling of disabled boot partitions
The enable bits in the EXT_CSD_PART_CONFIG ext_csd register do *not* specify whether the boot partitions exist, but whether they are enabled for booting. Existence of the boot partitions is specified by a EXT_CSD_BOOT_MULT != 0. Currently, in the case of boot-partition-size=1M and boot-config=0, Linux detects boot partitions of 1M. But as sd_bootpart_offset always returns 0, all reads/writes are mapped to the same offset in the backing file. Fix this bug by calculating the offset independent of which partition is enabled for booting. This bug is unlikely to affect many users with QEMU's current set of boards, because only aspeed sets boot-partition-size, and it also sets boot-config to 8. So to run into this a user would have to manually mark the boot partition non-booting from within the guest. Cc: qemu-stable@nongnu.org Signed-off-by: Jan Luebbe <jlu@pengutronix.de> Message-id: 20240906164834.130257-1-jlu@pengutronix.de Reviewed-by: Peter Maydell <peter.maydell@linaro.org> [PMM: added note to commit message about effects of bug] Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'docs/system')
0 files changed, 0 insertions, 0 deletions