From: Yu Watanabe Date: Mon, 16 Feb 2026 00:10:01 +0000 (+0900) Subject: boot: fix buffer alignment when doing block I/O (#40465) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d0e8271b4ab332d356d7f59394035da2d8845a8;p=thirdparty%2Fsystemd.git boot: fix buffer alignment when doing block I/O (#40465) UEFI Block I/O Protocol has `Media->IoAlign` field dictating the minimum alignment for I/O buffer. It's quite surprising this has been lingering here unnoticed for years, seems like most UEFI implementations have small or no alignment requirements. U-Boot is not the case here, and requires at least 512 byte alignment, hence attempt to read GPT partition table fail and in effect systemd-boot can not find XBOOTLDR partition. These patches allow to boot from XBOOTLDR partition on U-Boot - tested with latest systemd revision and U-Boot master (`8de6e8f8a076d2c9b6d38d8563db135c167077ec`) on x64 and ARM32, of which both are failing without the patch. Also fixes Bitlocker probing logic, which is the only other place where raw block I/O is used, however this is untested. --- 6d0e8271b4ab332d356d7f59394035da2d8845a8