Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Jan 2008 07:19:39 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 132461 for review
Message-ID:  <200801040719.m047JdLk050327@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132461

Change 132461 by imp@imp_paco-paco on 2008/01/04 07:18:46

	locks of hacks for the moment to get things "compiling".
	
	but there's lots of work here still to reconcile how we want to
	do locore interfaces, cpu junk, etc.

Affected files ...

.. //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#5 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/include/trap.h#4 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#5 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#5 edit
.. //depot/projects/mips2-jnpr/src/sys/mips/mips32/malta/malta_machdep.c#3 edit

Differences ...

==== //depot/projects/mips2-jnpr/src/sys/mips/include/md_var.h#5 (text+ko) ====

@@ -59,4 +59,10 @@
 #define	MIPS_DEBUG_PRINT(fmt, args...)
 #endif
 
+void	cpu_identify(void);
+void	mips_cpu_init(void);
+
+/* Platform call-downs. */
+void	platform_identify(void);
+
 #endif /* !_MACHINE_MD_VAR_H_ */

==== //depot/projects/mips2-jnpr/src/sys/mips/include/trap.h#4 (text+ko) ====

@@ -106,4 +106,10 @@
 
 #endif
 
+#ifndef LOCORE /* XXX */
+int check_address(void *);
+void platform_trap_enter(void);
+void platform_trap_exit(void);
+#endif
+
 #endif /* !_MACHINE_TRAP_H_ */

==== //depot/projects/mips2-jnpr/src/sys/mips/mips/locore.S#5 (text+ko) ====

@@ -125,7 +125,8 @@
 	bne    a2, zero, start_secondary
 	nop
 
-
+/*XXXimp:	 should call platform_start here and also port over the
+	platform specific code. */
 	jal	_C_LABEL(mips_init)		# mips_init(argc, argv, envp)
 	sw	zero, START_FRAME - 8(sp)	# Zero out old fp for debugger
 	nop

==== //depot/projects/mips2-jnpr/src/sys/mips/mips/machdep.c#5 (text+ko) ====

@@ -122,7 +122,7 @@
 SYSCTL_INT(_hw, OID_AUTO, clockrate, CTLFLAG_RD, 
     &cpu_clock, 0, "CPU instruction clock rate");
 
-vm_offset_t proc0kstack;
+vm_offset_t kstack0;
 
 #ifdef SMP
 struct pcpu __pcpu[32];
@@ -266,11 +266,11 @@
  * Initialize mips and configure to run kernel
  */
 
-static void
+void
 mips_proc0_init(void)
 {
-	proc0kstack = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE);
-	thread0.td_kstack = proc0kstack;
+	kstack0 = pmap_steal_memory(KSTACK_PAGES * PAGE_SIZE);
+	thread0.td_kstack = kstack0;
 	thread0.td_pcb = (struct pcb *)
 	    (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
 
@@ -513,6 +513,12 @@
 #include <machine/ns16550.h>
 /*
  * Do all the stuff that locore normally does before calling mi_start().
+ *
+ * We need to migrate to the mips2 way of doing things.  There's code in
+ * locore.S which preserves environment parameters and passes them to
+ * platform start...
+ *
+ * XXXimp
  */
 void
 mips_init(int bootinfo_magic, int boothowto_arg, u_int32_t bootdev_arg,
@@ -570,6 +576,7 @@
 
 	getmemsize();
 
+#if 0
 	/* depend on phys_avail being initialized first */
 	mips_proc0_init();
 	mutex_init();
@@ -579,8 +586,10 @@
 	if ((boothowto & RB_KDB) || (boothowto & RB_GDB))
 		kdb_enter(KDB_WHY_BOOTFLAGS, "Boot flags requested debugger");
 #endif
-
 	pmap_bootstrap();
+#else
+	/* XXXimp need to call platform start */
+#endif
 	init_param2(physmem);
 }
 

==== //depot/projects/mips2-jnpr/src/sys/mips/mips32/malta/malta_machdep.c#3 (text+ko) ====

@@ -183,12 +183,16 @@
 	mips_cpu_init();
 	pmap_bootstrap();
 
+#if 0
 	proc_linkup(&proc0, &thread0);
 	thread0.td_kstack = kstack0;
 	pcpu_init(pcpup, 0, sizeof(struct pcpu));
 	pcpup->pc_curthread = &thread0;
 	cpu_thread_alloc(curthread);
 	pcpup->pc_curpcb = curthread->td_pcb;
+#else
+	mips_proc0_init();
+#endif
 
 	mutex_init();
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801040719.m047JdLk050327>