# 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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to