Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/uebayasi-xip]: src/sys/arch/x86/x86 PA != VA here, use vtophys() to conv...



details:   https://anonhg.NetBSD.org/src/rev/6e46858fd1dc
branches:  uebayasi-xip
changeset: 751782:6e46858fd1dc
user:      uebayasi <uebayasi%NetBSD.org@localhost>
date:      Wed Aug 25 13:36:09 2010 +0000

description:
PA != VA here, use vtophys() to convert VA to PA.

(I hate x86.)

diffstat:

 sys/arch/x86/x86/xmd_machdep.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 345a95b2dbfc -r 6e46858fd1dc sys/arch/x86/x86/xmd_machdep.c
--- a/sys/arch/x86/x86/xmd_machdep.c    Fri Aug 20 07:04:37 2010 +0000
+++ b/sys/arch/x86/x86/xmd_machdep.c    Wed Aug 25 13:36:09 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: xmd_machdep.c,v 1.1.2.1 2010/08/20 07:04:38 uebayasi Exp $     */
+/*     $NetBSD: xmd_machdep.c,v 1.1.2.2 2010/08/25 13:36:09 uebayasi Exp $     */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xmd_machdep.c,v 1.1.2.1 2010/08/20 07:04:38 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xmd_machdep.c,v 1.1.2.2 2010/08/25 13:36:09 uebayasi Exp $");
 
 #include "opt_xip.h"
 
@@ -46,7 +46,7 @@
 xmd_machdep_mmap(vaddr_t addr, off_t off, int prot)
 {
 
-       return x86_btop(addr + off);
+       return x86_btop(vtophys(addr + off));
 }
 
 void *
@@ -54,8 +54,8 @@
 {
        paddr_t start, end;
 
-       start = x86_btop(addr);
-       end = x86_btop(addr + size);
+       start = x86_btop(vtophys(addr));
+       end = x86_btop(vtophys(addr + size));
 
        return uvm_page_physload_device(start, end, start, end, PROT_READ, 0);
 }



Home | Main Index | Thread Index | Old Index