Date: Wed, 3 Jun 2020 16:38:16 +0000 (UTC) From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361754 - head/stand/efi/gptboot Message-ID: <202006031638.053GcGoJ091478@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mhorne Date: Wed Jun 3 16:38:16 2020 New Revision: 361754 URL: https://svnweb.freebsd.org/changeset/base/361754 Log: gptboot.efi: align secbuf to 4K The u-boot EFI implementation of the ReadBlocks and WriteBlocks methods requires that the provided buffer meet the IO alignment requirements of the underlying disk. Unlike loader.efi, gptboot.efi doesn't check this requirement, and therefore fails to perform a successful read. Adjust secbuf's alignment to 4K in hopes that we will always meet this requirement. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D25111 Modified: head/stand/efi/gptboot/proto.c Modified: head/stand/efi/gptboot/proto.c ============================================================================== --- head/stand/efi/gptboot/proto.c Wed Jun 3 14:54:54 2020 (r361753) +++ head/stand/efi/gptboot/proto.c Wed Jun 3 16:38:16 2020 (r361754) @@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$"); #include "gpt.h" #include <sys/gpt.h> static const uuid_t freebsd_ufs_uuid = GPT_ENT_TYPE_FREEBSD_UFS; -static char secbuf[4096]; +static char secbuf[4096] __aligned(4096); static struct dsk dsk; static dev_info_t *devices = NULL; static dev_info_t *raw_device = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202006031638.053GcGoJ091478>