[Top] [All Lists]

Re: 64 to 32 bit jr

To: "Erik J. Green" <>
Subject: Re: 64 to 32 bit jr
From: "Maciej W. Rozycki" <>
Date: Mon, 7 Apr 2003 20:10:49 +0200 (MET DST)
Cc: "" <>
In-reply-to: <>
Organization: Technical University of Gdansk
Original-recipient: rfc822;
On Mon, 7 Apr 2003, Erik J. Green wrote:

> According to my current understanding, the base of each of 8 segments in 
> xkphys
> maps to the start of physical memory, so offset 0 in kseg0 should be the same
> data as at offset 0 of the a800...0000 segment in xkphys.  So, if I load code
> starting at offset 0 in xkphys, I should be able to jump to the 32-bit part of
> the xkphys address and end up at the same offset in kseg0, provided the target
> address is sign-extended properly.

 As long as your offset into XPHYS fits within the KSEG0 size.

> the code in xkphys and kseg0 have the same offsets.  Objcopy seems to have 
> some
> non-obvious rules for doing address calculations, IE objcopy using
> --change-addresses=X
> 0xa800000000000000 + 0x20004000
> gives something close to (not near my MIPS system atm)
> 0xa7ffffff2001c000

 Hmm, the option seems to work for me as expected.  What version of
objcopy?  What do you use for "X"?  What does `readelf -l' report before
and after copying? 

> So, I'm thinking constructing the address in a register might be easier for 
> now.

 But your kernel really needs to be linked at a KSEG0 address -- if you
are to construct the address manually, the resulting kernel won't work. 


+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+        e-mail:, PGP key available        +

<Prev in Thread] Current Thread [Next in Thread>