Code Monkey home page Code Monkey logo

rcore_tutorial's Introduction

rCore_tutorial

Actions Status

WARNING

This project is no longer maintained, please try Tutorial v3.5.

Documentations

Please read

Prerequisite

You need: rustup installed, ensure ~/.cargo/bin is added to PATH and run:

make env

Quick Try

$ make run
## If everything is OK, then you will see below info:
......
OpenSBI v0.4 (Jul  2 2019 11:53:53)
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name          : QEMU Virt Machine
Platform HART Features : RV64ACDFIMSU
Platform Max HARTs     : 8
Current Hart           : 0
Firmware Base          : 0x80000000
Firmware Size          : 112 KB
Runtime SBI Version    : 0.1

PMP0: 0x0000000080000000-0x000000008001ffff (A)
PMP1: 0x0000000000000000-0xffffffffffffffff (A,R,W,X)
switch satp from 0x8000000000080256 to 0x800000000008119f
++++ setup memory!    ++++
++++ setup interrupt! ++++
available programs in rust/ are:
  .
  ..
  user_shell
  notebook
  greenthread
  hello_world
  model
++++ setup fs!        ++++
++++ setup process!   ++++
++++ setup timer!     ++++
Rust user shell
>>

rcore_tutorial's People

Contributors

chyyuu avatar hi-rustin avatar jiegec avatar lyriczhao avatar panql avatar rzswh avatar wangrunji0408 avatar wyfcyx avatar xy-plus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rcore_tutorial's Issues

K210 porting logs

Following the step of @wangrunji0408, I want to port the tutorial from Qemu to K210, a RISC-V board which is cheap and simple, as an important part of the fourth edition of tutorial.
K210 is based on RISC-V spec 1.9.1, which was published about 4 years ago. So you can hardly find a toolchain or bootloader that fits it perfectly now. For example, OpenSBI 0.4/0.8 don't work normally on K210...
About 1 year and a half ago, rjgg tried to port rCore to K210 and succeed in the end. Here is his log. He modified OpenSBI 0.3 in order to support K210, you can find that version here.
How to use it to completing porting? It is at a relative ease. First, download the modified OpenSBI, and change the FW_PAYLOAD_ALIGN to 0x200000 since we want to put our kernel to 0x80200000 on memory. Then, merge the OpenSBI image(fw_payload.bin) and our kernel image into a big one using dd tool and finally burn it into flash.
Now, chapter 2 can run on K210 successfully. I will create a new branch about porting later.

kernel panicked on multicore branch

Sometimes kernel panicked when typing commands in the user shell, the following two errors could be found in the panic infomation:

panicked at 'called `Option::unwrap()` on a `None` value', src/process/processor.rs:100:40
panicked at 'thread not exist!', src/process/thread_pool.rs:49:31

Maybe there are some bugs in the scheduling module or the thread management module.

License?

Hi,thank-you for the rcore-tutorial. I noticed that rcore v3 uses the GPL3 license and I was wondering if you forgot to add a license to rcore v2

page fault after upgrading asm! to llvm_asm!

make run on master branch, and it panicked with:

Exception(StorePageFault) va = 0xffffffffffffffe8 instruction = 0x1acfe
panicked at 'page fault!', src/interrupt.rs:76:5
  • rust-toolchain = nightly-2020-06-04
  • riscv = 21e32ee
    In the meanwhile, multicore branch worked normally 15 days ago, but now it failed with page fault too. Given that the only change of it in the last two weeks was the update of riscv crate, so I think there maybe some bugs in it. Actually, I made it work again by rolling back the riscv version to c62af46.

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.