关于P2020长地址跳转问题

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

关于P2020长地址跳转问题

3,034 Views
liyj
Contributor II

你好!

      我在codewarrior下,通过L2 SRAM运行一级boot跳转到0x7fe00500的二级boot地址,无法跳转,调试发现在汇编指令生成的指令是调用bctrl进行的,跳转地址0x7fe00500的值已写到cout寄存器,但PC指针为0;地址空间0x0000_0000 --0x3fff_ffff和0x4000_0000 - 0x7fff_ffff的TLB属性是一致无法跳转,将SX等属性全部打开也不行;但是跳转到0x1fe00500地址是可以的。使用仿真器调试时时可以的,自动运行无法跳转。

Labels (1)
0 Kudos
11 Replies

2,783 Views
ufedor
NXP Employee
NXP Employee

> 2.SDK version:

> - CodeWarrior for Power Architecture
> Version: 10.5.1
> Build Id:160128

SDK means Linux Software Development Kit - not CodeWarrior IDE.

Provided pictures have bad resolution - almost unreadable.

0 Kudos

2,782 Views
liyj
Contributor II

1.bmp2.bmp3.bmp

0 Kudos

2,782 Views
ufedor
NXP Employee
NXP Employee

SDK means Linux Software Development Kit.

Which NXP Linux SDK is used?

0 Kudos

2,783 Views
liyj
Contributor II

I  just use codewarrior 10.5.1 build a bare code,and jump to vxworks bootrom.

0 Kudos

2,783 Views
ufedor
NXP Employee
NXP Employee

Using Community we could provide support only for NXP software products.

Please consider using Professional Services for development and debug a custom software:

Design Services | NXP 

0 Kudos

2,783 Views
ufedor
NXP Employee
NXP Employee

Please provide the problem description in English.

0 Kudos

2,783 Views
liyj
Contributor II

Hi!

    I have count a problem when i run the first-level boot jump to the second-level boot address of 0x7fe00500, and cannot jump. Debugging finds that the instruction generated in assembly instruction is called BCTRL, and the value of jump address 0x7fe00500 has been written to the count register, but the PC pointer is 0.Address space 0x0000_0000 --0x3fff_ffff and 0x4000_0000-0x7fff_ffff TLB attribute is the same cannot jump, SX and other attributes all open is not ok;But it's ok to jump to 0x1fe00500 or 0x3fe00500.Using the simulator debugging can be, automatic running can not jump.

      The address 0x7fe00500 is avilable for access,and can pritf the jump instruction.

      TLB value :

   0xa0007fc0fc0800000000000000000001  for 0x0000_0000 --0x3fff_ffff 

   0xa0007fc0fc0800004000000040000001 for 0x4000_0000-0x7fff_ffff 

0 Kudos

2,783 Views
ufedor
NXP Employee
NXP Employee

What are LAWs settings for the SDRAM?

What are DDR controller settings?

Which NXP SDK is used?

0 Kudos

2,783 Views
liyj
Contributor II

LAW for DDR  attibute val:  0x80f0001e

DDR BOUNDS val: 0x0000007f

NXP SDK : P2020DS for sram

0 Kudos

2,783 Views
ufedor
NXP Employee
NXP Employee

Is SDRAM accessible in the range 0x4000_0000-0x7fff_ffff ?

You wrote:

> NXP SDK : P2020DS for sram

What is the exact SDK revision?

> assembly instruction is called BCTRL, and the value of jump address

> 0x7fe00500 has been written to the count register,

Please provide the assembler code excerpt and dump of the processor's registers when breakpoint is set on the branch instruction.

What happens after single step through the BCTRL? + one more dump of the processor's registers.

0 Kudos

2,783 Views
liyj
Contributor II

1.SDRAM is accessible in the range 0x4000_0000-0x7fff_ffff ;

2.SDK version:

- CodeWarrior for Power Architecture
Version: 10.5.1
Build Id:160128

3.The jump address is 0x7fe00500,and before jump i can printf the vaule of 0x7fe00500;

4.

C code:

#define BOOT_BASE_ADDR 0x7fe00000

entry bootentry = (entry)(BOOT_BASE_ADDR+0x500);

printf("goto 0x%x 0x%x...\n\r",bootentry,*(UINT32*)bootentry);
/* gotoBootrom();*/
bootentry();

Autorun printf:

bootrom copy down...
goto 0x7fe00500 0x480ff301...

The assembly instrucion :

   E:\Freescale\CW_PA_v10.5.1\workspace\2020_sram-core00\Sources\/main_SRAM.c:429
   4168: 7f ec fb 78 mr r12,r31
   416c: 7d 89 03 a6 mtctr r12
   4170: 4e 80 04 21 bctrl

 The exact register vaule is follow:LongjumpError_generalReg.pngcore_reg.pngcore_reg_2.png

0 Kudos