摘要:apt install g++-8-riscv64-linux-gnu
阅读全文
摘要:ubuntu@ubuntu:~/linux-5.14$ ls ./arch/riscv/boot/dts/sifive/ fu540-c000.dtsi hifive-unleashed-a00.dtb hifive-unmatched-a00.dtb Makefile fu740-c000.dts
阅读全文
摘要:进程切换有自愿(Voluntary)和强制(Involuntary)之分,在前文中详细解释了两者的不同,简单来说,自愿切换意味着进程需要等待某种资源,强制切换则与抢占(Preemption)有关。 抢占(Preemption)是指内核强行切换正在CPU上运行的进程,在抢占的过程中并不需要得到进程的配
阅读全文
摘要:qemu-system-riscv64 -M sifive_u 改成 qemu-system-riscv64 -M virt qemu-system-riscv64: clint: invalid write: 0000e8a4 qemu-system-riscv64: clint: invalid
阅读全文
摘要:For help, type "help". Type "apropos word" to search for commands related to "word". 0x0000000000001000 in ?? () (gdb) b xPortStartFirstTask Breakpoin
阅读全文
摘要:riscv 通用寄存器 CPU中包含32个通用寄存器,有时候也会被称为通用寄存器文件,如图1所示。通用寄存器的命名方式为X0-X31。其中第一个寄存器X0的值,被硬连线到0,因此值永远是0。其他寄存器X1-X31都是可读可写的。0-31也叫做索引号,索引号也可以理解为寄存器的地址,当指令需要调用通用
阅读全文
摘要:运行05-Preemptive 05-Preemptive# riscv64-linux-gnu-objdump -d -t kernel.elf > dump.txt cat dump.txt | grep 800002ac -B 10 8000028c: 87aa mv a5,a0 800002
阅读全文
摘要:static unsigned long long riscv_clocksource_rdtime(struct clocksource *cs) { return get_cycles64(); } clocksource clocksource 提供了对不同软硬件时钟的抽象。可以理解为时间源,
阅读全文
摘要:void timer_init() { // each CPU has a separate source of timer interrupts. int id = r_mhartid(); // ask the CLINT for a timer interrupt. // int interv
阅读全文
摘要:lesson7 qemu-system-riscv64 --version QEMU emulator version 6.1.0 Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers 执行mret 抛异常 I
阅读全文
摘要:204 void enter_supervisor_mode(void (*fn)(uintptr_t), uintptr_t arg0, uintptr_t arg1) 205 { 206 uintptr_t mstatus = read_csr(mstatus); 207 mstatus = I
阅读全文
摘要:添加nostdlib CFLAGS = -Wall -mcmodel=medany -g -I $(IDIR) -O0 -nostdlib
阅读全文
摘要:./configure --host=arm-linux-gnueabihf CC=arm-linux-gnueabihf-gcc CFLAGS=-static CXX=arm-linux-gnueabihf-g++ CXXFLAGS=-static root@ubuntu:/home/ubuntu
阅读全文