svn commit: r238146 - in projects/amd64_xen_pv/sys/amd64: include/xen xen

Cherry G. Mathew cherry at FreeBSD.org
Thu Jul 5 20:16:25 UTC 2012


Author: cherry
Date: Thu Jul  5 20:16:24 2012
New Revision: 238146
URL: http://svn.freebsd.org/changeset/base/238146

Log:
   - vprintk() looks more like vprintf() (returns int)
   - enable kernel debugger.
  
  Approved by:	gibbs (implicit)

Modified:
  projects/amd64_xen_pv/sys/amd64/include/xen/xen-os.h
  projects/amd64_xen_pv/sys/amd64/xen/machdep.c

Modified: projects/amd64_xen_pv/sys/amd64/include/xen/xen-os.h
==============================================================================
--- projects/amd64_xen_pv/sys/amd64/include/xen/xen-os.h	Thu Jul  5 20:08:54 2012	(r238145)
+++ projects/amd64_xen_pv/sys/amd64/include/xen/xen-os.h	Thu Jul  5 20:16:24 2012	(r238146)
@@ -75,7 +75,7 @@ void bootmem_free(void *ptr, unsigned in
 #include <sys/types.h>
 
 void printk(const char *fmt, ...);
-void vprintk(const char *fmt, __va_list ap);
+int vprintk(const char *fmt, __va_list ap);
 
 /* some function prototypes */
 void trap_init(void);

Modified: projects/amd64_xen_pv/sys/amd64/xen/machdep.c
==============================================================================
--- projects/amd64_xen_pv/sys/amd64/xen/machdep.c	Thu Jul  5 20:08:54 2012	(r238145)
+++ projects/amd64_xen_pv/sys/amd64/xen/machdep.c	Thu Jul  5 20:16:24 2012	(r238146)
@@ -61,6 +61,7 @@
 #include <sys/cons.h>
 #include <sys/cpu.h>
 #include <sys/imgact.h>
+#include <sys/kdb.h>
 #include <sys/kernel.h>
 #include <sys/linker.h>
 #include <sys/lock.h>
@@ -452,10 +453,19 @@ initxen(struct start_info *si)
 	/* Event handling */
 	init_event_callbacks();
 
-
 	cninit();		/* Console subsystem init */
 
+	kdb_init();
+
+#ifdef KDB
+	if (boothowto & RB_KDB)
+		kdb_enter(KDB_WHY_BOOTFLAGS,
+		    "Boot flags requested debugger");
+#endif
+
 	identify_cpu();		/* Final stage of CPU initialization */
+	//initializecpu();
+	//initializecpucache();
 
 	init_param2(physmem);
 
@@ -1130,7 +1140,7 @@ printk(const char *fmt, ...)
         va_end(ap);
 }
 
-void
+int
 vprintk(const char *fmt, __va_list ap)
 {
         int retval;
@@ -1139,6 +1149,7 @@ vprintk(const char *fmt, __va_list ap)
         retval = vsnprintf(buf, PRINTK_BUFSIZE - 1, fmt, ap);
         buf[retval] = 0;
         (void)HYPERVISOR_console_write(buf, retval);
+	return retval;
 }
 
 


More information about the svn-src-projects mailing list