From: Murray Jensen <Murray.Jensen@csiro.au>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] booting linux from u-boot - help!
Date: Tue, 17 Dec 2002 20:05:23 +1100 [thread overview]
Message-ID: <26333.1040115923@msa.cmst.csiro.au> (raw)
In-Reply-To: Message from My-Hong Vuong <My-Hong.Vuong@au.thalesgroup.com> of "Tue, 17 Dec 2002 19:04:41 +1100." <sdff7591.074@au.thalesgroup.com>
On Tue, 17 Dec 2002 19:04:41 +1100, My-Hong Vuong <My-Hong.Vuong@au.thalesgroup.com> writes:
>with the cache, i've disabled MSR_DR in head_8xx.S
You mustn't do this - virtual memory will not work if you do this.
>which then seems to
>get to start_here fine.
This is giving you false hope - you must leave the virtual memory on.
>but inserting the same code just before
>early_init doesn't seem to work...
One problem that you need to look out for is that you only have 0x100 bytes
available to you at that point. This is executing the reset exception handler
at 0x...100 and the next exception handler must start at 0x...200. Don't insert
too much code (you should get an error from the assembler - saying that you
are trying to set the location backwards or something like that).
>the assembly I'm using is :
>lis r25, 0xaaaa
>ori r25, r25, 0xaaaa
>lis r26, 0x8100
>ori r26,r26,0x0000
>stw r25, 0(r26)
>
>where r25 is the pattern I want to write into address 0x81000000. I've
>used r25 and r26 because I can't see them being used anywhere in the
>code...
r25 and r26 (and others) are used to save the arguments passed to kernel from
the boot loader (in r3, r4, ..., r7) - it's like the first few instructions
ever executed by Linux - you mustn't clobber these registers.
Besides this, if you leave virtual memory on, this will not do what you
think it will - you must first set up a temporary translation in the TLB before
you can access that physical location, as is done for the Internal Memory
Mapped Registers (IMMR) area.
Of course, the appropriate BRx/ORx for the LEDs must have been set up by the
boot loader so that the physical address 0x81000000 really does access the
LED hardware (I assume this is the case - since you say this code works
elsewhere).
>I'm not sure how do do it otherwise (i.e. restoring the original
>register values)
Use some other registers (if you're careful) - e.g. r3, r4, r5 - these will be
restored later when required (see call to identify_machine - or some name like
that).
>any other ideas would be muchly appreciated,
I just got my BDI2000 - it's great. Other than that - pull out all code you
have inserted and go back to the original Linux code - after carefully
examining all the config options. If your hardware is correct and your
linux config matches it properly, it should "just work" :-) Good luck.
Cheers!
Murray...
--
Murray Jensen, CSIRO Manufacturing & Infra. Tech. Phone: +61 3 9662 7763
Locked Bag No. 9, Preston, Vic, 3072, Australia. Fax: +61 3 9662 7853
Internet: Murray.Jensen at csiro.au
Hymod project: http://www.msa.cmst.csiro.au/projects/Hymod/
To the extent permitted by law, CSIRO does not represent, warrant and/or
guarantee that the integrity of this communication has been maintained or
that the communication is free of errors, virus, interception or interference.
The information contained in this e-mail may be confidential or privileged.
Any unauthorised use or disclosure is prohibited. If you have received this
e-mail in error, please delete it immediately and notify Murray Jensen on
+61 3 9662 7763. Thank you.
next parent reply other threads:[~2002-12-17 9:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <My-Hong.Vuong@au.thalesgroup.com>
[not found] ` <sdff7591.074@au.thalesgroup.com>
2002-12-17 9:05 ` Murray Jensen [this message]
2003-06-24 0:08 ` [U-Boot-Users] [PPCBoot-users] Using gcc-3.4 to compile u-boo t on powerpc Vuong My-Hong
2003-06-26 2:03 ` Murray Jensen
2002-12-17 8:04 [U-Boot-Users] booting linux from u-boot - help! My-Hong Vuong
2002-12-17 8:25 ` Wolfgang Denk
-- strict thread matches above, loose matches on Subject: below --
2002-12-17 0:23 My-Hong Vuong
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=26333.1040115923@msa.cmst.csiro.au \
--to=murray.jensen@csiro.au \
--cc=u-boot@lists.denx.de \
/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