diff --git a/sys/mips/mips/locore.S b/sys/mips/mips/locore.S index b742bb96091c..a332325cc915 100644 --- a/sys/mips/mips/locore.S +++ b/sys/mips/mips/locore.S @@ -83,10 +83,6 @@ GLOBAL(cfe_handle) GLOBAL(cfe_vector) .space 4 #endif -#if defined(TARGET_OCTEON) -GLOBAL(app_descriptor_addr) - .space 8 -#endif GLOBAL(stackspace) .space NBPG /* Smaller than it should be since it's temp. */ .align 8 @@ -189,10 +185,6 @@ VECTOR(_locore, unknown) sw a0, _C_LABEL(cfe_handle)/* Firmware data segment */ sw a2, _C_LABEL(cfe_vector)/* Firmware entry vector */ no_cfe: -#endif -#if defined(TARGET_OCTEON) - PTR_LA a0, app_descriptor_addr - sw a3, 0(a0) /* Store app descriptor ptr */ #endif /* @@ -203,6 +195,7 @@ no_cfe: /* * Block all the slave CPUs */ + /* XXX a0, a1, a2 shouldn't be used here */ /* * Read the cpu id from the cp0 config register * cpuid[9:4], thrid[3: 0] diff --git a/sys/mips/mips/machdep.c b/sys/mips/mips/machdep.c index fdd95135f49f..356e52821df1 100644 --- a/sys/mips/mips/machdep.c +++ b/sys/mips/mips/machdep.c @@ -154,7 +154,6 @@ extern char edata[], end[]; u_int32_t bootdev; struct bootinfo bootinfo; - static void cpu_startup(void *dummy) { @@ -259,17 +258,11 @@ SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, CTLFLAG_RW, void mips_proc0_init(void) { - proc_linkup(&proc0, &thread0); + proc_linkup0(&proc0, &thread0); thread0.td_kstack = kstack0; thread0.td_kstack_pages = KSTACK_PAGES - 1; thread0.td_md.md_realstack = roundup2(thread0.td_kstack, PAGE_SIZE * 2); - /* Initialize pcpu info of cpu-zero */ -#ifdef SMP - pcpu_init(&__pcpu[0], 0, sizeof(struct pcpu)); -#else - pcpu_init(pcpup, 0, sizeof(struct pcpu)); -#endif /* * Do not use cpu_thread_alloc to initialize these fields * thread0 is the only thread that has kstack located in KSEG0 @@ -279,6 +272,13 @@ mips_proc0_init(void) (thread0.td_kstack_pages - 1) * PAGE_SIZE) - 1; thread0.td_frame = &thread0.td_pcb->pcb_regs; + /* Initialize pcpu info of cpu-zero */ +#ifdef SMP + pcpu_init(&__pcpu[0], 0, sizeof(struct pcpu)); +#else + pcpu_init(pcpup, 0, sizeof(struct pcpu)); +#endif + /* Steal memory for the dynamic per-cpu area. */ dpcpu_init((void *)pmap_steal_memory(DPCPU_SIZE), 0); @@ -295,7 +295,7 @@ mips_proc0_init(void) void cpu_initclocks(void) { - platform_initclocks(); + platform_initclocks(); } struct msgbuf *msgbufp=0;