From owner-p4-projects@FreeBSD.ORG Sat Nov 20 06:25:24 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 96F2E16A4D0; Sat, 20 Nov 2004 06:25:23 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7106C16A4CE for ; Sat, 20 Nov 2004 06:25:23 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 15ADD43D3F for ; Sat, 20 Nov 2004 06:25:23 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id iAK6PNCr016150 for ; Sat, 20 Nov 2004 06:25:23 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id iAK6PMDw016143 for perforce@freebsd.org; Sat, 20 Nov 2004 06:25:22 GMT (envelope-from marcel@freebsd.org) Date: Sat, 20 Nov 2004 06:25:22 GMT Message-Id: <200411200625.iAK6PMDw016143@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Subject: PERFORCE change 65540 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2004 06:25:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=65540 Change 65540 by marcel@marcel_nfs on 2004/11/20 06:24:49 IFC @65539 Affected files ... .. //depot/projects/uart/alpha/alpha/genassym.c#4 integrate .. //depot/projects/uart/alpha/alpha/machdep.c#11 integrate .. //depot/projects/uart/alpha/alpha/mp_machdep.c#10 integrate .. //depot/projects/uart/alpha/include/param.h#4 integrate .. //depot/projects/uart/amd64/amd64/busdma_machdep.c#8 integrate .. //depot/projects/uart/amd64/amd64/genassym.c#5 integrate .. //depot/projects/uart/amd64/amd64/machdep.c#10 integrate .. //depot/projects/uart/amd64/include/param.h#4 integrate .. //depot/projects/uart/arm/arm/genassym.c#3 integrate .. //depot/projects/uart/arm/arm/trap.c#3 integrate .. //depot/projects/uart/arm/arm/vm_machdep.c#3 integrate .. //depot/projects/uart/arm/include/param.h#4 integrate .. //depot/projects/uart/arm/sa11x0/assabet_machdep.c#2 integrate .. //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#4 integrate .. //depot/projects/uart/compat/pecoff/imgact_pecoff.c#4 integrate .. //depot/projects/uart/conf/NOTES#21 integrate .. //depot/projects/uart/conf/kmod.mk#9 integrate .. //depot/projects/uart/ddb/db_ps.c#7 integrate .. //depot/projects/uart/i386/i386/busdma_machdep.c#11 integrate .. //depot/projects/uart/i386/i386/genassym.c#4 integrate .. //depot/projects/uart/i386/i386/locore.s#7 integrate .. //depot/projects/uart/i386/i386/machdep.c#11 integrate .. //depot/projects/uart/i386/include/param.h#3 integrate .. //depot/projects/uart/i386/linux/linux_sysvec.c#4 integrate .. //depot/projects/uart/ia64/ia64/genassym.c#7 integrate .. //depot/projects/uart/ia64/ia64/machdep.c#17 integrate .. //depot/projects/uart/ia64/include/param.h#5 integrate .. //depot/projects/uart/kern/imgact_aout.c#4 integrate .. //depot/projects/uart/kern/init_main.c#8 integrate .. //depot/projects/uart/kern/kern_fork.c#8 integrate .. //depot/projects/uart/kern/kern_proc.c#8 integrate .. //depot/projects/uart/netgraph/atm/sscop/ng_sscop_cust.h#3 integrate .. //depot/projects/uart/netgraph/bluetooth/drivers/bt3c/ng_bt3c_pccard.c#3 integrate .. //depot/projects/uart/netgraph/ng_one2many.c#3 integrate .. //depot/projects/uart/pc98/i386/machdep.c#9 integrate .. //depot/projects/uart/powerpc/include/param.h#5 integrate .. //depot/projects/uart/powerpc/powerpc/genassym.c#3 integrate .. //depot/projects/uart/powerpc/powerpc/machdep.c#6 integrate .. //depot/projects/uart/sparc64/include/param.h#4 integrate .. //depot/projects/uart/sparc64/sparc64/genassym.c#6 integrate .. //depot/projects/uart/sparc64/sparc64/machdep.c#8 integrate .. //depot/projects/uart/sys/proc.h#10 integrate .. //depot/projects/uart/sys/systm.h#8 integrate .. //depot/projects/uart/sys/user.h#3 integrate .. //depot/projects/uart/vm/swap_pager.c#14 integrate .. //depot/projects/uart/vm/vm_extern.h#5 integrate .. //depot/projects/uart/vm/vm_glue.c#9 integrate .. //depot/projects/uart/vm/vm_pageout.h#5 integrate Differences ... ==== //depot/projects/uart/alpha/alpha/genassym.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/genassym.c,v 1.44 2004/04/05 21:00:49 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/genassym.c,v 1.45 2004/11/20 02:28:14 das Exp $"); #include #include @@ -52,12 +52,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include #include ==== //depot/projects/uart/alpha/alpha/machdep.c#11 (text+ko) ==== @@ -88,7 +88,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.224 2004/11/05 19:16:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/machdep.c,v 1.225 2004/11/20 02:29:36 das Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -160,7 +160,6 @@ struct mtx icu_lock; -struct user *proc0uarea; vm_offset_t proc0kstack; char machine[] = "alpha"; @@ -848,11 +847,9 @@ proc_linkup(&proc0, &ksegrp0, &thread0); /* - * Init mapping for u page(s) for proc 0 + * Init mapping for kernel stack for proc 0 */ - proc0uarea = (struct user *)pmap_steal_memory(UAREA_PAGES * PAGE_SIZE); proc0kstack = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE); - proc0.p_uarea = proc0uarea; thread0.td_kstack = proc0kstack; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; @@ -861,7 +858,6 @@ * Setup the per-CPU data for the bootstrap cpu. */ { - /* This is not a 'struct user' */ size_t sz = round_page(KSTACK_PAGES * PAGE_SIZE); pcpup = (struct pcpu *) pmap_steal_memory(sz); pcpu_init(pcpup, 0, sz); ==== //depot/projects/uart/alpha/alpha/mp_machdep.c#10 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.53 2004/11/05 19:16:43 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/mp_machdep.c,v 1.54 2004/11/20 02:29:36 das Exp $"); #include "opt_kstack_pages.h" @@ -233,7 +233,7 @@ if (bootverbose) printf("smp_start_secondary: starting cpu %d\n", pal_id); - sz = round_page((UAREA_PAGES + KSTACK_PAGES) * PAGE_SIZE); + sz = KSTACK_PAGES * PAGE_SIZE; pcpu = malloc(sz, M_TEMP, M_NOWAIT); if (!pcpu) { printf("smp_start_secondary: can't allocate memory\n"); ==== //depot/projects/uart/alpha/include/param.h#4 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/alpha/include/param.h,v 1.36 2004/09/02 18:59:14 scottl Exp $ */ +/* $FreeBSD: src/sys/alpha/include/param.h,v 1.37 2004/11/20 02:29:49 das Exp $ */ /* From: NetBSD: param.h,v 1.20 1997/09/19 13:52:53 leo Exp */ /* @@ -117,7 +117,6 @@ #define KSTACK_PAGES 2 /* pages of kstack (with pcb) */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ -#define UAREA_PAGES 1 /* pages of u-area */ /* ==== //depot/projects/uart/amd64/amd64/busdma_machdep.c#8 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.60 2004/11/10 03:49:24 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.61 2004/11/19 17:51:29 scottl Exp $"); #include #include @@ -135,8 +135,7 @@ static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); -static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, - bus_size_t len); +static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); /* * Return true if a match is made. @@ -147,18 +146,15 @@ * to check for a match, if there is no filter callback then assume a match. */ static __inline int -run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, bus_size_t len) +run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) { - bus_size_t bndy; int retval; retval = 0; - bndy = dmat->boundary; do { if (((paddr > dmat->lowaddr && paddr <= dmat->highaddr) - || ((paddr & (dmat->alignment - 1)) != 0) - || ((paddr & bndy) != ((paddr + len) & bndy))) + || ((paddr & (dmat->alignment - 1)) != 0)) && (dmat->filter == NULL || (*dmat->filter)(dmat->filterarg, paddr) != 0)) retval = 1; @@ -586,7 +582,7 @@ while (vaddr < vendaddr) { paddr = pmap_kextract(vaddr); - if (run_filter(dmat, paddr, 0) != 0) { + if (run_filter(dmat, paddr) != 0) { needbounce = 1; map->pagesneeded++; } @@ -647,7 +643,7 @@ sgsize = (baddr - curaddr); } - if (map->pagesneeded != 0 && run_filter(dmat, curaddr, sgsize)) + if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) curaddr = add_bounce_page(dmat, map, vaddr, sgsize); /* ==== //depot/projects/uart/amd64/amd64/genassym.c#5 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.154 2004/05/16 22:43:57 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/genassym.c,v 1.155 2004/11/20 02:30:59 das Exp $"); #include "opt_compat.h" #include "opt_kstack_pages.h" @@ -50,14 +50,12 @@ #include #include #include -#include #include #include #include #include #include #include -#include #include #include #include @@ -67,6 +65,7 @@ #include #include #include +#include #include #include #include @@ -76,7 +75,6 @@ ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); ASSYM(P_SFLAG, offsetof(struct proc, p_sflag)); -ASSYM(P_UAREA, offsetof(struct proc, p_uarea)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); @@ -88,7 +86,6 @@ ASSYM(V_TRAP, offsetof(struct vmmeter, v_trap)); ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall)); ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); -ASSYM(UAREA_PAGES, UAREA_PAGES); ASSYM(KSTACK_PAGES, KSTACK_PAGES); ASSYM(PAGE_SIZE, PAGE_SIZE); ASSYM(NPTEPG, NPTEPG); ==== //depot/projects/uart/amd64/amd64/machdep.c#10 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.622 2004/10/28 12:16:03 simokawa Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.623 2004/11/20 02:29:23 das Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1114,9 +1114,6 @@ #error "have you forgotten the isa device?"; #endif - proc0.p_uarea = (struct user *)(physfree + KERNBASE); - bzero(proc0.p_uarea, UAREA_PAGES * PAGE_SIZE); - physfree += UAREA_PAGES * PAGE_SIZE; thread0.td_kstack = physfree + KERNBASE; bzero((void *)thread0.td_kstack, KSTACK_PAGES * PAGE_SIZE); physfree += KSTACK_PAGES * PAGE_SIZE; ==== //depot/projects/uart/amd64/include/param.h#4 (text+ko) ==== @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)param.h 8.1 (Berkeley) 6/10/93 - * $FreeBSD: src/sys/amd64/include/param.h,v 1.14 2004/09/02 18:59:14 scottl Exp $ + * $FreeBSD: src/sys/amd64/include/param.h,v 1.15 2004/11/20 02:29:49 das Exp $ */ /* @@ -125,7 +125,6 @@ #define KSTACK_PAGES 4 /* pages of kstack (with pcb) */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ -#define UAREA_PAGES 1 /* holds struct user WITHOUT PCB (see def.) */ /* ==== //depot/projects/uart/arm/arm/genassym.c#3 (text+ko) ==== @@ -26,12 +26,11 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.3 2004/11/12 21:49:05 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/genassym.c,v 1.4 2004/11/20 02:30:59 das Exp $"); #include #include #include #include -#include #include #include #include @@ -42,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -94,7 +94,6 @@ ASSYM(TF_R0, offsetof(struct trapframe, tf_r0)); ASSYM(TF_R1, offsetof(struct trapframe, tf_r1)); ASSYM(TF_PC, offsetof(struct trapframe, tf_pc)); -ASSYM(P_UAREA, offsetof(struct proc, p_uarea)); ASSYM(P_PID, offsetof(struct proc, p_pid)); ASSYM(P_FLAG, offsetof(struct proc, p_flag)); @@ -105,7 +104,6 @@ #endif ASSYM(TDF_ASTPENDING, TDF_ASTPENDING); ASSYM(TDF_NEEDRESCHED, TDF_NEEDRESCHED); -ASSYM(USER_SIZE, sizeof(struct user)); ASSYM(P_TRACED, P_TRACED); ASSYM(P_SIGEVENT, P_SIGEVENT); ASSYM(P_PROFIL, P_PROFIL); ==== //depot/projects/uart/arm/arm/trap.c#3 (text+ko) ==== @@ -82,7 +82,7 @@ #include "opt_ktrace.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.3 2004/11/05 19:57:10 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/trap.c,v 1.4 2004/11/20 00:55:57 cognet Exp $"); #include @@ -247,6 +247,7 @@ td = curthread; p = td->td_proc; + atomic_add_int(&cnt.v_trap, 1); /* Data abort came from user mode? */ user = TRAP_USERMODE(tf); @@ -711,6 +712,7 @@ td = curthread; p = td->td_proc; + atomic_add_int(&cnt.v_trap, 1); if (TRAP_USERMODE(tf)) { td->td_frame = tf; @@ -861,6 +863,7 @@ int locked = 0; u_int sticks = 0; + atomic_add_int(&cnt.v_syscall, 1); sticks = td->td_sticks; if (td->td_ucred != td->td_proc->p_ucred) cred_update_thread(td); ==== //depot/projects/uart/arm/arm/vm_machdep.c#3 (text+ko) ==== @@ -81,7 +81,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.6 2004/11/08 00:43:46 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/vm_machdep.c,v 1.7 2004/11/20 02:31:23 das Exp $"); #include #include @@ -145,8 +145,7 @@ struct trapframe *tf; struct switchframe *sf; struct mdproc *mdp2; - vm_offset_t uarea = td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE - - USPACE; + vm_offset_t uarea = td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE; pcb1 = td1->td_pcb; pcb2 = (struct pcb *)(td2->td_kstack + td2->td_kstack_pages * PAGE_SIZE) - 1; @@ -305,7 +304,7 @@ tf->tf_r0 = 0; td->td_pcb->un_32.pcb32_sp = (u_int)sf; td->td_pcb->un_32.pcb32_und_sp = td->td_kstack + td->td_kstack_pages - * PAGE_SIZE - USPACE + USPACE_UNDEF_STACK_TOP; + * PAGE_SIZE + USPACE_UNDEF_STACK_TOP; } /* @@ -336,7 +335,7 @@ td->td_pcb = (struct pcb *)(td->td_kstack + td->td_kstack_pages * PAGE_SIZE) - 1; td->td_frame = (struct trapframe *) - ((u_int)td->td_kstack + td->td_kstack_pages * PAGE_SIZE - USPACE + + ((u_int)td->td_kstack + td->td_kstack_pages * PAGE_SIZE + USPACE_SVC_STACK_TOP - sizeof(struct pcb)) - 1; #ifdef __XSCALE__ pmap_use_minicache(td->td_kstack, td->td_kstack_pages * PAGE_SIZE); ==== //depot/projects/uart/arm/include/param.h#4 (text+ko) ==== @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)param.h 5.8 (Berkeley) 6/28/91 - * $FreeBSD: src/sys/arm/include/param.h,v 1.7 2004/11/04 19:19:21 cognet Exp $ + * $FreeBSD: src/sys/arm/include/param.h,v 1.8 2004/11/20 02:31:37 das Exp $ */ /* @@ -98,14 +98,6 @@ #define KSTACK_PAGES 2 #endif /* !KSTACK_PAGES */ -#ifndef UAREA_PAGES -#define UAREA_PAGES 1 -#endif /* !UAREA_PAGES */ - -#ifndef USPACE -#define USPACE (UAREA_PAGES * PAGE_SIZE) /* total size of u-area */ -#endif - #ifndef FPCONTEXTSIZE #define FPCONTEXTSIZE (0x100) #endif @@ -114,7 +106,7 @@ #define KSTACK_GUARD_PAGES 1 #endif /* !KSTACK_GUARD_PAGES */ -#define USPACE_SVC_STACK_TOP (USPACE) +#define USPACE_SVC_STACK_TOP 0 #define USPACE_SVC_STACK_BOTTOM (USPACE_SVC_STACK_TOP - 0x1000) #define USPACE_UNDEF_STACK_TOP (USPACE_SVC_STACK_BOTTOM - 0x10) #define USPACE_UNDEF_STACK_BOTTOM (FPCONTEXTSIZE + 10) ==== //depot/projects/uart/arm/sa11x0/assabet_machdep.c#2 (text+ko) ==== @@ -47,7 +47,7 @@ #include -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.5 2004/10/11 14:41:38 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.6 2004/11/20 02:29:24 das Exp $"); #include "opt_md.h" @@ -180,7 +180,6 @@ { struct pcpu *pc; struct pv_addr kernel_l1pt; - struct pv_addr proc0_uarea; struct pv_addr md_addr; struct pv_addr md_bla; int loop; @@ -275,8 +274,8 @@ valloc_pages(abtstack, ABT_STACK_SIZE); valloc_pages(undstack, UND_STACK_SIZE); valloc_pages(kernelstack, KSTACK_PAGES); + lastalloced = kernelstack.pv_va; - /* * Allocate memory for the l1 and l2 page tables. The scheme to avoid * wasting memory by allocating the l1pt on the first 16k memory was @@ -284,10 +283,6 @@ * this to work (which is supposed to be the case). */ - /* Allocate pages for process 0 kernel stack and uarea */ - valloc_pages(proc0_uarea, UAREA_PAGES); - lastalloced = proc0_uarea.pv_va; - /* * Now we start construction of the L1 page table * We start by mapping the L2 page tables into the L1. @@ -324,9 +319,6 @@ UND_STACK_SIZE * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); pmap_map_chunk(l1pagetable, kernelstack.pv_va, kernelstack.pv_pa, KSTACK_PAGES * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - pmap_map_chunk(l1pagetable, proc0_uarea.pv_va, proc0_uarea.pv_pa, - UAREA_PAGES * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa, L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE); @@ -393,7 +385,6 @@ /* Set stack for exception handlers */ proc_linkup(&proc0, &ksegrp0, &thread0); - proc0.p_uarea = (struct user *) proc0_uarea.pv_va; thread0.td_kstack = kernelstack.pv_va; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; ==== //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#4 (text+ko) ==== @@ -48,7 +48,7 @@ #include "opt_msgbuf.h" #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.3 2004/11/10 22:09:39 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.4 2004/11/20 02:29:24 das Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -198,7 +198,6 @@ initarm(void *arg, void *arg2) { struct pv_addr kernel_l1pt; - struct pv_addr proc0_uarea; int loop; u_int kerneldatasize, symbolsize; u_int l1pagetable; @@ -298,9 +297,6 @@ * this to work (which is supposed to be the case). */ - /* Allocate pages for process 0 kernel stack and uarea */ - valloc_pages(proc0_uarea, UAREA_PAGES); - /* * Now we start construction of the L1 page table * We start by mapping the L2 page tables into the L1. @@ -333,8 +329,6 @@ UND_STACK_SIZE * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); pmap_map_chunk(l1pagetable, kernelstack.pv_va, kernelstack.pv_pa, KSTACK_PAGES * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); - pmap_map_chunk(l1pagetable, proc0_uarea.pv_va, proc0_uarea.pv_pa, - UAREA_PAGES * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); pmap_map_chunk(l1pagetable, msgbufpv.pv_va, msgbufpv.pv_pa, MSGBUF_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); @@ -405,7 +399,6 @@ undefined_init(); proc_linkup(&proc0, &ksegrp0, &thread0); - proc0.p_uarea = (struct user *) proc0_uarea.pv_va; thread0.td_kstack = kernelstack.pv_va; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; ==== //depot/projects/uart/compat/pecoff/imgact_pecoff.c#4 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/pecoff/imgact_pecoff.c,v 1.33 2004/06/05 02:18:27 tjr Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/pecoff/imgact_pecoff.c,v 1.34 2004/11/20 02:32:04 das Exp $"); #include #include @@ -79,6 +79,8 @@ #include "opt_pecoff.h" +#define uarea_pages 1 + #define PECOFF_PE_SIGNATURE "PE\0\0" static int pecoff_fixup(register_t **, struct image_params *); static int @@ -189,9 +191,8 @@ if (tempuser == NULL) return (ENOMEM); PROC_LOCK(p); - fill_kinfo_proc(p, &p->p_uarea->u_kproc); + fill_user(p, (struct user *)tempuser); PROC_UNLOCK(p); - bcopy(p->p_uarea, tempuser, sizeof(struct user)); bcopy(td->td_frame, tempuser + ctob(uarea_pages) + ((caddr_t)td->td_frame - (caddr_t)td->td_kstack), ==== //depot/projects/uart/conf/NOTES#21 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1288 2004/11/12 19:44:30 peter Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1289 2004/11/20 02:32:15 das Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -2185,7 +2185,7 @@ options SW_WATCHDOG # -# Disable swapping of upages and stack pages. This option removes all +# Disable swapping of stack pages. This option removes all # code which actually performs swapping, so it's not possible to turn # it back on at run-time. # ==== //depot/projects/uart/conf/kmod.mk#9 (text+ko) ==== @@ -1,5 +1,5 @@ # From: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 -# $FreeBSD: src/sys/conf/kmod.mk,v 1.172 2004/10/24 08:26:48 ru Exp $ +# $FreeBSD: src/sys/conf/kmod.mk,v 1.173 2004/11/20 06:09:11 marcel Exp $ # # The include file handles building and installing loadable # kernel modules. @@ -288,17 +288,15 @@ .endfor .endif -MFILES?= kern/bus_if.m kern/device_if.m dev/iicbus/iicbb_if.m \ - dev/iicbus/iicbus_if.m isa/isa_if.m \ - libkern/iconv_converter_if.m \ - dev/acpica/acpi_if.m dev/eisa/eisa_if.m dev/mii/miibus_if.m \ - dev/ofw/ofw_bus_if.m \ - dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \ - dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \ - dev/usb/usb_if.m dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \ - dev/sound/pcm/feeder_if.m dev/sound/pcm/mixer_if.m pci/agp_if.m \ - opencrypto/crypto_if.m pc98/pc98/canbus_if.m dev/uart/uart_if.m \ - sparc64/pci/ofw_pci_if.m +MFILES?= dev/acpica/acpi_if.m dev/eisa/eisa_if.m dev/iicbus/iicbb_if.m \ + dev/iicbus/iicbus_if.m dev/mii/miibus_if.m dev/ofw/ofw_bus_if.m \ + dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \ + dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \ + dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \ + dev/sound/pcm/feeder_if.m dev/sound/pcm/mixer_if.m dev/uart/uart_if.m \ + dev/usb/usb_if.m isa/isa_if.m kern/bus_if.m kern/device_if.m \ + libkern/iconv_converter_if.m opencrypto/crypto_if.m \ + pc98/pc98/canbus_if.m pci/agp_if.m sparc64/pci/ofw_pci_if.m .for _srcsrc in ${MFILES} .for _ext in c h ==== //depot/projects/uart/ddb/db_ps.c#7 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ddb/db_ps.c,v 1.54 2004/11/01 22:15:14 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_ps.c,v 1.55 2004/11/20 02:32:42 das Exp $"); #include #include @@ -66,7 +66,7 @@ p = &proc0; db_setup_paging(db_simple_pager, &quit, db_lines_per_page); - db_printf(" pid proc uarea uid ppid pgrp flag stat wmesg wchan cmd\n"); + db_printf(" pid proc uid ppid pgrp flag stat wmesg wchan cmd\n"); while (--np >= 0 && !quit) { if (p == NULL) { printf("oops, ran out of processes early!\n"); @@ -95,8 +95,8 @@ state = "Unkn"; break; } - db_printf("%5d %8p %8p %4d %5d %5d %07x %s", - p->p_pid, (volatile void *)p, (void *)p->p_uarea, + db_printf("%5d %8p %4d %5d %5d %07x %s", + p->p_pid, (volatile void *)p, p->p_ucred != NULL ? p->p_ucred->cr_ruid : 0, pp->p_pid, p->p_pgrp != NULL ? p->p_pgrp->pg_id : 0, p->p_flag, state); ==== //depot/projects/uart/i386/i386/busdma_machdep.c#11 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.64 2004/11/09 16:03:27 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/busdma_machdep.c,v 1.65 2004/11/19 17:56:22 scottl Exp $"); #include #include @@ -135,8 +135,7 @@ static bus_addr_t add_bounce_page(bus_dma_tag_t dmat, bus_dmamap_t map, vm_offset_t vaddr, bus_size_t size); static void free_bounce_page(bus_dma_tag_t dmat, struct bounce_page *bpage); -static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, - bus_size_t len); +static __inline int run_filter(bus_dma_tag_t dmat, bus_addr_t paddr); /* * Return true if a match is made. @@ -147,18 +146,15 @@ * to check for a match, if there is no filter callback then assume a match. */ static __inline int -run_filter(bus_dma_tag_t dmat, bus_addr_t paddr, bus_size_t len) +run_filter(bus_dma_tag_t dmat, bus_addr_t paddr) { - bus_size_t bndy; int retval; retval = 0; - bndy = dmat->boundary; do { if (((paddr > dmat->lowaddr && paddr <= dmat->highaddr) - || ((paddr & (dmat->alignment - 1)) != 0) - || ((paddr & bndy) != ((paddr + len) & bndy))) + || ((paddr & (dmat->alignment - 1)) != 0)) && (dmat->filter == NULL || (*dmat->filter)(dmat->filterarg, paddr) != 0)) retval = 1; @@ -586,7 +582,7 @@ while (vaddr < vendaddr) { paddr = pmap_kextract(vaddr); - if (run_filter(dmat, paddr, 0) != 0) { + if (run_filter(dmat, paddr) != 0) { needbounce = 1; map->pagesneeded++; } @@ -647,7 +643,7 @@ sgsize = (baddr - curaddr); } - if (map->pagesneeded != 0 && run_filter(dmat, curaddr, sgsize)) + if (map->pagesneeded != 0 && run_filter(dmat, curaddr)) curaddr = add_bounce_page(dmat, map, vaddr, sgsize); /* ==== //depot/projects/uart/i386/i386/genassym.c#4 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/genassym.c,v 1.148 2004/05/23 16:50:55 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/genassym.c,v 1.149 2004/11/20 02:30:59 das Exp $"); #include "opt_apic.h" #include "opt_compat.h" @@ -50,8 +50,8 @@ #include #include #include +#include #include -#include #include #include #include @@ -59,7 +59,6 @@ #include #include #include -#include #include #include #include @@ -71,6 +70,7 @@ #include #endif #include +#include #include #include #include @@ -79,7 +79,6 @@ ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); ASSYM(P_SFLAG, offsetof(struct proc, p_sflag)); -ASSYM(P_UAREA, offsetof(struct proc, p_uarea)); ASSYM(TD_FLAGS, offsetof(struct thread, td_flags)); ASSYM(TD_PCB, offsetof(struct thread, td_pcb)); @@ -96,7 +95,6 @@ ASSYM(V_SYSCALL, offsetof(struct vmmeter, v_syscall)); ASSYM(V_INTR, offsetof(struct vmmeter, v_intr)); /* ASSYM(UPAGES, UPAGES);*/ -ASSYM(UAREA_PAGES, UAREA_PAGES); ASSYM(KSTACK_PAGES, KSTACK_PAGES); ASSYM(PAGE_SIZE, PAGE_SIZE); ASSYM(NPTEPG, NPTEPG); ==== //depot/projects/uart/i386/i386/locore.s#7 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * from: @(#)locore.s 7.3 (Berkeley) 5/13/91 - * $FreeBSD: src/sys/i386/i386/locore.s,v 1.184 2004/07/08 22:35:34 brian Exp $ + * $FreeBSD: src/sys/i386/i386/locore.s,v 1.185 2004/11/20 02:29:24 das Exp $ * * originally from: locore.s, by William F. Jolitz * @@ -129,10 +129,10 @@ #endif KPTphys: .long 0 /* phys addr of kernel page tables */ - .globl proc0uarea, proc0kstack -proc0uarea: .long 0 /* address of proc 0 uarea space */ + .globl proc0kstack +proc0uarea: .long 0 /* address of proc 0 uarea (unused)*/ proc0kstack: .long 0 /* address of proc 0 kstack space */ -p0upa: .long 0 /* phys addr of proc0's UAREA */ +p0upa: .long 0 /* phys addr of proc0 UAREA (unused) */ p0kpa: .long 0 /* phys addr of proc0's STACK */ vm86phystk: .long 0 /* PA of vm86/bios stack */ @@ -748,12 +748,7 @@ ALLOCPAGES(NPGPTD) movl %esi,R(IdlePTD) -/* Allocate UPAGES */ - ALLOCPAGES(UAREA_PAGES) - movl %esi,R(p0upa) - addl $KERNBASE, %esi - movl %esi, R(proc0uarea) - +/* Allocate KSTACK */ ALLOCPAGES(KSTACK_PAGES) movl %esi,R(p0kpa) addl $KERNBASE, %esi @@ -847,11 +842,6 @@ movl $NPGPTD, %ecx fillkptphys($PG_RW) -/* Map proc0's UPAGES in the physical way ... */ - movl R(p0upa), %eax - movl $(UAREA_PAGES), %ecx - fillkptphys($PG_RW) - /* Map proc0's KSTACK in the physical way ... */ movl R(p0kpa), %eax movl $(KSTACK_PAGES), %ecx ==== //depot/projects/uart/i386/i386/machdep.c#11 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.601 2004/11/16 20:42:31 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.602 2004/11/20 02:29:24 das Exp $"); #include "opt_apic.h" #include "opt_atalk.h" @@ -1233,7 +1233,6 @@ static struct i386tss dblfault_tss; static char dblfault_stack[PAGE_SIZE]; -extern struct user *proc0uarea; extern vm_offset_t proc0kstack; @@ -1956,7 +1955,6 @@ int gsel_tss, metadata_missing, off, x; struct pcpu *pc; - proc0.p_uarea = proc0uarea; thread0.td_kstack = proc0kstack; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; ==== //depot/projects/uart/i386/include/param.h#3 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * from: @(#)param.h 5.8 (Berkeley) 6/28/91 - * $FreeBSD: src/sys/i386/include/param.h,v 1.78 2004/09/02 18:59:15 scottl Exp $ + * $FreeBSD: src/sys/i386/include/param.h,v 1.79 2004/11/20 02:29:49 das Exp $ */ /* @@ -103,7 +103,6 @@ #define KSTACK_PAGES 2 /* Includes pcb! */ #endif #define KSTACK_GUARD_PAGES 1 /* pages of kstack guard; 0 disables */ -#define UAREA_PAGES 1 /* holds struct user WITHOUT PCB (see def.) */ /* * Ceiling on amount of swblock kva space, can be changed via ==== //depot/projects/uart/i386/linux/linux_sysvec.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.132 2004/07/15 08:26:05 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/linux/linux_sysvec.c,v 1.133 2004/11/20 02:32:04 das Exp $"); /* XXX we use functions that might not exist. */ #include "opt_compat.h" @@ -94,6 +94,8 @@ #define LINUX_SYS_linux_rt_sendsig 0 #define LINUX_SYS_linux_sendsig 0 +#define uarea_pages 1 + extern char linux_sigcode[]; extern int linux_szsigcode; @@ -746,9 +748,8 @@ if (tempuser == NULL) return (ENOMEM); PROC_LOCK(p); - fill_kinfo_proc(p, &p->p_uarea->u_kproc); + fill_user(p, (struct user *)tempuser); PROC_UNLOCK(p); - bcopy(p->p_uarea, tempuser, sizeof(struct user)); bcopy(td->td_frame, tempuser + ctob(uarea_pages) + ((caddr_t)td->td_frame - (caddr_t)td->td_kstack), ==== //depot/projects/uart/ia64/ia64/genassym.c#7 (text+ko) ==== @@ -29,7 +29,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/ia64/ia64/genassym.c,v 1.40 2004/09/25 04:27:44 marcel Exp $ + * $FreeBSD: src/sys/ia64/ia64/genassym.c,v 1.41 2004/11/20 02:28:14 das Exp $ */ #include "opt_compat.h" @@ -52,12 +52,12 @@ #include #include #include +#include #include #include #include #include #include -#include #include #include ==== //depot/projects/uart/ia64/ia64/machdep.c#17 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.190 2004/10/06 02:43:28 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ia64/ia64/machdep.c,v 1.191 2004/11/20 02:29:24 das Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -102,7 +102,6 @@ struct pcpu early_pcpu; extern char kstack[]; -struct user *proc0uarea; vm_offset_t proc0kstack; extern u_int64_t kernel_text[], _end[]; @@ -716,11 +715,9 @@ proc_linkup(&proc0, &ksegrp0, &thread0); /* - * Init mapping for u page(s) for proc 0 + * Init mapping for kernel stack for proc 0 */ - proc0uarea = (struct user *)pmap_steal_memory(UAREA_PAGES * PAGE_SIZE); proc0kstack = (vm_offset_t)kstack; - proc0.p_uarea = proc0uarea; thread0.td_kstack = proc0kstack; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; >>> TRUNCATED FOR MAIL (1000 lines) <<<