Where does the SDK set VBAR?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Where does the SDK set VBAR?

953件の閲覧回数
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 返答(返信)

683件の閲覧回数
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 件の賞賛
返信

683件の閲覧回数
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

683件の閲覧回数
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 件の賞賛
返信

683件の閲覧回数
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 件の賞賛
返信