Module Name: src Committed By: martin Date: Sat Sep 28 07:24:29 UTC 2019
Modified Files: src/sys/stand/efiboot [netbsd-9]: efiblock.c Log Message: Pull up following revision(s) (requested by jakllsch in ticket #257): sys/stand/efiboot/efiblock.c: revision 1.7 Use roundup2() instead of open coding something almost the same that truncates 64-bit quantities. Fixes disk access and booting in bootaa64.efi on SoftIron OverDrive 1000 (which does not have any memory below 4GiB). To generate a diff of this commit: cvs rdiff -u -r1.5.6.1 -r1.5.6.2 src/sys/stand/efiboot/efiblock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/stand/efiboot/efiblock.c diff -u src/sys/stand/efiboot/efiblock.c:1.5.6.1 src/sys/stand/efiboot/efiblock.c:1.5.6.2 --- src/sys/stand/efiboot/efiblock.c:1.5.6.1 Sun Sep 22 12:37:39 2019 +++ src/sys/stand/efiboot/efiblock.c Sat Sep 28 07:24:29 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: efiblock.c,v 1.5.6.1 2019/09/22 12:37:39 martin Exp $ */ +/* $NetBSD: efiblock.c,v 1.5.6.2 2019/09/28 07:24:29 martin Exp $ */ /*- * Copyright (c) 2016 Kimihiro Nonaka <non...@netbsd.org> @@ -108,8 +108,8 @@ efi_block_allocate_device_buffer(struct *buf_start = buf = AllocatePool(size); else { buf = AllocatePool(size + bdev->bio->Media->IoAlign - 1); - *buf_start = (buf == NULL) ? NULL : (void *)(((intptr_t)buf + - bdev->bio->Media->IoAlign - 1) & ~(bdev->bio->Media->IoAlign - 1)); + *buf_start = (buf == NULL) ? NULL : + (void *)roundup2((intptr_t)buf, bdev->bio->Media->IoAlign); } return buf;