Kill proc0paddr. Use lwp0.l_addr instead.
This commit is contained in:
parent
f3d037fec4
commit
11af2f9cfa
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: start.c,v 1.15 2009/11/21 20:32:17 rmind Exp $ */
|
||||
/* $NetBSD: start.c,v 1.16 2009/11/26 00:19:11 matt Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 Ben Harris
|
||||
* All rights reserved.
|
||||
@ -31,7 +31,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: start.c,v 1.15 2009/11/21 20:32:17 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: start.c,v 1.16 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include "opt_modular.h"
|
||||
|
||||
@ -64,8 +64,6 @@ extern void main(void); /* XXX Should be in a header file */
|
||||
|
||||
struct bootconfig bootconfig;
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* in machdep.h */
|
||||
extern i2c_tag_t acorn26_i2c_tag;
|
||||
|
||||
@ -190,8 +188,8 @@ start(struct bootconfig *initbootconfig)
|
||||
* Locate process 0's user structure, in the bottom of its kernel
|
||||
* stack page. That's our current stack page too.
|
||||
*/
|
||||
proc0paddr = (struct user *)(round_page((vaddr_t)&onstack) - USPACE);
|
||||
memset(proc0paddr, 0, sizeof(*proc0paddr));
|
||||
lwp0.l_addr = (struct user *)(round_page((vaddr_t)&onstack) - USPACE);
|
||||
memset(lwp0.l_addr, 0, sizeof(*lwp0.l_addr));
|
||||
|
||||
/* TODO: anything else? */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.23 2009/11/21 20:32:17 rmind Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.24 2009/11/26 00:19:11 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2000, 2001 Ben Harris
|
||||
@ -64,7 +64,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.23 2009/11/21 20:32:17 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.24 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/buf.h>
|
||||
@ -82,10 +82,10 @@ __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.23 2009/11/21 20:32:17 rmind Exp $"
|
||||
#include <machine/machdep.h>
|
||||
|
||||
/*
|
||||
* Finish a fork operation, with process p2 nearly set up.
|
||||
* Finish a fork operation, with thread l2 nearly set up.
|
||||
* Copy and update the pcb and trap frame, making the child ready to run.
|
||||
*
|
||||
* p1 is the process being forked; if p1 == &proc0, we are creating
|
||||
* l1 is the thread being forked; if l1 == &lwp0, we are creating
|
||||
* a kernel thread, and the return path and argument are specified with
|
||||
* `func' and `arg'.
|
||||
*
|
||||
@ -97,8 +97,9 @@ __KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.23 2009/11/21 20:32:17 rmind Exp $"
|
||||
/*
|
||||
* Note:
|
||||
*
|
||||
* The pcb structure has to be* at the start of the area -- we start the
|
||||
* kernel stack from the end.
|
||||
* l->l_addr points to a page containing the user structure
|
||||
* (see <sys/user.h>) and the kernel stack. The pcb structure has to be
|
||||
* at the start of the area -- we start the kernel stack from the end.
|
||||
*/
|
||||
|
||||
void
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rpc_machdep.c,v 1.77 2009/08/16 22:06:12 cegger Exp $ */
|
||||
/* $NetBSD: rpc_machdep.c,v 1.78 2009/11/26 00:19:11 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2002 Reinoud Zandijk.
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.77 2009/08/16 22:06:12 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: rpc_machdep.c,v 1.78 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -181,8 +181,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
#ifdef CPU_SA110
|
||||
#define CPU_SA110_CACHE_CLEAN_SIZE (0x4000 * 2)
|
||||
static vaddr_t sa110_cc_base;
|
||||
@ -843,8 +841,7 @@ initarm(void *cookie)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
/*
|
||||
* if there is support for a serial console ...we should now
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: eb7500atx_machdep.c,v 1.16 2009/09/22 14:49:28 tsutsui Exp $ */
|
||||
/* $NetBSD: eb7500atx_machdep.c,v 1.17 2009/11/26 00:19:11 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000-2002 Reinoud Zandijk.
|
||||
@ -55,7 +55,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.16 2009/09/22 14:49:28 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.17 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/kernel.h>
|
||||
@ -121,7 +121,6 @@ __KERNEL_RCSID(0, "$NetBSD: eb7500atx_machdep.c,v 1.16 2009/09/22 14:49:28 tsuts
|
||||
*/
|
||||
u_int cpu_reset_address = 0x0; /* XXX 0x3800000 too for rev0 RiscPC 600 */
|
||||
|
||||
|
||||
#define VERBOSE_INIT_ARM
|
||||
|
||||
|
||||
@ -183,7 +182,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
#ifdef CPU_SA110
|
||||
#define CPU_SA110_CACHE_CLEAN_SIZE (0x4000 * 2)
|
||||
@ -783,8 +781,7 @@ initarm(void *cookie)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
/*
|
||||
* if there is support for a serial console ...we should now
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.41 2008/11/30 18:21:32 martin Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.42 2009/11/26 00:19:11 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -106,7 +106,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2008/11/30 18:21:32 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include "opt_algor_p4032.h"
|
||||
#include "opt_algor_p5064.h"
|
||||
@ -184,8 +184,6 @@ struct p5064_config p5064_configuration;
|
||||
struct p6032_config p6032_configuration;
|
||||
#endif
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Our exported CPU info; we can have only one. */
|
||||
struct cpu_info cpu_info_store;
|
||||
|
||||
@ -566,9 +564,9 @@ mach_init(int argc, char *argv[], char *envp[])
|
||||
*/
|
||||
led_display('u', 's', 'p', 'c');
|
||||
v = (void *) uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *) v;
|
||||
lwp0.l_addr = (struct user *) v;
|
||||
lwp0.l_md.md_regs = (struct frame *)((char*)v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cpu.c,v 1.87 2009/11/21 05:35:40 rmind Exp $ */
|
||||
/* $NetBSD: cpu.c,v 1.88 2009/11/26 00:19:11 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.87 2009/11/21 05:35:40 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.88 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_multiprocessor.h"
|
||||
@ -155,10 +155,10 @@ struct cputable_struct {
|
||||
*
|
||||
* As we find processors during the autoconfiguration sequence, all
|
||||
* processors have idle stacks and PCBs created for them, including
|
||||
* the primary (although the primary idles on proc0's PCB until its
|
||||
* the primary (although the primary idles on lwp0's PCB until its
|
||||
* idle PCB is created).
|
||||
*
|
||||
* Right before calling uvm_scheduler(), main() calls, on proc0's
|
||||
* Right before calling uvm_scheduler(), main() calls, on lwp0's
|
||||
* context, cpu_boot_secondary_processors(). This is our key to
|
||||
* actually spin up the additional processor's we've found. We
|
||||
* run through our cpu_info[] array looking for secondary processors
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.322 2009/11/21 05:35:40 rmind Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.323 2009/11/26 00:19:11 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -68,7 +68,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.322 2009/11/21 05:35:40 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.323 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -166,8 +166,6 @@ char machine[] = MACHINE; /* from <machine/param.h> */
|
||||
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
|
||||
char cpu_model[128];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Number of machine cycles per microsecond */
|
||||
u_int64_t cycles_per_usec;
|
||||
|
||||
@ -638,8 +636,7 @@ nobootinfo:
|
||||
/*
|
||||
* Init mapping for u page(s) for proc 0
|
||||
*/
|
||||
lwp0.l_addr = proc0paddr =
|
||||
(struct user *)uvm_pageboot_alloc(UPAGES * PAGE_SIZE);
|
||||
lwp0.l_addr = (struct user *)uvm_pageboot_alloc(UPAGES * PAGE_SIZE);
|
||||
|
||||
/*
|
||||
* Initialize the virtual memory system, and set the
|
||||
@ -653,19 +650,19 @@ nobootinfo:
|
||||
* address.
|
||||
*/
|
||||
lwp0.l_md.md_pcbpaddr =
|
||||
(struct pcb *)ALPHA_K0SEG_TO_PHYS((vaddr_t)&proc0paddr->u_pcb);
|
||||
(struct pcb *)ALPHA_K0SEG_TO_PHYS((vaddr_t)&lwp0.l_addr->u_pcb);
|
||||
|
||||
/*
|
||||
* Set the kernel sp, reserving space for an (empty) trapframe,
|
||||
* and make proc0's trapframe pointer point to it for sanity.
|
||||
* and make lwp0's trapframe pointer point to it for sanity.
|
||||
*/
|
||||
proc0paddr->u_pcb.pcb_hw.apcb_ksp =
|
||||
(u_int64_t)proc0paddr + USPACE - sizeof(struct trapframe);
|
||||
lwp0.l_addr->u_pcb.pcb_hw.apcb_ksp =
|
||||
(vaddr_t)lwp0.l_addr + USPACE - sizeof(struct trapframe);
|
||||
lwp0.l_md.md_tf =
|
||||
(struct trapframe *)proc0paddr->u_pcb.pcb_hw.apcb_ksp;
|
||||
simple_lock_init(&proc0paddr->u_pcb.pcb_fpcpu_slock);
|
||||
(struct trapframe *)lwp0.l_addr->u_pcb.pcb_hw.apcb_ksp;
|
||||
simple_lock_init(&lwp0.l_addr->u_pcb.pcb_fpcpu_slock);
|
||||
|
||||
/* Indicate that proc0 has a CPU. */
|
||||
/* Indicate that lwp0 has a CPU. */
|
||||
lwp0.l_cpu = ci;
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.251 2009/11/21 05:35:40 rmind Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.252 2009/11/26 00:19:11 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000, 2001, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
@ -140,7 +140,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.251 2009/11/21 05:35:40 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.252 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -946,7 +946,7 @@ pmap_bootstrap(paddr_t ptaddr, u_int maxasn, u_long ncpuids)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Set up proc0's PCB such that the ptbr points to the right place
|
||||
* Set up lwp0's PCB such that the ptbr points to the right place
|
||||
* and has the kernel pmap's (really unused) ASN.
|
||||
*/
|
||||
pcb = lwp_getpcb(&lwp0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.102 2009/11/21 05:35:41 rmind Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.103 2009/11/26 00:19:11 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
@ -29,7 +29,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.102 2009/11/21 05:35:41 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.103 2009/11/26 00:19:11 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -63,16 +63,16 @@ cpu_lwp_free2(struct lwp *l)
|
||||
}
|
||||
|
||||
/*
|
||||
* Finish a fork operation, with process p2 nearly set up.
|
||||
* Finish a fork operation, with thread l2 nearly set up.
|
||||
* Copy and update the pcb and trap frame, making the child ready to run.
|
||||
*
|
||||
* Rig the child's kernel stack so that it will start out in
|
||||
* lwp_trampoline() and call child_return() with p2 as an
|
||||
* argument. This causes the newly-created child process to go
|
||||
* lwp_trampoline() and call child_return() with l2 as an
|
||||
* argument. This causes the newly-created child thread to go
|
||||
* directly to user level with an apparent return value of 0 from
|
||||
* fork(), while the parent process returns normally.
|
||||
*
|
||||
* p1 is the process being forked; if p1 == &proc0, we are creating
|
||||
* l1 is the thread being forked; if l1 == &lwp0, we are creating
|
||||
* a kernel thread, and the return path and argument are specified with
|
||||
* `func' and `arg'.
|
||||
*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.53 2009/11/25 14:28:50 rmind Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.54 2009/11/26 00:19:12 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright-o-rama!
|
||||
@ -234,7 +234,7 @@ _C_LABEL(lapic_isr):
|
||||
.globl _C_LABEL(cpuid_level),_C_LABEL(cpu_feature),_C_LABEL(cpu_feature2)
|
||||
.globl _C_LABEL(esym),_C_LABEL(eblob),_C_LABEL(boothowto)
|
||||
.globl _C_LABEL(bootinfo),_C_LABEL(atdevbase)
|
||||
.globl _C_LABEL(proc0paddr),_C_LABEL(PDPpaddr)
|
||||
.globl _C_LABEL(PDPpaddr)
|
||||
.globl _C_LABEL(biosbasemem),_C_LABEL(biosextmem)
|
||||
.globl _C_LABEL(gdtstore),_C_LABEL(cpu)
|
||||
|
||||
@ -253,7 +253,6 @@ _C_LABEL(cpu_brand_id): .long 0 # brand ID from 'cpuid' instruction
|
||||
_C_LABEL(esym): .quad 0 # ptr to end of syms
|
||||
_C_LABEL(eblob): .quad 0 # ptr to end of modules
|
||||
_C_LABEL(atdevbase): .quad 0 # location of start of iomem in virtual
|
||||
_C_LABEL(proc0paddr): .quad 0
|
||||
_C_LABEL(PDPpaddr): .quad 0 # paddr of PTD, for libkvm
|
||||
#ifndef REALBASEMEM
|
||||
_C_LABEL(biosbasemem): .long 0 # base memory reported by BIOS
|
||||
@ -696,7 +695,7 @@ longmode_hi:
|
||||
/* Set up bootstrap stack. */
|
||||
leaq (PROC0_STK_OFF)(%rsi),%rax
|
||||
addq %r8,%rax
|
||||
movq %rax,_C_LABEL(proc0paddr)(%rip)
|
||||
movq %rax,(_C_LABEL(lwp0)+L_ADDR)(%rip)
|
||||
leaq (USPACE-FRAMESIZE)(%rax),%rsp
|
||||
movq %rsi,PCB_CR3(%rax) # pcb->pcb_cr3
|
||||
xorq %rbp,%rbp # mark end of frames
|
||||
@ -776,7 +775,7 @@ start:
|
||||
* First avail returned by xen_pmap_bootstrap in %rax
|
||||
*/
|
||||
movq %rax, %rsi
|
||||
movq %rsi,_C_LABEL(proc0paddr)
|
||||
movq %rsi,(_C_LABEL(lwp0)+L_ADDR)
|
||||
|
||||
xorq %rax,%rax
|
||||
movq %rsi,%rdi
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.137 2009/11/21 03:11:01 rmind Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.138 2009/11/26 00:19:12 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008
|
||||
@ -107,7 +107,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.137 2009/11/21 03:11:01 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.138 2009/11/26 00:19:12 matt Exp $");
|
||||
|
||||
/* #define XENDEBUG_LOW */
|
||||
|
||||
@ -1051,7 +1051,6 @@ int xen_idt_idx;
|
||||
#endif
|
||||
char *ldtstore;
|
||||
char *gdtstore;
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
void
|
||||
setgate(struct gate_descriptor *gd, void *func, int ist, int type, int dpl, int sel)
|
||||
@ -1271,9 +1270,7 @@ init_x86_64(paddr_t first_avail)
|
||||
|
||||
cpu_init_msrs(&cpu_info_primary, true);
|
||||
|
||||
lwp0.l_addr = proc0paddr;
|
||||
pcb = (void *)proc0paddr;
|
||||
|
||||
pcb = lwp_getpcb(&lwp0);
|
||||
#ifdef XEN
|
||||
pcb->pcb_cr3 = xen_start_info.pt_base - KERNBASE;
|
||||
__PRINTK(("pcb_cr3 0x%lx\n", xen_start_info.pt_base - KERNBASE));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: amiga_init.c,v 1.111 2009/11/23 00:11:42 rmind Exp $ */
|
||||
/* $NetBSD: amiga_init.c,v 1.112 2009/11/26 00:19:12 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Michael L. Hitch
|
||||
@ -36,7 +36,7 @@
|
||||
#include "opt_devreload.h"
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.111 2009/11/23 00:11:42 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.112 2009/11/26 00:19:12 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -67,7 +67,7 @@ __KERNEL_RCSID(0, "$NetBSD: amiga_init.c,v 1.111 2009/11/23 00:11:42 rmind Exp $
|
||||
#define RELOC(v, t) *((t*)((u_int)&(v) + loadbase))
|
||||
|
||||
extern u_int lowram;
|
||||
extern u_int Umap, proc0paddr;
|
||||
extern u_int Umap;
|
||||
extern u_int Sysseg_pa;
|
||||
#if defined(M68040) || defined(M68060)
|
||||
extern int protostfree;
|
||||
@ -351,9 +351,9 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync,
|
||||
avail -= vstart;
|
||||
|
||||
/*
|
||||
* save KVA of proc0 u-area and allocate it.
|
||||
* save KVA of lwp0 u-area and allocate it.
|
||||
*/
|
||||
RELOC(proc0paddr, u_int) = vstart;
|
||||
RELOC(lwp0.l_addr, struct user *) = vstart;
|
||||
pstart += USPACE;
|
||||
vstart += USPACE;
|
||||
avail -= USPACE;
|
||||
@ -574,7 +574,7 @@ start_c(id, fphystart, fphysize, cphysize, esym_addr, flags, inh_sync,
|
||||
#endif
|
||||
/*
|
||||
* go till end of data allocated so far
|
||||
* plus proc0 u-area (to be allocated)
|
||||
* plus lwp0 u-area (to be allocated)
|
||||
*/
|
||||
for (; kva < vstart; kva += PAGE_SIZE, pg_proto += PAGE_SIZE)
|
||||
*pg++ = pg_proto;
|
||||
@ -788,7 +788,7 @@ start_c_finish(void)
|
||||
((volatile struct Custom *)CUSTOMADDR)->color[0] = 0x0a0; /* GREEN */
|
||||
#endif
|
||||
|
||||
bzero ((u_char *)proc0paddr, USPACE);
|
||||
memset(lwp0.l_addr, 0, USPACE);
|
||||
pmap_bootstrap(start_c_pstart, start_c_fphystart);
|
||||
|
||||
/*
|
||||
@ -822,11 +822,6 @@ start_c_finish(void)
|
||||
z2mem_start = ZTWOMEMADDR;
|
||||
}
|
||||
|
||||
#if 0
|
||||
i = *(int *)proc0paddr;
|
||||
*(volatile int *)proc0paddr = i;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* disable all interrupts but enable allow them to be enabled
|
||||
* by specific driver code (global int enable bit)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.145 2008/01/06 18:50:30 mhitch Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.146 2009/11/26 00:19:12 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990 The Regents of the University of California.
|
||||
@ -1024,11 +1024,10 @@ LMMUenable_end:
|
||||
jbsr _C_LABEL(start_c_finish)
|
||||
|
||||
/* set kernel stack, user SP, and initial pcb */
|
||||
movl _C_LABEL(proc0paddr),%a1 | proc0 kernel stack
|
||||
lea _C_LABEL(lwp0),%a2 | grab lwp0 and initialize
|
||||
movl %a2,_C_LABEL(curlwp) | curlwp so that
|
||||
movl %a2@(L_ADDR),%a1 | we don't dref NULL in trap()
|
||||
lea %a1@(USPACE),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.p_addr
|
||||
movl %a2,_C_LABEL(curlwp) | and curlwp so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't dref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
movl %a2,%usp | init user SP
|
||||
movl %a2,%a1@(PCB_USP) | and save it
|
||||
@ -1608,9 +1607,6 @@ GLOBAL(fputype)
|
||||
GLOBAL(protorp)
|
||||
.long 0x80000002,0 | prototype root pointer
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 | KVA of proc0 u-area
|
||||
|
||||
#ifdef DEBUG
|
||||
ASGLOBAL(fulltflush)
|
||||
.long 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.16 2009/07/21 09:49:15 phx Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.17 2009/11/26 00:19:12 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -72,8 +72,6 @@ GLOBAL(startsym)
|
||||
.long 0 /* start symbol table */
|
||||
GLOBAL(endsym)
|
||||
.long 0 /* end symbol table */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0
|
||||
GLOBAL(oeacpufeat)
|
||||
.long 0 /* cpu features */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.116 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.117 2009/11/26 00:19:12 matt Exp $ */
|
||||
/* $OpenBSD: machdep.c,v 1.36 1999/05/22 21:22:19 weingart Exp $ */
|
||||
|
||||
/*
|
||||
@ -78,7 +78,7 @@
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.116 2009/02/13 22:41:01 apb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.117 2009/11/26 00:19:12 matt Exp $");
|
||||
|
||||
#include "fs_mfs.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -218,7 +218,6 @@ int safepri = MIPS3_PSL_LOWIPL;
|
||||
const uint32_t *ipl_sr_bits;
|
||||
|
||||
extern char kernel_text[], edata[], end[];
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
/*
|
||||
* Do all the stuff that locore normally does before calling main().
|
||||
@ -490,12 +489,12 @@ mach_init(int argc, char *argv[], u_int bim, void *bip)
|
||||
pmap_bootstrap();
|
||||
|
||||
/*
|
||||
* Allocate space for proc0's USPACE.
|
||||
* Allocate space for lwp0's USPACE.
|
||||
*/
|
||||
v = uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: arm32_machdep.c,v 1.68 2009/11/21 20:32:17 rmind Exp $ */
|
||||
/* $NetBSD: arm32_machdep.c,v 1.69 2009/11/26 00:19:12 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -42,7 +42,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.68 2009/11/21 20:32:17 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.69 2009/11/26 00:19:12 matt Exp $");
|
||||
|
||||
#include "opt_md.h"
|
||||
#include "opt_pmap_debug.h"
|
||||
@ -84,8 +84,6 @@ extern paddr_t msgbufphys;
|
||||
|
||||
int kernel_debug = 0;
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* exported variable to be filled in by the bootloaders */
|
||||
char *booted_kernel;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vm_machdep.c,v 1.51 2009/11/21 20:32:25 rmind Exp $ */
|
||||
/* $NetBSD: vm_machdep.c,v 1.52 2009/11/26 00:19:12 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -44,7 +44,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.51 2009/11/21 20:32:25 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.52 2009/11/26 00:19:12 matt Exp $");
|
||||
|
||||
#include "opt_armfpe.h"
|
||||
#include "opt_pmap_debug.h"
|
||||
@ -207,7 +207,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize,
|
||||
* cpu_exit is called as the last action during exit.
|
||||
*
|
||||
* We clean up a little and then call switch_exit() with the old proc as an
|
||||
* argument. switch_exit() first switches to proc0's context, and finally
|
||||
* argument. switch_exit() first switches to lwp0's context, and finally
|
||||
* jumps into switch() to wait for another process to wake up.
|
||||
*/
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: at91bus.c,v 1.7 2009/10/23 06:53:13 snj Exp $ */
|
||||
/* $NetBSD: at91bus.c,v 1.8 2009/11/26 00:19:12 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Embedtronics Oy
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: at91bus.c,v 1.7 2009/10/23 06:53:13 snj Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: at91bus.c,v 1.8 2009/11/26 00:19:12 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -138,9 +138,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
|
||||
/* prototypes: */
|
||||
void consinit(void);
|
||||
static int at91bus_match(device_t, cfdata_t, void *);
|
||||
@ -461,8 +458,7 @@ at91bus_setup(BootConfig *mem)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: atari_init.c,v 1.86 2009/08/23 01:27:13 mrg Exp $ */
|
||||
/* $NetBSD: atari_init.c,v 1.87 2009/11/26 00:19:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Leo Weppelman
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.86 2009/08/23 01:27:13 mrg Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.87 2009/11/26 00:19:13 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_mbtype.h"
|
||||
@ -118,7 +118,6 @@ int iomem_malloc_safe;
|
||||
static cpu_kcore_hdr_t cpu_kcore_hdr;
|
||||
|
||||
extern u_int lowram;
|
||||
extern u_int proc0paddr;
|
||||
int machineid, mmutype, cputype, astpending;
|
||||
#if defined(M68040) || defined(M68060)
|
||||
extern int protostfree;
|
||||
@ -275,9 +274,9 @@ start_c(int id, u_int ttphystart, u_int ttphysize, u_int stphysize,
|
||||
avail = stphysize - pstart;
|
||||
|
||||
/*
|
||||
* Save KVA of proc0 user-area and allocate it
|
||||
* Save KVA of lwp0 user-area and allocate it
|
||||
*/
|
||||
proc0paddr = vstart;
|
||||
lwp.l_addr = (struct user *)vstart;
|
||||
pstart += USPACE;
|
||||
vstart += USPACE;
|
||||
avail -= USPACE;
|
||||
@ -408,7 +407,7 @@ start_c(int id, u_int ttphystart, u_int ttphysize, u_int stphysize,
|
||||
|
||||
/*
|
||||
* go till end of data allocated so far
|
||||
* plus proc0 u-area (to be allocated)
|
||||
* plus lwp0 u-area (to be allocated)
|
||||
*/
|
||||
for (; kva < vstart; kva += PAGE_SIZE) {
|
||||
*pg++ = pg_proto;
|
||||
@ -568,19 +567,14 @@ start_c(int id, u_int ttphystart, u_int ttphysize, u_int stphysize,
|
||||
__asm volatile ("pmove %0@,%%tc" : : "a" (&tc));
|
||||
}
|
||||
|
||||
/* Is this to fool the optimizer?? */
|
||||
i = *(int *)proc0paddr;
|
||||
*(volatile int *)proc0paddr = i;
|
||||
|
||||
/*
|
||||
* Initialize the "u-area" pages.
|
||||
* Must initialize p_addr before autoconfig or the
|
||||
* fault handler will get a NULL reference.
|
||||
*/
|
||||
memset((u_char *)proc0paddr, 0, USPACE);
|
||||
lwp0.l_addr = (struct user *)proc0paddr;
|
||||
memset(lwp0.l_addr, 0, USPACE);
|
||||
curlwp = &lwp0;
|
||||
curpcb = &((struct user *)proc0paddr)->u_pcb;
|
||||
curpcb = &lwp0.l_addr->u_pcb;
|
||||
|
||||
/*
|
||||
* Get the hardware into a defined state
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.102 2008/12/27 16:17:24 tsutsui Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.103 2009/11/26 00:19:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990 The Regents of the University of California.
|
||||
@ -1026,10 +1026,9 @@ Lend_cpuset:
|
||||
/*
|
||||
* set kernel stack, user SP, and initial pcb
|
||||
*/
|
||||
movl _C_LABEL(proc0paddr),%a1| lwp0 kernel stack
|
||||
lea _C_LABEL(lwp0),%a0 | grab lwp0.p_addr
|
||||
movl %a0@(L_ADDR),%a1
|
||||
lea %a1@(USPACE-4),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.p_addr so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't deref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
movl %a2,%usp | init user SP
|
||||
movl %a2,%a1@(PCB_USP) | and save it
|
||||
@ -1078,8 +1077,8 @@ Lcacheon:
|
||||
movw #PSL_USER,%sp@- | in user mode
|
||||
clrl %sp@- | stack adjust count
|
||||
lea %sp@(-64),%sp | construct space for D0-D7/A0-A7
|
||||
lea _C_LABEL(lwp0),%a0 | proc0 in a0
|
||||
movl %sp,%a0@(L_MD_REGS) | save frame for proc0
|
||||
#lea _C_LABEL(lwp0),%a0 | lwp0 in a0
|
||||
movl %sp,%a0@(L_MD_REGS) | save frame for lwp0
|
||||
movl %usp,%a1
|
||||
movl %a1,%sp@(FR_SP) | save user stack pointer in frame
|
||||
pea %sp@ | addr of space for D0
|
||||
@ -1464,8 +1463,6 @@ ASLOCAL(tmpstk)
|
||||
GLOBAL(protorp)
|
||||
.long 0x80000002,0 | prototype root pointer
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 | KVA of proc0 u-area
|
||||
#ifdef M68060 /* XXX */
|
||||
L60iem: .long 0
|
||||
L60fpiem: .long 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.18 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.19 2009/11/26 00:19:13 matt Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
|
||||
|
||||
/*
|
||||
@ -66,8 +66,6 @@ GLOBAL(startsym)
|
||||
.long 0 /* start symbol table */
|
||||
GLOBAL(endsym)
|
||||
.long 0 /* end symbol table */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
GLOBAL(oeacpufeat)
|
||||
.long 0 /* cpu features */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: cats_machdep.c,v 1.66 2009/08/18 09:22:47 he Exp $ */
|
||||
/* $NetBSD: cats_machdep.c,v 1.67 2009/11/26 00:19:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997,1998 Mark Brinicombe.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.66 2009/08/18 09:22:47 he Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: cats_machdep.c,v 1.67 2009/11/26 00:19:13 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_modular.h"
|
||||
@ -159,8 +159,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -741,8 +739,7 @@ initarm(void *arm_bootargs)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
/*
|
||||
* XXX this should only be done in main() but it useful to
|
||||
* have output earlier ...
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.17 2009/01/11 06:02:18 tsutsui Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.18 2009/11/26 00:19:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990, 1993
|
||||
@ -335,11 +335,10 @@ Lenab1:
|
||||
lea _ASM_LABEL(tmpstk),%sp | temporary stack
|
||||
jbsr _C_LABEL(uvm_setpagesize) | select software page size
|
||||
/* set kernel stack, user SP, and initial pcb */
|
||||
movl _C_LABEL(proc0paddr),%a1 | get lwp0 pcb addr
|
||||
lea _C_LABEL(lwp0),%a2 | get lwp0 pcb addr and initialize
|
||||
movl %a2,_C_LABEL(curlwp) | curlwp so that
|
||||
movl %a2@(L_ADDR),%a1 | we don't deref NULL in trap()
|
||||
lea %a1@(USPACE-4),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.l_addr
|
||||
movl %a2,_C_LABEL(curlwp) | and curlwp so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't deref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
movl %a2,%usp | init user SP
|
||||
movl %a1,_C_LABEL(curpcb) | lwp0 is running
|
||||
@ -1139,8 +1138,6 @@ GLOBAL(protorp)
|
||||
GLOBAL(prototc)
|
||||
.long 0 | prototype translation control
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 | KVA of lwp0 u-area
|
||||
#ifdef DEBUG
|
||||
.globl fulltflush, fullcflush
|
||||
fulltflush:
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.17 2009/08/11 17:04:15 matt Exp $ */
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.18 2009/11/26 00:19:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.17 2009/08/11 17:04:15 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.18 2009/11/26 00:19:13 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -54,7 +54,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.17 2009/08/11 17:04:15 matt Exp
|
||||
#define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa - KERNBASE))
|
||||
|
||||
extern char *etext;
|
||||
extern char *proc0paddr;
|
||||
extern paddr_t avail_start, avail_end;
|
||||
|
||||
void pmap_bootstrap(vm_offset_t, vm_offset_t);
|
||||
@ -365,7 +364,7 @@ pmap_bootstrap(vm_offset_t nextpa, vm_offset_t firstpa)
|
||||
* Remember the u-area address so it can be loaded in the
|
||||
* proc struct p_addr field later.
|
||||
*/
|
||||
RELOC(proc0paddr, char *) = (char *)(p0upa - firstpa + KERNBASE);
|
||||
RELOC(lwp0.l_addr, struct user *) = (char *)(p0upa - firstpa + KERNBASE);
|
||||
|
||||
/*
|
||||
* VM data structures are now initialized, set up data for
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.102 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.103 2009/11/26 00:19:13 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Izumi Tsutsui. All rights reserved.
|
||||
@ -50,7 +50,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.102 2009/02/13 22:41:01 apb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.103 2009/11/26 00:19:13 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -139,9 +139,6 @@ static u_int read_board_id(void);
|
||||
int safepri = MIPS1_PSL_LOWIPL;
|
||||
|
||||
extern char *esym;
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Do all the stuff that locore normally does before calling main().
|
||||
@ -318,9 +315,9 @@ mach_init(unsigned int memsize, u_int bim, char *bip)
|
||||
* Allocate space for proc0's USPACE.
|
||||
*/
|
||||
v = (char *)uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: brh_machdep.c,v 1.32 2009/08/11 17:04:15 matt Exp $ */
|
||||
/* $NetBSD: brh_machdep.c,v 1.33 2009/11/26 00:19:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: brh_machdep.c,v 1.32 2009/08/11 17:04:15 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: brh_machdep.c,v 1.33 2009/11/26 00:19:13 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_pmap_debug.h"
|
||||
@ -187,8 +187,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -671,8 +669,7 @@ initarm(void *arg)
|
||||
* Move from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: armadillo9_machdep.c,v 1.15 2009/08/11 17:04:15 matt Exp $ */
|
||||
/* $NetBSD: armadillo9_machdep.c,v 1.16 2009/11/26 00:19:13 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
@ -110,7 +110,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.15 2009/08/11 17:04:15 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: armadillo9_machdep.c,v 1.16 2009/11/26 00:19:13 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -253,8 +253,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -776,8 +774,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: beagle_machdep.c,v 1.4 2009/08/11 17:04:15 matt Exp $ */
|
||||
/* $NetBSD: beagle_machdep.c,v 1.5 2009/11/26 00:19:14 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Machine dependent functions for kernel setup for TI OSK5912 board.
|
||||
@ -125,7 +125,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.4 2009/08/11 17:04:15 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: beagle_machdep.c,v 1.5 2009/11/26 00:19:14 matt Exp $");
|
||||
|
||||
#include "opt_machdep.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -235,8 +235,6 @@ extern char _end[];
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
/*
|
||||
* Macros to translate between physical and virtual for a subset of the
|
||||
* kernel address space. *Not* for general use.
|
||||
@ -533,8 +531,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init.
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: initarm_common.c,v 1.7 2009/08/11 17:04:15 matt Exp $ */
|
||||
/* $NetBSD: initarm_common.c,v 1.8 2009/11/26 00:19:14 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2003 Wasabi Systems, Inc.
|
||||
@ -69,7 +69,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: initarm_common.c,v 1.7 2009/08/11 17:04:15 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: initarm_common.c,v 1.8 2009/11/26 00:19:14 matt Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/param.h>
|
||||
@ -97,8 +97,6 @@ vm_offset_t physical_start;
|
||||
vm_offset_t physical_end;
|
||||
pv_addr_t systempage;
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
extern u_int data_abort_handler_address;
|
||||
extern u_int prefetch_abort_handler_address;
|
||||
extern u_int undefined_handler_address;
|
||||
@ -418,8 +416,7 @@ initarm_common(const struct initarm_config *ic)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: g42xxeb_machdep.c,v 1.16 2009/08/11 17:04:15 matt Exp $ */
|
||||
/* $NetBSD: g42xxeb_machdep.c,v 1.17 2009/11/26 00:19:14 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2003, 2004, 2005 Genetec Corporation.
|
||||
@ -220,8 +220,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
#if 0
|
||||
@ -804,8 +802,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gemini_machdep.c,v 1.12 2009/08/11 17:04:15 matt Exp $ */
|
||||
/* $NetBSD: gemini_machdep.c,v 1.13 2009/11/26 00:19:14 matt Exp $ */
|
||||
|
||||
/* adapted from:
|
||||
* NetBSD: sdp24xx_machdep.c,v 1.4 2008/08/27 11:03:10 matt Exp
|
||||
@ -129,7 +129,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: gemini_machdep.c,v 1.12 2009/08/11 17:04:15 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: gemini_machdep.c,v 1.13 2009/11/26 00:19:14 matt Exp $");
|
||||
|
||||
#include "opt_machdep.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -260,8 +260,6 @@ unsigned long gemini_ipmq_vbase = GEMINI_IPMQ_VBASE;
|
||||
#endif /* NGEMINIIPM > 0 */
|
||||
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
/*
|
||||
* Macros to translate between physical and virtual for a subset of the
|
||||
* kernel address space. *Not* for general use.
|
||||
@ -687,8 +685,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init.
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: gumstix_machdep.c,v 1.18 2009/11/22 12:05:14 kiyohara Exp $ */
|
||||
/* $NetBSD: gumstix_machdep.c,v 1.19 2009/11/26 00:19:14 matt Exp $ */
|
||||
/*
|
||||
* Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation.
|
||||
* All rights reserved.
|
||||
@ -253,8 +253,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
static void read_system_serial(void);
|
||||
static void process_kernel_args(int, char *[]);
|
||||
@ -800,8 +798,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hdlg_machdep.c,v 1.10 2009/08/11 17:04:16 matt Exp $ */
|
||||
/* $NetBSD: hdlg_machdep.c,v 1.11 2009/11/26 00:19:14 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdlg_machdep.c,v 1.10 2009/08/11 17:04:16 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hdlg_machdep.c,v 1.11 2009/11/26 00:19:14 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -190,8 +190,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
void consinit(void);
|
||||
|
||||
@ -565,8 +563,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: imx31lk_machdep.c,v 1.5 2009/08/11 17:04:16 matt Exp $ */
|
||||
/* $NetBSD: imx31lk_machdep.c,v 1.6 2009/11/26 00:19:14 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Startup routines for the ZOOM iMX31 LITEKIT.
|
||||
@ -110,7 +110,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: imx31lk_machdep.c,v 1.5 2009/08/11 17:04:16 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: imx31lk_machdep.c,v 1.6 2009/11/26 00:19:14 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -227,8 +227,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
#if 0
|
||||
@ -681,8 +679,7 @@ printf("%s: textsize %#lx, totalsize %#lx\n",
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: integrator_machdep.c,v 1.62 2009/08/11 17:04:16 matt Exp $ */
|
||||
/* $NetBSD: integrator_machdep.c,v 1.63 2009/11/26 00:19:14 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001,2002 ARM Ltd
|
||||
@ -68,7 +68,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: integrator_machdep.c,v 1.62 2009/08/11 17:04:16 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: integrator_machdep.c,v 1.63 2009/11/26 00:19:14 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_pmap_debug.h"
|
||||
@ -171,8 +171,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
static void integrator_sdram_bounds (paddr_t *, psize_t *);
|
||||
@ -671,8 +669,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef PLCONSOLE
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iq80310_machdep.c,v 1.74 2009/08/11 17:04:16 matt Exp $ */
|
||||
/* $NetBSD: iq80310_machdep.c,v 1.75 2009/11/26 00:19:14 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80310_machdep.c,v 1.74 2009/08/11 17:04:16 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80310_machdep.c,v 1.75 2009/11/26 00:19:14 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_pmap_debug.h"
|
||||
@ -187,8 +187,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -685,8 +683,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iq80321_machdep.c,v 1.44 2009/08/11 17:04:16 matt Exp $ */
|
||||
/* $NetBSD: iq80321_machdep.c,v 1.45 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80321_machdep.c,v 1.44 2009/08/11 17:04:16 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iq80321_machdep.c,v 1.45 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -191,8 +191,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -711,8 +709,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ixdp425_machdep.c,v 1.23 2009/10/21 14:15:51 rmind Exp $ */
|
||||
/* $NetBSD: ixdp425_machdep.c,v 1.24 2009/11/26 00:19:15 matt Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003
|
||||
* Ichiro FUKUHARA <ichiro@ichiro.org>.
|
||||
@ -64,7 +64,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixdp425_machdep.c,v 1.23 2009/10/21 14:15:51 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixdp425_machdep.c,v 1.24 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -176,8 +176,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -680,8 +678,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ixm1200_machdep.c,v 1.42 2009/10/21 14:15:51 rmind Exp $ */
|
||||
/* $NetBSD: ixm1200_machdep.c,v 1.43 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2003
|
||||
@ -61,7 +61,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.42 2009/10/21 14:15:51 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ixm1200_machdep.c,v 1.43 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_modular.h"
|
||||
@ -198,8 +198,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
#ifdef CPU_IXP12X0
|
||||
#define CPU_IXP12X0_CACHE_CLEAN_SIZE (0x4000 * 2)
|
||||
extern unsigned int ixp12x0_cache_clean_addr;
|
||||
@ -623,8 +621,7 @@ initarm(void *arg)
|
||||
* Moved here from cpu_startup() as data_abort_handler() references
|
||||
* this during init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
/*
|
||||
* We must now clean the cache again....
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lubbock_machdep.c,v 1.20 2009/08/11 17:04:16 matt Exp $ */
|
||||
/* $NetBSD: lubbock_machdep.c,v 1.21 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2003, 2005 Genetec Corporation. All rights reserved.
|
||||
@ -112,7 +112,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: lubbock_machdep.c,v 1.20 2009/08/11 17:04:16 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: lubbock_machdep.c,v 1.21 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -230,8 +230,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
#if 0
|
||||
@ -884,8 +882,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: npwr_fc_machdep.c,v 1.10 2009/08/11 17:04:17 matt Exp $ */
|
||||
/* $NetBSD: npwr_fc_machdep.c,v 1.11 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: npwr_fc_machdep.c,v 1.10 2009/08/11 17:04:17 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: npwr_fc_machdep.c,v 1.11 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -191,8 +191,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -682,8 +680,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nslu2_machdep.c,v 1.13 2009/10/21 14:15:51 rmind Exp $ */
|
||||
/* $NetBSD: nslu2_machdep.c,v 1.14 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 The NetBSD Foundation, Inc.
|
||||
@ -94,7 +94,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nslu2_machdep.c,v 1.13 2009/10/21 14:15:51 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nslu2_machdep.c,v 1.14 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -206,8 +206,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -748,8 +746,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: osk5912_machdep.c,v 1.5 2009/08/11 17:04:17 matt Exp $ */
|
||||
/* $NetBSD: osk5912_machdep.c,v 1.6 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Machine dependent functions for kernel setup for TI OSK5912 board.
|
||||
@ -99,7 +99,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: osk5912_machdep.c,v 1.5 2009/08/11 17:04:17 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: osk5912_machdep.c,v 1.6 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_machdep.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -204,8 +204,6 @@ extern char _end[];
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
/*
|
||||
* Macros to translate between physical and virtual for a subset of the
|
||||
* kernel address space. *Not* for general use.
|
||||
@ -423,8 +421,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init.
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: smdk2410_machdep.c,v 1.23 2009/08/11 17:04:17 matt Exp $ */
|
||||
/* $NetBSD: smdk2410_machdep.c,v 1.24 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2003 Fujitsu Component Limited
|
||||
@ -105,7 +105,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: smdk2410_machdep.c,v 1.23 2009/08/11 17:04:17 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: smdk2410_machdep.c,v 1.24 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -238,8 +238,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -808,8 +806,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: smdk2800_machdep.c,v 1.31 2009/08/11 17:04:17 matt Exp $ */
|
||||
/* $NetBSD: smdk2800_machdep.c,v 1.32 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002, 2003, 2005 Fujitsu Component Limited
|
||||
@ -106,7 +106,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: smdk2800_machdep.c,v 1.31 2009/08/11 17:04:17 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: smdk2800_machdep.c,v 1.32 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -229,8 +229,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -712,8 +710,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sdp24xx_machdep.c,v 1.6 2009/08/11 17:04:17 matt Exp $ */
|
||||
/* $NetBSD: sdp24xx_machdep.c,v 1.7 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Machine dependent functions for kernel setup for TI OSK5912 board.
|
||||
@ -125,7 +125,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sdp24xx_machdep.c,v 1.6 2009/08/11 17:04:17 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sdp24xx_machdep.c,v 1.7 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_machdep.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -235,8 +235,6 @@ extern char _end[];
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
/*
|
||||
* Macros to translate between physical and virtual for a subset of the
|
||||
* kernel address space. *Not* for general use.
|
||||
@ -522,8 +520,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init.
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tsarm_machdep.c,v 1.11 2009/08/11 17:04:17 matt Exp $ */
|
||||
/* $NetBSD: tsarm_machdep.c,v 1.12 2009/11/26 00:19:15 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: tsarm_machdep.c,v 1.11 2009/08/11 17:04:17 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: tsarm_machdep.c,v 1.12 2009/11/26 00:19:15 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -197,8 +197,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -688,8 +686,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: viper_machdep.c,v 1.12 2009/08/11 17:04:17 matt Exp $ */
|
||||
/* $NetBSD: viper_machdep.c,v 1.13 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Startup routines for the Arcom Viper. Below you can trace the
|
||||
@ -112,7 +112,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: viper_machdep.c,v 1.12 2009/08/11 17:04:17 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: viper_machdep.c,v 1.13 2009/11/26 00:19:16 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -228,8 +228,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
#if 0
|
||||
@ -730,8 +728,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("bootstrap done.\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.11 2009/08/11 17:04:17 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.12 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2007 Ruslan Ermilov and Vsevolod Lobko.
|
||||
@ -107,7 +107,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.11 2009/08/11 17:04:17 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.12 2009/11/26 00:19:16 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -161,8 +161,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.11 2009/08/11 17:04:17 matt Exp $");
|
||||
#define MEMSIZE 4 * 1024 * 1024
|
||||
#endif /* !MEMSIZE */
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Our exported CPU info; we can have only one. */
|
||||
struct cpu_info cpu_info_store;
|
||||
|
||||
@ -439,9 +437,9 @@ mach_init(int argc, char **argv, void *a2, void *a3)
|
||||
* Init mapping for u page(s) for proc0.
|
||||
*/
|
||||
v = uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.42 2009/08/11 17:04:18 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.43 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2006 Itronix Inc.
|
||||
@ -107,7 +107,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2009/08/11 17:04:18 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2009/11/26 00:19:16 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -163,8 +163,6 @@ int aucomcnrate = 0;
|
||||
|
||||
#include "ohci.h"
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Our exported CPU info; we can have only one. */
|
||||
struct cpu_info cpu_info_store;
|
||||
|
||||
@ -365,9 +363,9 @@ mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize)
|
||||
* Init mapping for u page(s) for proc0.
|
||||
*/
|
||||
v = (void *) uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.18 2009/08/11 17:04:18 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.19 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Urbana-Champaign Independent Media Center.
|
||||
@ -147,7 +147,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2009/08/11 17:04:18 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.19 2009/11/26 00:19:16 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -184,8 +184,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2009/08/11 17:04:18 matt Exp $");
|
||||
#include <mips/atheros/include/ar531xvar.h>
|
||||
#include <mips/atheros/include/arbusvar.h>
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
/* Our exported CPU info; we can have only one. */
|
||||
struct cpu_info cpu_info_store;
|
||||
|
||||
@ -311,9 +309,9 @@ mach_init(void)
|
||||
* Init mapping for u page(s) for proc0.
|
||||
*/
|
||||
v = (void *) uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.8 2009/08/17 18:57:34 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.9 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001, 2002 Wasabi Systems, Inc.
|
||||
@ -112,7 +112,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.8 2009/08/17 18:57:34 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.9 2009/11/26 00:19:16 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_execfmt.h"
|
||||
@ -186,8 +186,6 @@ void mach_init(int, char **, char **, void *);
|
||||
*/
|
||||
int safepri = MIPS1_PSL_LOWIPL;
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
/*
|
||||
* For some reason, PMON doesn't assign a real address to the Ralink's BAR.
|
||||
* So we have to do it.
|
||||
@ -392,9 +390,9 @@ mach_init(int argc, char **argv, char **envp, void *callvec)
|
||||
* Allocate space for proc0's USPACE.
|
||||
*/
|
||||
v = (void *)uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.34 2009/03/18 10:22:27 cegger Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.35 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001, 2002 Wasabi Systems, Inc.
|
||||
@ -112,7 +112,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.34 2009/03/18 10:22:27 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.35 2009/11/26 00:19:16 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_execfmt.h"
|
||||
@ -191,8 +191,6 @@ void mach_init(int, char **, yamon_env_var *, u_long);
|
||||
*/
|
||||
int safepri = MIPS1_PSL_LOWIPL;
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
/*
|
||||
* Do all the stuff that locore normally does before calling main().
|
||||
*/
|
||||
@ -322,9 +320,9 @@ mach_init(int argc, char **argv, yamon_env_var *envp, u_long memsize)
|
||||
* Allocate space for proc0's USPACE.
|
||||
*/
|
||||
v = (void *)uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ev64260_locore.S,v 1.11 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: ev64260_locore.S,v 1.12 2009/11/26 00:19:16 matt Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
|
||||
|
||||
/*
|
||||
@ -67,8 +67,6 @@ GLOBAL(startsym)
|
||||
.long 0 /* start symbol table */
|
||||
GLOBAL(endsym)
|
||||
.long 0 /* end symbol table */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
GLOBAL(oeacpufeat)
|
||||
.long 0 /* cpu features */
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.25 2009/03/14 21:04:09 dsl Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.26 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.25 2009/03/14 21:04:09 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.26 2009/11/26 00:19:16 matt Exp $");
|
||||
|
||||
#include "opt_marvell.h"
|
||||
#include "opt_modular.h"
|
||||
@ -114,8 +114,6 @@ void isa_intr_init(void);
|
||||
/*
|
||||
* Global variables used here and there
|
||||
*/
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
#define PMONMEMREGIONS 32
|
||||
struct mem_region physmemr[PMONMEMREGIONS], availmemr[PMONMEMREGIONS];
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: explora_start.S,v 1.5 2008/04/28 20:23:17 martin Exp $ */
|
||||
/* $NetBSD: explora_start.S,v 1.6 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -55,9 +55,6 @@
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_ppcparam.h"
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
|
||||
/*
|
||||
* Initially the dram starts at 0x01000000. This is way too high.
|
||||
* We relocate dram to 0x00000000. We use the video ram at 0xf0000000
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.27 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.28 2009/11/26 00:19:16 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003 The NetBSD Foundation, Inc.
|
||||
@ -30,7 +30,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.27 2009/02/13 22:41:01 apb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.28 2009/11/26 00:19:16 matt Exp $");
|
||||
|
||||
#include "opt_explora.h"
|
||||
#include "opt_modular.h"
|
||||
@ -75,8 +75,6 @@ char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
|
||||
|
||||
static const unsigned int cpuspeed = 66000000;
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
prop_dictionary_t board_properties;
|
||||
struct vm_map *phys_map = NULL;
|
||||
struct vm_map *mb_map = NULL;
|
||||
@ -211,10 +209,9 @@ bootstrap(u_int startkernel, u_int endkernel)
|
||||
* Initialize lwp0 and current pcb and pmap pointers.
|
||||
*/
|
||||
lwp0.l_cpu = ci;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
memset(lwp0.l_addr, 0, sizeof *lwp0.l_addr);
|
||||
|
||||
curpcb = &proc0paddr->u_pcb;
|
||||
curpcb = &lwp0.l_addr->u_pcb;
|
||||
curpcb->pcb_pm = pmap_kernel();
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: obs200_locore.S,v 1.6 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: obs200_locore.S,v 1.7 2009/11/26 00:19:16 matt Exp $ */
|
||||
/* Original Tag: locore.S,v 1.1 2003/09/23 15:21:58 shige Exp */
|
||||
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
|
||||
|
||||
@ -100,12 +100,6 @@
|
||||
*/
|
||||
#define bdneq bdnzf 2,
|
||||
|
||||
/*
|
||||
* Globals
|
||||
*/
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
|
||||
/*
|
||||
* This symbol is here for the benefit of kvm_mkdb, and is supposed to
|
||||
* mark the start of kernel text.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmppc_locore.S,v 1.3 2008/02/05 22:31:49 garbled Exp $ */
|
||||
/* $NetBSD: pmppc_locore.S,v 1.4 2009/11/26 00:19:16 matt Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
|
||||
|
||||
/*
|
||||
@ -68,8 +68,6 @@ GLOBAL(startsym)
|
||||
.long 0 /* start symbol table */
|
||||
GLOBAL(endsym)
|
||||
.long 0 /* end symbol table */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
GLOBAL(oeacpufeat)
|
||||
.long 0 /* cpu features */
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.10 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.11 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Jachym Holecek
|
||||
@ -34,7 +34,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.10 2009/02/13 22:41:01 apb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.11 2009/11/26 00:19:17 matt Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -100,8 +100,6 @@ char cpu_model[80];
|
||||
char machine[] = MACHINE; /* from <machine/param.h> */
|
||||
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
char bootpath[256];
|
||||
paddr_t msgbuf_paddr;
|
||||
vaddr_t msgbuf_vaddr;
|
||||
@ -209,10 +207,9 @@ initppc(u_int startkernel, u_int endkernel)
|
||||
physmemr, availmemr);
|
||||
|
||||
lwp0.l_cpu = ci;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
memset(lwp0.l_addr, 0, sizeof(*lwp0.l_addr));
|
||||
|
||||
curpcb = &proc0paddr->u_pcb;
|
||||
curpcb = &lwp0.l_addr->u_pcb;
|
||||
curpcb->pcb_pm = pmap_kernel();
|
||||
|
||||
for (exc = EXC_RSVD; exc <= EXC_LAST; exc += 0x100)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: virtex_start.S,v 1.3 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: virtex_start.S,v 1.4 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006 Jachym Holecek
|
||||
@ -64,11 +64,6 @@
|
||||
/* Set bit (beginning with MSB) for each 128MB of RAM. */
|
||||
#define PHYSMEM_REGIONS_MASK ~((1 << (32 - MB(PHYSMEM)/MB(128))) - 1)
|
||||
|
||||
|
||||
/* Initialized by INIT_CPUINFO(), used by machdep.c */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
|
||||
/* For kvm_mkdb, supposed to mark the start of kernel text. */
|
||||
.text
|
||||
.globl _C_LABEL(kernel_text)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.41 2009/11/07 07:27:43 cegger Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.42 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2001, 2002 Wasabi Systems, Inc.
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2009/11/07 07:27:43 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2009/11/26 00:19:17 matt Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -131,8 +131,6 @@ char cpu_model[80];
|
||||
char machine[] = MACHINE; /* from <machine/param.h> */
|
||||
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
char bootpath[256];
|
||||
paddr_t msgbuf_paddr;
|
||||
vaddr_t msgbuf_vaddr;
|
||||
@ -206,10 +204,9 @@ initppc(u_int startkernel, u_int endkernel, char *args, void *info_block)
|
||||
* Initialize lwp0 and current pcb and pmap pointers.
|
||||
*/
|
||||
lwp0.l_cpu = ci;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
memset(lwp0.l_addr, 0, sizeof *lwp0.l_addr);
|
||||
|
||||
curpcb = &proc0paddr->u_pcb;
|
||||
curpcb = &lwp0.laddr->u_pcb;
|
||||
curpcb->pcb_pm = pmap_kernel();
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: walnut_start.S,v 1.16 2009/02/13 22:41:01 apb Exp $ */
|
||||
/* $NetBSD: walnut_start.S,v 1.17 2009/11/26 00:19:17 matt Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
|
||||
|
||||
/*
|
||||
@ -99,12 +99,6 @@
|
||||
*/
|
||||
#define bdneq bdnzf 2,
|
||||
|
||||
/*
|
||||
* Globals
|
||||
*/
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
|
||||
/*
|
||||
* This symbol is here for the benefit of kvm_mkdb, and is supposed to
|
||||
* mark the start of kernel text.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.17 2009/08/11 17:04:18 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.18 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2004, 2005 The NetBSD Foundation, Inc.
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2009/08/11 17:04:18 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2009/11/26 00:19:17 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
|
||||
@ -90,7 +90,6 @@ void
|
||||
mach_init(int argc, char *argv[], struct bootinfo *bi)
|
||||
{
|
||||
extern char kernel_text[], edata[], end[];
|
||||
extern struct user *proc0paddr;
|
||||
void *v;
|
||||
int i;
|
||||
|
||||
@ -170,9 +169,9 @@ mach_init(int argc, char *argv[], struct bootinfo *bi)
|
||||
pmap_bootstrap();
|
||||
|
||||
v = (void *)uvm_pageboot_alloc(USPACE); /* proc0 USPACE */
|
||||
lwp0.l_addr = proc0paddr = (struct user *) v;
|
||||
lwp0.l_addr = (struct user *) v;
|
||||
lwp0.l_md.md_regs = (struct frame *)((char *)v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.146 2009/01/11 06:02:18 tsutsui Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.147 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990, 1993
|
||||
@ -553,11 +553,10 @@ Lenab1:
|
||||
lea _ASM_LABEL(tmpstk),%sp | temporary stack
|
||||
jbsr _C_LABEL(uvm_setpagesize) | select software page size
|
||||
/* set kernel stack, user SP, and initial pcb */
|
||||
movl _C_LABEL(proc0paddr),%a1 | get lwp0 pcb addr
|
||||
lea %a1@(USPACE-4),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.l_addr
|
||||
movl %a2,_C_LABEL(curlwp) | and curlwp so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't deref NULL in trap()
|
||||
lea _C_LABEL(lwp0),%a2 | grab lwp0.l_addr
|
||||
movl %a2@(L_ADDR),%a1 | set kernel stack to end of area
|
||||
lea %a1@(USPACE-4),%sp | and curlwp so that we don't
|
||||
movl %a2,_C_LABEL(curlwp) | deref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
movl %a2,%usp | init user SP
|
||||
movl %a1,_C_LABEL(curpcb) | lwp0 is running
|
||||
@ -1520,9 +1519,6 @@ GLOBAL(prototc)
|
||||
GLOBAL(internalhpib)
|
||||
.long 1 | has internal HP-IB, default to yes
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 | KVA of lwp0 u-area
|
||||
|
||||
GLOBAL(intiobase)
|
||||
.long 0 | KVA of base of internal IO space
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.37 2009/01/17 07:17:35 tsutsui Exp $ */
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.38 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.37 2009/01/17 07:17:35 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.38 2009/11/26 00:19:17 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -55,7 +55,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.37 2009/01/17 07:17:35 tsutsui
|
||||
#define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa))
|
||||
|
||||
extern char *etext;
|
||||
extern char *proc0paddr;
|
||||
extern vaddr_t CLKbase, MMUbase;
|
||||
extern paddr_t bootinfo_pa;
|
||||
extern vaddr_t bootinfo_va;
|
||||
@ -410,7 +409,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
* Remember the u-area address so it can be loaded in the
|
||||
* proc struct p_addr field later.
|
||||
*/
|
||||
RELOC(proc0paddr, char *) = (char *)(p0upa - firstpa);
|
||||
RELOC(lwp.l_addr, struct user *) = (struct user *)(p0upa - firstpa);
|
||||
|
||||
/*
|
||||
* VM data structures are now initialized, set up data for
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.35 2009/06/03 21:08:51 skrll Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.36 2009/11/26 00:19:17 matt Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */
|
||||
|
||||
/*
|
||||
@ -148,7 +148,6 @@
|
||||
.import esym, data
|
||||
.import virtual_avail, data
|
||||
.import lwp0, data
|
||||
.import proc0paddr, data
|
||||
.import kpsw, data
|
||||
.import panic, code
|
||||
.import fpu_csw, data
|
||||
@ -262,8 +261,6 @@ L$start_zero_tf:
|
||||
ldil L%USPACE, %r4
|
||||
add %t3, %r4, %r4
|
||||
|
||||
ldil L%proc0paddr, %t1
|
||||
stw %t3, R%proc0paddr(%t1)
|
||||
ldil L%lwp0, %t2
|
||||
stw %t3, R%lwp0+L_ADDR(%t2)
|
||||
ldo NBPG(%t3), %t1
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.73 2009/11/21 15:36:33 rmind Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.74 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
|
||||
@ -58,7 +58,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.73 2009/11/21 15:36:33 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.74 2009/11/26 00:19:17 matt Exp $");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -242,7 +242,6 @@ u_int hppa_btlb_size_min, hppa_btlb_size_max;
|
||||
/*
|
||||
* Things for MI glue to stick on.
|
||||
*/
|
||||
struct user *proc0paddr;
|
||||
struct extent *hp700_io_extent;
|
||||
static long hp700_io_extent_store[EXTENT_FIXED_STORAGE_SIZE(64) / sizeof(long)];
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hpc_machdep.c,v 1.92 2009/08/11 17:04:18 matt Exp $ */
|
||||
/* $NetBSD: hpc_machdep.c,v 1.93 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994-1998 Mark Brinicombe.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.92 2009/08/11 17:04:18 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: hpc_machdep.c,v 1.93 2009/11/26 00:19:17 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_modular.h"
|
||||
@ -163,8 +163,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
#define CPU_SA110_CACHE_CLEAN_SIZE (0x4000 * 2)
|
||||
extern unsigned int sa1_cache_clean_addr;
|
||||
extern unsigned int sa1_cache_clean_size;
|
||||
@ -661,8 +659,7 @@ initarm(int argc, char **argv, struct bootinfo *bi)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init.
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef BOOT_DUMP
|
||||
dumppages((char *)0xc0000000, 16 * PAGE_SIZE);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.103 2009/03/18 16:00:12 cegger Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.104 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 Shin Takemura, All rights reserved.
|
||||
@ -108,7 +108,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.103 2009/03/18 16:00:12 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.104 2009/11/26 00:19:17 matt Exp $");
|
||||
|
||||
#include "opt_vr41xx.h"
|
||||
#include "opt_tx39xx.h"
|
||||
@ -260,7 +260,6 @@ mach_init(int argc, char *argv[], struct bootinfo *bi)
|
||||
#ifdef KLOADER
|
||||
struct kloader_bootinfo kbi;
|
||||
#endif
|
||||
extern struct user *proc0paddr;
|
||||
extern char edata[], end[];
|
||||
#if NKSYMS || defined(DDB) || defined(MODULAR)
|
||||
extern void *esym;
|
||||
@ -456,14 +455,13 @@ mach_init(int argc, char *argv[], struct bootinfo *bi)
|
||||
/*
|
||||
* Alloc u pages for lwp0 stealing KSEG0 memory.
|
||||
*/
|
||||
lwp0.l_addr = proc0paddr = (struct user *)kernend;
|
||||
lwp0.l_md.md_regs =
|
||||
(struct frame *)((char *)kernend + UPAGES * PAGE_SIZE) - 1;
|
||||
memset(kernend, 0, UPAGES * PAGE_SIZE);
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr = (struct user *)kernend;
|
||||
lwp0.l_md.md_regs = (struct frame *)((char *)kernend + USPACE) - 1;
|
||||
memset(kernend, 0, USPACE);
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
kernend = (char *)kernend + UPAGES * PAGE_SIZE;
|
||||
kernend = (char *)kernend + USPACE;
|
||||
|
||||
/* Initialize console and KGDB serial port. */
|
||||
(*platform.cons_init)();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap.c,v 1.57 2009/11/21 15:36:33 rmind Exp $ */
|
||||
/* $NetBSD: pmap.c,v 1.58 2009/11/26 00:19:17 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
|
||||
@ -65,7 +65,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.57 2009/11/21 15:36:33 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.58 2009/11/26 00:19:17 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -1015,9 +1015,6 @@ pmap_bootstrap(vaddr_t vstart)
|
||||
/* TODO optimize/inline the kenter */
|
||||
for (va = PAGE_SIZE; va < ptoa(physmem); va += PAGE_SIZE) {
|
||||
vm_prot_t prot = UVM_PROT_RW;
|
||||
#ifdef DIAGNOSTIC
|
||||
extern struct user *proc0paddr;
|
||||
#endif
|
||||
|
||||
if (va < resvmem)
|
||||
prot = UVM_PROT_RX;
|
||||
@ -1026,7 +1023,7 @@ pmap_bootstrap(vaddr_t vstart)
|
||||
else if (va >= ksro && va < kero)
|
||||
prot = UVM_PROT_R;
|
||||
#ifdef DIAGNOSTIC
|
||||
else if (va == (vaddr_t)proc0paddr + USPACE - PAGE_SIZE)
|
||||
else if (va == (vaddr_t)lwp0.l_addr + USPACE - PAGE_SIZE)
|
||||
prot = UVM_PROT_NONE;
|
||||
#endif
|
||||
pmap_kenter_pa(va, va, prot, 0);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.677 2009/11/25 14:28:50 rmind Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.678 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
|
||||
@ -67,7 +67,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.677 2009/11/25 14:28:50 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.678 2009/11/26 00:19:18 matt Exp $");
|
||||
|
||||
#include "opt_beep.h"
|
||||
#include "opt_compat_ibcs2.h"
|
||||
@ -1055,7 +1055,6 @@ setregs(struct lwp *l, struct exec_package *pack, u_long stack)
|
||||
|
||||
union descriptor *gdt, *ldt;
|
||||
union descriptor *pentium_idt;
|
||||
struct user *proc0paddr;
|
||||
extern vaddr_t proc0uarea;
|
||||
|
||||
void
|
||||
@ -1313,9 +1312,8 @@ init386(paddr_t first_avail)
|
||||
cpu_feature2 = cpu_info_primary.ci_feature2_flags;
|
||||
cpu_feature_padlock = cpu_info_primary.ci_padlock_flags;
|
||||
|
||||
proc0paddr = UAREA_TO_USER(proc0uarea);
|
||||
lwp0.l_addr = proc0paddr;
|
||||
pcb = (void *)proc0paddr;
|
||||
lwp0.l_addr = UAREA_TO_USER(proc0uarea);
|
||||
pcb = (void *)lwp0.l_addr;
|
||||
|
||||
#ifdef XEN
|
||||
/* not on Xen... */
|
||||
@ -1323,8 +1321,8 @@ init386(paddr_t first_avail)
|
||||
pcb->pcb_cr3 = PDPpaddr - KERNBASE;
|
||||
__PRINTK(("pcb_cr3 0x%lx cr3 0x%lx\n",
|
||||
PDPpaddr - KERNBASE, xpmap_ptom(PDPpaddr - KERNBASE)));
|
||||
XENPRINTK(("proc0 pcb %p first_avail %p\n",
|
||||
pcb, (void *)(long)first_avail));
|
||||
XENPRINTK(("lwp0.l_addr %p first_avail %p\n",
|
||||
lwp0.l_addr, (void *)(long)first_avail));
|
||||
XENPRINTK(("ptdpaddr %p atdevbase %p\n", (void *)PDPpaddr,
|
||||
(void *)atdevbase));
|
||||
#endif
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.18 2009/11/21 15:36:34 rmind Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.19 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003,2004 Marcel Moolenaar
|
||||
@ -161,8 +161,6 @@ extern vaddr_t kernel_text, end;
|
||||
|
||||
struct fpswa_iface *fpswa_iface;
|
||||
|
||||
struct user *proc0paddr; /* XXX: See: kern/kern_proc.c:proc0_init() */
|
||||
|
||||
#define Mhz 1000000L
|
||||
#define Ghz (1000L*Mhz)
|
||||
|
||||
@ -440,6 +438,7 @@ void
|
||||
ia64_init(void)
|
||||
{
|
||||
paddr_t kernstartpfn, kernendpfn, pfn0, pfn1;
|
||||
struct pcb *pcb0;
|
||||
struct efi_md *md;
|
||||
|
||||
/* NO OUTPUT ALLOWED UNTIL FURTHER NOTICE */
|
||||
@ -661,8 +660,8 @@ ia64_init(void)
|
||||
/*
|
||||
* Init mapping for u page(s) for proc 0
|
||||
*/
|
||||
lwp0.l_addr = proc0paddr =
|
||||
(struct user *)uvm_pageboot_alloc(UPAGES * PAGE_SIZE);
|
||||
lwp0.l_addr = (struct user *)uvm_pageboot_alloc(UPAGES * PAGE_SIZE);
|
||||
pcb0 = &lwp0.l_addr->u_pcb;
|
||||
|
||||
|
||||
/*
|
||||
@ -688,19 +687,18 @@ ia64_init(void)
|
||||
*/
|
||||
|
||||
|
||||
lwp0.l_md.md_tf = (struct trapframe *)((uint64_t)proc0paddr +
|
||||
lwp0.l_md.md_tf = (struct trapframe *)((vaddr_t)lwp0.l_addr +
|
||||
USPACE - sizeof(struct trapframe));
|
||||
|
||||
proc0paddr->u_pcb.pcb_special.sp =
|
||||
(uint64_t)lwp0.l_md.md_tf - 16; /* 16 bytes is the
|
||||
pcb0->pcb_special.sp =
|
||||
(vaddr_t)lwp0.l_md.md_tf - 16; /* 16 bytes is the
|
||||
* scratch area defined
|
||||
* by the ia64 ABI
|
||||
*/
|
||||
|
||||
proc0paddr->u_pcb.pcb_special.bspstore =
|
||||
(uint64_t) proc0paddr + sizeof(struct user);
|
||||
pcb0->pcb_special.bspstore = (vaddr_t) (lwp0.l_addr + 1);
|
||||
|
||||
mutex_init(&proc0paddr->u_pcb.pcb_fpcpu_slock, MUTEX_DEFAULT, 0);
|
||||
mutex_init(&pcb0.pcb_fpcpu_slock, MUTEX_DEFAULT, 0);
|
||||
|
||||
|
||||
/*
|
||||
@ -727,7 +725,7 @@ ia64_init(void)
|
||||
* MULTIPROCESSOR configuration, each CPU will later get
|
||||
* its own idle PCB when autoconfiguration runs.
|
||||
*/
|
||||
ci->ci_idle_pcb = &proc0paddr->u_pcb;
|
||||
ci->ci_idle_pcb = pcb0;
|
||||
|
||||
/* Indicate that proc0 has a CPU. */
|
||||
lwp0.l_cpu = ci;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.5 2008/02/05 22:31:49 garbled Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.6 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -64,8 +64,6 @@ GLOBAL(startsym)
|
||||
.long 0 /* start symbol table */
|
||||
GLOBAL(endsym)
|
||||
.long 0 /* end symbol table */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
GLOBAL(oeacpufeat)
|
||||
.long 0 /* cpu features */
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: iyonix_machdep.c,v 1.13 2009/08/11 17:04:18 matt Exp $ */
|
||||
/* $NetBSD: iyonix_machdep.c,v 1.14 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
|
||||
@ -73,7 +73,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.13 2009/08/11 17:04:18 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.14 2009/11/26 00:19:18 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -193,8 +193,6 @@ extern int pmap_debug_level;
|
||||
|
||||
pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
char iyonix_macaddr[ETHER_ADDR_LEN];
|
||||
|
||||
char boot_consdev[16];
|
||||
@ -749,8 +747,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.29 2009/01/11 06:02:18 tsutsui Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.30 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990, 1993
|
||||
@ -314,11 +314,10 @@ Lenab1:
|
||||
jbsr _C_LABEL(uvm_setpagesize) | select software page size
|
||||
|
||||
/* set kernel stack, user SP, lwp0, and initial pcb */
|
||||
movl _C_LABEL(proc0paddr),%a1 | get lwp0 pcb addr
|
||||
lea %a1@(USPACE-4),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.l_addr
|
||||
movl %a2,_C_LABEL(curlwp) | and curlwp so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't deref NULL in trap()
|
||||
lea _C_LABEL(lwp0),%a2 | get lwp0.l_addr
|
||||
movl %a2@(L_ADDR),%a1 | set kernel stack to end of area
|
||||
lea %a1@(USPACE-4),%sp | and curlwp so that we don't
|
||||
movl %a2,_C_LABEL(curlwp) | deref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
movl %a2,%usp | init user SP
|
||||
movl %a1,_C_LABEL(curpcb) | lwp0 is running
|
||||
@ -1204,8 +1203,6 @@ nullrp:
|
||||
|
||||
GLOBAL(memavail)
|
||||
.long 0
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0
|
||||
GLOBAL(bootdev)
|
||||
.long 0
|
||||
GLOBAL(hwplanemask)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.18 2009/03/14 15:36:08 dsl Exp $ */
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.19 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.18 2009/03/14 15:36:08 dsl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.19 2009/11/26 00:19:18 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/proc.h>
|
||||
@ -52,7 +52,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.18 2009/03/14 15:36:08 dsl Exp
|
||||
#define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa))
|
||||
|
||||
extern char *etext;
|
||||
extern char *proc0paddr;
|
||||
|
||||
extern int maxmem, physmem;
|
||||
extern paddr_t avail_start, avail_end;
|
||||
@ -85,7 +84,7 @@ void *msgbufaddr;
|
||||
void
|
||||
pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
{
|
||||
paddr_t kstpa, kptpa, kptmpa, p0upa;
|
||||
paddr_t kstpa, kptpa, kptmpa, l0upa;
|
||||
u_int nptpages, kstsize;
|
||||
st_entry_t protoste, *ste;
|
||||
pt_entry_t protopte, *pte, *epte;
|
||||
@ -106,7 +105,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
*
|
||||
* kptmpa kernel PT map 1 page
|
||||
*
|
||||
* p0upa proc 0 u-area UPAGES pages
|
||||
* l0upa lwp 0 u-area UPAGES pages
|
||||
*
|
||||
* The KVA corresponding to any of these PAs is:
|
||||
* (PA - firstpa + KERNBASE).
|
||||
@ -122,7 +121,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
nextpa += kstsize * PAGE_SIZE;
|
||||
kptmpa = nextpa;
|
||||
nextpa += PAGE_SIZE;
|
||||
p0upa = nextpa;
|
||||
l0upa = nextpa;
|
||||
nextpa += USPACE;
|
||||
kptpa = nextpa;
|
||||
nptpages = RELOC(Sysptsize, int) +
|
||||
@ -345,15 +344,15 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
* Zero the u-area.
|
||||
* NOTE: `pte' and `epte' aren't PTEs here.
|
||||
*/
|
||||
pte = (u_int *)p0upa;
|
||||
epte = (u_int *)(p0upa + USPACE);
|
||||
pte = (u_int *)l0upa;
|
||||
epte = (u_int *)(l0upa + USPACE);
|
||||
while (pte < epte)
|
||||
*pte++ = 0;
|
||||
/*
|
||||
* Remember the u-area address so it can be loaded in the
|
||||
* proc struct p_addr field later.
|
||||
*/
|
||||
RELOC(proc0paddr, char *) = (char *)(p0upa - firstpa);
|
||||
RELOC(lwp0.l_addr, struct user *) = (struct user *)(l0upa - firstpa);
|
||||
|
||||
RELOC(avail_start, paddr_t) = nextpa;
|
||||
RELOC(avail_end, paddr_t) = m68k_ptob(RELOC(maxmem, int)) -
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.155 2009/01/11 06:02:18 tsutsui Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.156 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1990 The Regents of the University of California.
|
||||
@ -338,11 +338,10 @@ Lloaddone:
|
||||
jbsr _C_LABEL(uvm_setpagesize) | select software page size
|
||||
|
||||
/* set kernel stack, user SP, lwp0, and initial pcb */
|
||||
movl _C_LABEL(proc0paddr),%a1 | get proc0 pcb addr
|
||||
lea %a1@(USPACE-4),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.l_addr
|
||||
movl %a2,_C_LABEL(curlwp) | and curlwp so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't deref NULL in trap()
|
||||
lea _C_LABEL(lwp0),%a2 | get lwp0.l_addr
|
||||
movl %a2@(L_ADDR),%a1 | set kernel stack to end of area
|
||||
lea %a1@(USPACE-4),%sp | and curlwp so that we don't
|
||||
movl %a2,_C_LABEL(curlwp) | deref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
movl %a2,%usp | init %USP
|
||||
movl %a1,_C_LABEL(curpcb) | lwp0 is running
|
||||
@ -1512,9 +1511,6 @@ GLOBAL(fputype)
|
||||
GLOBAL(protorp)
|
||||
.long 0,0 | prototype root pointer
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 | KVA of lwp0 u-area
|
||||
|
||||
GLOBAL(intiolimit)
|
||||
.long 0 | KVA of end of internal IO space
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.78 2009/08/11 17:04:18 matt Exp $ */
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.79 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.78 2009/08/11 17:04:18 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.79 2009/11/26 00:19:18 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kgdb.h"
|
||||
@ -60,7 +60,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.78 2009/08/11 17:04:18 matt Exp
|
||||
#define PA2VA(v, t) (t)((u_int)(v) - firstpa)
|
||||
|
||||
extern char *etext;
|
||||
extern char *extiobase, *proc0paddr;
|
||||
extern char *extiobase;
|
||||
|
||||
extern paddr_t avail_start;
|
||||
extern paddr_t avail_end;
|
||||
@ -110,7 +110,7 @@ void bootstrap_mac68k(int);
|
||||
void
|
||||
pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
{
|
||||
paddr_t kstpa, kptpa, kptmpa, p0upa;
|
||||
paddr_t kstpa, kptpa, kptmpa, l0upa;
|
||||
u_int nptpages, kstsize;
|
||||
paddr_t avail_next;
|
||||
int avail_remaining;
|
||||
@ -138,7 +138,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
*
|
||||
* kptmpa kernel PT map 1 page
|
||||
*
|
||||
* p0upa proc 0 u-area UPAGES pages
|
||||
* l0upa lwp 0 u-area UPAGES pages
|
||||
*
|
||||
*/
|
||||
if (mmutype == MMU_68040)
|
||||
@ -149,7 +149,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
nextpa += kstsize * PAGE_SIZE;
|
||||
kptmpa = nextpa;
|
||||
nextpa += PAGE_SIZE;
|
||||
p0upa = nextpa;
|
||||
l0upa = nextpa;
|
||||
nextpa += USPACE;
|
||||
kptpa = nextpa;
|
||||
nptpages = Sysptsize +
|
||||
@ -405,15 +405,15 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
* Zero the u-area.
|
||||
* NOTE: `pte' and `epte' aren't PTEs here.
|
||||
*/
|
||||
pte = PA2VA(p0upa, u_int *);
|
||||
epte = (u_int *)(PA2VA(p0upa, u_int) + USPACE);
|
||||
pte = PA2VA(l0upa, u_int *);
|
||||
epte = (u_int *)(PA2VA(l0upa, u_int) + USPACE);
|
||||
while (pte < epte)
|
||||
*pte++ = 0;
|
||||
|
||||
/*
|
||||
* Remember the u-area address so it can be loaded in the
|
||||
* proc struct p_addr field later.
|
||||
* Store the u-area address
|
||||
*/
|
||||
proc0paddr = PA2VA(p0upa, char *);
|
||||
lwp0.l_addr = PA2VA(l0upa, struct user *);
|
||||
|
||||
/*
|
||||
* VM data structures are now initialized, set up data for
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.63 2009/02/13 22:41:02 apb Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.64 2009/11/26 00:19:18 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -64,8 +64,6 @@
|
||||
.data
|
||||
GLOBAL(esym)
|
||||
.long 0 /* end of symbol table */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
GLOBAL(oeacpufeat)
|
||||
.long 0 /* cpu features */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mcontext.h,v 1.8 2008/04/28 20:23:28 martin Exp $ */
|
||||
/* $NetBSD: mcontext.h,v 1.9 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999, 2002 The NetBSD Foundation, Inc.
|
||||
@ -81,15 +81,15 @@
|
||||
|
||||
/* Make sure this is signed; we need pointers to be sign-extended. */
|
||||
#if defined(__mips_n32)
|
||||
typedef long long __greg_t;
|
||||
typedef long long __greg_t;
|
||||
#else
|
||||
typedef long __greg_t;
|
||||
typedef long __greg_t;
|
||||
#endif /* __mips_n32 */
|
||||
|
||||
typedef __greg_t __gregset_t[_NGREG];
|
||||
|
||||
/*
|
||||
* For the O32 ABI, there are 16 doubles, one at each even FP reg
|
||||
* For the O32/O64 ABI, there are 16 doubles, one at each even FP reg
|
||||
* number. The FP registers themselves are 32-bits.
|
||||
*
|
||||
* For 64-bit ABIs (include N32), each FP register is a 64-bit double.
|
||||
@ -99,45 +99,50 @@ typedef __greg_t __freg_t;
|
||||
/*
|
||||
* Floating point register state
|
||||
*/
|
||||
#if defined(__mips_n32) || defined(_LP64)
|
||||
typedef struct {
|
||||
struct __fpregset_nabi {
|
||||
union {
|
||||
double __fp64_dregs[32];
|
||||
__freg_t __fp_regs[32];
|
||||
} __fp_r;
|
||||
unsigned int __fp_csr;
|
||||
unsigned int __fp_pad;
|
||||
} __fpregset_t;
|
||||
#else /* !(__mips_n32 || _LP64) */
|
||||
typedef struct {
|
||||
};
|
||||
struct __fpregset_oabi {
|
||||
union {
|
||||
double __fp_dregs[16];
|
||||
float __fp_fregs[32];
|
||||
__freg_t __fp_regs[32];
|
||||
int32_t __fp_regs[32];
|
||||
} __fp_r;
|
||||
unsigned int __fp_csr;
|
||||
unsigned int __fp_pad;
|
||||
} __fpregset_t;
|
||||
#endif /* !(__mips_n32 || _LP64) */
|
||||
};
|
||||
|
||||
#if __mips_n32 || __mips_n64
|
||||
typedef struct __fpregset_nabi __fpregset_t;
|
||||
#else
|
||||
typedef struct __fpregset_oabi __fpregset_t;
|
||||
#else
|
||||
|
||||
typedef struct {
|
||||
__gregset_t __gregs;
|
||||
__fpregset_t __fpregs;
|
||||
} mcontext_t;
|
||||
|
||||
#ifdef COMPAT_NETBSD32
|
||||
typedef int32_t __greg32_t;
|
||||
typedef __greg32_t __gregset32_t[_NGREG];
|
||||
|
||||
typedef struct {
|
||||
__gregset32_t __gregs;
|
||||
__fpregset_oabi_t __fpregs;
|
||||
} mcontext32_t;
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* !__ASSEMBLER__ */
|
||||
|
||||
#define _UC_MACHINE_PAD 16 /* Padding appended to ucontext_t */
|
||||
|
||||
/*
|
||||
* Offsets relative to ucontext_t; intended to be used by assembly stubs.
|
||||
*/
|
||||
#if !defined(_MIPS_BSD_API) || _MIPS_BSD_API == _MIPS_BSD_API_LP32
|
||||
#define _OFFSETOF_UC_GREGS 40
|
||||
#else
|
||||
#define _OFFSETOF_UC_GREGS 56
|
||||
#endif
|
||||
|
||||
#define _UC_SETSTACK 0x00010000
|
||||
#define _UC_CLRSTACK 0x00020000
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.167 2007/10/17 19:55:38 garbled Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.168 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -138,7 +138,7 @@ _C_LABEL(kernel_text):
|
||||
jal _C_LABEL(mach_init) # mach_init(a0, a1, a2, a3)
|
||||
nop
|
||||
|
||||
lw sp, _C_LABEL(proc0paddr) # switch to proc0 stack
|
||||
lw sp, L_ADDR(MIPS_CURLWP) # switch to lwp0 stack
|
||||
nop
|
||||
addu sp, sp, USPACE - FRAME_SIZ - CALLFRAME_SIZ
|
||||
jal _C_LABEL(main) # main(void)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mips_machdep.c,v 1.218 2009/11/21 17:40:28 rmind Exp $ */
|
||||
/* $NetBSD: mips_machdep.c,v 1.219 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -112,7 +112,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.218 2009/11/21 17:40:28 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.219 2009/11/26 00:19:19 matt Exp $");
|
||||
|
||||
#include "opt_cputype.h"
|
||||
|
||||
@ -204,7 +204,6 @@ int mips_has_r4k_mmu;
|
||||
int mips3_pg_cached;
|
||||
u_int mips3_pg_shift;
|
||||
|
||||
struct user *proc0paddr;
|
||||
struct segtab *segbase;
|
||||
|
||||
void * msgbufaddr;
|
||||
@ -459,12 +458,17 @@ static const struct pridtab fputab[] = {
|
||||
* by pridtab->cpu_cid.
|
||||
*/
|
||||
static const char * const cidnames[] = {
|
||||
"Prehistoric",
|
||||
"MIPS", /* or "MIPS Technologies, Inc. */
|
||||
"Broadcom", /* or "Broadcom Corp." */
|
||||
"Alchemy", /* or "Alchemy Semiconductor" */
|
||||
"SiByte", /* or "Broadcom Corp. (SiByte)" */
|
||||
"SandCraft",
|
||||
[MIPS_PRID_CID_PREHISTORIC] = "Prehistoric",
|
||||
[MIPS_PRID_CID_MIPS] = "MIPS",
|
||||
/* or "MIPS Technologies, Inc. */
|
||||
[MIPS_PRID_CID_BROADCOM] = "Broadcom",
|
||||
/* or "Broadcom Corp." */
|
||||
[MIPS_PRID_CID_ALCHEMY] = "Alchemy",
|
||||
/* or "Alchemy Semiconductor" */
|
||||
[MIPS_PRID_CID_SIBYTE] = "SiByte",
|
||||
/* or "Broadcom Corp. (SiByte)" */
|
||||
[MIPS_PRID_CID_SANDCRAFT] = "SandCraft",
|
||||
[MIPS_PRID_CID_RMI] = "RMI",
|
||||
};
|
||||
#define ncidnames (sizeof(cidnames) / sizeof(cidnames[0]))
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.67 2009/03/18 10:22:32 cegger Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.68 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.67 2009/03/18 10:22:32 cegger Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.68 2009/11/26 00:19:19 matt Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
@ -181,7 +181,6 @@ extern void stacktrace(void); /*XXX*/
|
||||
* disables mips1 FPU interrupts.
|
||||
*/
|
||||
int safepri = MIPS3_PSL_LOWIPL; /* XXX */
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
/* locore callback-vector setup */
|
||||
extern void mips_vector_init(void);
|
||||
@ -371,9 +370,9 @@ mach_init(int argc, char *argv[], char *envp[], u_int bim, char *bip)
|
||||
* Allocate space for proc0's USPACE.
|
||||
*/
|
||||
v = (void *)uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.100 2009/01/11 06:02:19 tsutsui Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.101 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990, 1993
|
||||
@ -668,11 +668,10 @@ Lenab1:
|
||||
lea _ASM_LABEL(tmpstk),%sp | temporary stack
|
||||
jbsr _C_LABEL(uvm_setpagesize) | select software page size
|
||||
/* set kernel stack, user SP, and initial pcb */
|
||||
movl _C_LABEL(proc0paddr),%a1 | get lwp0 pcb addr
|
||||
lea %a1@(USPACE-4),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.p_addr
|
||||
movl %a2,_C_LABEL(curlwp) | and curlwp so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't deref NULL in trap()
|
||||
lea _C_LABEL(lwp0),%a2 | get lwp0.l_addr
|
||||
movl %a2@(L_ADDR),%a1 | set kernel stack to end of area
|
||||
lea %a1@(USPACE-4),%sp | and curlwp so that we don't
|
||||
movl %a2,_C_LABEL(curlwp) | deref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
movl %a2,%usp | init user SP
|
||||
movl %a1,_C_LABEL(curpcb) | lwp0 is running
|
||||
@ -1551,9 +1550,6 @@ GLOBAL(bootctrllun)
|
||||
GLOBAL(bootaddr)
|
||||
.long 0
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 | KVA of proc0 u-area
|
||||
|
||||
GLOBAL(intiobase)
|
||||
.long 0 | KVA of base of internal IO space
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.31 2009/01/17 07:17:36 tsutsui Exp $ */
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.32 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.31 2009/01/17 07:17:36 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.32 2009/11/26 00:19:19 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kcore.h>
|
||||
@ -53,7 +53,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.31 2009/01/17 07:17:36 tsutsui
|
||||
#define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa))
|
||||
|
||||
extern char *kernel_text, *etext;
|
||||
extern char *proc0paddr;
|
||||
|
||||
extern int maxmem, physmem;
|
||||
extern paddr_t avail_start, avail_end;
|
||||
@ -89,7 +88,7 @@ void pmap_bootstrap(paddr_t, paddr_t);
|
||||
void
|
||||
pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
{
|
||||
paddr_t kstpa, kptpa, kptmpa, lkptpa, p0upa;
|
||||
paddr_t kstpa, kptpa, kptmpa, lkptpa, l0upa;
|
||||
u_int nptpages, kstsize;
|
||||
st_entry_t protoste, *ste;
|
||||
pt_entry_t protopte, *pte, *epte;
|
||||
@ -114,7 +113,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
*
|
||||
* lkptpa last kernel PT page 1 page
|
||||
*
|
||||
* p0upa proc 0 u-area UPAGES pages
|
||||
* l0upa lwp0 0 u-area UPAGES pages
|
||||
*
|
||||
* The KVA corresponding to any of these PAs is:
|
||||
* (PA - firstpa + KERNBASE).
|
||||
@ -134,7 +133,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
nextpa += PAGE_SIZE;
|
||||
lkptpa = nextpa;
|
||||
nextpa += PAGE_SIZE;
|
||||
p0upa = nextpa;
|
||||
l0upa = nextpa;
|
||||
nextpa += USPACE;
|
||||
kptpa = nextpa;
|
||||
nptpages = RELOC(Sysptsize, int) + (iiomappages + NPTEPG - 1) / NPTEPG;
|
||||
@ -398,15 +397,14 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
* Zero the u-area.
|
||||
* NOTE: `pte' and `epte' aren't PTEs here.
|
||||
*/
|
||||
pte = (u_int *)p0upa;
|
||||
epte = (u_int *)(p0upa + USPACE);
|
||||
pte = (u_int *)l0upa;
|
||||
epte = (u_int *)(l0upa + USPACE);
|
||||
while (pte < epte)
|
||||
*pte++ = 0;
|
||||
/*
|
||||
* Remember the u-area address so it can be loaded in the
|
||||
* proc struct p_addr field later.
|
||||
* Store the u-area into lwp0.
|
||||
*/
|
||||
RELOC(proc0paddr, char *) = (char *)(p0upa - firstpa);
|
||||
RELOC(lwp0.l_addr, struct user *) = (struct user *)(l0upa - firstpa);
|
||||
|
||||
/*
|
||||
* Initialize the mem_clusters[] array for the crash dump
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.9 2009/02/13 22:41:02 apb Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.10 2009/11/26 00:19:19 matt Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
|
||||
|
||||
/*
|
||||
@ -67,8 +67,6 @@ GLOBAL(startsym)
|
||||
.long 0 /* start symbol table */
|
||||
GLOBAL(endsym)
|
||||
.long 0 /* end symbol table */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
GLOBAL(oeacpufeat)
|
||||
.long 0 /* cpu features */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netwinder_machdep.c,v 1.71 2009/08/11 17:04:18 matt Exp $ */
|
||||
/* $NetBSD: netwinder_machdep.c,v 1.72 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997,1998 Mark Brinicombe.
|
||||
@ -40,7 +40,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.71 2009/08/11 17:04:18 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netwinder_machdep.c,v 1.72 2009/11/26 00:19:19 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_pmap_debug.h"
|
||||
@ -179,8 +179,6 @@ pv_addr_t kernel_pt_table[NUM_KERNEL_PTS];
|
||||
#define KERNEL_VM_SIZE 0x0C000000
|
||||
#endif
|
||||
|
||||
extern struct user *proc0paddr; /* in arm32_machdep.c */
|
||||
|
||||
/* Prototypes */
|
||||
|
||||
void consinit(void);
|
||||
@ -704,8 +702,7 @@ initarm(void *arg)
|
||||
* Moved from cpu_startup() as data_abort_handler() references
|
||||
* this during uvm init
|
||||
*/
|
||||
proc0paddr = (struct user *)kernelstack.pv_va;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
lwp0.l_addr = (struct user *)kernelstack.pv_va;
|
||||
|
||||
#ifdef VERBOSE_INIT_ARM
|
||||
printf("done!\n");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.47 2008/12/21 17:43:32 tsutsui Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.48 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1990, 1993
|
||||
@ -446,12 +446,10 @@ Lenab1:
|
||||
lea _ASM_LABEL(tmpstk),%sp | temporary stack
|
||||
jbsr _C_LABEL(uvm_setpagesize) | select software page size
|
||||
/* set kernel stack, user SP, and initial pcb */
|
||||
movl _C_LABEL(proc0paddr),%a1| get lwp0 pcb addr
|
||||
lea %a1@(USPACE-4),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.l_addr
|
||||
movl %a2,_C_LABEL(curlwp) | and curlwp so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't deref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
lea _C_LABEL(lwp0),%a2 | get lwp0.l_addr
|
||||
movl %a2@(L_ADDR),%a1 | set kernel stack to end of area
|
||||
lea %a1@(USPACE-4),%sp | and curlwp so that we don't
|
||||
movl %a2,_C_LABEL(curlwp) | deref NULL in trap()
|
||||
movl %a2,%usp | init user SP
|
||||
movl %a1,_C_LABEL(curpcb) | lwp0 is running
|
||||
|
||||
@ -1235,9 +1233,6 @@ GLOBAL(bootctrllun)
|
||||
GLOBAL(bootaddr)
|
||||
.long 0
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 | KVA of lwp0 u-area
|
||||
|
||||
GLOBAL(intiobase)
|
||||
.long 0 | KVA of base of internal IO space
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.22 2009/01/17 07:17:36 tsutsui Exp $ */
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.23 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1991, 1993
|
||||
@ -39,7 +39,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.22 2009/01/17 07:17:36 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.23 2009/11/26 00:19:19 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
@ -52,7 +52,7 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.22 2009/01/17 07:17:36 tsutsui
|
||||
#define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa))
|
||||
|
||||
extern char *etext;
|
||||
extern char *extiobase, *proc0paddr;
|
||||
extern char *extiobase;
|
||||
extern char *cache_ctl, *cache_clr;
|
||||
|
||||
extern int maxmem, physmem;
|
||||
@ -89,7 +89,7 @@ void *msgbufaddr;
|
||||
void
|
||||
pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
{
|
||||
paddr_t kstpa, kptpa, kptmpa, p0upa;
|
||||
paddr_t kstpa, kptpa, kptmpa, l0upa;
|
||||
u_int nptpages, kstsize;
|
||||
st_entry_t protoste, *ste;
|
||||
pt_entry_t protopte, *pte, *epte;
|
||||
@ -110,7 +110,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
*
|
||||
* kptmpa kernel PT map 1 page
|
||||
*
|
||||
* p0upa proc 0 u-area UPAGES pages
|
||||
* l0upa lwp 0 u-area UPAGES pages
|
||||
*
|
||||
* The KVA corresponding to any of these PAs is:
|
||||
* (PA - firstpa + KERNBASE).
|
||||
@ -136,7 +136,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
nextpa += kstsize * PAGE_SIZE;
|
||||
kptmpa = nextpa;
|
||||
nextpa += PAGE_SIZE;
|
||||
p0upa = nextpa;
|
||||
l0upa = nextpa;
|
||||
nextpa += USPACE;
|
||||
kptpa = nextpa;
|
||||
nptpages = RELOC(Sysptsize, int) +
|
||||
@ -367,15 +367,15 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
* Zero the u-area.
|
||||
* NOTE: `pte' and `epte' aren't PTEs here.
|
||||
*/
|
||||
pte = (u_int *)p0upa;
|
||||
epte = (u_int *)(p0upa + USPACE);
|
||||
pte = (u_int *)l0upa;
|
||||
epte = (u_int *)(l0upa + USPACE);
|
||||
while (pte < epte)
|
||||
*pte++ = 0;
|
||||
/*
|
||||
* Remember the u-area address so it can be loaded in the
|
||||
* proc struct p_addr field later.
|
||||
*/
|
||||
RELOC(proc0paddr, char *) = (char *)(p0upa - firstpa);
|
||||
RELOC(lwp0.l_addr, struct user *) = (struct user *)(l0upa - firstpa);
|
||||
|
||||
/*
|
||||
* VM data structures are now initialized, set up data for
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.103 2009/08/11 17:04:19 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.104 2009/11/26 00:19:19 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -76,7 +76,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.103 2009/08/11 17:04:19 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.104 2009/11/26 00:19:19 matt Exp $");
|
||||
|
||||
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
|
||||
|
||||
@ -205,7 +205,6 @@ const uint32_t ipl_sr_bits[_IPL_N] = {
|
||||
MIPS_INT_MASK_2,
|
||||
};
|
||||
|
||||
extern struct user *proc0paddr;
|
||||
extern u_long bootdev;
|
||||
extern char edata[], end[];
|
||||
|
||||
@ -379,9 +378,9 @@ mach_init(int x_boothowto, int x_bootdev, int x_bootname, int x_maxmem)
|
||||
* Allocate space for lwp0's USPACE.
|
||||
*/
|
||||
v = (char *)uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *)v;
|
||||
lwp0.l_addr = (struct user *)v;
|
||||
lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.s,v 1.50 2009/01/11 06:02:19 tsutsui Exp $ */
|
||||
/* $NetBSD: locore.s,v 1.51 2009/11/26 00:19:20 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998 Darrin B. Jewell
|
||||
@ -460,11 +460,10 @@ Lpushpc:
|
||||
|
||||
|
||||
/* set kernel stack, user %SP, and initial pcb */
|
||||
movl _C_LABEL(proc0paddr),%a1 | get lwp0 pcb addr
|
||||
lea %a1@(USPACE-4),%sp | set kernel stack to end of area
|
||||
lea _C_LABEL(lwp0),%a2 | initialize lwp0.l_addr
|
||||
movl %a2,_C_LABEL(curlwp) | and curlwp so that
|
||||
movl %a1,%a2@(L_ADDR) | we don't deref NULL in trap()
|
||||
lea _C_LABEL(lwp0),%a2 | get lwp0.l_addr
|
||||
movl %a2@(L_ADDR),%a1 | set kernel stack to end of area
|
||||
lea %a1@(USPACE-4),%sp | and curlwp so that we don't
|
||||
movl %a2,_C_LABEL(curlwp) | deref NULL in trap()
|
||||
movl #USRSTACK-4,%a2
|
||||
movl %a2,%usp | init user SP
|
||||
movl %a1,_C_LABEL(curpcb) | lwp0 is running
|
||||
@ -1384,9 +1383,6 @@ GLOBAL(protorp)
|
||||
GLOBAL(prototc)
|
||||
.long 0 | prototype translation control
|
||||
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 | KVA of lwp0 u-area
|
||||
|
||||
GLOBAL(intiobase)
|
||||
.long INTIOBASE | KVA of base of internal IO space
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.27 2009/01/17 07:17:36 tsutsui Exp $ */
|
||||
/* $NetBSD: pmap_bootstrap.c,v 1.28 2009/11/26 00:19:20 matt Exp $ */
|
||||
|
||||
/*
|
||||
* This file was taken from mvme68k/mvme68k/pmap_bootstrap.c
|
||||
@ -45,7 +45,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.27 2009/01/17 07:17:36 tsutsui Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.28 2009/11/26 00:19:20 matt Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kcore.h>
|
||||
@ -65,7 +65,6 @@ __KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.27 2009/01/17 07:17:36 tsutsui
|
||||
#define RELOCPTR(v, t) ((t)((uintptr_t)RELOC((v), t) + firstpa))
|
||||
|
||||
extern char *etext;
|
||||
extern char *proc0paddr;
|
||||
|
||||
extern int maxmem, physmem;
|
||||
extern paddr_t avail_start, avail_end;
|
||||
@ -102,7 +101,7 @@ void *msgbufaddr;
|
||||
void
|
||||
pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
{
|
||||
paddr_t kstpa, kptpa, kptmpa, lkptpa, p0upa;
|
||||
paddr_t kstpa, kptpa, kptmpa, lkptpa, l0upa;
|
||||
u_int nptpages, kstsize;
|
||||
st_entry_t protoste, *ste;
|
||||
pt_entry_t protopte, *pte, *epte;
|
||||
@ -126,7 +125,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
*
|
||||
* lkptpa last kernel PT page 1 page
|
||||
*
|
||||
* p0upa proc 0 u-area UPAGES pages
|
||||
* l0upa lwp 0 u-area UPAGES pages
|
||||
*
|
||||
* The KVA corresponding to any of these PAs is:
|
||||
* (PA - firstpa + KERNBASE).
|
||||
@ -143,7 +142,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
nextpa += PAGE_SIZE;
|
||||
lkptpa = nextpa;
|
||||
nextpa += PAGE_SIZE;
|
||||
p0upa = nextpa;
|
||||
l0upa = nextpa;
|
||||
nextpa += USPACE;
|
||||
kptpa = nextpa;
|
||||
nptpages = RELOC(Sysptsize, int) +
|
||||
@ -361,7 +360,7 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
* map the kernel segment table cache invalidated for
|
||||
* these machines (for the 68040 not strictly necessary, but
|
||||
* recommended by Motorola; for the 68060 mandatory)
|
||||
* XXX this includes p0upa. why?
|
||||
* XXX this includes l0upa. why?
|
||||
*/
|
||||
epte = &((u_int *)kptpa)[m68k_btop(nextpa - firstpa)];
|
||||
protopte = (protopte & ~PG_PROT) | PG_RW;
|
||||
@ -442,15 +441,15 @@ pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
|
||||
* Zero the u-area.
|
||||
* NOTE: `pte' and `epte' aren't PTEs here.
|
||||
*/
|
||||
pte = (u_int *)p0upa;
|
||||
epte = (u_int *)(p0upa + USPACE);
|
||||
pte = (u_int *)l0upa;
|
||||
epte = (u_int *)(l0upa + USPACE);
|
||||
while (pte < epte)
|
||||
*pte++ = 0;
|
||||
/*
|
||||
* Remember the u-area address so it can be loaded in the
|
||||
* proc struct p_addr field later.
|
||||
*/
|
||||
RELOC(proc0paddr, char *) = (char *)(p0upa - firstpa);
|
||||
RELOC(lwp0.l_addr, struct user *) = (struct user *)(l0upa - firstpa);
|
||||
|
||||
/*
|
||||
* Initialize the mem_clusters[] array for the crash dump
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.41 2009/02/13 22:41:02 apb Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.42 2009/11/26 00:19:20 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -64,8 +64,6 @@
|
||||
.data
|
||||
GLOBAL(esym)
|
||||
.long 0 /* end of symbol table */
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
GLOBAL(oeacpufeat)
|
||||
.long 0 /* cpu features */
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.26 2009/08/11 17:04:19 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.27 2009/11/26 00:19:20 matt Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
@ -27,7 +27,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.26 2009/08/11 17:04:19 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.27 2009/11/26 00:19:20 matt Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_kloader.h"
|
||||
@ -90,7 +90,6 @@ void
|
||||
mach_init(void)
|
||||
{
|
||||
extern char kernel_text[], edata[], end[];
|
||||
extern struct user *proc0paddr;
|
||||
void *kernend, *v;
|
||||
paddr_t start;
|
||||
size_t size;
|
||||
@ -155,11 +154,11 @@ mach_init(void)
|
||||
* Allocate space for proc0's USPACE.
|
||||
*/
|
||||
v = (void *)uvm_pageboot_alloc(USPACE);
|
||||
lwp0.l_addr = proc0paddr = (struct user *) v;
|
||||
lwp0.l_addr = (struct user *) v;
|
||||
lwp0.l_md.md_regs = (struct frame *)(v + USPACE) - 1;
|
||||
proc0paddr->u_pcb.pcb_context[11] = PSL_LOWIPL; /* SR */
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] = PSL_LOWIPL; /* SR */
|
||||
#ifdef IPL_ICU_MASK
|
||||
proc0paddr->u_pcb.pcb_ppl = 0;
|
||||
lwp0.l_addr->u_pcb.pcb_ppl = 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.235 2009/08/15 23:44:59 matt Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.236 2009/11/26 00:19:20 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
@ -77,7 +77,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.235 2009/08/15 23:44:59 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.236 2009/11/26 00:19:20 matt Exp $");
|
||||
|
||||
#include "fs_mfs.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -181,7 +181,6 @@ struct platform platform = {
|
||||
};
|
||||
|
||||
extern void *esym; /* XXX */
|
||||
extern struct user *proc0paddr; /* XXX */
|
||||
extern struct consdev promcd; /* XXX */
|
||||
|
||||
/*
|
||||
@ -340,10 +339,10 @@ mach_init(int argc, char *argv[], int code, int cv, u_int bim, char *bip)
|
||||
/*
|
||||
* Alloc u pages for proc0 stealing KSEG0 memory.
|
||||
*/
|
||||
lwp0.l_addr = proc0paddr = (struct user *)kernend;
|
||||
lwp0.l_addr = (struct user *)kernend;
|
||||
lwp0.l_md.md_regs = (struct frame *)(kernend + USPACE) - 1;
|
||||
memset(lwp0.l_addr, 0, USPACE);
|
||||
proc0paddr->u_pcb.pcb_context[11] =
|
||||
lwp0.l_addr->u_pcb.pcb_context[11] =
|
||||
MIPS_INT_MASK | MIPS_SR_INT_IE; /* SR */
|
||||
|
||||
kernend += USPACE;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ibm4xx_machdep.c,v 1.10 2009/11/21 17:40:28 rmind Exp $ */
|
||||
/* $NetBSD: ibm4xx_machdep.c,v 1.11 2009/11/26 00:19:20 matt Exp $ */
|
||||
/* Original: ibm40x_machdep.c,v 1.3 2005/01/17 17:19:36 shige Exp $ */
|
||||
|
||||
/*
|
||||
@ -68,7 +68,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.10 2009/11/21 17:40:28 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.11 2009/11/26 00:19:20 matt Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
#include "opt_ddb.h"
|
||||
@ -101,7 +101,6 @@ __KERNEL_RCSID(0, "$NetBSD: ibm4xx_machdep.c,v 1.10 2009/11/21 17:40:28 rmind Ex
|
||||
/*
|
||||
* Global variables used here and there
|
||||
*/
|
||||
extern struct user *proc0paddr;
|
||||
paddr_t msgbuf_paddr;
|
||||
vaddr_t msgbuf_vaddr;
|
||||
char msgbuf[MSGBUFSIZE];
|
||||
@ -141,12 +140,10 @@ ibm4xx_init(void (*handler)(void))
|
||||
KASSERT(ci != NULL);
|
||||
KASSERT(curcpu() == ci);
|
||||
lwp0.l_cpu = ci;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
curpcb = lwp_getpcb(&lwp0);
|
||||
memset(lwp0.l_addr, 0, sizeof *lwp0.l_addr);
|
||||
KASSERT(lwp0.l_cpu != NULL);
|
||||
|
||||
curpcb = lwp_getpcb(&lwp0);
|
||||
memset(curpcb, 0, sizeof(*curpcb));
|
||||
curpcb->pcb_pm = pmap_kernel();
|
||||
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: locore.S,v 1.5 2009/02/13 22:41:03 apb Exp $ */
|
||||
/* $NetBSD: locore.S,v 1.6 2009/11/26 00:19:20 matt Exp $ */
|
||||
/* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */
|
||||
|
||||
/*
|
||||
@ -102,9 +102,6 @@
|
||||
/*
|
||||
* Globals
|
||||
*/
|
||||
GLOBAL(proc0paddr)
|
||||
.long 0 /* proc0 p_addr */
|
||||
|
||||
GLOBAL(intrnames)
|
||||
.asciz "clock", "irq1", "irq2", "irq3"
|
||||
.asciz "irq4", "irq5", "irq6", "irq7"
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: asm.h,v 1.26 2008/02/23 19:38:47 matt Exp $ */
|
||||
/* $NetBSD: asm.h,v 1.27 2009/11/26 00:19:20 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -175,8 +175,8 @@ y: .quad .y,.TOC.@tocbase,0; \
|
||||
stint tmp2,CI_INTRDEPTH(tmp1); \
|
||||
li tmp2,0; \
|
||||
stptr tmp2,-CALLFRAMELEN(er); /* terminate idle stack chain */\
|
||||
lis tmp1,_C_LABEL(proc0paddr)@ha; \
|
||||
stptr er,_C_LABEL(proc0paddr)@l(tmp1); \
|
||||
lis tmp1,_C_LABEL(lwp0)+L_ADDR@ha; \
|
||||
stptr er,_C_LABEL(lwp0)+L_ADDR@l(tmp1); \
|
||||
addi er,er,USPACE; /* stackpointer for proc0 */ \
|
||||
addi sp,er,-FRAMELEN; /* stackpointer for proc0 */ \
|
||||
/* er = end of mem reserved for kernel */ \
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: oea_machdep.c,v 1.49 2009/11/21 17:40:29 rmind Exp $ */
|
||||
/* $NetBSD: oea_machdep.c,v 1.50 2009/11/26 00:19:20 matt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 2002 Matt Thomas
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.49 2009/11/21 17:40:29 rmind Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.50 2009/11/26 00:19:20 matt Exp $");
|
||||
|
||||
#include "opt_ppcarch.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -94,8 +94,6 @@ struct vm_map *phys_map = NULL;
|
||||
/*
|
||||
* Global variables used here and there
|
||||
*/
|
||||
extern struct user *proc0paddr;
|
||||
|
||||
static void trap0(void *);
|
||||
|
||||
/* XXXSL: The battable is not initialized to non-zero for PPC_OEA64 and PPC_OEA64_BRIDGE */
|
||||
@ -152,12 +150,10 @@ oea_init(void (*handler)(void))
|
||||
KASSERT(ci != NULL);
|
||||
KASSERT(curcpu() == ci);
|
||||
lwp0.l_cpu = ci;
|
||||
lwp0.l_addr = proc0paddr;
|
||||
curpcb = lwp_getpcb(&lwp0);
|
||||
memset(lwp0.l_addr, 0, sizeof *lwp0.l_addr);
|
||||
KASSERT(lwp0.l_cpu != NULL);
|
||||
|
||||
curpcb = lwp_getpcb(&lwp0);
|
||||
memset(curpcb, 0, sizeof(*curpcb));
|
||||
#ifdef ALTIVEC
|
||||
/*
|
||||
* Initialize the vectors with NaNs
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user