Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Sep 1998 14:44:09 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        nate@mt.sri.com, tlambert@primenet.com
Cc:        current@FreeBSD.ORG, yokota@zodiac.mech.utsunomiya-u.ac.jp
Subject:   Re: VM86 and APM
Message-ID:  <199809280444.OAA10819@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> > Does anybody know of any problem using VM86 and the apm driver together?
>..
>> > apm0 not found.
>> 
>> I think that you may have APM disabled in your CMOS setup?
>
>Doesn't matter, since having APM disabled means it's disabled.  If it's
>disabled, it's not found by *ANY* means

Actually, having APM disabled doesn't mean that it is disabled, except
possibly when VM86 is configured, since apm_setup() is called from
locore.s without looking at the `disabled' flag.  The disabled flag isn't
really valid at that time since it might be changed in Userconfig.
Calling apm_setup() is not a no-op since it sets `apm_version'
which clock.c uses to decide whether the TSC timecounter can be used.
Misconfigured systems (with apm configured but disabled) always get the
i8254 timecounter which seems to be buggier than the TSC timecounter.

>> I think the APM VM86() call will detect this because it uses
>> BIOS-specific code that knows about the CMOS setting, but the
>> non-VM86() code ignores the CMOS setting (which can cause other,
>> interesting problems, like being able to suspend, but the laptop
>> not waking up on an event that should result in a "resume").
>
>Not.  We used to use our own VM86 switcher to do the probe earlier, and
>Mike converted to use the GENERIC VM86 switcher.  If it worked before,
>it *should* work now (modulo any bugs, which is essentially the
>problem the poster is pointing out).

Moving the call later breaks clock.c's apm detection in a different way.
`apm_version' is statically initialized to 0, which is different from
APMINI_CANTFIND (= -1).  clock.c thinks that apm has been detected
since it tests `apm_version' very early before apm has had a chance to
run.

Bruce

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?199809280444.OAA10819>