Skip to content

Commit f6832be

Browse files
committed
Add ToC
1 parent 823c1d3 commit f6832be

File tree

10 files changed

+77
-14
lines changed

10 files changed

+77
-14
lines changed

01_wait_forever/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ Project skeleton is set up; Code just halts all CPU cores executing the kernel c
3131

3232
[inner attributes]: https://doc.rust-lang.org/reference/attributes.html
3333

34-
### Give it a try
34+
### Test it
3535

3636
In the project folder, invoke QEMU and observe the CPU core spinning on `wfe`:
3737
```console
3838
make qemu
3939
[...]
40-
IN:
41-
0x00080000: d503205f wfe
40+
IN:
41+
0x00080000: d503205f wfe
4242
0x00080004: 17ffffff b #0x80000
4343
```

02_runtime_init/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## tl;dr
44

5-
We are calling into Rust code for the first time and zero the [bss](https://en.wikipedia.org/wiki/.bss) section.
5+
We are calling into Rust code for the first time and zero the [bss] section.
66
Check out `make qemu` again to see the additional code run.
77

88
- More sections in linker script:
@@ -16,6 +16,8 @@ Check out `make qemu` again to see the additional code run.
1616
- Calls `kernel_init()`, which calls `panic!()`, which eventually halts
1717
`core0` as well.
1818

19+
[bss]: https://en.wikipedia.org/wiki/.bss
20+
1921
## Diff to previous
2022
```diff
2123

03_hacky_hello_world/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@ Using the real hardware `UART` is enabled step-by-step in following tutorials.
1212
- Panic handler `print!()`s supplied error messages.
1313
- This is showcased in `main()`.
1414

15-
### Give it a try
15+
### Test it
1616

17-
QEMU is no longer run in assembly mode. It will from now on show the output of `UART0`.
17+
QEMU is no longer running in assembly mode. It will from now on show the output
18+
of the `console`.
1819

1920
```console
2021
make qemu

05_safe_globals/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ you can check out implemntations in the [spin crate] or the [parking lot crate].
3939
[spin crate]: https://github.com/mvdnes/spin-rs
4040
[parking lot crate]: https://github.com/Amanieu/parking_lot
4141

42-
### Give it a try
42+
### Test it
4343

4444
```console
4545
make qemu

07_uart_chainloader/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ You can try it with this tutorial already:
2525
make chainboot
2626
[...]
2727
### Listening on /dev/ttyUSB0
28-
__ __ _ _ _ _
28+
__ __ _ _ _ _
2929
| \/ (_)_ _ (_) | ___ __ _ __| |
3030
| |\/| | | ' \| | |__/ _ \/ _` / _` |
3131
|_| |_|_|_||_|_|____\___/\__,_\__,_|
@@ -49,7 +49,7 @@ In this tutorial, a version of the kernel from the previous tutorial is loaded
4949
for demo purposes. In subsequent tuts, it will be the working directory's
5050
kernel.
5151

52-
### Observing the jump
52+
## Test it
5353

5454
The `Makefile` in this tutorial has an additional target, `qemuasm`, that lets
5555
you nicely observe the jump from the loaded address (`0x80_XXX`) to the

08_timestamps/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
We add abstractions for the architectural timer, implement it for `aarch64` and
66
use it to annotate prints with timestamps; A `warn!()` macro is added.
77

8+
## Test it
9+
810
Check it out via chainboot (added in previous tutorial):
911
```console
1012
make chainboot

09_hw_debug_JTAG/README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ In the exact order as listed:
1010
4. In new terminal, `make openocd` and keep terminal open.
1111
5. In new terminal, `make gdb` or make `make gdb-opt0`.
1212

13+
![JTAG live demo](../doc/jtag_demo.gif)
14+
15+
## Table of Contents
16+
17+
- [Introduction](#introduction)
18+
- [Outline](#outline)
19+
- [Software Setup](#software-setup)
20+
- [Hardware Setup](#hardware-setup)
21+
* [Wiring](#wiring)
22+
- [Getting ready to connect](#getting-ready-to-connect)
23+
- [OpenOCD](#openocd)
24+
- [GDB](#gdb)
25+
* [Remarks](#remarks)
26+
+ [Optimization](#optimization)
27+
+ [GDB control](#gdb-control)
28+
- [Notes on USB connection constraints](#notes-on-usb-connection-constraints)
29+
- [Additional resources](#additional-resources)
30+
- [Acknowledgments](#acknowledgments)
31+
- [Diff to previous](#diff-to-previous)
32+
1333
## Introduction
1434

1535
In the upcoming tutorials, we are going to touch sensitive areas of the RPi's SoC that can make our
@@ -24,8 +44,6 @@ simulate down to the very last bit.
2444
So lets introduce `JTAG` debugging. Once set up, it will allow us to single-step through our kernel
2545
on the real HW. How cool is that?!
2646

27-
![JTAG live demo](../doc/jtag_demo.gif)
28-
2947
## Outline
3048

3149
From kernel perspective, this tutorial is the same as the previous one. We are just wrapping

10_privilege_level/README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,19 @@
22

33
## tl;dr
44

5-
In early boot code, we transition from the `Hypervisor` privilege level (`EL2` in AArch64) to the
6-
`Kernel` (`EL1`) privilege level.
5+
In early boot code, we transition from the `Hypervisor` privilege level (`EL2`
6+
in AArch64) to the `Kernel` (`EL1`) privilege level.
7+
8+
## Table of Contents
9+
10+
- [Introduction](#introduction)
11+
- [Scope of this tutorial](#scope-of-this-tutorial)
12+
- [Checking for EL2 in the entrypoint](#checking-for-el2-in-the-entrypoint)
13+
- [Transition preparation](#transition-preparation)
14+
- [Returning from an exception that never happened](#returning-from-an-exception-that-never-happened)
15+
- [Are we stackless?](#are-we-stackless)
16+
- [Test it](#test-it)
17+
- [Diff to previous](#diff-to-previous)
718

819
## Introduction
920

@@ -172,7 +183,7 @@ Disassembly of section .text:
172183
Looks good! Thanks zero-overhead abstractions in the
173184
[cortex-a](https://github.com/rust-embedded/cortex-a) crate! :heart_eyes:
174185

175-
## Testing
186+
## Test it
176187

177188
In `main.rs`, we additionally inspect if the mask bits in `SPSR_EL2` made it to `EL1` as well:
178189

11_virtual_memory/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,20 @@
55
The `MMU` is turned on; A simple scheme is used: static `64 KiB` page tables; For educational
66
purposes, we write to a remapped `UART`.
77

8+
## Table of Contents
9+
10+
- [Introduction](#introduction)
11+
- [MMU and paging theory](#mmu-and-paging-theory)
12+
- [Approach](#approach)
13+
* [BSP: `bsp/rpi/virt_mem_layout.rs`](#bsp-bsprpivirt_mem_layoutrs)
14+
* [Arch: `arch/aarch64/mmu.rs`](#arch-archaarch64mmurs)
15+
* [`link.ld`](#linkld)
16+
- [Address translation examples](#address-translation-examples)
17+
* [Address translation using a 64 KiB page descriptor](#address-translation-using-a-64-kib-page-descriptor)
18+
- [Zero-cost abstraction](#zero-cost-abstraction)
19+
- [Test it](#test-it)
20+
- [Diff to previous](#diff-to-previous)
21+
822
## Introduction
923

1024
Virtual memory is an immensely complex, but important and powerful topic. In this tutorial, we start

12_cpu_exceptions_part1/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@ development and runtime.
99
For demo purposes, MMU `page faults` are used to demonstrate (i) returning from an exception and
1010
(ii) the default `panic!` behavior.
1111

12+
## Table of Contents
13+
14+
- [Introduction](#introduction)
15+
- [Exception Types](#exception-types)
16+
- [Exception entry](#exception-entry)
17+
* [Exception Vectors](#exception-vectors)
18+
- [Handler Code and Offsets](#handler-code-and-offsets)
19+
- [Rust and Assembly Implementation](#rust-and-assembly-implementation)
20+
* [Context Save and Restore](#context-save-and-restore)
21+
* [Exception Vector Table](#exception-vector-table)
22+
* [Implementing handlers](#implementing-handlers)
23+
- [Causing an Exception - Testing the Code](#causing-an-exception---testing-the-code)
24+
- [Test it](#test-it)
25+
- [Diff to previous](#diff-to-previous)
26+
1227
## Introduction
1328

1429
Now that we are executing in `EL1`, and have activated the `MMU`, time is due for implementing `CPU

0 commit comments

Comments
 (0)