From owner-svn-src-all@FreeBSD.ORG Mon Sep 21 08:46:34 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F9F106566C; Mon, 21 Sep 2009 08:46:34 +0000 (UTC) (envelope-from swell.k@gmail.com) Received: from mail-ew0-f208.google.com (mail-ew0-f208.google.com [209.85.219.208]) by mx1.freebsd.org (Postfix) with ESMTP id 47D948FC15; Mon, 21 Sep 2009 08:46:33 +0000 (UTC) Received: by ewy4 with SMTP id 4so2223561ewy.36 for ; Mon, 21 Sep 2009 01:46:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:references :date:in-reply-to:message-id:user-agent:mime-version:content-type; bh=TR2hGidj+5v4YVntyh+yft1aGS5Xtya1Yx50f1LQBCA=; b=Ly4KhRNreif7kXoVxLaK5oEAJ8nNFEieqmsiyIgMjLxwUP/47IBSuxUGKegDTHvZVy n1IUOhKr7jwh8jzkW3TJajrCulwPOuqm6CiOEnEt1vsaH3u2M+TXFzVF6BfbOSBXq3AR VIGzx1/WAqQhefA0YTRwa1yU7We16CIRp4LRM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; b=H2ygDM3E2c3bmTHy2jIbB3TJkVGbgpC7cYbxLAWTSh3CWg21Jnur+iwRbru12SsbHU Mdl0mtxZ+0pC9Cd6qnPQCud2TL34W28E5rX6L92iO97e9p7Ro1j86Ci0tps58XL/XGYi +YXfvVZ/ToYLIrfyXADzMlnh0fYSnpDTyngo4= Received: by 10.210.6.8 with SMTP id 8mr2703009ebf.41.1253522792110; Mon, 21 Sep 2009 01:46:32 -0700 (PDT) Received: from localhost (95-24-211-3.broadband.corbina.ru [95.24.211.3]) by mx.google.com with ESMTPS id 10sm1345300eyz.26.2009.09.21.01.46.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 21 Sep 2009 01:46:31 -0700 (PDT) From: Anonymous To: Xin LI References: <200909210817.n8L8HvP3080703@svn.freebsd.org> Date: Mon, 21 Sep 2009 12:46:29 +0400 In-Reply-To: <200909210817.n8L8HvP3080703@svn.freebsd.org> (Xin LI's message of "Mon, 21 Sep 2009 08:17:57 +0000 (UTC)") Message-ID: <86my4olm6y.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r197383 - in head/sys: conf contrib/x86emu dev/dpms dev/fb dev/x86bios modules modules/x86bios modules/x86emu X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Sep 2009 08:46:34 -0000 --=-=-= Xin LI writes: > Author: delphij > Date: Mon Sep 21 08:17:57 2009 > New Revision: 197383 > URL: http://svn.freebsd.org/changeset/base/197383 > > Log: > Collapase interrupt supporting functions to a new module, and switch from > x86emu to this new module. > > This changeset also brings a fix for bugs introduced with the initial > x86emu commit, which prevents the user from using some display mode or > cause instant reboots during mode switch. > > Submitted by: paradox > > Index: sys/dev/x86bios/x86bios.c [...] > +static moduledata_t x86bios_mod = { > + "x86bios", > + x86bios_modevent, > + NULL, > +}; > + > +DECLARE_MODULE(x86bios, x86bios_mod, SI_SUB_KLD, SI_ORDER_ANY); > +MODULE_VERSION(x86bios, 1); > + SI_SUB_KLD may not work sometimes. If it panics when loaded from loader(8) then better to place it in SI_SUB_CPU or later. BTW, some style(9) fixes didn't make it there. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=a.diff --- sys/dev/fb/vesa.c~ +++ sys/dev/fb/vesa.c @@ -461,7 +461,7 @@ vesa_bios_state_buf_size(void) if ((regs.R_AX & 0xff) != 0x4f) return 0; - return regs.R_BX*64; + return regs.R_BX * 64; } static int @@ -698,7 +698,7 @@ vesa_bios_init(void) vesa_revstr = (char *)x86biosOffs(FARP(vesa_adp_info->v_revstr)); } - vesa_vmodetab = (u_int16_t *)x86biosOffs(FARP(vesa_adp_info->v_modetable)); + vesa_vmodetab = (uint16_t *)x86biosOffs(FARP(vesa_adp_info->v_modetable)); if (vesa_vmodetab == NULL) return 1; @@ -783,7 +783,7 @@ vesa_bios_init(void) - vmode.v_lfb; else vesa_vmode[modes].vi_buffer_size - = vmode.v_offscreen + vmode.v_offscreensize*1024; + = vmode.v_offscreen + vmode.v_offscreensize * 1024; #endif vesa_vmode[modes].vi_mem_model = vesa_translate_mmodel(vmode.v_memmodel); @@ -1269,7 +1269,7 @@ vesa_get_origin(video_adapter_t *adp, of if ((regs.R_AX & 0xff) != 0x4f) return 1; - *offset = regs.DX*adp->va_window_gran; + *offset = regs.DX * adp->va_window_gran; return 0; } @@ -1298,7 +1298,7 @@ vesa_set_origin(video_adapter_t *adp, of regs.R_EAX = 0x4f05; regs.R_EBX = 0; - regs.R_EDX = offset/adp->va_window_gran; + regs.R_EDX = offset / adp->va_window_gran; x86biosCall(®s, 0x10); if ((regs.R_AX & 0xff) != 0x4f) @@ -1306,7 +1306,7 @@ vesa_set_origin(video_adapter_t *adp, of regs.R_EAX = 0x4f05; regs.R_EBX = 1; - regs.R_EDX = offset/adp->va_window_gran; + regs.R_EDX = offset / adp->va_window_gran; x86biosCall(®s, 0x10); adp->va_window_orig = (offset/adp->va_window_gran)*adp->va_window_gran; --- sys/dev/x86bios/x86bios.c~ +++ sys/dev/x86bios/x86bios.c @@ -27,8 +28,8 @@ #include #include -unsigned char *pbiosMem = NULL; -static unsigned char *pbiosStack = NULL; +u_char *pbiosMem = NULL; +static u_char *pbiosStack = NULL; int busySegMap[5]; --- sys/dev/x86bios/x86bios_alloc.c~ +++ sys/dev/x86bios/x86bios_alloc.c @@ -29,7 +29,7 @@ #include -extern unsigned char *pbiosMem; +extern u_char *pbiosMem; extern int busySegMap[5]; void * @@ -74,7 +74,7 @@ x86biosFree(void *pbuf, int count) int i; int busySeg; - busySeg = ((unsigned char *)pbuf - (unsigned char *)pbiosMem)/4096; + busySeg = ((u_char *)pbuf - pbiosMem) / 4096; for (i = busySeg; i < (busySeg + count); i++) busySegMap[i] = 0; --=-=-=--