linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <bh40@calva.net>
To: Joseph Garcia <jpgarcia@execpc.com>, <linuxppc-dev@lists.linuxppc.org>
Subject: Re: setpramboot problems
Date: Tue, 18 Apr 2000 11:29:47 +0200	[thread overview]
Message-ID: <20000418092948.17203@mailhost.mipsys.com> (raw)
In-Reply-To: <38FBA3AA.3864AAA0@execpc.com>


On Mon, Apr 17, 2000, Joseph Garcia <jpgarcia@execpc.com> wrote:

>his weekend, I got my hands on some other systems.  I found that the linux
>kernel maps NVRAM differently on NewWorld systems (OF >= 3.0), which includes
>the 101/lombard.  As a result, the 4 bytes setpramboot modifies are in a
>different location.  What the kernel does also seems to break nvsetenv.
 using
>hexdump on /dev/nvram, the PRAM boot location is on line 0x1370 with
oldworld,
>and 0x1220 with newworld if i recall correctly.  Any kernel maintainers
>know why
>this happens?  (running Paul's 2.2.15pre17, dmesg lists where various nvram
>sections are mapped, so the kernel knows that the address is different)
>
>Regarding setpramboot, its definitely still a work in progress.  I still have
>yet to figure out the meaning of the code when the bus is scsi.  the ata
>setting
>makes sense, but the SCSI setting is still cryptic.  fyi, even if scsi,
>'System
>Disk' still only changes those 4 bytes, so a simple cut and paste of known
>correct values would work.  Maybe I should put a hexcode option in the
>/etc/pramtab.
>
>I might have a chance update setpramboot this weekend.

You may want to look at my latest rsync tree, in arch/ppc/pmac_support.c

(rsync -arvz linuxcare.com.au::linux-pmac-benh .)

I added code to correctly access the nvram (which is in fact a flash) on
new Core99 machines and code to detect the location of the PRAM partition
inside the nvram on all machines. I didn't yet have time to add ioctls to
return those infos to userland, I'll try to do this by next week end.

nvsetenv needs to be fixed too (by either using the same algorithm, or by
using the not-yet-added iotcls). Currently, nvsetenv works on oldworld,
and Marcus Volmer "nvtool" works on newworld for manipulating OF
environement variables.

Basically, the NVRAM is divided in 3 regions:

 - The OF environement variables
 - The MacOS XPRAM (flat region containing things like the "old" macos
boot device, time zone, mouse speed, sound volume, etc...)
 - The MacOS Name Registry persistent properies (a hackish mecanism to
add some persistent nodes to some device tree entries, used for the
backlight setting for example).

My current kernel code can find those 3 regions (thanks to Darwin source)
and had in-kernel accessors for the xpram. I plan to add support for the
Name Registry extensions too, but this is a bit more complicated since
there are at least 2 different formats for those entries and they are a
bit ugly.


** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2000-04-18  9:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-04-02  2:30 PRAMBoot Selector - update Joseph Garcia
2000-04-17 23:15 ` Tim Wojtulewicz
2000-04-17 23:52   ` setpramboot problems Joseph Garcia
2000-04-18  9:29     ` Benjamin Herrenschmidt [this message]
2000-08-17 11:11       ` Can't find nvtool? " Vladimir Simonov
2000-08-17 11:24         ` Martin Costabel

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=20000418092948.17203@mailhost.mipsys.com \
    --to=bh40@calva.net \
    --cc=jpgarcia@execpc.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /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).