Software on RP2350
Our Principal Software Engineer Graham Sanderson explains all the new boot path functionality supported on our RP2350 chip. This section from Graham was part of an in-depth Raspberry Pi Pico 2 feature including expert insights from our engineering team. It first appeared in the bumper Pico 2 launch issue of The MagPi, which you can download to read.

“When you power up the chip, you have to run some software, but the program that the user installs, their firmware is stored in flash, so you have to run some code to be able to read flash before you can do anything else. That code is part of the boot ROM, named because it runs at boot, and it’s stored in ROM.”
“On RP2040, the boot path is fairly simple — there is a program in flash, you go look for it, and then you run it. The rest of the boot ROM space is taken up by things like floating point math support, a variety of other useful runtime APIs, and of course the UF2 bootloader that enables the user to drag and drop programs onto the Pico, mounted as a USB drive, and make them run.”
“The RP2350 boot path supports a bunch of new functionality, with support for RISC-V as well as Arm processors, and particularly completely new support for secure boot on Arm. This requires us to verify that the program stored in flash is trusted to run on RP2350, by verifying a cryptographic signature. Additionally, we have hardened the boot code with the goal of making it impossible to run any user code that is not correctly signed, even in the hands of an attacker.”

“The RP2350 boot ROM also supports dividing the flash into multiple partitions so that you can keep multiple copies of a binary, or keep shared data or resources separate from the main program. Our focus, as ever, has been to make things powerful yet simple; therefore you can set up secure boot and have two (A/B) partitions, but still just drag and drop a UF2 to update your software. Dropping the UF2 will automatically target the partition that isn’t currently in use, before switching at the next boot, thus avoiding situations where you have only half written the program. If your new program version is not correctly signed, the old version will continue to boot. Support for A/B partitions makes it much easier for user code to over-the-air update, for example, reading a new version of itself from a web server — but now it can write that new copy to an unused area of flash, rather than worrying about updating the part of flash it itself is running from!”
“Let’s not forget about the Raspberry Pi Pico SDK either. This has had a lot of enhancements, bug fixes, and new features, and of course, now supports both RP2040 and RP2350, as well as both Arm and RISC-V. Nonetheless, most people should only need to recompile their RP2040 program for RP2350 with minor, if any, changes. I can’t wait to see what people do with the new chip.”
Did you miss the results of the RP2350 Hacking Challenge? Read all about the winners, what they did, and why Eben Upton chose to achieve security through transparency.
The post Software on RP2350 appeared first on Raspberry Pi.
from News - Raspberry Pi https://ift.tt/NuhCF5v
Comments
Post a Comment