Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nickez/dont boot to ff #1332

Merged
merged 2 commits into from
Dec 3, 2024
Merged

Conversation

NickeZ
Copy link
Collaborator

@NickeZ NickeZ commented Dec 2, 2024

You can test with "Erase firmware" option in send message helper.

py/send_message.py
3

@NickeZ NickeZ requested a review from benma December 2, 2024 12:34
@NickeZ NickeZ force-pushed the nickez/dont-boot-to-ff branch from 1be239a to de1cc9f Compare December 2, 2024 12:37
Copy link
Collaborator

@benma benma left a comment

Choose a reason for hiding this comment

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

utACK

src/bootloader/bootloader.c Outdated Show resolved Hide resolved
If no firmware is flashed, then flash contains all 1's. The firmware's
reset handler (stored in the exception table) would then be 0xffffffff.
Jumping that address is very bad because that is the same as setting the
cpu in LOCKUP state.

* The common way to get to the LOCKUP state is with a double fault
  (fault in a fault handler), so this natuarally makes you go debug the
  wrong things.
* The debugger cannot access the CPU when it is in LOCKUP state.
@NickeZ NickeZ force-pushed the nickez/dont-boot-to-ff branch from de1cc9f to b163c7e Compare December 3, 2024 13:55
@NickeZ NickeZ merged commit 886e2fd into BitBoxSwiss:master Dec 3, 2024
3 checks passed
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.

2 participants