Merge pull request #88 from ruiqurm/ch2-lab

udpate rust-toolchain: nightly-2022-07-20
This commit is contained in:
Yifan Wu 2022-09-05 03:42:45 -07:00 committed by GitHub
commit b52bc8fa46
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 17 additions and 10 deletions

View File

@ -1,6 +1,7 @@
use lazy_static::*;
use crate::trap::TrapContext;
use crate::sync::UPSafeCell;
use core::arch::asm;
const USER_STACK_SIZE: usize = 4096 * 2;
const KERNEL_STACK_SIZE: usize = 4096 * 2;

View File

@ -1,7 +1,5 @@
#![no_std]
#![no_main]
#![feature(global_asm)]
#![feature(asm)]
#![feature(panic_info_message)]
#[macro_use]
@ -13,6 +11,8 @@ mod trap;
mod batch;
mod sync;
use core::arch::global_asm;
global_asm!(include_str!("entry.asm"));
global_asm!(include_str!("link_app.S"));

View File

@ -10,6 +10,8 @@ const SBI_REMOTE_SFENCE_VMA: usize = 6;
const SBI_REMOTE_SFENCE_VMA_ASID: usize = 7;
const SBI_SHUTDOWN: usize = 8;
use core::arch::asm;
#[inline(always)]
fn sbi_call(which: usize, arg0: usize, arg1: usize, arg2: usize) -> usize {
let mut ret;

View File

@ -12,6 +12,7 @@ use riscv::register::{
};
use crate::syscall::syscall;
use crate::batch::run_next_app;
use core::arch::global_asm;
global_asm!(include_str!("trap.S"));

View File

@ -1 +0,0 @@
nightly-2021-10-15

4
rust-toolchain.toml Normal file
View File

@ -0,0 +1,4 @@
[toolchain]
profile = "minimal"
channel = "nightly-2022-07-20"
components = ["rust-src", "llvm-tools-preview", "rustfmt", "clippy"]

View File

@ -1,6 +1,5 @@
#![no_std]
#![no_main]
#![feature(asm)]
extern crate user_lib;

View File

@ -1,6 +1,7 @@
#![no_std]
#![no_main]
#![feature(asm)]
use core::arch::asm;
extern crate user_lib;

View File

@ -1,6 +1,7 @@
#![no_std]
#![no_main]
#![feature(asm)]
use core::arch::asm;
extern crate user_lib;

View File

@ -1,6 +1,5 @@
#![no_std]
#![no_main]
#![feature(asm)]
#[macro_use]
extern crate user_lib;

View File

@ -1,6 +1,7 @@
#![no_std]
#![no_main]
#![feature(asm)]
use core::arch::asm;
#[macro_use]
extern crate user_lib;

View File

@ -1,5 +1,4 @@
#![no_std]
#![feature(asm)]
#![feature(linkage)]
#![feature(panic_info_message)]
#![feature(alloc_error_handler)]

View File

@ -1,5 +1,5 @@
use super::{Stat, TimeVal};
use core::arch::asm;
pub const SYSCALL_OPENAT: usize = 56;
pub const SYSCALL_CLOSE: usize = 57;
pub const SYSCALL_READ: usize = 63;