cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
hcuongvn
Observer
Observer
3,112 Views
Registered: ‎12-21-2011

Misunderstanding KERNEL_START vs KERNEL_BASE_ADDR

Hello!

I'm trying to config linux kernel to port to my system (Virtex2P, Microblaze). And I so confused about KERNEL_START and KERNEL_BASE_ADDR. I misunderstand that 2 options! I hope, I could get some experiences from you!

 

I read on wiki: http://wiki.xilinx.com/microblaze-linux :

The  tested hardware and reference systems: ML507 (also SP605) had the DDR2 base address  is: 0x50000000.

DDR2_SDRAM: memory@50000000 {
	device_type = "memory";
	reg = < 0x50000000 0x10000000 >;
} ;

and I saw in the ml505_defconfig had CONFIG_KERNEL_BASE_ADDR=0x50000000. I think, when the kernel's downloaded to DDR2 memory will locate at address 0x50000000. But when I dumped the elf executable file:

 

kernelimage:     file format elf32-microblaze

Disassembly of section .text:

c0000000 <.text>:
c0000000:	94208001 	mfs	r1, rmsr
c0000004:	a421fffd 	andi	r1, r1, -3
c0000008:	9401c001 	mts	rmsr, r1
c000000c:	24000001 	rsubi	r0, r0, 1
c0000010:	94110004 	msrclr	r0, 4
c0000014:	31000000 	addik	r8, r0, 0
c0000018:	bc070040 	beqi	r7, 64		// c0000058
c000001c:	c9603800 	lw	r11, r0, r7
c0000020:	b000d00d 	imm	-12275
c0000024:	256bfeed 	rsubi	r11, r11, -275
c0000028:	bc0b000c 	beqi	r11, 12		// c0000034
c000002c:	80e00000 	or	r7, r0, r0
c0000030:	bc2b0028 	bnei	r11, 40		// c0000058
c0000034:	81600000 	or	r11, r0, r0
c0000038:	b0005029 	imm	20521
c000003c:	a080a204 	ori	r4, r0, -24060

 What does 0xC0000000 address value mean?

If the elf file begin at this address (0xC0000000), how can you download to your system using XMD commands??

xmd> connect mb mdm
xmd> dow arch/microblaze/boot/simpleImage.ml507_mb_v1
xmd> run

I tried to find 0xC0000000 value in config file. And It was defined at:

CONFIG_HIGHMEM_START=0xfe000000
CONFIG_LOWMEM_SIZE=0x30000000
CONFIG_KERNEL_START=0xc0000000
CONFIG_TASK_SIZE=0x80000000

 So, Would you like to explain a little about 2 options CONFIG_KERNEL_START and CONFIG_KERNEL_BASE_ADDR?

 

0 Kudos
1 Reply
linnj
Xilinx Employee
Xilinx Employee
3,088 Views
Registered: ‎09-10-2008

There are typically some images that are virtual address based (vmlinux) and some that are physical based that also include the decompressor for compressed images. The simpleImage should be physical address based so that it can be loaded into memory from XMD.

Thanks.
0 Kudos