summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2004-11-20 02:29:25 +0000
committerdas <das@FreeBSD.org>2004-11-20 02:29:25 +0000
commit8375566745ec76f883fac94cf26a360d03473ab7 (patch)
treeb9220a5f6fd9eae8ac1a5c9cb2681727fdd08f45 /sys
parentaf608beb4021b912ed7214f282dbf696c3295998 (diff)
downloadFreeBSD-src-8375566745ec76f883fac94cf26a360d03473ab7.zip
FreeBSD-src-8375566745ec76f883fac94cf26a360d03473ab7.tar.gz
U areas are going away, so don't allocate one for process 0.
Reviewed by: arch@
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/machdep.c3
-rw-r--r--sys/arm/sa11x0/assabet_machdep.c11
-rw-r--r--sys/arm/xscale/i80321/iq31244_machdep.c7
-rw-r--r--sys/i386/i386/locore.s18
-rw-r--r--sys/i386/i386/machdep.c2
-rw-r--r--sys/ia64/ia64/machdep.c5
-rw-r--r--sys/pc98/i386/machdep.c2
-rw-r--r--sys/pc98/pc98/machdep.c2
-rw-r--r--sys/powerpc/aim/machdep.c3
-rw-r--r--sys/powerpc/powerpc/machdep.c3
-rw-r--r--sys/sparc64/sparc64/machdep.c3
11 files changed, 6 insertions, 53 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 2bf532f..ee4e1b7 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 276f38d..92fc4cb 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 0f9093b..4e58334 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 72ef2bf..5b1583c 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 d7a02a6..897ddc6 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 9b11553..7c73860 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 5296ef5..e5f7238 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 5296ef5..e5f7238 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 2f0d3c4..b98689b 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 2f0d3c4..b98689b 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 cc7eb3d..50b8cc5 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;
OpenPOWER on IntegriCloud