From owner-svn-src-head@FreeBSD.ORG Tue Dec 15 22:44:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A8651065670; Tue, 15 Dec 2009 22:44:29 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 306C78FC1B; Tue, 15 Dec 2009 22:44:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id nBFMiT4a077328; Tue, 15 Dec 2009 22:44:29 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id nBFMiTlf077326; Tue, 15 Dec 2009 22:44:29 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200912152244.nBFMiTlf077326@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 15 Dec 2009 22:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r200591 - head/sys/compat/x86bios X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Dec 2009 22:44:29 -0000 Author: jkim Date: Tue Dec 15 22:44:28 2009 New Revision: 200591 URL: http://svn.freebsd.org/changeset/base/200591 Log: Add two new debugging tunables for x86bios instead of abusing bootverbose, i.e., debug.x86bios.call and debug.x86bios.int. Modified: head/sys/compat/x86bios/x86bios.c Modified: head/sys/compat/x86bios/x86bios.c ============================================================================== --- head/sys/compat/x86bios/x86bios.c Tue Dec 15 21:24:12 2009 (r200590) +++ head/sys/compat/x86bios/x86bios.c Tue Dec 15 22:44:28 2009 (r200591) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -80,6 +81,16 @@ static vm_offset_t *x86bios_map; static vm_paddr_t x86bios_seg_phys; +SYSCTL_NODE(_debug, OID_AUTO, x86bios, CTLFLAG_RD, NULL, "x86bios debugging"); +static int x86bios_trace_call; +TUNABLE_INT("debug.x86bios.call", &x86bios_trace_call); +SYSCTL_INT(_debug_x86bios, OID_AUTO, call, CTLFLAG_RW, &x86bios_trace_call, 0, + "Trace far function calls"); +static int x86bios_trace_int; +TUNABLE_INT("debug.x86bios.int", &x86bios_trace_int); +SYSCTL_INT(_debug_x86bios, OID_AUTO, int, CTLFLAG_RW, &x86bios_trace_int, 0, + "Trace software interrupt handlers"); + static void * x86bios_get_pages(uint32_t offset, size_t size) { @@ -312,7 +323,7 @@ x86bios_call(struct x86regs *regs, uint1 if (x86bios_map == NULL) return; - if (bootverbose) + if (x86bios_trace_call) printf("Calling 0x%05x (ax=0x%04x bx=0x%04x " "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n", (seg << 4) + off, regs->R_AX, regs->R_BX, regs->R_CX, @@ -324,7 +335,7 @@ x86bios_call(struct x86regs *regs, uint1 memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock_spin(&x86bios_lock); - if (bootverbose) + if (x86bios_trace_call) printf("Exiting 0x%05x (ax=0x%04x bx=0x%04x " "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n", (seg << 4) + off, regs->R_AX, regs->R_BX, regs->R_CX, @@ -351,7 +362,7 @@ x86bios_intr(struct x86regs *regs, int i if (x86bios_map == NULL) return; - if (bootverbose) + if (x86bios_trace_int) printf("Calling int 0x%x (ax=0x%04x bx=0x%04x " "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n", intno, regs->R_AX, regs->R_BX, regs->R_CX, @@ -363,7 +374,7 @@ x86bios_intr(struct x86regs *regs, int i memcpy(regs, &x86bios_emu.x86, sizeof(*regs)); mtx_unlock_spin(&x86bios_lock); - if (bootverbose) + if (x86bios_trace_int) printf("Exiting int 0x%x (ax=0x%04x bx=0x%04x " "cx=0x%04x dx=0x%04x es=0x%04x di=0x%04x)\n", intno, regs->R_AX, regs->R_BX, regs->R_CX,