Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jul 2012 20:16:24 +0000 (UTC)
From:      "Cherry G. Mathew" <cherry@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r238146 - in projects/amd64_xen_pv/sys/amd64: include/xen xen
Message-ID:  <201207052016.q65KGOv5016252@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;
 }
 
 



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