summaryrefslogtreecommitdiff
path: root/drivers/fpga/intel_sdm_mb.c
diff options
context:
space:
mode:
authorEddie Kovsky <ekovsky@redhat.com>2025-05-21 15:26:59 -0600
committerTom Rini <trini@konsulko.com>2025-05-30 13:44:05 -0600
commitb22a276f039f818d5564bec6637071cfc8a7e432 (patch)
tree08a4df2db304b8fd8e24bafaed08470cf4e5db4d /drivers/fpga/intel_sdm_mb.c
parentb8f282b8e0ee1e2c36694071c26b6b796f50c0a1 (diff)
image: android: fix ramdisk default address
Commit 21e7fa0e3ac5 ("image: android: handle ramdisk default address") changed the default behavior for header versions less than or equal to 2. The ramdisk address (img_data.ramdisk_ptr) is only assigned to *rd_data if the physical load address (img_data.ramdisk_addr) is equal to 0 or the Android default ramdisk address. /* Ramdisk can be used in-place, use current ptr */ if (img_data.ramdisk_addr == 0 || img_data.ramdisk_addr == ANDROID_IMAGE_DEFAULT_RAMDISK_ADDR) { *rd_data = img_data.ramdisk_ptr; } else { ramdisk_ptr = img_data.ramdisk_addr; *rd_data = ramdisk_ptr; memcpy((void *)(ramdisk_ptr), (void *)img_data.ramdisk_ptr, img_data.ramdisk_size); } When the img_data.ramdisk_addr and the img_data.kernel_addr are the same *rd_data needs to be assigned to the ramdisk address (ramdisk_ptr), not the physical address (ramdisk_addr). As a result of the current behavior, we can no longer boot a kernel on the Renesas R-Car S4 board. Add an additional check to the if clause so that the ramdisk address is assigned when the kernel address and the ramdisk address are the same, restoring the previous default behavior. Fixes: 21e7fa0e3ac5 ("image: android: handle ramdisk default address") Signed-off-by: Eddie Kovsky <ekovsky@redhat.com> Reviewed-by: Mattijs Korpershoek <mkorpershoek@kernel.org> Tested-by: Mattijs Korpershoek <mkorpershoek@kernel.org> # khadas vim3
Diffstat (limited to 'drivers/fpga/intel_sdm_mb.c')
0 files changed, 0 insertions, 0 deletions