summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1999-08-20 21:08:41 +0000
committermsmith <msmith@FreeBSD.org>1999-08-20 21:08:41 +0000
commitc540cb886d0239c0ef10f6f716379ca46e03611a (patch)
treecd3cebeb7f56d3ac9caaf78b098e14b78b74cf86 /sys/amd64
parentc54627898a4267bd9a7a2bf98a2da7a238186aa0 (diff)
downloadFreeBSD-src-c540cb886d0239c0ef10f6f716379ca46e03611a.zip
FreeBSD-src-c540cb886d0239c0ef10f6f716379ca46e03611a.tar.gz
Loosen up the constructed argument segment generation slightly; rather than
trying to size it intelligently just make it 64k and leave it up to the caller to ensure that the arguments all fit within that range. This should resolve the issue that some people were seeing with the PnP BIOS scan crashing on a large PnP node.
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/bios.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c
index bc1e535..980c0b5 100644
--- a/sys/amd64/amd64/bios.c
+++ b/sys/amd64/amd64/bios.c
@@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bios.c,v 1.16 1999/08/17 07:10:29 msmith Exp $
+ * $Id: bios.c,v 1.17 1999/08/18 02:19:52 msmith Exp $
*/
/*
@@ -287,13 +287,6 @@ set_bios_selectors(struct bios_segments *seg, int flags)
}
}
-/*
- * for pointers, we don't know how much space is supposed to be allocated,
- * so we assume a minimum size of 256 bytes. If more than this is needed,
- * then this can be revisited, such as adding a length specifier.
- */
-#define ASSUMED_ARGSIZE 256
-
extern int vm86pa;
/*
@@ -329,7 +322,7 @@ bios16(struct bios_args *args, char *fmt, ...)
case 'p': /* 32-bit pointer */
i = va_arg(ap, u_int);
arg_start = min(arg_start, i);
- arg_end = max(arg_end, i + ASSUMED_ARGSIZE);
+ arg_end = max(arg_end, i);
flags |= BIOSARGS_FLAG;
stack -= 4;
break;
@@ -361,7 +354,7 @@ bios16(struct bios_args *args, char *fmt, ...)
if (arg_end - arg_start > ctob(16))
return (EACCES);
args->seg.args.base = arg_start;
- args->seg.args.limit = arg_end - arg_start;
+ args->seg.args.limit = 0xffff;
}
args->seg.code32.base = (u_int)&bios16_call & PG_FRAME;
OpenPOWER on IntegriCloud