Bug 253574 - buffers passed to efi readblocks needs to be block aligned on arm.
Summary: buffers passed to efi readblocks needs to be block aligned on arm.
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: arm (show other bugs)
Version: 12.2-RELEASE
Hardware: arm Any
: --- Affects Some People
Assignee: freebsd-arm (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-17 02:40 UTC by Christopher R. Bowman
Modified: 2023-04-24 15:00 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher R. Bowman 2021-02-17 02:40:18 UTC
in stand/efi/boot1/ufs_module.c init_dev allocates a buffer and calls dskread which passes the buffer to the efi entry readblocks from u-booot.
Likewise in stand/efi/libsa/ufsread.c there are calls to dskread.
according to https://gitlab.denx.de/u-boot/u-boot/-/commit/f59f0825e8b9fdeb8abe43ffd10c5119ca1a032f
as of f59f0825 lib/efi_loader/efi_disk.c checks for block alignment of the buffer passed to readblocks.

on my armv7 system u-boot insists on 512 byte alignment.

The blocks allocated in init_dev and fsread should be block aligned.

There probably exists a similar problem in zfs_module.c
Comment 1 crb 2022-06-25 09:59:22 UTC
I switched to the loader_lua which works wonderfully.  You can probably close this.
Comment 2 Mitchell Horne freebsd_committer freebsd_triage 2023-04-24 15:00:01 UTC
Closing. It appears this was already fixed in -CURRENT at the time of the report.

https://cgit.freebsd.org/src/commit/?id=3d5e12ebce94791aa0d6df3e81e7a8ac48ee4b51