Skip to contentSkip to conversation

MPC8xx: wrong zimage_start

DISCUSSION Wolfgang Denk 3 participants 4 messages Jun 2, 1999 – Jun 3, 1999

lore
Share & tools
lore
#0 lore raw

Hi,

I think I need some help... I'm trying to port Linux to a "non-stan-
dard" MPC860 board. Obviously, it does not provide the same
environment as the EPPC-Bug on the MBX860 boards.

I'm running into problems when it comes to decompressiong and starting the kernel; here is what I see on the console (I've added some debugging code):

    decompress_kernel: load_addr 00010000 num_words 0003F510 cksum 96CF6339 &residual 01FFFDD8 
    loaded at:     00010000 0010D440
    relocated to:  00100000 001FD440
    board data at: 01FFFDD8 01FFFE00
    relocated to:  00000100 00000128
    zimage at:     00017000 0006B2F3
    avail ram:     001FD440 00600000

    Linux/PPC load: console=tty0 console=ttyS0,115200n8

    gunzip: dst 0 dstlen 0x400000 zimage_start 00017000 zimage_size 000542F3 

    Uncompressing Linux... bad gzipped data
     00017000 : 3D29C000    A3E90000    7C0006AC    48000010 
     00017010 : A0093C82    541F043E    7C0006AC    3D20C000 
     00017020 : A0093CAC    5400043E    7C0006AC    2C800000 
     00017030 : 4186001C    31202010    5529043E    3D29C000 
     00017040 : B1690000    7C0006AC    4800000C    B1693C90 
     00017050 : 7C0006AC    3D20C000    A0093CAC    5400043E 
     00017060 : 7C0006AC    2C800000    4186001C    31202020 
     00017070 : 5529043E    3D29C000    B3E90000    7C0006AC 
     00017080 : 4800000C    B3E93CA0    7C0006AC    3D20C000 
     00017090 : A0093CAC    5400043E    7C0006AC    2C800000 
     000170A0 : 41860020    31202004    5529043E    3D29C000 
     000170B0 : 38000010    98090000    7C0006AC    48000010 
     000170C0 : 38000010    98093C84    7C0006AC    3D20C000 
     000170D0 : A0093CAC    5400043E    7C0006AC    2C800000 
     000170E0 : 41860020    31202005    5529043E    3D29C000 
     000170F0 : 38000010    98090000    7C0006AC    48000010 
    Searching [0x4000 - 0x1000000]...  
    at 004E7C00 : 1F8B0808  DC0D5337  0203766D  6C696E75 
    ......looks good...done.

I'm booting from flash memory; zImage is at 40700000, so I start with a `go 40710000'; I have 32 MB RAM and created a faked "bd_info" struct at the end of RAM. Everything seems to be fine, but the compressed image is not where it is expected to be: objdump says

    -> objdump -h zvmlinux

    zvmlinux:     file format elf32-powerpc

    Sections:
    Idx Name          Size      VMA       LMA       File off  Algn
      0 .text         00004fa0  00100000  00100000  00010000  2**2
		      CONTENTS, ALLOC, LOAD, READONLY, CODE
      1 .rodata       00000618  00104fa0  00104fa0  00014fa0  2**2
		      CONTENTS, ALLOC, LOAD, READONLY, DATA
      2 .data         00000314  00106000  00106000  00016000  2**2
		      CONTENTS, ALLOC, LOAD, DATA
      3 .bss          0000bbbc  00107000  00107000  00017000  2**2
		      ALLOC
      4 image         0005421a  00000000  00000000  00017000  2**0
		      CONTENTS, READONLY

so the value of 00017000 for zimage_start looks good. I've added some code to search for the real position in memory, and found it to sit at 004E7C00 instead.

Hmmm... I guess that EPPC-Bug might be doing some magic things to the ELF file which I am still missing.

Can anybody see what I'm doing wrong, or at least give me a few hints where to look?

Thanks in advance,

Wolfgang

Signature · 8 lines
Phone: (+49)-8142-4596-87  Fax: -88  Home: -86  Email: [email protected]
Any time things appear to be going better, you have overlooked  some-
thing.

[[ This message was sent via the linuxppc-dev mailing list.  Replies are ]]
[[ not  forced  back  to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting.   ]]
#1 lore raw
Quoted 2 lines

Hi,

Hi there!

Quoted 2 lines

I think I need some help... I'm trying to port Linux to a "non-stan-
dard" MPC860 board.

I've ported linux to a few custom 860 boards.

Quoted 2 lines

Obviously, it does not provide the same
environment as the EPPC-Bug on the MBX860 boards.

I am with you.

Quoted 2 lines

Can anybody see what I'm doing wrong, or at least give me a few hints where to look?

Well, I havn't had any trouble like that.

I started loading a 'vmlinux' to address 0 and started at address 0x0c. That was just because I didn't like the things that was done in the boot-code for the zImage.
The MBX board reads some stuff from the NVRAM and does a few wierd things.

I've made a port to an ADS board from motorola, I've sent the patches to Dan Malek.

I use the embedded-2.2.5 tarball, what code do you use? My patches are for the embedded-2.2.5 code.

I've got a bootrom that loads a zImage or vmlinux from ATA-flash or romdisk.
That might be a good start.

Another thing - remember to read the errata for the 860. Revisions before C tend to have some problems. And 860T has still (B3) got problems.

Good luck! /

magnus

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]

#2 lore raw

Hi Magnus

Quoted 5 lines · On 02-Jun-99 Magnus Damm wrote:

Another thing - remember to read the errata for the 860. Revisions before C tend to have some problems. And 860T has still (B3) got problems.

Please give me a hint where to find the errata sheets ?.
What problems about the 860T ? Because we choose that device :-(

thanks

heinz

___________________________________________________
Larkinson's Law:
All laws are basically false.
___________________________________________________
Heinz Blaettner / BinTec Communications AG

fon:    +49 911 96 73-0  / Suedwestpark 94  
fax:    +49 911 688 0725 / D-90449 Nuernberg
E-Mail: [email protected]  / http://www.bintec.de

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]

#3 lore raw
Quoted 4 lines

Hi Magnus

Hi there!

Quoted 1 line

Please give me a hint where to find the errata sheets ?.

You can find the 860 errata at motorolas website:

http://www.mot.com/netcomm/aesop/mpc8XX/860/860err.pdf

It contains a 860T specific part.

When I got my 860T didn't this errata contain any 860T specific information at all.

Quoted 1 line

What problems about the 860T ? Because we choose that device :-(

First of all, the B revision contains the serious bug that makes it impossible to use the
fec and the cpm at the same time. great.

They don't mention the B revision in that errata. My FADS860T had that chip when I got it.

I've got a B3 and that one still contains the CPU7 bug that makes datacache corruption
when writing to sprs.

I've got a workaround from Dan that I've applied to my embedded-2.2.5 head.S.

The workaround works fine, now I'm stuck with some minor fec.c problem.

Hope this helps! /

Magnus

[[ This message was sent via the linuxppc-dev mailing list. Replies are ]] [[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]] [[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]