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

RE: [microblaze-uclinux] Kernel boot problem ( Michael Simek Wiki )



Dear all,
hope you are doing well,

Ok, i did not receive any reply for my previous post from neither Michal nor Jhon, so i decided to test the main petalogix distribution.

the linux kernel provided in main petalogix distribution booted up on our custom board in just 5 minutes and is working properly. thanks to great work.

but the problem i mentioned in the previous post is still alive, XMD can not even load the new kernel. still the same problem as before, XMD is not capable of understanding virtual addresses and segments defined with virtual address values.

again realelf recognizes the generated petalinux kernel easily. but XMD dow command can not load it into memory. and this kernel works fine when loaded and executed by u-boot.

Thanks



From: mamsadegh@xxxxxxxxxxx
To: microblaze-uclinux@xxxxxxxxxxxxxx
Subject: RE: [microblaze-uclinux] Kernel boot problem ( Michael Simek Wiki )
Date: Sat, 31 Oct 2009 07:52:25 +0000

Dear Michal

Here is the result of my test on my simpleImage.platform

mb-readelf -l simpleImage.platfrom , results:

Elf file type is EXEC (Executable file)
Entry point 0x44800000
There are 3 program headers, starting at offset 52

Program Headers:
  Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align
  LOAD           0x001000 0xc0000000 0x44800000 0x2c2680 0x2c3000 RWE 0x1000
  LOAD           0x2c4000 0xc02c3000 0x44ac3000 0x11a6c 0x11a6c RW  0x1000
  LOAD           0x2d6000 0xc02d6000 0x44ad6000 0x1a018 0x47ae0 RWE 0x1000

 Section to Segment mapping:

as you mentioned in your email, the elf file is Ok and so XMD should be able to load it successfully, however, here is the result of XMD when issuing the dow command:

XMD% dow simpleImage.platform
System Reset .... DONE
Downloading Program -- simpleImage.platform
        section, .text: 0xc0000000-0xc022b1f7
        section, .ref.text: 0xc022b1f8-0xc022be87
        section, .cpuinit.text: 0xc022be88-0xc022cd13
        section, .meminit.text: 0xc022cd14-0xc022cfb3
        section, .devexit.text: 0xc022cfb4-0xc022d0cf
        section, .devinit.text: 0xc022d0d0-0xc022dc33
        section, .init.text: 0xc02d8000-0xc02eddc7
        section, .init.ivt: 0xc02eec44-0xc02eecab
 ERROR: Failed to download ELF file

I-Side Memory Access Check Failed
        Section, 0xc0000000-0xc022b1f7 Not Accessible from Processor I-Side Interface

the error message still exists, can i conclude that the problem may be from the toolchain? I mean i do not use the toolchain provided by Xilinx in EDK. I just downloaded the toolchain from your git repository and compiled it. can it be the source of problem?

EDK is 11.2 SP2

thanks

