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

[ROM] functionalities in asm code #25918

Open
baskaranindia opened this issue Jan 17, 2025 · 1 comment
Open

[ROM] functionalities in asm code #25918

baskaranindia opened this issue Jan 17, 2025 · 1 comment

Comments

@baskaranindia
Copy link

Description

The rom_start.S asm file implements lot of functionalities (interrupt, reset, RMA, Power, watchdog, clock, memory init) in asm code. is there specific reasons for implementing them in asm ?

Can they be moved to C code ?

@jwnrt
Copy link
Contributor

jwnrt commented Jan 21, 2025

  1. I think a lot of those (interrupts, resets, watchdog, etc.) just need to be initialised very early before we’ve had time to prepare an environment for C.

  2. I believe we want the RMA loop to come before most other initialisation so that any fault in hardware won’t prevent us from RMAing a chip. Contrast with the bootstrap loop later on in C.

  3. Memory initialisation is needed to support the C environment.

Do you have a particular concern about this ASM? It's not clear to me personally that much of what's in there would be safer / easier to review in C.

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

No branches or pull requests

2 participants