Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/uebayasi-xip]: src/sys/arch Teach TLB miss handler (pmap_tlbmiss()) to m...
details: https://anonhg.NetBSD.org/src/rev/2a97a71f7fdd
branches: uebayasi-xip
changeset: 751773:2a97a71f7fdd
user: uebayasi <uebayasi%NetBSD.org@localhost>
date: Sat Aug 14 02:09:57 2010 +0000
description:
Teach TLB miss handler (pmap_tlbmiss()) to map "Expansion ROM" area as
PA == VA. Now we don't need to reserve a TLB entry for it.
diffstat:
sys/arch/evbppc/obs405/obs266_machdep.c | 9 ++-------
sys/arch/powerpc/ibm4xx/pmap.c | 7 ++++---
sys/arch/powerpc/include/ibm4xx/vmparam.h | 4 ++--
3 files changed, 8 insertions(+), 12 deletions(-)
diffs (76 lines):
diff -r bc8037dfe350 -r 2a97a71f7fdd sys/arch/evbppc/obs405/obs266_machdep.c
--- a/sys/arch/evbppc/obs405/obs266_machdep.c Thu Aug 12 03:41:55 2010 +0000
+++ b/sys/arch/evbppc/obs405/obs266_machdep.c Sat Aug 14 02:09:57 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: obs266_machdep.c,v 1.10.2.2 2010/08/11 14:02:45 uebayasi Exp $ */
+/* $NetBSD: obs266_machdep.c,v 1.10.2.3 2010/08/14 02:09:57 uebayasi Exp $ */
/* Original: md_machdep.c,v 1.3 2005/01/24 18:47:37 shige Exp $ */
/*
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.10.2.2 2010/08/11 14:02:45 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: obs266_machdep.c,v 1.10.2.3 2010/08/14 02:09:57 uebayasi Exp $");
#include "opt_compat_netbsd.h"
#include "opt_ddb.h"
@@ -150,11 +150,6 @@
for (va = 0; va < endkernel; va += TLB_PG_SIZE)
ppc4xx_tlb_reserve(va, va, TLB_PG_SIZE, TLB_EX);
-#ifdef XIP
- /* Map NOR FlashROM as managed. */
- ppc4xx_tlb_reserve(0xff000000, 0xff000000, TLB_PG_SIZE, TLB_I);
-#endif
-
/* Map console after RAM (see pmap_tlbmiss()) */
ppc4xx_tlb_reserve(CONADDR, roundup(memsize, TLB_PG_SIZE), TLB_PG_SIZE,
TLB_I | TLB_G);
diff -r bc8037dfe350 -r 2a97a71f7fdd sys/arch/powerpc/ibm4xx/pmap.c
--- a/sys/arch/powerpc/ibm4xx/pmap.c Thu Aug 12 03:41:55 2010 +0000
+++ b/sys/arch/powerpc/ibm4xx/pmap.c Sat Aug 14 02:09:57 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.60.2.4 2010/08/11 13:46:28 uebayasi Exp $ */
+/* $NetBSD: pmap.c,v 1.60.2.5 2010/08/14 02:09:57 uebayasi Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.60.2.4 2010/08/11 13:46:28 uebayasi Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.60.2.5 2010/08/14 02:09:57 uebayasi Exp $");
#include "opt_xip.h"
@@ -1517,7 +1517,8 @@
* to not clobber 0 upto ${physmem} with device mappings in machdep
* code.
*/
- if (ctx != KERNEL_PID || va >= VM_MIN_KERNEL_ADDRESS) {
+ if (ctx != KERNEL_PID ||
+ (va >= VM_MIN_KERNEL_ADDRESS && va < VM_MAX_KERNEL_ADDRESS)) {
pte = pte_find((struct pmap *)__UNVOLATILE(ctxbusy[ctx]), va);
if (pte == NULL) {
/* Map unmanaged addresses directly for kernel access */
diff -r bc8037dfe350 -r 2a97a71f7fdd sys/arch/powerpc/include/ibm4xx/vmparam.h
--- a/sys/arch/powerpc/include/ibm4xx/vmparam.h Thu Aug 12 03:41:55 2010 +0000
+++ b/sys/arch/powerpc/include/ibm4xx/vmparam.h Sat Aug 14 02:09:57 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.6.2.2 2010/08/11 13:50:05 uebayasi Exp $ */
+/* $NetBSD: vmparam.h,v 1.6.2.3 2010/08/14 02:09:57 uebayasi Exp $ */
/*-
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -78,7 +78,7 @@
#define VM_MAXUSER_ADDRESS ((vaddr_t)0xffff0000-PAGE_SIZE)
#define VM_MAX_ADDRESS VM_MAXUSER_ADDRESS
#define VM_MIN_KERNEL_ADDRESS ((vaddr_t)0x80000000)
-#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xff000000)
+#define VM_MAX_KERNEL_ADDRESS ((vaddr_t)0xef000000) /* before I/O periphs */
#else
/*
* Would like to have MAX addresses = 0, but this doesn't (currently) work
Home |
Main Index |
Thread Index |
Old Index