Date: Tue, 15 Dec 2009 22:44:29 +0000 (UTC) From: Jung-uk Kim <jkim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r200591 - head/sys/compat/x86bios Message-ID: <200912152244.nBFMiTlf077326@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <sys/module.h> #include <sys/mutex.h> #include <sys/proc.h> +#include <sys/sysctl.h> #include <contrib/x86emu/x86emu.h> #include <contrib/x86emu/x86emu_regs.h> @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200912152244.nBFMiTlf077326>