summaryrefslogtreecommitdiff
path: root/os/notes.txt
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-05-13 12:21:59 +0200
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-05-13 12:21:59 +0200
commit9160f2912eb57910e45b681b7b5eef9acb6a922e (patch)
tree2ec20d782cd5a05a2bebe2f6756456f1d4caa4d9 /os/notes.txt
parentf95a85de0082010e4af83e26e99299d601bb48d6 (diff)
OS Hello worldHEADmain
Diffstat (limited to 'os/notes.txt')
-rw-r--r--os/notes.txt32
1 files changed, 32 insertions, 0 deletions
diff --git a/os/notes.txt b/os/notes.txt
new file mode 100644
index 0000000..ccd55a3
--- /dev/null
+++ b/os/notes.txt
@@ -0,0 +1,32 @@
+qemu-system-riscv32 -machine virt -cpu rv32 -smp 1 -m 128M -nographic -serial mon:stdio -bios none -kernel kernel.elf
+
+qemu-system-riscv32 -machine virt -cpu rv32 -smp 1 -m 128M -bios none -kernel kernel.elf
+
+cmd /c exit
+
+clang --target=riscv32 -march=rv32im -nostdlib boot.S -c -o boot.o
+
+ld.lld -T linker.ld boot.o -o kernel.elf
+
+static const MemMapEntry virt_memmap[] = {
+ [VIRT_DEBUG] = { 0x0, 0x100 },
+ [VIRT_MROM] = { 0x1000, 0xf000 },
+ [VIRT_TEST] = { 0x100000, 0x1000 },
+ [VIRT_RTC] = { 0x101000, 0x1000 },
+ [VIRT_CLINT] = { 0x2000000, 0x10000 },
+ [VIRT_ACLINT_SSWI] = { 0x2F00000, 0x4000 },
+ [VIRT_PCIE_PIO] = { 0x3000000, 0x10000 },
+ [VIRT_PLATFORM_BUS] = { 0x4000000, 0x2000000 },
+ [VIRT_PLIC] = { 0xc000000, VIRT_PLIC_SIZE(VIRT_CPUS_MAX * 2) },
+ [VIRT_APLIC_M] = { 0xc000000, APLIC_SIZE(VIRT_CPUS_MAX) },
+ [VIRT_APLIC_S] = { 0xd000000, APLIC_SIZE(VIRT_CPUS_MAX) },
+ [VIRT_UART0] = { 0x10000000, 0x100 },
+ [VIRT_VIRTIO] = { 0x10001000, 0x1000 },
+ [VIRT_FW_CFG] = { 0x10100000, 0x18 },
+ [VIRT_FLASH] = { 0x20000000, 0x4000000 },
+ [VIRT_IMSIC_M] = { 0x24000000, VIRT_IMSIC_MAX_SIZE },
+ [VIRT_IMSIC_S] = { 0x28000000, VIRT_IMSIC_MAX_SIZE },
+ [VIRT_PCIE_ECAM] = { 0x30000000, 0x10000000 },
+ [VIRT_PCIE_MMIO] = { 0x40000000, 0x40000000 },
+ [VIRT_DRAM] = { 0x80000000, 0x0 },
+};