diff options
author | andrew <andrew@FreeBSD.org> | 2012-06-10 01:13:04 +0000 |
---|---|---|
committer | andrew <andrew@FreeBSD.org> | 2012-06-10 01:13:04 +0000 |
commit | 723899fa5c91cf5bb546942f05ad02ffb04560cf (patch) | |
tree | a54857d5b64fb392edc9c816a507c21fc49fe892 /sys/arm/xscale | |
parent | 070b3c041473a0ce18654dc5b1e1100d4b7896d2 (diff) | |
download | FreeBSD-src-723899fa5c91cf5bb546942f05ad02ffb04560cf.zip FreeBSD-src-723899fa5c91cf5bb546942f05ad02ffb04560cf.tar.gz |
Pull out the common code to initialise proc0 & thread0 from initarm to a
common function.
Reviewed by: imp
Diffstat (limited to 'sys/arm/xscale')
-rw-r--r-- | sys/arm/xscale/i80321/ep80219_machdep.c | 10 | ||||
-rw-r--r-- | sys/arm/xscale/i80321/iq31244_machdep.c | 10 | ||||
-rw-r--r-- | sys/arm/xscale/i8134x/crb_machdep.c | 10 | ||||
-rw-r--r-- | sys/arm/xscale/ixp425/avila_machdep.c | 10 | ||||
-rw-r--r-- | sys/arm/xscale/pxa/pxa_machdep.c | 10 |
5 files changed, 5 insertions, 45 deletions
diff --git a/sys/arm/xscale/i80321/ep80219_machdep.c b/sys/arm/xscale/i80321/ep80219_machdep.c index e0cfeed..803fec1 100644 --- a/sys/arm/xscale/i80321/ep80219_machdep.c +++ b/sys/arm/xscale/i80321/ep80219_machdep.c @@ -136,8 +136,6 @@ struct pv_addr abtstack; struct pv_addr kernelstack; struct pv_addr minidataclean; -static struct trapframe proc0_tf; - /* #define IQ80321_OBIO_BASE 0xfe800000UL */ /* #define IQ80321_OBIO_SIZE 0x00100000UL */ @@ -379,13 +377,7 @@ initarm(struct arm_boot_params *abp) undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); - proc_linkup0(&proc0, &thread0); - thread0.td_kstack = kernelstack.pv_va; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; - thread0.td_pcb->pcb_flags = 0; - thread0.td_frame = &proc0_tf; - pcpup->pc_curpcb = thread0.td_pcb; + init_proc0(kernelstack.pv_va); /* Enable MMU, I-cache, D-cache, write buffer. */ diff --git a/sys/arm/xscale/i80321/iq31244_machdep.c b/sys/arm/xscale/i80321/iq31244_machdep.c index d5e7549..ae642c5 100644 --- a/sys/arm/xscale/i80321/iq31244_machdep.c +++ b/sys/arm/xscale/i80321/iq31244_machdep.c @@ -136,8 +136,6 @@ struct pv_addr abtstack; struct pv_addr kernelstack; struct pv_addr minidataclean; -static struct trapframe proc0_tf; - #define IQ80321_OBIO_BASE 0xfe800000UL #define IQ80321_OBIO_SIZE 0x00100000UL /* Static device mappings. */ @@ -377,13 +375,7 @@ initarm(struct arm_boot_params *abp) undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); - proc_linkup0(&proc0, &thread0); - thread0.td_kstack = kernelstack.pv_va; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; - thread0.td_pcb->pcb_flags = 0; - thread0.td_frame = &proc0_tf; - pcpup->pc_curpcb = thread0.td_pcb; + init_proc0(kernelstack.pv_va); /* Enable MMU, I-cache, D-cache, write buffer. */ diff --git a/sys/arm/xscale/i8134x/crb_machdep.c b/sys/arm/xscale/i8134x/crb_machdep.c index cb0cefc..7d49d40 100644 --- a/sys/arm/xscale/i8134x/crb_machdep.c +++ b/sys/arm/xscale/i8134x/crb_machdep.c @@ -135,8 +135,6 @@ struct pv_addr undstack; struct pv_addr abtstack; struct pv_addr kernelstack; -static struct trapframe proc0_tf; - /* Static device mappings. */ static const struct pmap_devmap iq81342_devmap[] = { { @@ -353,13 +351,7 @@ initarm(struct arm_boot_params *abp) undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); - proc_linkup0(&proc0, &thread0); - thread0.td_kstack = kernelstack.pv_va; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; - thread0.td_pcb->pcb_flags = 0; - thread0.td_frame = &proc0_tf; - pcpup->pc_curpcb = thread0.td_pcb; + init_proc0(kernelstack.pv_va); arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); diff --git a/sys/arm/xscale/ixp425/avila_machdep.c b/sys/arm/xscale/ixp425/avila_machdep.c index 01a770d..a91fd20 100644 --- a/sys/arm/xscale/ixp425/avila_machdep.c +++ b/sys/arm/xscale/ixp425/avila_machdep.c @@ -140,8 +140,6 @@ struct pv_addr abtstack; struct pv_addr kernelstack; struct pv_addr minidataclean; -static struct trapframe proc0_tf; - /* Static device mappings. */ static const struct pmap_devmap ixp425_devmap[] = { /* Physical/Virtual address for I/O space */ @@ -443,13 +441,7 @@ initarm(struct arm_boot_params *abp) undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); - proc_linkup0(&proc0, &thread0); - thread0.td_kstack = kernelstack.pv_va; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; - thread0.td_pcb->pcb_flags = 0; - thread0.td_frame = &proc0_tf; - pcpup->pc_curpcb = thread0.td_pcb; + init_proc0(kernelstack.pv_va); arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); diff --git a/sys/arm/xscale/pxa/pxa_machdep.c b/sys/arm/xscale/pxa/pxa_machdep.c index 56e1402..69311d4 100644 --- a/sys/arm/xscale/pxa/pxa_machdep.c +++ b/sys/arm/xscale/pxa/pxa_machdep.c @@ -136,8 +136,6 @@ struct pv_addr abtstack; struct pv_addr kernelstack; struct pv_addr minidataclean; -static struct trapframe proc0_tf; - static void pxa_probe_sdram(bus_space_tag_t, bus_space_handle_t, uint32_t *, uint32_t *); @@ -367,13 +365,7 @@ initarm(struct arm_boot_params *abp) undefined_handler_address = (u_int)undefinedinstruction_bounce; undefined_init(); - proc_linkup(&proc0, &thread0); - thread0.td_kstack = kernelstack.pv_va; - thread0.td_pcb = (struct pcb *) - (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1; - thread0.td_pcb->pcb_flags = 0; - thread0.td_frame = &proc0_tf; - pcpup->pc_curpcb = thread0.td_pcb; + init_proc0(kernelstack.pv_va); /* Enable MMU, I-cache, D-cache, write buffer. */ arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL); |