diff options
author | 2007-05-27 00:57:17 +0000 | |
---|---|---|
committer | 2007-05-27 00:57:17 +0000 | |
commit | e3e152095a3c45bb420a950a9755b4ca050cb043 (patch) | |
tree | da5259233afd385aa05a46db9c31980ecc8c4159 | |
parent | sync (diff) | |
download | wireguard-openbsd-e3e152095a3c45bb420a950a9755b4ca050cb043.tar.xz wireguard-openbsd-e3e152095a3c45bb420a950a9755b4ca050cb043.zip |
When deciding whether to allocate a bounce buffer, we need one if
we are going to read exactly at 1 MB (i.e. fix an off-by-one that
is already correct in the amd64 version of this file).
ok toby@
-rw-r--r-- | sys/arch/i386/stand/libsa/biosdev.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/i386/stand/libsa/biosdev.c b/sys/arch/i386/stand/libsa/biosdev.c index b3dbe74c317..4d6348a8c72 100644 --- a/sys/arch/i386/stand/libsa/biosdev.c +++ b/sys/arch/i386/stand/libsa/biosdev.c @@ -1,4 +1,4 @@ -/* $OpenBSD: biosdev.c,v 1.71 2007/04/04 14:36:05 jmc Exp $ */ +/* $OpenBSD: biosdev.c,v 1.72 2007/05/27 00:57:17 tom Exp $ */ /* * Copyright (c) 1996 Michael Shalayeff @@ -260,11 +260,11 @@ biosd_io(int rw, bios_diskinfo_t *bd, daddr_t off, int nsect, void *buf) /* * Use a bounce buffer to not cross 64k DMA boundary, and to - * not access above 1 MB. + * not access 1 MB or above. */ if (((((u_int32_t)buf) & ~0xffff) != (((u_int32_t)buf + bbsize) & ~0xffff)) || - (((u_int32_t)buf) > 0x100000)) { + (((u_int32_t)buf) >= 0x100000)) { /* * XXX we believe that all the io is buffered * by fs routines, so no big reads anyway |