Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Remove old pmap support for platforms which have fu...
details: https://anonhg.NetBSD.org/src/rev/c81ff789cb6e
branches: trunk
changeset: 546628:c81ff789cb6e
user: thorpej <thorpej%NetBSD.org@localhost>
date: Sat May 03 03:29:06 2003 +0000
description:
Remove old pmap support for platforms which have fully switched over.
diffstat:
sys/arch/cats/cats/cats_machdep.c | 68 +-------------
sys/arch/cats/include/vmparam.h | 5 +-
sys/arch/evbarm/adi_brh/brh_machdep.c | 65 +-------------
sys/arch/evbarm/include/vmparam.h | 5 +-
sys/arch/evbarm/integrator/integrator_machdep.c | 64 +-------------
sys/arch/evbarm/iq80310/iq80310_machdep.c | 65 +-------------
sys/arch/evbarm/iq80321/iq80321_machdep.c | 65 +-------------
sys/arch/evbarm/ixm1200/ixm1200_machdep.c | 69 +-------------
sys/arch/evbarm/smdk2xx0/smdk2800_machdep.c | 65 +-------------
sys/arch/hpcarm/hpcarm/hpc_machdep.c | 67 +-------------
sys/arch/hpcarm/include/vmparam.h | 5 +-
sys/arch/netwinder/include/vmparam.h | 5 +-
sys/arch/netwinder/netwinder/netwinder_machdep.c | 63 +------------
sys/arch/shark/include/vmparam.h | 5 +-
sys/arch/shark/ofw/ofw.c | 111 +----------------------
15 files changed, 18 insertions(+), 709 deletions(-)
diffs (truncated from 1589 to 300 lines):
diff -r 1f6a651966aa -r c81ff789cb6e sys/arch/cats/cats/cats_machdep.c
--- a/sys/arch/cats/cats/cats_machdep.c Sat May 03 03:24:01 2003 +0000
+++ b/sys/arch/cats/cats/cats_machdep.c Sat May 03 03:29:06 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cats_machdep.c,v 1.42 2003/05/02 23:22:34 thorpej Exp $ */
+/* $NetBSD: cats_machdep.c,v 1.43 2003/05/03 03:29:06 thorpej Exp $ */
/*
* Copyright (c) 1997,1998 Mark Brinicombe.
@@ -346,9 +346,6 @@
u_int l1pagetable;
struct exec *kernexec = (struct exec *)KERNEL_TEXT_BASE;
pv_addr_t kernel_l1pt;
-#ifndef ARM32_PMAP_NEW
- pv_addr_t kernel_ptpt;
-#endif
/*
* Heads up ... Setup the CPU / MMU / TLB functions
@@ -488,15 +485,8 @@
&& kernel_l1pt.pv_pa == 0) {
valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE);
} else {
-#ifdef ARM32_PMAP_NEW
valloc_pages(kernel_pt_table[loop1],
L2_TABLE_SIZE / PAGE_SIZE);
-#else
- alloc_pages(kernel_pt_table[loop1].pv_pa,
- L2_TABLE_SIZE / PAGE_SIZE);
- kernel_pt_table[loop1].pv_va =
- kernel_pt_table[loop1].pv_pa;
-#endif
++loop1;
}
}
@@ -514,11 +504,6 @@
*/
alloc_pages(systempage.pv_pa, 1);
-#ifndef ARM32_PMAP_NEW
- /* Allocate a page for the page table to map kernel page tables*/
- valloc_pages(kernel_ptpt, L2_TABLE_SIZE / PAGE_SIZE);
-#endif
-
/* Allocate stacks for all modes */
valloc_pages(irqstack, IRQ_STACK_SIZE);
valloc_pages(abtstack, ABT_STACK_SIZE);
@@ -566,10 +551,6 @@
pmap_curmaxkvaddr =
KERNEL_VM_BASE + (KERNEL_PT_VMDATA_NUM * 0x00400000);
-#ifndef ARM32_PMAP_NEW
- pmap_link_l2pt(l1pagetable, PTE_BASE, &kernel_ptpt);
-#endif
-
#ifdef VERBOSE_INIT_ARM
printf("Mapping kernel\n");
#endif
@@ -628,10 +609,6 @@
pmap_map_chunk(l1pagetable, kernelstack.pv_va, kernelstack.pv_pa,
UPAGES * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-#ifndef ARM32_PMAP_NEW
- pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
- L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-#else
pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
@@ -640,40 +617,6 @@
kernel_pt_table[loop].pv_pa, L2_TABLE_SIZE,
VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
}
-#endif
-
-#ifndef ARM32_PMAP_NEW
- /* Map the page table that maps the kernel pages */
- pmap_map_entry(l1pagetable, kernel_ptpt.pv_va, kernel_ptpt.pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE);
-
- /*
- * Map entries in the page table used to map PTE's
- * Basically every kernel page table gets mapped here
- */
- /* The -2 is slightly bogus, it should be -log2(sizeof(pt_entry_t)) */
- for (loop = 0; loop < KERNEL_PT_KERNEL_NUM; loop++)
- pmap_map_entry(l1pagetable,
- PTE_BASE + ((KERNEL_BASE +
- (loop * 0x00400000)) >> (PGSHIFT-2)),
- kernel_pt_table[KERNEL_PT_KERNEL + loop].pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
- pmap_map_entry(l1pagetable,
- PTE_BASE + (PTE_BASE >> (PGSHIFT-2)),
- kernel_ptpt.pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE);
-
- pmap_map_entry(l1pagetable,
- PTE_BASE + (0x00000000 >> (PGSHIFT-2)),
- kernel_pt_table[KERNEL_PT_SYS].pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
- for (loop = 0; loop < KERNEL_PT_VMDATA_NUM; ++loop)
- pmap_map_entry(l1pagetable,
- PTE_BASE + ((KERNEL_VM_BASE +
- (loop * 0x00400000)) >> (PGSHIFT-2)),
- kernel_pt_table[KERNEL_PT_VMDATA + loop].pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-#endif
/* Map the vector page. */
pmap_map_entry(l1pagetable, vector_page, systempage.pv_pa,
@@ -714,12 +657,9 @@
*/
/* fcomcndetach(); */
-#ifdef ARM32_PMAP_NEW
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
-#endif
setttb(kernel_l1pt.pv_pa);
cpu_tlb_flushID();
-#ifdef ARM32_PMAP_NEW
cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2));
/*
* Moved from cpu_startup() as data_abort_handler() references
@@ -727,7 +667,6 @@
*/
proc0paddr = (struct user *)kernelstack.pv_va;
lwp0.l_addr = proc0paddr;
-#endif
/*
* XXX this should only be done in main() but it useful to
* have output earlier ...
@@ -861,11 +800,8 @@
/* Boot strap pmap telling it where the kernel page table is */
printf("pmap ");
-#ifndef ARM32_PMAP_NEW
- pmap_bootstrap((pd_entry_t *)kernel_l1pt.pv_va, kernel_ptpt);
-#else
pmap_bootstrap((pd_entry_t *)kernel_l1pt.pv_va);
-#endif
+
/* Setup the IRQ system */
printf("irq ");
footbridge_intr_init();
diff -r 1f6a651966aa -r c81ff789cb6e sys/arch/cats/include/vmparam.h
--- a/sys/arch/cats/include/vmparam.h Sat May 03 03:24:01 2003 +0000
+++ b/sys/arch/cats/include/vmparam.h Sat May 03 03:29:06 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.18 2003/04/28 01:34:29 thorpej Exp $ */
+/* $NetBSD: vmparam.h,v 1.19 2003/05/03 03:29:07 thorpej Exp $ */
/*
* Copyright (c) 1988 The Regents of the University of California.
@@ -52,9 +52,6 @@
/* Various constants used by the MD code*/
#define KERNEL_TEXT_BASE (KERNEL_BASE + 0x00000000)
-#ifndef ARM32_PMAP_NEW
-#define APTE_BASE (KERNEL_BASE + 0x00c00000)
-#endif
#define KERNEL_VM_BASE (KERNEL_BASE + 0x01000000)
/*
* The Kernel VM Size varies depending on the machine depending on how
diff -r 1f6a651966aa -r c81ff789cb6e sys/arch/evbarm/adi_brh/brh_machdep.c
--- a/sys/arch/evbarm/adi_brh/brh_machdep.c Sat May 03 03:24:01 2003 +0000
+++ b/sys/arch/evbarm/adi_brh/brh_machdep.c Sat May 03 03:29:06 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: brh_machdep.c,v 1.7 2003/05/02 23:22:34 thorpej Exp $ */
+/* $NetBSD: brh_machdep.c,v 1.8 2003/05/03 03:29:07 thorpej Exp $ */
/*
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -388,9 +388,6 @@
int loop1;
u_int l1pagetable;
pv_addr_t kernel_l1pt;
-#ifndef ARM32_PMAP_NEW
- pv_addr_t kernel_ptpt;
-#endif
paddr_t memstart;
psize_t memsize;
@@ -517,15 +514,8 @@
&& kernel_l1pt.pv_pa == 0) {
valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE);
} else {
-#ifdef ARM32_PMAP_NEW
valloc_pages(kernel_pt_table[loop1],
L2_TABLE_SIZE / PAGE_SIZE);
-#else
- alloc_pages(kernel_pt_table[loop1].pv_pa,
- L2_TABLE_SIZE / PAGE_SIZE);
- kernel_pt_table[loop1].pv_va =
- kernel_pt_table[loop1].pv_pa;
-#endif
++loop1;
}
}
@@ -541,11 +531,6 @@
*/
alloc_pages(systempage.pv_pa, 1);
-#ifndef ARM32_PMAP_NEW
- /* Allocate a page for the page table to map kernel page tables. */
- valloc_pages(kernel_ptpt, L2_TABLE_SIZE / PAGE_SIZE);
-#endif
-
/* Allocate stacks for all modes */
valloc_pages(irqstack, IRQ_STACK_SIZE);
valloc_pages(abtstack, ABT_STACK_SIZE);
@@ -598,9 +583,6 @@
for (loop = 0; loop < KERNEL_PT_VMDATA_NUM; loop++)
pmap_link_l2pt(l1pagetable, KERNEL_VM_BASE + loop * 0x00400000,
&kernel_pt_table[KERNEL_PT_VMDATA + loop]);
-#ifndef ARM32_PMAP_NEW
- pmap_link_l2pt(l1pagetable, PTE_BASE, &kernel_ptpt);
-#endif
/* update the top of the kernel VM */
pmap_curmaxkvaddr =
@@ -644,10 +626,6 @@
pmap_map_chunk(l1pagetable, kernelstack.pv_va, kernelstack.pv_pa,
UPAGES * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-#ifndef ARM32_PMAP_NEW
- pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
- L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-#else
pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
@@ -656,44 +634,11 @@
kernel_pt_table[loop].pv_pa, L2_TABLE_SIZE,
VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
}
-#endif
/* Map the Mini-Data cache clean area. */
xscale_setup_minidata(l1pagetable, minidataclean.pv_va,
minidataclean.pv_pa);
-#ifndef ARM32_PMAP_NEW
- /* Map the page table that maps the kernel pages */
- pmap_map_entry(l1pagetable, kernel_ptpt.pv_va, kernel_ptpt.pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE);
-
- /*
- * Map entries in the page table used to map PTE's
- * Basically every kernel page table gets mapped here
- */
- /* The -2 is slightly bogus, it should be -log2(sizeof(pt_entry_t)) */
- for (loop = 0; loop < KERNEL_PT_KERNEL_NUM; loop++) {
- pmap_map_entry(l1pagetable,
- PTE_BASE + ((KERNEL_BASE +
- (loop * 0x00400000)) >> (PGSHIFT-2)),
- kernel_pt_table[KERNEL_PT_KERNEL + loop].pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
- }
- pmap_map_entry(l1pagetable,
- PTE_BASE + (PTE_BASE >> (PGSHIFT-2)),
- kernel_ptpt.pv_pa, VM_PROT_READ|VM_PROT_WRITE, PTE_NOCACHE);
- pmap_map_entry(l1pagetable,
- trunc_page(PTE_BASE + (ARM_VECTORS_HIGH >> (PGSHIFT-2))),
- kernel_pt_table[KERNEL_PT_SYS].pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
- for (loop = 0; loop < KERNEL_PT_VMDATA_NUM; loop++)
- pmap_map_entry(l1pagetable,
- PTE_BASE + ((KERNEL_VM_BASE +
- (loop * 0x00400000)) >> (PGSHIFT-2)),
- kernel_pt_table[KERNEL_PT_VMDATA + loop].pv_pa,
- VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
-#endif
-
/* Map the vector page. */
pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
@@ -736,12 +681,9 @@
#ifdef VERBOSE_INIT_ARM
printf("switching to new L1 page table @%#lx...", kernel_l1pt.pv_pa);
#endif
-#ifdef ARM32_PMAP_NEW
cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT);
-#endif
setttb(kernel_l1pt.pv_pa);
cpu_tlb_flushID();
-#ifdef ARM32_PMAP_NEW
cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2));
/*
@@ -750,7 +692,6 @@
*/
proc0paddr = (struct user *)kernelstack.pv_va;
lwp0.l_addr = proc0paddr;
-#endif
#ifdef VERBOSE_INIT_ARM
printf("done!\n");
@@ -854,11 +795,7 @@
/* Boot strap pmap telling it where the kernel page table is */
Home |
Main Index |
Thread Index |
Old Index