From owner-freebsd-mobile Sun Feb 14 13:00:25 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id NAA08057 for freebsd-mobile-outgoing; Sun, 14 Feb 1999 13:00:25 -0800 (PST) (envelope-from owner-freebsd-mobile@FreeBSD.ORG) Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id NAA08052 for ; Sun, 14 Feb 1999 13:00:19 -0800 (PST) (envelope-from imp@village.org) Received: from harmony [10.0.0.6] by rover.village.org with esmtp (Exim 1.71 #1) id 10C8dw-00047t-00; Sun, 14 Feb 1999 13:59:56 -0700 Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.2/8.8.3) with ESMTP id OAA32088; Sun, 14 Feb 1999 14:02:07 -0700 (MST) Message-Id: <199902142102.OAA32088@harmony.village.org> To: Mitsuru IWASAKI Subject: Re: apm & current Cc: Valentin Shopov , mobile@FreeBSD.ORG, Nate Williams In-reply-to: Your message of "Mon, 15 Feb 1999 01:43:35 +0900." <199902141646.BAA21353@tasogare.imasy.or.jp> References: <199902141646.BAA21353@tasogare.imasy.or.jp> <19990213153958.2977.rocketmail@send1e.yahoomail.com> Date: Sun, 14 Feb 1999 14:02:06 -0700 From: Warner Losh Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org In message <199902141646.BAA21353@tasogare.imasy.or.jp> Mitsuru IWASAKI writes: : I already noticed that this problem happens on some old laptops which has : apm v1.1 or 1.0 (Sotec WinBookPro DX4/100, DEC HiNote Ultra II, etc.). : -current/-stable apm(8) try to call APM v1.2 BIOS functions : (e.g. APM_RESUMETIMER) without version checking. : Some of the old APM BIOSes, however, can make kernel panic when recieved : unkown APM BIOS functions. : In /sys/i386/apm/apm.c, apm_get_info() has the same problem : (APM_GETCAPABILITIES), therefore xbatt also will cause the same trouble. : : So, now I'm going to commit version checking code just before : calling apm_bios_call() in /sys/i386/apm/apm.c into PAO3 CVS repository. These patches look basically good. I'll integrate them when I have a chance. : Adding to this, I noticed many other problems in apm code, such as : - Fixed segment description for APM. The limit granularity should be : specified in bytes, not pages. This looks good. : - Try to limit the number of apm_bios_call() executing to only one : at the same time, watching busy state made by previous call and : waiting if necessary. I wonder how this can happen, but it couldn't hurt. : - Made apm_suspend() and apm_standby() be invoked by apm_timeout() in order to : obtain stablities. What stabilities are these? I'm curious. : - Added adjustment for segment size limits informed by APM BIOS. Following : patch for apm_init.S and make in /sys/i386/apm/apm_init/ to generate : apm_init.inc are required if VM86 isn't enabled in your kernel. These look good to me. I'll also have to take a look at the PAO3 CVS tree... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message