Subject: Re: How does the asm interface to OF work? I need to enhance it
To: None <port-macppc@netbsd.org>
From: Derek Peschel <dpeschel@eskimo.com>
List: port-macppc
Date: 12/28/2001 08:50:30
> What's the problem, really, with going through openfirmware() more
> than once? I mean, we already do that quite a bit in machdep.c, do
> we not? Sure, we usually only call it once per command, but if it's
> a workable and not-that-ugly hack to make this problem go away, hey,
> what the hell, right?

Nothing is the prblem.  We're really not disagreeing here.  Of course
the OF stack had better not change between calls to openfirmware().

> Is there no "read the top of the stack and then pop" command
> floating around? That's what you really want, I think.

I'd have to look.  The . command prints the top value, which is not
the same thing.  I wonder if it's possible to abuse openfirmware() so
that it puts nothing on the stack, does nothing, and then takes one
value off the stasck?  (Or do the same thing from C, by giving clever
arguments to one of the OF_... functions.)

> (Though, yes, clever naming conventions wouldn't hurt, and I don't
> think we need the device's address in this case, since the
> appropriate -kbd-ihandle[s] command is what we use to get the
> address.)

I was being funny but not completely funny.  Correct names really
are important.

-- Derek