Code Monkey home page Code Monkey logo

rcoreloongarch's Introduction

rCore的龙芯平台移植

项目名称:proj93-la-tsinghuaOS

项目描述:

将清华大学uCore/rCore/zCore教学系统移植到LoongArch平台上,并进行力所能及的优化。清华大学操作系统课程使用的教学系统,uCore为最早的C语言实现版本,rCore为使用rust语言重新实现的版本,支持x86/RISCV/ARM/MIPS等架构,zCore为谷歌微内核zircon的rust实现。

调研情况分析

  1. loongArch平台上有比较完善的工具链,可以支持rust的开发
  2. loongArch的指令和mips、riscv相似,可以快速进行学习
  3. 有过rcore的开发经验,项目可以进行
  4. 有qemu模拟的龙芯平台可以进行虚拟实验

项目目标

根据硬件差异将rCore逐步迁移到loongArch64平台上,并撰写详细的实验手册,以期达到学习操作系统的同学可以熟悉如何在loongArcch平台上进行相关的实验,同时也将rCore扩展到新的平台。

目标规划:

ch0:

  • 阅读LoongArch相关材料,熟悉相关指令和开发流程
  • 搭建交叉编译环境,调试linux系统的启动过程
  • 将Linux的启动过程的反汇编代码移植进入rCore

ch1:

  • LoongArch的操作系统启动过程解析
  • 第一次进入操作系统
  • 完成串口输出功能

ch2:

  • LoongArch特权指令的使用
  • qemu模拟器的地址空间分布
  • 使用rust编写loongArch的寄存器支持
  • 特权级切换
  • 加载应用程序

ch3:

  • 中断
  • 多道程序
  • 协作式多道程序
  • 分时多任务
  • 时钟

ch4:

  • buddy system allocator
  • 三级页表
  • TLB管理
  • 地址空间

ch5:

  • 进程抽象
  • 地址空间切换

ch6:

  • PCI设备探测
  • ahci协议
  • 文件系统easy-fs

ch7:

  • 输入输出重定向
  • 管道
  • 信号

ch8:

  • 内核态线程抽象
  • 信号量
  • 锁机制
  • 条件变量

其它:

  • 简易内核栈回溯loongArch64版本
  • 简易内核栈回溯risc-v版本
  • VESA BIOS Extensions 显示(初步)

依赖

rustup target add loongarch64-unknown-none

项目运行

项目存在许多分支,每一个分支均对应于某一章的全部或者一部分。项目的具体环境配置位于实验手册中。

进入loongrCore目录下
make run #直接运行
make debug #gdb

运行截图:

一些说明文件和实验过程:

要查看提供的教程,请进入rCoreloongArch目录,使用mdbook命令

mdbook serve --open

在线查看指导教程。

或者查看根目录下导出的rCoreloongArch-tutorial.pdf文件。

建议

Arceos查看更多la64相关的内容。

未来

  • 添加键盘、鼠标中断的完整支持
  • 图形化显示
  • 教程的细致化

其它仓库地址

https://github.com/Godones/rCoreloongArch

参考资源

rcoreloongarch's People

Contributors

godones avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.