Where does the SDK set VBAR?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Where does the SDK set VBAR?

986 次查看
shefft
Contributor IV

Hi, I'm wondering where the Platform SDK sets up the Secure VBAR and vector table so that an interrupt causes a jump to the correct handler.  I'm using a debugger to load the SDK .elf on top of uboot and finding that the old uboot value is still sitting in the VBAR.  Is that part of the code missing in the SDK?

标签 (2)
0 项奖励
回复
4 回复数

716 次查看
shefft
Contributor IV

The answer is that it doesn't, and the code IS missing.  You have to add that yourself.  So nice that this omission was documented somewhere.

0 项奖励
回复

716 次查看
alejandrolozan1
NXP Employee
NXP Employee

Hi Tyler,

Sorry for the delay. I have checked and I found that the vector table is copied to  address 0x0093FFB8.

You can get this address from the linker file.

.ram_vectors (ORIGIN(OCRAM) + LENGTH(OCRAM) - RAM_VECTORS_SIZE) (NOLOAD) :

    {

        __ram_vectors_start = .;

        . += RAM_VECTORS_SIZE;

        __ram_vectors_end = .;

    } > OCRAM

And if you see section 8.4.5 Exception Handling  in RM you can see that this address correponds to the address of the RAM exception table after and in the boot process. This would mean that the Boot ROM changes the VBAR and I assume that  maybe that is why the VBAR register never changes in the SDK.

I hope that helps,

Alejandro

716 次查看
shefft
Contributor IV

Thanks for the reply, I actually had a different question though - I was wondering about the location in the code, not the location in memory.  I was able to apply a fix.

0 项奖励
回复

716 次查看
alejandrolozan1
NXP Employee
NXP Employee

Hi Tyler,

As far as I understand you are using U-Boot to load the sdk right? If so, that is why the VBAR contains the last value of U-Boot.

If you see, you do not need U-Boot, you can create a SD bootable card with the SDK as boot image.

You can find this in the README.pdf file.

Best Regards,

Alejandro

0 项奖励
回复