summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-05-25 09:43:44 -0600
committerTom Rini <[email protected]>2026-05-25 09:43:44 -0600
commit97208cb762aacb4a63297afa1ec34ef7dc82261a (patch)
tree56ec980f6ddaf4e5f3ac2d554043488bc71dbe66
parentba932756ca1518a98ead78980c9010f843b5319a (diff)
parent8a5989acc6ff1430a2775178d2e6b0b5d4573247 (diff)
Merge tag 'xilinx-for-v2026.07-rc3' of https://source.denx.de/u-boot/custodians/u-boot-microblaze
AMD/Xilinx/FPGA changes for v2026.07-rc3 versal/fpga: - Fix unaligned buffer handling versal2: - Fix buffer overflow in SOC name array
-rw-r--r--board/amd/versal2/board.c9
-rw-r--r--drivers/fpga/versalpl.c2
2 files changed, 6 insertions, 5 deletions
diff --git a/board/amd/versal2/board.c b/board/amd/versal2/board.c
index d94c1494d53..81daba1c5ef 100644
--- a/board/amd/versal2/board.c
+++ b/board/amd/versal2/board.c
@@ -81,12 +81,13 @@ char *soc_name_decode(void)
}
/*
- * --rev. are 6 chars
- * max platform name is qemu which is 4 chars
+ * --rev.-el are 9 chars
+ * max platform name is emu-mmd which is 7 chars
* platform version number are 1+1
- * Plus 1 char for \n
+ * el is 1 char
+ * Plus 1 char for NULL byte
*/
- name = calloc(1, strlen(CONFIG_SYS_BOARD) + 13);
+ name = calloc(1, strlen(CONFIG_SYS_BOARD) + 20);
if (!name)
return NULL;
diff --git a/drivers/fpga/versalpl.c b/drivers/fpga/versalpl.c
index 630d1ecfea3..3cb56cc0dc9 100644
--- a/drivers/fpga/versalpl.c
+++ b/drivers/fpga/versalpl.c
@@ -17,7 +17,7 @@ static ulong versal_align_dma_buffer(ulong *buf, u32 len)
if ((ulong)buf != ALIGN((ulong)buf, ARCH_DMA_MINALIGN)) {
new_buf = (ulong *)ALIGN((ulong)buf, ARCH_DMA_MINALIGN);
- memcpy(new_buf, buf, len);
+ memmove(new_buf, buf, len);
buf = new_buf;
}