Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Pure rust chainboot #172

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

Closed
berkus opened this issue Oct 15, 2022 · 1 comment
Closed

Pure rust chainboot #172

berkus opened this issue Oct 15, 2022 · 1 comment

Comments

@berkus
Copy link
Member

berkus commented Oct 15, 2022

Was trying to find through which medium to contact @andre-richter, but hey, this is as good as any.

Some fun: pure Rust chain bootloader for Raspberry Pi

:)

@andre-richter
Copy link
Member

Nice! I actually went the exact different route and returned to doing basic init in assembly after reading rust-embedded/cortex-m-rt#300.

This decision was later reinforced when I realized that you cannot rely on the compiler to not reorder register manipulations done through cortex-a, aka tock-registers, with other operations. Unfortunately I don’t remember exactly where I observed it in a problematic situation, and more unfortunately, I never followed through documenting it.

Might have been a situation where I wanted to re-set the stack pointer, but function prologue operations always came in first. But naked functions might have helped, so I’m not sure if it was this example.

All in all, I personally feel more safe having bss and stack prepared in assembly, and thus having the basics of the abstract machine sound when we start with Rust.

In your code's comments I saw the reference to rust-embedded/cortex-m-rt#300 as well, but haven’t yet checked the other resources you mentioned regarding this discussion.

@rust-embedded rust-embedded locked and limited conversation to collaborators Oct 15, 2022
@andre-richter andre-richter converted this issue into discussion #173 Oct 15, 2022

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants