mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-24 02:16:19 +04:00
Ugh. Remove target
This commit is contained in:
parent
b139313874
commit
ee92f8e123
Binary file not shown.
@ -94,6 +94,36 @@ m_trap_vector:
|
||||
|
||||
mret
|
||||
|
||||
.global switch_to_user
|
||||
switch_to_user:
|
||||
# a0 - Frame address
|
||||
# a1 - Program counter
|
||||
# a2 - SATP Register
|
||||
csrw mscratch, a0
|
||||
mv t6, a0
|
||||
|
||||
# 1 << 7 is MPIE
|
||||
# Since user mode is 00, we don't need to set anything
|
||||
# in MPP (bits 12:11)
|
||||
li t0, 1 << 7
|
||||
csrw mstatus, t0
|
||||
csrw mepc, a1
|
||||
csrw satp, a2
|
||||
# This fence forces the MMU to flush the TLB. However, since
|
||||
# we're using the PID as the address space identifier, we might
|
||||
# only need this when we create a process. Right now, this ensures
|
||||
# correctness, however it isn't the most efficient.
|
||||
sfence.vma
|
||||
|
||||
# A0 is the context frame, so we need to reload it back
|
||||
# and mret so we can start running the program.
|
||||
.set i, 1
|
||||
.rept 31
|
||||
load_gp %i
|
||||
.set i, i+1
|
||||
.endr
|
||||
mret
|
||||
|
||||
|
||||
.global make_syscall
|
||||
make_syscall:
|
||||
|
@ -144,7 +144,7 @@ extern "C" fn kinit() -> usize {
|
||||
let mtime = 0x0200_bff8 as *const u64;
|
||||
// The frequency given by QEMU is 10_000_000 Hz, so this sets
|
||||
// the next interrupt to fire one second from now.
|
||||
mtimecmp.write_volatile(mtime.read_volatile() + 10_000_000);
|
||||
mtimecmp.write_volatile(mtime.read_volatile() + 1_000_000);
|
||||
}
|
||||
// When we return, we put the return value into mepc and start there. This
|
||||
// should be init's starting point.
|
||||
@ -182,6 +182,7 @@ pub mod kmem;
|
||||
pub mod page;
|
||||
pub mod plic;
|
||||
pub mod process;
|
||||
pub mod sched;
|
||||
pub mod syscall;
|
||||
pub mod trap;
|
||||
pub mod uart;
|
||||
|
@ -117,6 +117,7 @@ pub fn init() -> usize {
|
||||
// Waiting - means that the process is waiting on I/O
|
||||
// Dead - We should never get here, but we can flag a process as Dead and clean
|
||||
// it out of the list later.
|
||||
#[repr(u8)]
|
||||
pub enum ProcessState {
|
||||
Running,
|
||||
Sleeping,
|
||||
@ -138,9 +139,28 @@ pub struct Process {
|
||||
root: *mut Table,
|
||||
state: ProcessState,
|
||||
data: ProcessData,
|
||||
sleep_until: usize,
|
||||
}
|
||||
|
||||
impl Process {
|
||||
pub fn get_frame_address(&self) -> usize {
|
||||
((&self.frame) as *const TrapFrame) as usize
|
||||
}
|
||||
pub fn get_program_counter(&self) -> usize {
|
||||
self.program_counter
|
||||
}
|
||||
pub fn get_table_address(&self) -> usize {
|
||||
self.root as usize
|
||||
}
|
||||
pub fn get_state(&self) -> &ProcessState {
|
||||
&self.state
|
||||
}
|
||||
pub fn get_pid(&self) -> u16 {
|
||||
self.pid
|
||||
}
|
||||
pub fn get_sleep_until(&self) -> usize {
|
||||
self.sleep_until
|
||||
}
|
||||
pub fn new_default(func: fn()) -> Self {
|
||||
let func_addr = func as usize;
|
||||
// We will convert NEXT_PID below into an atomic increment when
|
||||
@ -153,7 +173,9 @@ impl Process {
|
||||
pid: unsafe { NEXT_PID },
|
||||
root: zalloc(1) as *mut Table,
|
||||
state: ProcessState::Waiting,
|
||||
data: ProcessData::zero(), };
|
||||
data: ProcessData::zero(),
|
||||
sleep_until: 0
|
||||
};
|
||||
unsafe {
|
||||
NEXT_PID += 1;
|
||||
}
|
||||
|
@ -3,13 +3,47 @@
|
||||
// Stephen Marz
|
||||
// 27 Dec 2019
|
||||
|
||||
use crate::process::{PROCESS_LIST, Process};
|
||||
use crate::cpu::mscratch_write;
|
||||
use crate::{process::{ProcessState, PROCESS_LIST}};
|
||||
|
||||
extern "C" {
|
||||
fn switch_to_user(to: usize, mepc: usize, satp: usize) -> !;
|
||||
}
|
||||
|
||||
pub fn schedule() {
|
||||
|
||||
}
|
||||
|
||||
pub fn switch_to(from: &mut Process, to: &mut Process) {
|
||||
|
||||
unsafe {
|
||||
if let Some(mut pl) = PROCESS_LIST.take() {
|
||||
pl.rotate_left(1);
|
||||
let mut frame_addr: usize = 0;
|
||||
let mut mepc: usize = 0;
|
||||
let mut satp: usize = 0;
|
||||
let mut pid: usize = 0;
|
||||
if let Some(prc) = pl.front() {
|
||||
match prc.get_state() {
|
||||
ProcessState::Running => {
|
||||
frame_addr =
|
||||
prc.get_frame_address();
|
||||
mepc = prc.get_program_counter();
|
||||
satp = prc.get_table_address() >> 12;
|
||||
pid = prc.get_pid() as usize;
|
||||
},
|
||||
ProcessState::Sleeping => {
|
||||
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
}
|
||||
PROCESS_LIST.replace(pl);
|
||||
if frame_addr != 0 {
|
||||
// MODE 8 is 39-bit virtual address MMU
|
||||
// I'm using the PID as the address space identifier to hopefully
|
||||
// help with (not?) flushing the TLB whenever we switch processes.
|
||||
if satp != 0 {
|
||||
switch_to_user(frame_addr, mepc, (8 << 60) | (pid << 44) | satp);
|
||||
}
|
||||
else {
|
||||
switch_to_user(frame_addr, mepc, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1 +0,0 @@
|
||||
{"rustc_fingerprint":12397020595697137230,"outputs":{"4476964694761187371":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/smarz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"mmx\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n",""],"7980669631894232998":["___\nlib___.rlib\nlib___.a\n/home/smarz/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\nproc_macro\ntarget_arch=\"riscv64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\n","warning: dropping unsupported crate type `dylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `cdylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `proc-macro` for target `riscv64gc-unknown-none-elf`\n\n"],"1164083562126845933":["rustc 1.41.0-nightly (25d8a9494 2019-11-29)\nbinary: rustc\ncommit-hash: 25d8a9494ca6d77361e47c1505ecf640b168819e\ncommit-date: 2019-11-29\nhost: x86_64-unknown-linux-gnu\nrelease: 1.41.0-nightly\nLLVM version: 9.0\n",""]},"successes":{}}
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
This file has an mtime of when this was started.
|
@ -1 +0,0 @@
|
||||
195e6f0358a31b25
|
@ -1 +0,0 @@
|
||||
{"rustc":12886109189411355181,"features":"[]","target":18216300742983494906,"profile":14996655781355331481,"path":10872709659218687626,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"riscv64gc-unknown-none-elf/debug/.fingerprint/sos-045a100c2f1b204e/dep-lib-sos-045a100c2f1b204e"}}],"rustflags":[],"metadata":10316790824418844821}
|
@ -1,3 +0,0 @@
|
||||
{"message":"unused variable: `status`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/trap.rs","byte_start":569,"byte_end":575,"line_start":18,"line_end":18,"column_start":22,"column_end":28,"is_primary":true,"text":[{"text":" status: usize,","highlight_start":22,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"consider prefixing with an underscore","code":null,"level":"help","spans":[{"file_name":"src/trap.rs","byte_start":569,"byte_end":575,"line_start":18,"line_end":18,"column_start":22,"column_end":28,"is_primary":true,"text":[{"text":" status: usize,","highlight_start":22,"highlight_end":28}],"label":null,"suggested_replacement":"_status","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `status`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/trap.rs:18:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m18\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m status: usize,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: consider prefixing with an underscore: `_status`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"unused variable: `frame`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/trap.rs","byte_start":605,"byte_end":610,"line_start":19,"line_end":19,"column_start":22,"column_end":27,"is_primary":true,"text":[{"text":" frame: *mut TrapFrame)","highlight_start":22,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider prefixing with an underscore","code":null,"level":"help","spans":[{"file_name":"src/trap.rs","byte_start":605,"byte_end":610,"line_start":19,"line_end":19,"column_start":22,"column_end":27,"is_primary":true,"text":[{"text":" frame: *mut TrapFrame)","highlight_start":22,"highlight_end":27}],"label":null,"suggested_replacement":"_frame","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `frame`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/trap.rs:19:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m19\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m frame: *mut TrapFrame)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: consider prefixing with an underscore: `_frame`\u001b[0m\n\n"}
|
||||
{"message":"field is never read: `cwd_path`","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/process.rs","byte_start":7792,"byte_end":7811,"line_start":229,"line_end":229,"column_start":2,"column_end":21,"is_primary":true,"text":[{"text":"\tcwd_path: [u8; 128],","highlight_start":2,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: field is never read: `cwd_path`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/process.rs:229:2\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m229\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m cwd_path: [u8; 128],\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
This file has an mtime of when this was started.
|
@ -1 +0,0 @@
|
||||
bcb098616205073c
|
@ -1 +0,0 @@
|
||||
{"rustc":15643956189553118024,"features":"[]","target":18216300742983494906,"profile":14996655781355331481,"path":10872709659218687626,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"riscv64gc-unknown-none-elf/debug/.fingerprint/sos-acfc70a7c1fcbfd7/dep-lib-sos-acfc70a7c1fcbfd7"}}],"rustflags":[],"metadata":10316790824418844821}
|
@ -1,2 +0,0 @@
|
||||
{"message":"unused variable: `status`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/trap.rs","byte_start":601,"byte_end":607,"line_start":19,"line_end":19,"column_start":22,"column_end":28,"is_primary":true,"text":[{"text":" status: usize,","highlight_start":22,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"consider prefixing with an underscore","code":null,"level":"help","spans":[{"file_name":"src/trap.rs","byte_start":601,"byte_end":607,"line_start":19,"line_end":19,"column_start":22,"column_end":28,"is_primary":true,"text":[{"text":" status: usize,","highlight_start":22,"highlight_end":28}],"label":null,"suggested_replacement":"_status","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `status`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/trap.rs:19:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m19\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m status: usize,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: consider prefixing with an underscore: `_status`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"field is never read: `cwd_path`","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/process.rs","byte_start":7796,"byte_end":7815,"line_start":229,"line_end":229,"column_start":2,"column_end":21,"is_primary":true,"text":[{"text":"\tcwd_path: [u8; 128],","highlight_start":2,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: field is never read: `cwd_path`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/process.rs:229:2\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m229\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m cwd_path: [u8; 128],\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
Binary file not shown.
@ -1 +0,0 @@
|
||||
This file has an mtime of when this was started.
|
@ -1 +0,0 @@
|
||||
44dc673b0883fa03
|
@ -1 +0,0 @@
|
||||
{"rustc":16843294504914232601,"features":"[]","target":18216300742983494906,"profile":14996655781355331481,"path":10872709659218687626,"deps":[],"local":[{"CheckDepInfo":{"dep_info":"riscv64gc-unknown-none-elf/debug/.fingerprint/sos-bf5ecfa00c701166/dep-lib-sos-bf5ecfa00c701166"}}],"rustflags":[],"metadata":10316790824418844821}
|
@ -1,5 +0,0 @@
|
||||
{"message":"unused variable: `status`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/trap.rs","byte_start":569,"byte_end":575,"line_start":18,"line_end":18,"column_start":22,"column_end":28,"is_primary":true,"text":[{"text":" status: usize,","highlight_start":22,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_variables)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"consider prefixing with an underscore","code":null,"level":"help","spans":[{"file_name":"src/trap.rs","byte_start":569,"byte_end":575,"line_start":18,"line_end":18,"column_start":22,"column_end":28,"is_primary":true,"text":[{"text":" status: usize,","highlight_start":22,"highlight_end":28}],"label":null,"suggested_replacement":"_status","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `status`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/trap.rs:18:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m18\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m status: usize,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: consider prefixing with an underscore: `_status`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_variables)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"unused variable: `frame`","code":{"code":"unused_variables","explanation":null},"level":"warning","spans":[{"file_name":"src/trap.rs","byte_start":605,"byte_end":610,"line_start":19,"line_end":19,"column_start":22,"column_end":27,"is_primary":true,"text":[{"text":" frame: &mut TrapFrame)","highlight_start":22,"highlight_end":27}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"consider prefixing with an underscore","code":null,"level":"help","spans":[{"file_name":"src/trap.rs","byte_start":605,"byte_end":610,"line_start":19,"line_end":19,"column_start":22,"column_end":27,"is_primary":true,"text":[{"text":" frame: &mut TrapFrame)","highlight_start":22,"highlight_end":27}],"label":null,"suggested_replacement":"_frame","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused variable: `frame`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/trap.rs:19:22\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m19\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m frame: &mut TrapFrame)\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33mhelp: consider prefixing with an underscore: `_frame`\u001b[0m\n\n"}
|
||||
{"message":"constant item is never used: `PROCESS_STARTING_ADDR`","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/process.rs","byte_start":709,"byte_end":758,"line_start":24,"line_end":24,"column_start":1,"column_end":50,"is_primary":true,"text":[{"text":"const PROCESS_STARTING_ADDR: usize = 0x2000_0000;","highlight_start":1,"highlight_end":50}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(dead_code)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: constant item is never used: `PROCESS_STARTING_ADDR`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/process.rs:24:1\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m24\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0mconst PROCESS_STARTING_ADDR: usize = 0x2000_0000;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(dead_code)]` on by default\u001b[0m\n\n"}
|
||||
{"message":"static item is never used: `CURRENT`","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/process.rs","byte_start":1237,"byte_end":1277,"line_start":34,"line_end":34,"column_start":1,"column_end":41,"is_primary":true,"text":[{"text":"static mut CURRENT: [usize; 2] = [0; 2];","highlight_start":1,"highlight_end":41}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: static item is never used: `CURRENT`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/process.rs:34:1\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m34\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0mstatic mut CURRENT: [usize; 2] = [0; 2];\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
|
||||
{"message":"field is never used: `cwd_path`","code":{"code":"dead_code","explanation":null},"level":"warning","spans":[{"file_name":"src/process.rs","byte_start":5877,"byte_end":5896,"line_start":176,"line_end":176,"column_start":2,"column_end":21,"is_primary":true,"text":[{"text":"\tcwd_path: [u8; 128],","highlight_start":2,"highlight_end":21}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: field is never used: `cwd_path`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/process.rs:176:2\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m176\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m cwd_path: [u8; 128],\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,12 +0,0 @@
|
||||
/home/smarz/Develop/blog/risc_v/ch6/target/riscv64gc-unknown-none-elf/debug/deps/libsos-045a100c2f1b204e.a: src/lib.rs src/cpu.rs src/kmem.rs src/page.rs src/plic.rs src/process.rs src/trap.rs src/uart.rs
|
||||
|
||||
/home/smarz/Develop/blog/risc_v/ch6/target/riscv64gc-unknown-none-elf/debug/deps/sos-045a100c2f1b204e.d: src/lib.rs src/cpu.rs src/kmem.rs src/page.rs src/plic.rs src/process.rs src/trap.rs src/uart.rs
|
||||
|
||||
src/lib.rs:
|
||||
src/cpu.rs:
|
||||
src/kmem.rs:
|
||||
src/page.rs:
|
||||
src/plic.rs:
|
||||
src/process.rs:
|
||||
src/trap.rs:
|
||||
src/uart.rs:
|
@ -1,13 +0,0 @@
|
||||
/home/smarz/Develop/blog/risc_v/ch7/target/riscv64gc-unknown-none-elf/debug/deps/libsos-acfc70a7c1fcbfd7.a: src/lib.rs src/cpu.rs src/kmem.rs src/page.rs src/plic.rs src/process.rs src/syscall.rs src/trap.rs src/uart.rs
|
||||
|
||||
/home/smarz/Develop/blog/risc_v/ch7/target/riscv64gc-unknown-none-elf/debug/deps/sos-acfc70a7c1fcbfd7.d: src/lib.rs src/cpu.rs src/kmem.rs src/page.rs src/plic.rs src/process.rs src/syscall.rs src/trap.rs src/uart.rs
|
||||
|
||||
src/lib.rs:
|
||||
src/cpu.rs:
|
||||
src/kmem.rs:
|
||||
src/page.rs:
|
||||
src/plic.rs:
|
||||
src/process.rs:
|
||||
src/syscall.rs:
|
||||
src/trap.rs:
|
||||
src/uart.rs:
|
@ -1,12 +0,0 @@
|
||||
/home/smarz/Develop/blog/risc_v/ch6/target/riscv64gc-unknown-none-elf/debug/deps/libsos-bf5ecfa00c701166.a: src/lib.rs src/cpu.rs src/kmem.rs src/page.rs src/plic.rs src/process.rs src/trap.rs src/uart.rs
|
||||
|
||||
/home/smarz/Develop/blog/risc_v/ch6/target/riscv64gc-unknown-none-elf/debug/deps/sos-bf5ecfa00c701166.d: src/lib.rs src/cpu.rs src/kmem.rs src/page.rs src/plic.rs src/process.rs src/trap.rs src/uart.rs
|
||||
|
||||
src/lib.rs:
|
||||
src/cpu.rs:
|
||||
src/kmem.rs:
|
||||
src/page.rs:
|
||||
src/plic.rs:
|
||||
src/process.rs:
|
||||
src/trap.rs:
|
||||
src/uart.rs:
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user