diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-05-20 16:38:02 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2002-05-20 16:38:02 +0000 |
commit | f919b8c68c5deed11e04734f7e6fd07a714cdd55 (patch) | |
tree | fd6015df063f1c1503689ab789c8538cdb692539 /sys/arch/i386 | |
parent | d5ccf12e536c75efef65504900234defe054c591 (diff) |
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
Diffstat (limited to 'sys/arch/i386')
-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); |