Re: 64 to 32 bit jr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro@ds2.pg.gda.pl, PGP key available        +



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux