Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4151

General • Problem with call rom function on pico2 rp2350

$
0
0
I program in arm assembly on the pico2 and I want to end a program with a reset to restart the pico in usb bootrom mode.
The rom api documentation indicates that you have to use the R B codes with the parameter:
0x0002: REBOOT_TYPE_BOOTSEL - reboot into BOOTSEL mode

After coding the codes I load the value contained in Pointer to ROM entry table (0x14)
and the value of the Pointer to a helper function (0x18) which I use to call the function.
But the return of this call is always 0 which causes an error when calling the termination function.
In the documentation it is indicated that
The function is available to Non-secure Arm code. The function in this case performs additional permission and
argument checks to prevent Secure data from leaking or being corrupted.
Each individual Arm-NS API function must be explicitly enabled by Secure code before use, via set_ns_api_permission().
disabled Non-secure API returns BOOTROM_ERROR_NOT_PERMITTED if disabled by Secure code. All Non-secure APIs are
disabled initially. There is no permission control on Non-secure code calling Secure-only Arm-S functions, but such a call
will crash when it attempts to access Secure-only hardware.
The Arm-NS functions may escalate through a Secure Gateway (SG) instruction to allow Non-secure code to perform
limited operations on nominally Secure-only hardware, such as QSPI direct-mode interface used for flash programming.


I tried to call the authorization rom function with the S and P codes but it did not work, the return code is always 0.
Does anyone have an idea to solve this problem?

Note on the RP2040 my function works without problem.
Thanck.

Statistics: Posted by VincentARM — Thu Jan 02, 2025 8:56 pm



Viewing all articles
Browse latest Browse all 4151

Trending Articles