Date: Mon, 02 Aug 1999 22:22:51 +0900 From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org> To: Maxim Sobolev <sobomax@altavista.net> Cc: Mike Smith <mike@smith.net.au>, FreeBSD-current@FreeBSD.ORG, iwasaki@jp.freebsd.org Subject: Re: APM related panic Message-ID: <199908021318.WAA14239@tasogare.imasy.or.jp>
next in thread | raw e-mail | index | archive | help
# sorry to break the thread, I'm a digest reader... Hi, > > apm0: <APM BIOS> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908021318.WAA14239>