diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 2bf532f788fd..ee4e1b7559ef 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -1114,9 +1114,6 @@ hammer_time(u_int64_t modulep, u_int64_t physfree) #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; diff --git a/sys/arm/sa11x0/assabet_machdep.c b/sys/arm/sa11x0/assabet_machdep.c index 276f38df0425..92fc4cba619d 100644 --- a/sys/arm/sa11x0/assabet_machdep.c +++ b/sys/arm/sa11x0/assabet_machdep.c @@ -180,7 +180,6 @@ initarm(void *arg, void *arg2) { 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,7 +274,7 @@ initarm(void *arg, void *arg2) 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 @@ -284,10 +283,6 @@ initarm(void *arg, void *arg2) * 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 @@ initarm(void *arg, void *arg2) 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 @@ initarm(void *arg, void *arg2) /* 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; diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c index 0f9093bcd807..4e5833489be9 100644 --- a/sys/arm/xscale/i80321/iq31244_machdep.c +++ b/sys/arm/xscale/i80321/iq31244_machdep.c @@ -198,7 +198,6 @@ void * 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 @@ initarm(void *arg, void *arg2) * 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 @@ initarm(void *arg, void *arg2) 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 @@ initarm(void *arg, void *arg2) 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; diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s index 72ef2bf5747c..5b1583c2078e 100644 --- a/sys/i386/i386/locore.s +++ b/sys/i386/i386/locore.s @@ -129,10 +129,10 @@ IdlePDPT: .long 0 /* phys addr of kernel PDPT */ #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 @@ no_kernend: 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 @@ no_kernend: 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 diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index d7a02a684eea..897ddc61316c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1233,7 +1233,6 @@ extern int has_f00f_bug; static struct i386tss dblfault_tss; static char dblfault_stack[PAGE_SIZE]; -extern struct user *proc0uarea; extern vm_offset_t proc0kstack; @@ -1956,7 +1955,6 @@ init386(first) 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; diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 9b11553cda0c..7c7386012c0f 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -102,7 +102,6 @@ struct bootinfo bootinfo; 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 @@ ia64_init(void) 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; diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index 5296ef51e68f..e5f7238625af 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -1250,7 +1250,6 @@ extern int has_f00f_bug; static struct i386tss dblfault_tss; static char dblfault_stack[PAGE_SIZE]; -extern struct user *proc0uarea; extern vm_offset_t proc0kstack; @@ -2015,7 +2014,6 @@ init386(first) 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; diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c index 5296ef51e68f..e5f7238625af 100644 --- a/sys/pc98/pc98/machdep.c +++ b/sys/pc98/pc98/machdep.c @@ -1250,7 +1250,6 @@ extern int has_f00f_bug; static struct i386tss dblfault_tss; static char dblfault_stack[PAGE_SIZE]; -extern struct user *proc0uarea; extern vm_offset_t proc0kstack; @@ -2015,7 +2014,6 @@ init386(first) 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; diff --git a/sys/powerpc/aim/machdep.c b/sys/powerpc/aim/machdep.c index 2f0d3c41ea0a..b98689b7d437 100644 --- a/sys/powerpc/aim/machdep.c +++ b/sys/powerpc/aim/machdep.c @@ -123,7 +123,6 @@ extern vm_offset_t ksym_start, ksym_end; int cold = 1; char pcpu0[PAGE_SIZE]; -char uarea0[UAREA_PAGES * PAGE_SIZE]; struct trapframe frame0; vm_offset_t kstack0; @@ -280,8 +279,6 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) * Start initializing proc0 and thread0. */ proc_linkup(&proc0, &ksegrp0, &thread0); - proc0.p_uarea = (struct user *)uarea0; - proc0.p_stats = &proc0.p_uarea->u_stats; thread0.td_frame = &frame0; /* diff --git a/sys/powerpc/powerpc/machdep.c b/sys/powerpc/powerpc/machdep.c index 2f0d3c41ea0a..b98689b7d437 100644 --- a/sys/powerpc/powerpc/machdep.c +++ b/sys/powerpc/powerpc/machdep.c @@ -123,7 +123,6 @@ extern vm_offset_t ksym_start, ksym_end; int cold = 1; char pcpu0[PAGE_SIZE]; -char uarea0[UAREA_PAGES * PAGE_SIZE]; struct trapframe frame0; vm_offset_t kstack0; @@ -280,8 +279,6 @@ powerpc_init(u_int startkernel, u_int endkernel, u_int basekernel, void *mdp) * Start initializing proc0 and thread0. */ proc_linkup(&proc0, &ksegrp0, &thread0); - proc0.p_uarea = (struct user *)uarea0; - proc0.p_stats = &proc0.p_uarea->u_stats; thread0.td_frame = &frame0; /* diff --git a/sys/sparc64/sparc64/machdep.c b/sys/sparc64/sparc64/machdep.c index cc7eb3d0f2d4..50b8cc535bea 100644 --- a/sys/sparc64/sparc64/machdep.c +++ b/sys/sparc64/sparc64/machdep.c @@ -121,7 +121,6 @@ int cold = 1; long Maxmem; char pcpu0[PCPU_PAGES * PAGE_SIZE]; -char uarea0[UAREA_PAGES * PAGE_SIZE]; struct trapframe frame0; vm_offset_t kstack0; @@ -364,8 +363,6 @@ sparc64_init(caddr_t mdp, u_long o1, u_long o2, u_long o3, ofw_vec_t *vec) proc_linkup(&proc0, &ksegrp0, &thread0); proc0.p_md.md_sigtramp = NULL; proc0.p_md.md_utrap = NULL; - proc0.p_uarea = (struct user *)uarea0; - proc0.p_stats = &proc0.p_uarea->u_stats; thread0.td_kstack = kstack0; thread0.td_pcb = (struct pcb *) (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;