diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-10-17 16:30:20 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-10-17 16:30:20 +0000 |
commit | 4ffeb47e1cdc4d287de5c609e3ac3797499b1be2 (patch) | |
tree | 218bf7984249b387b36a22d3dd2d32387d9573cb /sys/arch/i386 | |
parent | 24e3de5df67557e931b57c91faa1a8f7da923c7f (diff) |
undo last commit. on some kernel links, this causes pcibios panics at
startup (on ALL machines)
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/bios.c | 27 |
1 files changed, 4 insertions, 23 deletions
diff --git a/sys/arch/i386/i386/bios.c b/sys/arch/i386/i386/bios.c index 28b0471641f..5c07e255c71 100644 --- a/sys/arch/i386/i386/bios.c +++ b/sys/arch/i386/i386/bios.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bios.c,v 1.35 2000/10/16 19:29:09 mickey Exp $ */ +/* $OpenBSD: bios.c,v 1.36 2000/10/17 16:30:19 deraadt Exp $ */ /* * Copyright (c) 1997-2000 Michael Shalayeff @@ -43,7 +43,6 @@ #include <sys/reboot.h> #include <vm/vm.h> -#include <vm/vm_kern.h> #include <sys/sysctl.h> #include <dev/cons.h> @@ -312,8 +311,6 @@ bios32_service(service, e, ei) extern union descriptor *dynamic_gdt; extern int gdt_get_slot __P((void)); - u_long pa, endpa; - vm_offset_t va; u_int32_t base, count, off, ent; int slot; @@ -333,28 +330,12 @@ bios32_service(service, e, ei) if (ent <= BIOS32_START || ent >= BIOS32_END) return 0; - - endpa = i386_round_page(BIOS32_END); - -#if defined(UVM) - va = uvm_km_valloc(kernel_map, endpa); -#else - va = kmem_alloc_pageable(kernel_map, endpa); -#endif - if (va == 0) - return (0); - slot = gdt_get_slot(); - setsegment(&dynamic_gdt[slot].sd, (caddr_t)va, BIOS32_END, - SDT_MEMERA, SEL_KPL, 1, 0); - - for (; pa < endpa; pa += NBPG, va += NBPG) - pmap_enter(pmap_kernel(), va, pa, - VM_PROT_READ | VM_PROT_WRITE, TRUE, - VM_PROT_READ | VM_PROT_WRITE); + setsegment(&dynamic_gdt[slot].sd, ISA_HOLE_VADDR(base), + ((base + 0x10000) & ~0xffff) - 1, SDT_MEMERA, SEL_KPL, 1, 0); e->segment = GSEL(slot, SEL_KPL); - e->offset = (vaddr_t)ent; + e->offset = (vaddr_t)(ent - base); ei->bei_base = base; ei->bei_size = count; |