From owner-svn-src-head@FreeBSD.ORG Wed Mar 9 16:16:38 2011 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 E67D4106564A; Wed, 9 Mar 2011 16:16:38 +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 D52308FC0C; Wed, 9 Mar 2011 16:16:38 +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 p29GGcou014138; Wed, 9 Mar 2011 16:16:38 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p29GGc74014136; Wed, 9 Mar 2011 16:16:38 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201103091616.p29GGc74014136@svn.freebsd.org> From: Jung-uk Kim Date: Wed, 9 Mar 2011 16:16:38 +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: r219430 - 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: Wed, 09 Mar 2011 16:16:39 -0000 Author: jkim Date: Wed Mar 9 16:16:38 2011 New Revision: 219430 URL: http://svn.freebsd.org/changeset/base/219430 Log: Remove custom interrupt dispatcher. This is a pointless micro-optimization and it may cause problems if SS and SP are modified by real-mode code. MFC after: 1 month Modified: head/sys/compat/x86bios/x86bios.c Modified: head/sys/compat/x86bios/x86bios.c ============================================================================== --- head/sys/compat/x86bios/x86bios.c Wed Mar 9 15:27:11 2011 (r219429) +++ head/sys/compat/x86bios/x86bios.c Wed Mar 9 16:16:38 2011 (r219430) @@ -533,25 +533,6 @@ x86bios_emu_outl(struct x86emu *emu, uin iodev_write_4(port, val); } -static void -x86bios_emu_get_intr(struct x86emu *emu, int intno) -{ - uint16_t *sp; - uint32_t iv; - - emu->x86.R_SP -= 6; - - sp = (uint16_t *)((vm_offset_t)x86bios_seg + emu->x86.R_SP); - sp[0] = htole16(emu->x86.R_IP); - sp[1] = htole16(emu->x86.R_CS); - sp[2] = htole16(emu->x86.R_FLG); - - iv = x86bios_get_intr(intno); - emu->x86.R_IP = iv & 0xffff; - emu->x86.R_CS = (iv >> 16) & 0xffff; - emu->x86.R_FLG &= ~(F_IF | F_TF); -} - void * x86bios_alloc(uint32_t *offset, size_t size, int flags) { @@ -764,7 +745,6 @@ fail: static int x86bios_init(void) { - int i; mtx_init(&x86bios_lock, "x86bios lock", NULL, MTX_DEF); @@ -787,9 +767,6 @@ x86bios_init(void) x86bios_emu.emu_outw = x86bios_emu_outw; x86bios_emu.emu_outl = x86bios_emu_outl; - for (i = 0; i < 256; i++) - x86bios_emu._x86emu_intrTab[i] = x86bios_emu_get_intr; - return (0); }