[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
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/