23 Commits

Author SHA1 Message Date
TuxSH
680a768178 thermosphere: reduce usage of nonvolatile memory by around 4KB 2020-02-04 19:12:24 +00:00
TuxSH
e3961f225c thermosphere: introduce "ENSURE" 2020-02-04 19:12:23 +00:00
TuxSH
63f5255a3d thermosphere: wip gdb 2020-02-04 19:12:22 +00:00
TuxSH
2d32a812b7 thermosphere: implement reading and writing guest memory 2020-02-04 19:12:21 +00:00
TuxSH
7553580b64 thermosphere: major refactor of memory map
- use recursive stage 1 page table (thanks @fincs for this idea)
- NULL now unmapped
- no identity mapping
- image + GICv2 now mapped at the same address for every platform
- tempbss mapped just after "real" bss, can now steal unused mem from
the latter
- no hardcoded VAs for other MMIO devices
- tegra: remove timers, use the generic timer instead
2020-02-04 19:12:21 +00:00
TuxSH
1c707d9ded thermosphere: rewrite debug pause & fix single step state machine 2020-02-04 19:12:21 +00:00
TuxSH
114cdc5aa4 thermosphere: use barriers and caches *properly*. Cache code refactoring
- set/way cache ops create losses of coherency, do not broadcast and are only meant to be used on boot, period.

Cache ops by VA are **the only way** to do data cache maintenance.

Fix a bug where the L2 cache was evicted by each core. It shouldn't have.

- Cleaning dcache to PoU and invalidating icache to PoU, by VA is sufficient for self-modifying code

- Since we operate within a single cluster and don't do DMA, we almost always operate within the inner shareability domain

(commit untested on real hw)
2020-02-04 19:12:21 +00:00
TuxSH
26bda4f32d thermosphere: refactor tegra uart code, etc. 2020-02-04 19:12:21 +00:00
TuxSH
edb942a032 thermosphere: add proper memory/instruction barriers for breakpoint stuff 2020-02-04 19:12:20 +00:00
TuxSH
0dd5f1f6d4 thermosphere: add hypervisor timer code 2020-02-04 19:12:20 +00:00
TuxSH
2f999497df thermosphere: rewrite sysreg trapping code, add skeleton code for timer val trap handling; support A32 EL1 once again 2020-02-04 19:12:20 +00:00
TuxSH
d560330a9d thermosphere: make the pending virq list ordering stable 2020-02-04 19:12:20 +00:00
TuxSH
b0d258209c thermosphere: add CFI where needed, add PANIC macro, etc. 2020-02-04 19:12:20 +00:00
TuxSH
6cef320bc1 thermosphere: fix multiple bugs 2020-02-04 19:12:19 +00:00
TuxSH
e7b351ddb8 thermosphere: vgic code draft 2020-02-04 19:12:19 +00:00
TuxSH
e71974085e thermosphere: sw breakpoint code, etc. 2020-02-04 19:12:19 +00:00
TuxSH
0435b73f63 thermosphere: refactor crt0 + watchpoint init 2020-02-04 19:12:19 +00:00
TuxSH
7f9c80abec thermosphere: impl stage2 translation 2020-02-04 19:12:19 +00:00
TuxSH
7f094044b2 thermosphere: add semihosting support & load a kernel using it when needed
basically host i/o
2020-02-04 19:12:19 +00:00
TuxSH
532907c9e7 thermosphere: add more sysreg stuff & start writing trap stuff 2020-02-04 19:12:18 +00:00
TuxSH
11c1d926e2 thermosphere: add hypercall support... even if unused 2020-02-04 19:12:18 +00:00
TuxSH
1d225ed5f8 thermosphere: attempt to output to uart-c 2020-02-04 19:12:18 +00:00
TuxSH
5bc923ea00 thermosphere: "write" placeholder code 2020-02-04 19:12:18 +00:00