#include "riscv.h" #include "defs.h" void main(); void timerinit(); // entry.S needs one stack per CPU. __attribute__ ((aligned (16))) char stack0[4096 * NCPU]; // a scratch area per CPU for machine-mode timer interrupts. uint64 timer_scratch[NCPU][5]; // assembly cod...
rustrisc-vxv6-riscv UpdatedJan 3, 2023 Rust CalvinHaynes/MIT6.S081-2020-labs Star77 Code Issues Pull requests MIT6.S081实验官方纯净源代码以及我为此制作的开箱即用的实验环境(部署后即可以用web端的Vscode进行实验),转载于MIT官方仓库git clone git://g.csail.mit.edu/xv6-labs-2020,由于GitHub上没...
此时我打算将gdb更新到与22同步的版本,我们发现Ubuntu22版本中的gdb打印版本是不会出现—target=riscv之类字样的,只有gnu-linux。所以我再一次尝试编译完整的gdb,加上了--enable-targets=all,此时我们可以直接更换launch的gdb为gdb了(之前只能gdb-multiarch或者riscv64,现在的gdb是融合了各种框架的超级缝合怪),进去后...
Code Issues Pull requests This repository contains my work on the xv6 operating system lab as part of MIT's 6.S081 course. The lab involves extending and optimizing various modules of the xv6 operating system, which is based on the RISC-V instruction set architecture. ...
先打开本部分步骤1中git clone下来的库,名称应该是xv6-riscv,cd进去,然后输入指令: make 输入以后你应该会看到一大堆输出,这里表示我们的xv6系统正在编译 在这些输出完成以后,输入指令: make qemu 编译我们的qemu系统,输出如下: 最后如果看到终端显示出:init: starting sh,如下图: ...
/* kernel/riscv.h */ ... // one beyond the highest possible virtual address. // MAXVA is actually one bit less than the max allowed by // Sv39, to avoid having to sign-extend virtual addresses // that have the high bit set. ...
实验指导书上给出了 RISC-V 栈帧布局: 基本上只要看懂这幅图就可以过关了: /* kernel/printf.c */ void backtrace() { uint64 *fp = (uint64*)r_fp(), *ra; while ((uint64)fp != PGROUNDUP((uint64)fp) && (uint64)fp != PGROUNDUP((uint64)fp)) { ...
#include"riscv.h" #include"defs.h" voidmain(); voidtimerinit(); // entry.S needs one stack per CPU. __attribute__ ((aligned (16)))charstack0[4096* NCPU]; // a scratch area per CPU for machine-mode timer interrupts. uint64 timer_scratch[NCPU][5]; // assembly code in kernel...
$cdxv6-riscv-fall19$git checkout util 实验指导简要介绍了如何把 xv6 跑起来(makethenmake qemu),如何交作业(make handin),如何测试成绩(make grade)。 下面介绍各个子任务如何写。 1. sleep 顾名思义写一个 sleep 例程,休眠一定的 tick 数,tick 的定义是时间中断。
因此第一套键盘扫描码还是得说道说道,一个键有按下就会有弹起,所以每个键会有两个状态,即每个键将会对应两个扫描码,键被按下时的编码叫做通码($makecode$),弹起时的编码叫做断码($breakcode$)。 大部分键的通码和断码都是 8 位 1 字节,但有些操作控制键如Ctrl、Alt,附加键如Insert,小键盘区如/,方向键...