Skip to content

Commit f4f631f

Browse files
committed
ZynqMP ZCU102 SD-card Linux boot fixes
Fixes for booting PetaLinux 2025.2 from SD card on ZCU102: - hal/zynq: implement hal_dts_fixup() for DTB bootargs override - hal/zynq: add hal_get_timer_us() using ARMv8 generic timer - src/sdhci: add udelay settle times and CMD0 retry loop for cold boot - src/boot_aarch64: clean D-cache and disable MMU/caches at EL2 before jumping to Linux (ARM64 boot protocol requirement) - config/examples/zynqmp_sdcard: reduce DISK_BLOCK_SIZE from 512KB to 128KB to avoid SDMA boundary-crossing corruption
1 parent bcaaf37 commit f4f631f

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

config/examples/zynqmp_sdcard.config

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ SIGN?=RSA4096
1717
HASH?=SHA3
1818
IMAGE_HEADER_SIZE?=1024
1919

20-
# Debug options
20+
# Debug options - for production, set DEBUG=0 and drop DEBUG_ZYNQ
2121
DEBUG?=0
2222
DEBUG_SYMBOLS=1
2323
DEBUG_UART=1
@@ -38,6 +38,7 @@ NO_XIP=1
3838

3939
# ELF loading support
4040
ELF?=1
41+
#DEBUG_ELF?=1
4142

4243
# Boot Exception Level: leave wolfBoot at EL2 for handoff to Linux (matches
4344
# the standard PetaLinux U-Boot flow and preserves KVM/hypervisor use of
@@ -79,8 +80,10 @@ WOLFBOOT_NO_PARTITIONS=1
7980
CFLAGS_EXTRA+=-DBOOT_PART_A=1
8081
CFLAGS_EXTRA+=-DBOOT_PART_B=2
8182

82-
# Disk read chunk size (512KB)
83-
CFLAGS_EXTRA+=-DDISK_BLOCK_SIZE=0x80000
83+
# Disk read chunk size. Must be less than the SDHCI SDMA buffer boundary
84+
# (512KB default, SDHCI_DMA_BUFF_BOUNDARY in sdhci.h). Using 512KB causes
85+
# a boundary-crossing edge case that corrupts reads under optimization.
86+
CFLAGS_EXTRA+=-DDISK_BLOCK_SIZE=0x10000
8487

8588
# Linux rootfs is on partition 4. Device naming depends on whether both
8689
# ZynqMP SDHCI controllers are enabled in the XSA / device tree:

0 commit comments

Comments
 (0)