From owner-svn-src-projects@FreeBSD.ORG Thu Jul 5 20:16:25 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AD4B1065670; Thu, 5 Jul 2012 20:16:25 +0000 (UTC) (envelope-from cherry@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0BAE88FC08; Thu, 5 Jul 2012 20:16:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q65KGOuW016255; Thu, 5 Jul 2012 20:16:24 GMT (envelope-from cherry@svn.freebsd.org) Received: (from cherry@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q65KGOv5016252; Thu, 5 Jul 2012 20:16:24 GMT (envelope-from cherry@svn.freebsd.org) Message-Id: <201207052016.q65KGOv5016252@svn.freebsd.org> From: "Cherry G. Mathew" Date: Thu, 5 Jul 2012 20:16:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r238146 - in projects/amd64_xen_pv/sys/amd64: include/xen xen X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 20:16:25 -0000 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 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 #include #include +#include #include #include #include @@ -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; }