Skip to content

Conversation

@bjoernQ
Copy link
Contributor

@bjoernQ bjoernQ commented Sep 27, 2023

Some Xtensa targets used Reset as entry but they must use ESP32Reset in order to set the SP.
Without setting SP, stack-allocations might overwrite memory which is reserved for the ROM functions on ESP32

Seems like direct-boot on ESP32-S3 is broken - but it was broken before: at least I'm unable to flash and run hello_world using direct-boot (it flashes 4MB to the chip and the app won't come up)

Copy link
Member

@MabezDev MabezDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really nice find!!! This can't have been easy to spot :D. The changes look good to me! If S3 direct boot is already broken then we can sort that in another PR.

This is already handled for the RISCV chips because it's done in assembly before we even get to Rust here.

@bjoernQ bjoernQ merged commit 94cd593 into main Sep 27, 2023
@bjoernQ bjoernQ deleted the fix/use-correct-xtensa-entry branch September 27, 2023 14:13
@bjoernQ
Copy link
Contributor Author

bjoernQ commented Sep 27, 2023

Will create an issue for S3-direct-boot. Thanks for the quick review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants