Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Jun 1998 22:35:23 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Warner Losh <imp@village.org>
Cc:        mobile@FreeBSD.ORG
Subject:   Re: apm vs apmconf 
Message-ID:  <199806140535.WAA03391@antipodes.cdrom.com>
In-Reply-To: Your message of "Sat, 13 Jun 1998 23:28:14 MDT." <199806140528.XAA11752@harmony.village.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> OK.  I'm putting some finishing touches on some APM 1.2 enhancements
> to FreeBSD.  I have a couple of questions, so I thought I'd share what
> I have done so far then ask the questions.  This is a little long, so
> please bear with me.  I'm very interested in hearing what others who
> have looked into this problem have to think about what I've done and
> where I'd like to take it.

BTW, thanks for attacking this!

> I've modified the APMIO_BIOS ioctl to not return EIO when an error
> happens.  Rather, it clears the ah portion of the eax value returned
> on success.  This isn't bad because all of the calls that return stuff
> in ah are APM driver only calls (that's what the APM standard calls
> them).  You would need to check ah to see if it was non-zero to see if
> the ioctl succeeded.

Hmm.  Ultimately (but not now I think) we should abstract stuff away 
from APM towards more general "power policy" (as you described 
elsewhere).  With ACPI now appearing in hardware, we'll be faced with 
more complex and abstract decisions.

> I've also implemented the APM 1.2 set/get/disable resume timer
> functionality in apm(8) (although I'm starting to think this might be
> better in apmconf(8), which is what motivated this message).

IMHO, there should only be one "apm" tool; there is no clear division 
of labour between the two, and I'm not at all sure there should be.

> My question:
> 	o does configuring the APM BIOS's wakeup timer belong in apm
> 	  or apmconf? 
> 	o ditto with ring indicator resume
> 	o ditto with the OEM functions

See above.

> 	o the timer values that I use MUST be in RTC time.  how do I
> 	  tell if that is GMT or localtime, my guess is that it is one
> 	  of the following sysctls: machdep.adjerntz or
> 	  machdep.wall_cmos_clock?  There doesn't seem to be docs for
> 	  them in any of the usual places.

machdep.wall.cmos.clock will tell you if the CMOS clock is "wall" or 
"GMT" time.

> 	o should I commit well tested portions of this work, or wait
> 	  for all pieces to in place first?

Bring them in as soon as you think they're ready.  A series of 
staggered commits is easier to back forwards/back through.

BTW, have you tried the VM86 connect code I committed?

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-mobile" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806140535.WAA03391>