9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Sape Mullender <sape@plan9.bell-labs.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] pm in the bitsy
Date: Fri,  1 Jun 2001 13:09:38 -0400	[thread overview]
Message-ID: <20010601170945.2ABE3199EC@mail.cse.psu.edu> (raw)

Nemo,

> I only took a quick look, so this could be wrong; but I think that
> rs232, lcd, audio, and of course sa1100 are doing a power off and have
> the code to get back on. Perhaps the pcmcia/wavelan will not do so (I
> didn't check that yet).

Peter Bosch — who joined our group a few months ago — is working on
code for all of our architectures to support dynamic pcmcia and cardbus card
insertion and removal.  Power management will fall out of that.  If you want,
you can do a quick hack for the Wavelan, but there will be better code at
some point.  The power code in the other drivers does exist but hasn't been
tested yet.  I do turn power off on close in the audio driver, so powering
in/off is not a problem, but I haven't tested how open-file state survives
power-off followed by power-on.

> Regarding the power-on entry point, my boot loader is already jumping
> (well, not sure yet, but looks like), to the address kept in
> powerregs->pspr.  The linux code was kind of a tutorial here.

> So, if I'm not so mistaken, I think I'd only need to save all the
> processor state and write an assembly routine to reload it (placing its
> address into powerregs->pspr in sa1100_power_off).

That's the impression I got.  A good idea might be to make the first
instruction of pwer-restore be to reload powerregs->pspr with the
cold-boot address.  If things go wrong in the power-up code, at least
you'll come back to life by recycling power.

> My only problem is that I'm learning arm assembler while trying to get
> this working, so I'm not too optimistic regarding the final result.

You'll also have to learn Ken's loader which may be even harder.  It
still confuses me occasionally.

> In any case, if you still think I'm missing something (well, probably
> many things) and you have a minute to let me know, that would be great.

We'd love it if you could get started on power management for the BItsy and
we'll definitely help you where we can.

By the way, during the conversion to 9P2000, I added the power and
configure entry points to the devtab for all of our systems — they only
existed for the bitsy.  Peter Bosch will have a lot to say about how we use
the configure entry point; we can dictate the use of the power entry point.

	Sape



             reply	other threads:[~2001-06-01 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-01 17:09 Sape Mullender [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-06-01 17:55 forsyth
2001-06-01 17:00 F.J.Ballesteros
2001-06-01 16:36 Sape Mullender
2001-06-01 14:53 F.J.Ballesteros
2001-06-01 14:50 presotto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010601170945.2ABE3199EC@mail.cse.psu.edu \
    --to=sape@plan9.bell-labs.com \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).