Skip to content

arch/[risc-v|xtensa]/src/common: Create SoC-specific initialization routine#18461

Open
tmedicci wants to merge 2 commits intoapache:masterfrom
tmedicci:feature/soc_specific_init
Open

arch/[risc-v|xtensa]/src/common: Create SoC-specific initialization routine#18461
tmedicci wants to merge 2 commits intoapache:masterfrom
tmedicci:feature/soc_specific_init

Conversation

@tmedicci
Copy link
Contributor

Summary

  • arch/[risc-v|xtensa]/src/common: Create SoC-specific initialization routine

Adds a function that can be implemented by any vendor to allow SoC-specific functions to be called by up_initialize. Please note that up_initialize is provided by the arch level, but it doesn't allow SoC-specific initialization. Although it could be possible to run such initialization on board-level, semantically
it isn't related to the board, but with the SoC. As an example of such implementation, some SoCs require RTC subsystem initialization to occur before the OS is completely initialized.

Impact

Impact on user: No.

Impact on build: No.

Impact on hardware: Yes. It allows performing SoC-specific initialization that is not board-dependent.

Impact on documentation: No.

Impact on security: No.

Impact on compatibility: No.

Testing

There is no specific testing for it at this moment. There is no implementation of it yet. This PR is part of a bigger refactor on Espressif devices to simplify its boot-up process and remove code from board-level, making it easier to support new SoCs.

For this moment, ostest on affected architectures may ensure that there is no compatibility issue. Taking ESP32-C6 as an example:

Building

make -j distclean && ./tools/configure.sh -S esp32c6-devkitc:ostest && make flash ESPTOOL_PORT=/dev/ttyUSB0 ESPTOOL_BINDIR=./ -s -j$(nproc) && picocom -b 115200 /dev/ttyUSB0

Running

Run ostest as usual.

Results

nsh> ostest
.
.
.
ostest_main: Exiting with status 0

This commits adds a function that can be implemented by any vendor
to allow SoC-specific functions to be called by `up_initialize`.
Please note that `up_initialize` is provided by the arch level, but
it doesn't allow SoC-specific initialization. Although it could be
possible to run such initialization on board-level, semantically
it isn't related to the board, but with the SoC. As an example of
such implementation, some SoCs require RTC subsystem initialization
to occur before the OS is completely initialized.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
This commits adds a function that can be implemented by any vendor
to allow SoC-specific functions to be called by `up_initialize`.
Please note that `up_initialize` is provided by the arch level, but
it doesn't allow SoC-specific initialization. Although it could be
possible to run such initialization on board-level, semantically
it isn't related to the board, but with the SoC. As an example of
such implementation, some SoCs require RTC subsystem initialization
to occur before the OS is completely initialized.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
@github-actions github-actions bot added Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Arch: xtensa Issues related to the Xtensa architecture Size: S The size of the change in this PR is small labels Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: risc-v Issues related to the RISC-V (32-bit or 64-bit) architecture Arch: xtensa Issues related to the Xtensa architecture Size: S The size of the change in this PR is small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant