mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-11 09:50:12 +00:00
U areas are going away, so don't allocate one for process 0.
Reviewed by: arch@
This commit is contained in:
parent
9799b417d5
commit
11111b709f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137912
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user