mirror of
https://github.com/rust-embedded/rust-raspberrypi-OS-tutorials.git
synced 2024-11-03 15:40:21 +00:00
.. | ||
.vscode | ||
src | ||
Cargo.lock | ||
Cargo.toml | ||
kernel | ||
kernel8.img | ||
Makefile | ||
README.md |
Tutorial 02 - Runtime Init
tl;dr
We extend cpu.S
to call into Rust code for the first time. There,we zero the bss section before
execution is halted with a call to panic()
. Check out make qemu
again to see the additional code
run.
Notable additions
- More sections in linker script:
.rodata
,.data
.bss
_start()
:- Halt core if core !=
core0
. core0
jumps to theruntime_init()
Rust function.
- Halt core if core !=
runtime_init()
inruntime_init.rs
- Zeros the
.bss
section. - Calls
kernel_init()
, which callspanic!()
, which eventually haltscore0
as well.
- Zeros the