diff options
author | 2002-05-20 16:38:01 +0000 | |
---|---|---|
committer | 2002-05-20 16:38:01 +0000 | |
commit | 4437b59f6332f31254cbfa651174ab28c8aef56a (patch) | |
tree | cc094da0f5c956119d0614718b74bc0f2ad91b0d | |
parent | byebye ecoffrdsetroot left over; miod@ ok. (diff) | |
download | wireguard-openbsd-4437b59f6332f31254cbfa651174ab28c8aef56a.tar.xz wireguard-openbsd-4437b59f6332f31254cbfa651174ab28c8aef56a.zip |
ignore corrupted prom headers w/ length exceeding the scanned isa hole region; reported by Jason Spence <jspence@lightconsulting.com> for Toshiba Satellite 3005-S303. add a note on a more aggressive course of action
-rw-r--r-- | sys/arch/i386/i386/bios.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c index 14c711811ae..e5cff420edb 100644 --- a/sys/arch/i386/i386/bios.c +++ b/sys/arch/i386/i386/bios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bios.c,v 1.48 2002/03/14 01:26:32 millert Exp $ */ +/* $OpenBSD: bios.c,v 1.49 2002/05/20 16:38:01 mickey Exp $ */ /* * Copyright (c) 1997-2001 Michael Shalayeff @@ -227,12 +227,16 @@ biosattach(parent, self, aux) if (romh->signature != 0xaa55) continue; + /* + * for this and the next check we probably want + * to reserve the page in the extent anyway + */ if (!romh->len || romh->len == 0xff) continue; len = romh->len * 512; - off = 0xc0000 + (va - (u_int8_t *) - ISA_HOLE_VADDR(0xc0000)); + if (va + len > eva) + continue; for (cksum = 0, i = len; i--; cksum += va[i]) ; @@ -241,6 +245,9 @@ biosattach(parent, self, aux) continue; #endif + off = 0xc0000 + (va - (u_int8_t *) + ISA_HOLE_VADDR(0xc0000)); + if (!str) printf("%s: ROM list:", str = sc->sc_dev.dv_xname); |