Linux Kernel bring-up on P4040 Processor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linux Kernel bring-up on P4040 Processor

473 Views
rupamsarma
Contributor I

Hi,

We are trying to load Linux on P4040 processor with 8GB DRAM (no SRAM).

From U-boot, we pass fdt and cmdline info; initrd is yet to create (initrd_start = initrd_end = 0)

But Kernel exception (DataTLBError) happens on following function

of_scan_flat_dt <-early_init_devtree <- machine_init <- _start

Deassembly of of_scan_flat_dt is as follow and exception coming from 0xc0a62090 while trying to access memory content in 0x70e24000 (should be virtual address of device tree)

From U-boot, we pass device tree structure at 0x00e24000 physical address which is within first 64MB of RAM.

But don't know why Kernel is translating 0x00e24000 to 0x70e24000 and hitting exception?

As Kernel code comment, it creates TLB for first 64MB memory, then it shouldn't be a problem to access FDT.

Is there anything wrong with address translation?

2212434 c0a62070 <of_scan_flat_dt>:

2212435 c0a62070:   94 21 ff d0     stwu    r1,-48(r1)

2212436 c0a62074:   7c 08 02 a6     mflr    r0

2212437 c0a62078:   bf 21 00 14     stmw    r25,20(r1)

2212438 c0a6207c:   90 01 00 34     stw     r0,52(r1)

2212439 c0a62080:   3f 20 c0 b1     lis     r25,-16207

2212440 c0a62084:   81 39 85 04     lwz     r9,-31484(r25)

2212441 c0a62088:   7c 7a 1b 78     mr      r26,r3

2212442 c0a6208c:   7c 9b 23 78     mr      r27,r4

2212443 c0a62090:   83 e9 00 08     lwz     r31,8(r9)

2212444 c0a62094:   3b a0 ff ff     li      r29,-1

2212445 c0a62098:   7f e9 fa 14     add     r31,r9,r31

2212446 c0a6209c:   80 9f 00 00     lwz     r4,0(r31)

2212447 c0a620a0:   3b df 00 04     addi    r30,r31,4

2212448 c0a620a4:   2b 84 00 02     cmplwi  cr7,r4,2

2212449 c0a620a8:   40 be 00 10     bne     cr7,c0a620b8 <of_scan_flat_dt+0x48>,

Any pointer on this is appreciated.

Regards,

Rupam

Labels (1)
Tags (2)
0 Kudos
1 Reply

353 Views
Pavel
NXP Employee
NXP Employee

Freescale Linux uses u-boot for SDRAM setting.

Look at the u-boot readme file using the following page: http://git.denx.de/?p=u-boot.git;a=blob_plain;f=README;hb=HEAD

Find the Section “Configuration Options:” in this file.

This Section contains the following:

Configuration depends on the combination of board and CPU type; all

such information is kept in a configuration file

"include/configs/<board_name>.h".

If Freescale SDK 1.7 is used the following path for u-boot source can be used:

QorIQ-SDK-V1.7-20141218-yocto/build_p4080ds_release/tmp/work/p4080ds-fsl-linux/u-boot-qoriq/2014.07+fslgit-r0/git

See the following page for u-boot source code installation: http://www.freescale.com/infocenter/index.jsp?topic=%2FQORIQSDK%2F3069724.html.

Change u-boot setting for your SDRAM memory.

0 Kudos