├── .cargo └── config.toml ├── .gitignore ├── Cargo.toml ├── LICENSE ├── README.md ├── dtb ├── sunxi.dtb └── sunxi.dts ├── justfile ├── linkscript ├── link-dwarf.ld ├── link-rvbt.ld ├── link-sunxi-64.ld └── link-virt-64.ld └── src ├── ecall ├── base.rs ├── hsm.rs ├── ipi.rs ├── mod.rs ├── rfence.rs ├── srst.rs └── timer.rs ├── fdt ├── cstr.rs ├── header.rs ├── memory_reserve.rs ├── mod.rs ├── node.rs ├── prop.rs └── token.rs ├── hal ├── clint.rs ├── clint32.rs ├── mod.rs ├── ns16550a.rs ├── sifive_uart.rs ├── sunxi_uart.rs └── tlb.rs ├── main.rs ├── memory ├── memory_layout.rs ├── mod.rs └── pmp.rs ├── platform ├── generic.rs ├── mod.rs ├── sifive.rs ├── sunxi.rs └── virt.rs ├── runtime ├── context.rs ├── mod.rs └── runtime.rs ├── rvbt ├── frame.rs ├── init.rs ├── mod.rs └── symbol.rs ├── sbi ├── console.rs ├── fence_info.rs ├── hart_mask.rs ├── hart_scratch.rs ├── hsm.rs ├── ipi.rs ├── ipi_event.rs ├── mod.rs ├── rfence.rs ├── sbiret.rs ├── srst.rs └── timer.rs └── util ├── addr.rs ├── banner.rs ├── fdt.rs ├── mod.rs ├── pmp_test.rs ├── reg.rs ├── status.rs └── timer_test.rs /.cargo/config.toml: -------------------------------------------------------------------------------- 1 | [build] 2 | target = "riscv64gc-unknown-none-elf" 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/.gitignore -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/README.md -------------------------------------------------------------------------------- /dtb/sunxi.dtb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/dtb/sunxi.dtb -------------------------------------------------------------------------------- /dtb/sunxi.dts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/dtb/sunxi.dts -------------------------------------------------------------------------------- /justfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/justfile -------------------------------------------------------------------------------- /linkscript/link-dwarf.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/linkscript/link-dwarf.ld -------------------------------------------------------------------------------- /linkscript/link-rvbt.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/linkscript/link-rvbt.ld -------------------------------------------------------------------------------- /linkscript/link-sunxi-64.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/linkscript/link-sunxi-64.ld -------------------------------------------------------------------------------- /linkscript/link-virt-64.ld: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/linkscript/link-virt-64.ld -------------------------------------------------------------------------------- /src/ecall/base.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/ecall/base.rs -------------------------------------------------------------------------------- /src/ecall/hsm.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/ecall/hsm.rs -------------------------------------------------------------------------------- /src/ecall/ipi.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/ecall/ipi.rs -------------------------------------------------------------------------------- /src/ecall/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/ecall/mod.rs -------------------------------------------------------------------------------- /src/ecall/rfence.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/ecall/rfence.rs -------------------------------------------------------------------------------- /src/ecall/srst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/ecall/srst.rs -------------------------------------------------------------------------------- /src/ecall/timer.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/ecall/timer.rs -------------------------------------------------------------------------------- /src/fdt/cstr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/fdt/cstr.rs -------------------------------------------------------------------------------- /src/fdt/header.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/fdt/header.rs -------------------------------------------------------------------------------- /src/fdt/memory_reserve.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/fdt/memory_reserve.rs -------------------------------------------------------------------------------- /src/fdt/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/fdt/mod.rs -------------------------------------------------------------------------------- /src/fdt/node.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/fdt/node.rs -------------------------------------------------------------------------------- /src/fdt/prop.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/fdt/prop.rs -------------------------------------------------------------------------------- /src/fdt/token.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/fdt/token.rs -------------------------------------------------------------------------------- /src/hal/clint.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/hal/clint.rs -------------------------------------------------------------------------------- /src/hal/clint32.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/hal/clint32.rs -------------------------------------------------------------------------------- /src/hal/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/hal/mod.rs -------------------------------------------------------------------------------- /src/hal/ns16550a.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/hal/ns16550a.rs -------------------------------------------------------------------------------- /src/hal/sifive_uart.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/hal/sifive_uart.rs -------------------------------------------------------------------------------- /src/hal/sunxi_uart.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/hal/sunxi_uart.rs -------------------------------------------------------------------------------- /src/hal/tlb.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/hal/tlb.rs -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/main.rs -------------------------------------------------------------------------------- /src/memory/memory_layout.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/memory/memory_layout.rs -------------------------------------------------------------------------------- /src/memory/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/memory/mod.rs -------------------------------------------------------------------------------- /src/memory/pmp.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/memory/pmp.rs -------------------------------------------------------------------------------- /src/platform/generic.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/platform/generic.rs -------------------------------------------------------------------------------- /src/platform/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/platform/mod.rs -------------------------------------------------------------------------------- /src/platform/sifive.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/platform/sifive.rs -------------------------------------------------------------------------------- /src/platform/sunxi.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/platform/sunxi.rs -------------------------------------------------------------------------------- /src/platform/virt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/platform/virt.rs -------------------------------------------------------------------------------- /src/runtime/context.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/runtime/context.rs -------------------------------------------------------------------------------- /src/runtime/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/runtime/mod.rs -------------------------------------------------------------------------------- /src/runtime/runtime.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/runtime/runtime.rs -------------------------------------------------------------------------------- /src/rvbt/frame.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/rvbt/frame.rs -------------------------------------------------------------------------------- /src/rvbt/init.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/rvbt/init.rs -------------------------------------------------------------------------------- /src/rvbt/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/rvbt/mod.rs -------------------------------------------------------------------------------- /src/rvbt/symbol.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/rvbt/symbol.rs -------------------------------------------------------------------------------- /src/sbi/console.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/console.rs -------------------------------------------------------------------------------- /src/sbi/fence_info.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/fence_info.rs -------------------------------------------------------------------------------- /src/sbi/hart_mask.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/hart_mask.rs -------------------------------------------------------------------------------- /src/sbi/hart_scratch.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/hart_scratch.rs -------------------------------------------------------------------------------- /src/sbi/hsm.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/hsm.rs -------------------------------------------------------------------------------- /src/sbi/ipi.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/ipi.rs -------------------------------------------------------------------------------- /src/sbi/ipi_event.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/ipi_event.rs -------------------------------------------------------------------------------- /src/sbi/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/mod.rs -------------------------------------------------------------------------------- /src/sbi/rfence.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/rfence.rs -------------------------------------------------------------------------------- /src/sbi/sbiret.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/sbiret.rs -------------------------------------------------------------------------------- /src/sbi/srst.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/srst.rs -------------------------------------------------------------------------------- /src/sbi/timer.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/sbi/timer.rs -------------------------------------------------------------------------------- /src/util/addr.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/util/addr.rs -------------------------------------------------------------------------------- /src/util/banner.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/util/banner.rs -------------------------------------------------------------------------------- /src/util/fdt.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/util/fdt.rs -------------------------------------------------------------------------------- /src/util/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/util/mod.rs -------------------------------------------------------------------------------- /src/util/pmp_test.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/util/pmp_test.rs -------------------------------------------------------------------------------- /src/util/reg.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/util/reg.rs -------------------------------------------------------------------------------- /src/util/status.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/util/status.rs -------------------------------------------------------------------------------- /src/util/timer_test.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jwnhy/coffer/HEAD/src/util/timer_test.rs --------------------------------------------------------------------------------