From owner-freebsd-current Mon Aug 2 6:19:48 1999 Delivered-To: freebsd-current@freebsd.org Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by hub.freebsd.org (Postfix) with ESMTP id 961DF150E5 for ; Mon, 2 Aug 1999 06:19:43 -0700 (PDT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (isdn51.imasy.or.jp [202.227.24.243]) by tasogare.imasy.or.jp (8.9.3+3.2W/3.7W-tasogare/smtpfeed 1.01) with ESMTP id WAA14239; Mon, 2 Aug 1999 22:18:59 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Message-Id: <199908021318.WAA14239@tasogare.imasy.or.jp> To: Maxim Sobolev Cc: Mike Smith , FreeBSD-current@FreeBSD.ORG, iwasaki@jp.freebsd.org Subject: Re: APM related panic X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Mon, 02 Aug 1999 22:22:51 +0900 From: Mitsuru IWASAKI X-Dispatcher: imput version 980905(IM100) Lines: 55 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG # sorry to break the thread, I'm a digest reader... Hi, > > apm0: on motherboard > > apm: APM BIOS version 0102 > > apm: Code16 0xc00f0000, Data 0xc00fdfa0 > > apm: Code entry 0x00008010, Idling CPU enabled, Management enabled > > apm: CS_limit=0x0, DS_limit=0x0 > > These limits look pretty suspect, although the code segment below looks > OK. I suspect too, especially ds limit. I've seen such bogus 1.2 APM BIOSes before. I hope attached patch help you (for /sys/i386/apm/apm.c). P.S. Thank you for enhanced APM code, mike. I had enjoy last week end to study the new code. Some of my concerns about APM gone :-) --- apm.c- Mon Aug 2 21:31:20 1999 +++ apm.c Mon Aug 2 21:49:52 1999 @@ -773,6 +773,30 @@ sc->bios.seg.code16.limit = 0xffff; sc->bios.seg.data.limit = 0xffff; } + + /* + * Segment limits fixup: + * Some bogus APM V1.1 (even if V1.2) BIOSes do not return + * any size limits in the registers they are supposed to. + * if we see zero limits here, we assume that means they + * should be 64k. + */ + + /* code segment (16 bit) */ + if (sc->bios.seg.code16.limit == 0) { +#ifdef APM_DEBUG + printf("apm_probe: APM bios gave zero len code16, pegged to 64K\n"); +#endif + sc->bios.seg.code16.limit = 0xffff; + } + /* data segment */ + if (sc->bios.seg.data.limit == 0) { +#ifdef APM_DEBUG + printf("apm_probe: APM bios gave zero len data, tentative 64K\n"); +#endif + sc->bios.seg.data.limit = 0xffff; + } + return(0); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message