mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-23 02:05:57 +01:00
baremetal bibliography
This commit is contained in:
39
README.adoc
39
README.adoc
@@ -8004,7 +8004,7 @@ Breakdown:
|
||||
** `D` stands for data, and represents the value that was written to memory or to a register
|
||||
** `A` stands for address, and represents the address to which the value was written. It only shows when data is being written to memory, but not to registers.
|
||||
|
||||
The best way to verify all of this is to write some bare metal code: https://stackoverflow.com/questions/43682311/uart-communication-in-gem5-with-arm-bare-metal
|
||||
The best way to verify all of this is to write some <<baremetal,baremetal code>>
|
||||
|
||||
Trace the source lines just like <<trace-source-lines,for QEMU>> with:
|
||||
|
||||
@@ -9703,6 +9703,8 @@ For QEMU and Buildroot, we have the following convenient setups respectively:
|
||||
|
||||
== Baremetal
|
||||
|
||||
Getting started at: <<baremetal-setup>>
|
||||
|
||||
=== Baremetal GDB step debug
|
||||
|
||||
GDB step debug works on baremetal exactly as it does on the Linux kernel, except that is is even cooler here since we can easily control and understand every single instruction that is being run!
|
||||
@@ -9962,7 +9964,7 @@ class RealViewPBX(RealView):
|
||||
uart = Pl011(pio_addr=0x10009000, int_num=44)
|
||||
....
|
||||
|
||||
==== aarch64 NEON setup
|
||||
==== aarch64 baremetal NEON setup
|
||||
|
||||
Inside link:baremetal/lib/aarch64.S[] there is a chunk of code called "NEON setup".
|
||||
|
||||
@@ -10027,6 +10029,39 @@ We then found out that QEMU starts in EL1, and so we kept just the EL1 part, and
|
||||
* https://stackoverflow.com/questions/42824706/qemu-system-aarch64-entering-el1-when-emulating-a53-power-up
|
||||
* https://stackoverflow.com/questions/37299524/neon-support-in-armv8-system-mode-qemu
|
||||
|
||||
=== Baremetal bibliography
|
||||
|
||||
https://stackoverflow.com/questions/43682311/uart-communication-in-gem5-with-arm-bare-metal
|
||||
|
||||
https://github.com/tukl-msd/gem5.bare-metal contains an alternative working baremetal setup. Our setup has more features at the time of writing however. Usage:
|
||||
|
||||
....
|
||||
# Build gem5.
|
||||
git clone https://gem5.googlesource.com/public/gem5
|
||||
cd gem5
|
||||
git checkout 60600f09c25255b3c8f72da7fb49100e2682093a
|
||||
scons --ignore-style -j`nproc` build/ARM/gem5.opt
|
||||
cd ..
|
||||
|
||||
# Build example.
|
||||
sudo apt-get install gcc-arm-none-eabi
|
||||
git clone https://github.com/tukl-msd/gem5.bare-metal
|
||||
cd gem5.bare-metal
|
||||
git checkout 6ad1069d4299b775b5491e9252739166bfac9bfe
|
||||
cd Simple
|
||||
make CROSS_COMPILE_DIR=/usr/bin
|
||||
|
||||
# Run example.
|
||||
../../gem5/default/build/ARM/gem5.opt' \
|
||||
../../gem5/configs/example/fs.py' \
|
||||
--bare-metal \
|
||||
--disk-image="$(pwd)/../common/fake.iso" \
|
||||
--kernel="$(pwd)/main.elf" \
|
||||
--machine-type=RealView_PBX \
|
||||
--mem-size=256MB \
|
||||
;
|
||||
....
|
||||
|
||||
== Benchmark this repo
|
||||
|
||||
In this section document how benchmark builds and runs of this repo, and how to investigate what the bottleneck is.
|
||||
|
||||
Reference in New Issue
Block a user