> Date: Wed, 28 Oct 2009 17:30:12 +0100
> From: michal.simek@xxxxxxxxxxxxx
> To: microblaze-uclinux@xxxxxxxxxxxxxx
> Subject: Re: [microblaze-uclinux] Kernel boot problem ( Michael Simek Wiki )
>
> Hi,
>
> I think you mixed some things together.
>
> please run readelf -) simpleImage....
>
>
> you could see something like I can see. Phys addr is correspond with your DDR ram and virtual is
> 0xC... ....
>
> [monstr@monstr images]$ readelf -l image.elf
>
> Elf file type is EXEC (Executable file)
> Entry point 0x50000000
> There are 3 program headers, starting at offset 52
>
> Program Headers:
> Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
> LOAD 0x001000 0xc0000000 0x50000000 0x237af0 0x238000 RWE 0x1000
> LOAD 0x239000 0xc0238000 0x50238000 0x10160 0x10160 RW 0x1000
> LOAD 0x24a000 0xc024a000 0x5024a000 0x5d1e04 0x5e3518 RWE 0x1000
>
> If you can see it - XMD will understand what you want to do and load this kernel to your DDR.
> You can reread memory and check it of course.
>
> If you don't have there correct physical address then you have bad setting in kernel
> Look at kernel configuration - CONFIG_KERNEL_BASE_ADDR.
>
> Regards,
> Michal
>
>
>
> Mohammad Sadegh Sadri wrote:
> > Dear Jhon
> >
> > Thanks for your guidance, I understood that XMD can not understand
> > virtual addresses, however i could not find out how I should solve the
> > problem. you have wirtten that i should do a subtraction to reach to
> > physical address from virtual one.
> >
> > however my problem is that, XMD dow command simply can not load the
> > kernel. It generates errors, it can not understand what ix 0xc0000000
> > address. how should i solve this one? i mean how should i tell XMD that
> > 0xc0000000 is a virtual address?
> >
> > my problem for now is not the relationship between these two addresses,
> > but it is how to load the kernel into memory using XMD at all?
> >
> > Thanks
> >
> >
> >
> > ------------------------------------------------------------------------
> > Date: Tue, 27 Oct 2009 22:02:29 +1000
> > Subject: Re: [microblaze-uclinux] Kernel boot problem ( Michael Simek Wiki )
> > From: john.williams@xxxxxxxxxxxxx
> > To: microblaze-uclinux@xxxxxxxxxxxxxx
> >
> > Hi Mohammad,
> >
> > On Tue, Oct 27, 2009 at 9:38 PM, Mohammad Sadegh Sadri
> > <mamsadegh@xxxxxxxxxxx <mailto:mamsadegh@xxxxxxxxxxx>> wrote:
> >
> > Dear Michal ( and others )
> >
> > You were correct,
> > I added the following change into kernel configuration:
> > - Platform Options ---> Physical Address where Linux kernel is :
> > 0x44800000
> >
> > Again we have problem with XMD, when running dow command, it persist
> > on there is no 0xc0000000 address
> >
> >
> > XMD does not understand virtual addresses, only physical. You must
> > convert virtual addresses to physical when using XMD. A simple example
> >
> > PHYS_base 0x50000000
> > VIRT_base 0xc0000000
> >
> > To convert a virtual address to physical, for inspecting with XMD, you
> > must subtract (0xc0000000-0x50000000 = 0x70000000) from each virtual
> > address.
> >
> > It's too late for me to do anything other than trivial hex arithmetic in
> > my head so I didn't choose your physical address, but you get the idea!
> >
> >
> > I added the following changes into kernel configuration to solve the
> > problem:
> >
> > - In "Advanced Setup" I enabled "Prompt for advance kernel
> > configuration options"
> > - In "Advanced setup" I enable "Set custom kernel base address"
> > - I set the custom kernel address to 0x44800000
> >
> >
> > You cannot do this - this is the virtual address of the kernel, it must
> > not be the same as the physical address. You should not change this
> > from the default - 0xc0000000.
> >
> >
> >
> > Now, in XMD , dow can run successfully, and I can run the kernel,
> > here is the outcome:
> >
> > early_printk_console is enabled at 0x84000000
> > Ramdisk addr 0x00000003, Compiled-in FDT at 0x44a2d49c
> >
> > and kernel stops working completely!
> >
> >
> > Overlaid / overlapping physical and virtual address spaces is almost
> > certainly the cause.
> >
> > Regards,
> >
> > John
> > --
> > John Williams, PhD, B.Eng, B.IT <http://B.IT>
> > PetaLogix - Linux Solutions for a Reconfigurable World
> > w: www.petalogix.com <http://www.petalogix.com> p: +61-7-30090663 f:
> > +61-7-30090663
> >
> > ------------------------------------------------------------------------
> > Ready for a deal-of-a-lifetime? Find fantastic offers on Windows 7, in
> > one convenient place. <http://go.microsoft.com/?linkid=9691629>
>
> --
> Michal Simek, Ing. (M.Eng)
> PetaLogix - Linux Solutions for a Reconfigurable World
> w: www.petalogix.com p: +61-7-30090663,+42-0-721842854 f: +61-7-30090663
> ___________________________
> microblaze-uclinux mailing list
> microblaze-uclinux@xxxxxxxxxxxxxx
> Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
> Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/
>


Ready…Set…Get a great deal on Windows 7 See phenomenal deals on Windows 7 now

CDN College or University student? Get Windows 7 for only $39.99 before Jan 3! Buy it now!