vm86.c (98482) | vm86.c (99862) |
---|---|
1/*- 2 * Copyright (c) 1997 Jonathan Lemon 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * | 1/*- 2 * Copyright (c) 1997 Jonathan Lemon 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 9 unchanged lines hidden (view full) --- 18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * |
26 * $FreeBSD: head/sys/i386/i386/vm86.c 98482 2002-06-20 07:23:08Z peter $ | 26 * $FreeBSD: head/sys/i386/i386/vm86.c 99862 2002-07-12 07:56:11Z peter $ |
27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/proc.h> 32#include <sys/lock.h> 33#include <sys/malloc.h> 34#include <sys/mutex.h> --- 563 unchanged lines hidden (view full) --- 598 int i, entry, retval; 599 600 mtx_lock(&vm86_lock); 601 for (i = 0; i < vmc->npages; i++) { 602 page = vtophys(vmc->pmap[i].kva & PG_FRAME); 603 entry = vmc->pmap[i].pte_num; 604 vmc->pmap[i].old_pte = pte[entry]; 605 pte[entry] = page | PG_V | PG_RW | PG_U; | 27 */ 28 29#include <sys/param.h> 30#include <sys/systm.h> 31#include <sys/proc.h> 32#include <sys/lock.h> 33#include <sys/malloc.h> 34#include <sys/mutex.h> --- 563 unchanged lines hidden (view full) --- 598 int i, entry, retval; 599 600 mtx_lock(&vm86_lock); 601 for (i = 0; i < vmc->npages; i++) { 602 page = vtophys(vmc->pmap[i].kva & PG_FRAME); 603 entry = vmc->pmap[i].pte_num; 604 vmc->pmap[i].old_pte = pte[entry]; 605 pte[entry] = page | PG_V | PG_RW | PG_U; |
606 pmap_invalidate_page(kernel_pmap, vmc->pmap[i].kva); |
|
606 } 607 608 vmf->vmf_trapno = intnum; 609 retval = vm86_bioscall(vmf); 610 611 for (i = 0; i < vmc->npages; i++) { 612 entry = vmc->pmap[i].pte_num; 613 pte[entry] = vmc->pmap[i].old_pte; | 607 } 608 609 vmf->vmf_trapno = intnum; 610 retval = vm86_bioscall(vmf); 611 612 for (i = 0; i < vmc->npages; i++) { 613 entry = vmc->pmap[i].pte_num; 614 pte[entry] = vmc->pmap[i].old_pte; |
615 pmap_invalidate_page(kernel_pmap, vmc->pmap[i].kva); |
|
614 } 615 mtx_unlock(&vm86_lock); 616 617 return (retval); 618} 619 620vm_offset_t 621vm86_getaddr(vmc, sel, off) --- 111 unchanged lines hidden --- | 616 } 617 mtx_unlock(&vm86_lock); 618 619 return (retval); 620} 621 622vm_offset_t 623vm86_getaddr(vmc, sel, off) --- 111 unchanged lines hidden --- |