You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
* README.ES.md I added a spanish translation for the README.md file, and modified the README.md to add my github profile and to add the link to README.ES.md file * Slightly reorganize translation overview * README.ES.md These changes are in response to PR comments * Update README.ES.md * README.ES.md -> 00_before_we_start * Updating README.ES.md I corrected a few mistakes in both README.ES.md files. * README.ES.md for 00 These changes are in response to PR comments * README.ES.md -> 01_wait_forever * README.ES.md -> 02_runtime_init * README.md for 01 & 02 with corrections/improvements * Update 01_wait_forever/README.ES.md * Update 02_runtime_init/README.ES.md Co-authored-by: zanez <zanez@protonmail.com> Co-authored-by: Andre Richter <andre-richter@users.noreply.github.com> Co-authored-by: Diego Barrios Romero <eldruin@gmail.com> |
2 years ago | |
---|---|---|
.. | ||
.vscode | 3 years ago | |
src | 2 years ago | |
Cargo.lock | 3 years ago | |
Cargo.toml | 3 years ago | |
Makefile | 2 years ago | |
README.CN.md | 4 years ago | |
README.ES.md | 2 years ago | |
README.md | 3 years ago | |
build.rs | 3 years ago |
README.md
Tutorial 01 - Wait Forever
tl;dr
- The project skeleton is set up.
- A small piece of assembly code runs that just halts all CPU cores executing the kernel code.
Building
Makefile
targets:doc
: Generate documentation.qemu
: Run thekernel
in QEMUclippy
clean
readelf
: Inspect theELF
output.objdump
: Inspect the assembly.nm
: Inspect the symbols.
Code to look at
BSP
-specificlink.ld
linker script.- Load address at
0x8_0000
- Only
.text
section.
- Load address at
main.rs
: Important inner attributes:#![no_std]
,#![no_main]
boot.s
: Assembly_start()
function that executeswfe
(Wait For Event), halting all cores that are executing_start()
.- We (have to) define a
#[panic_handler]
function to make the compiler happy.- Make it
unimplemented!()
because it will be stripped out since it is not used.
- Make it
Test it
In the project folder, invoke QEMU and observe the CPU core spinning on wfe
:
$ make qemu
[...]
IN:
0x00080000: d503205f wfe
0x00080004: 17ffffff b #0x80000