Skip to content

Pure rust chainboot #172

Description

@berkus

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

:)

Activity

  1. andre-richter commented on Oct 15, 2022

    @andre-richter
    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.

  2. locked and limited conversation to collaborators on Oct 15, 2022
  3. converted this issue into a discussion #173 on Oct 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions