k210 cpu、asm、rust、smpboot、ipi


介绍

k210的datasheet主要讲了与外设相关的内容,k210并不支持最新的完整的riscv指令集,而是实现了一部分。本文想要通过汇编来一点点摸索k210的寄存器,布局,mmu,缓存等结构
相关链接:https://github.com/rcore-os/rCore-Tutorial/issues/80#issuecomment-663055705

riscv指令模块

图片名称

在包云岗老师翻译的riscv reader 手册 的指令集参考手册中
第二章介绍了RV32I的寄存器和6中指令类型
类型简介:https://blog.csdn.net/m0_46450829/article/details/105201216
第五章介绍了RV32F和RV32D的寄存器(浮点寄存器)和相关指令

k210架构

实际上k210使用的是rocket core:https://canaan-creative.com/716.html
riscv 裸机编程:https://blog.csdn.net/u010451780/article/details/120830800
什么是设备树:https://rcore-os.github.io/rCore-Tutorial-deploy/docs/lab-5/guide/part-1.html

IA-32体系结构下的多核启动

参考《linux源码情景分析》,首先由引导处理器进行自身的初始化,特别是内存的初始化之后,再调用smp_init()进行smp结构的初始化(创建一个带有主线程的进程),然后利用apic给另外一个核以信号,并设置其初始运行地址,等待启动

gdb 调试方法

https://blog.csdn.net/houzijushi/article/details/79901344

jtag调试

riscv 特权级二进制接口规范

英文原版:https://github.com/riscv-non-isa/riscv-sbi-doc/blob/master/riscv-sbi.adoc
洛佳大佬翻译版本:https://zh.m.wikisource.org/wiki/Translation:特权层二进制接口规范标准

rust 内联汇编

某位同学的博客
https://xiaopengli89.github.io/posts/rust-asm-macro/
参考手册详细教程(英文)
https://doc.rust-lang.org/stable/reference/inline-assembly.html

riscv 汇编调用规范

https://inst.eecs.berkeley.edu/~cs61c/resources/RISCV_Calling_Convention.pdf

其他相关资料

aiot中riscv芯片的相关报告:https://www.hexiaoqing.net/wp-content/uploads/2016/05/AIoT技术挑战与RISC-V-处理器机遇-202007.pdf

操作系统实现目标:

qemu文档网址 https://www.qemu.org/docs/master/
linux中riscv 体系结构下的代码:https://github.com/riscvarchive/riscv-linux/tree/18c83d2c0390fd0e8336ad090a047c56037d19f5/arch/riscv/kernel
从零开始学os https://learningos.github.io/rcore_step_by_step_webdoc/