Update coreutils, remove sys:memory
This commit is contained in:
parent
1bcc7f96f4
commit
79b700b2f6
|
@ -98,7 +98,7 @@ pub extern fn userspace_init() {
|
||||||
|
|
||||||
syscall::exec(b"/bin/init", &[]).expect("failed to execute init");
|
syscall::exec(b"/bin/init", &[]).expect("failed to execute init");
|
||||||
|
|
||||||
panic!("init returned")
|
panic!("init returned");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Allow exception handlers to send signal to arch-independant kernel
|
/// Allow exception handlers to send signal to arch-independant kernel
|
||||||
|
@ -151,7 +151,13 @@ pub extern fn kmain(cpus: usize) {
|
||||||
|
|
||||||
/// This is the main kernel entry point for secondary CPUs
|
/// This is the main kernel entry point for secondary CPUs
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub extern fn kmain_ap(id: usize) {
|
pub extern fn kmain_ap(_id: usize) {
|
||||||
|
// Disable APs for now
|
||||||
|
loop {
|
||||||
|
unsafe { interrupt::enable_and_halt(); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
CPU_ID.store(id, Ordering::SeqCst);
|
CPU_ID.store(id, Ordering::SeqCst);
|
||||||
|
|
||||||
context::init();
|
context::init();
|
||||||
|
@ -159,11 +165,6 @@ pub extern fn kmain_ap(id: usize) {
|
||||||
let pid = syscall::getpid();
|
let pid = syscall::getpid();
|
||||||
println!("AP {}: {:?}", id, pid);
|
println!("AP {}: {:?}", id, pid);
|
||||||
|
|
||||||
// Disable APs for now
|
|
||||||
loop {
|
|
||||||
unsafe { interrupt::enable_and_halt(); }
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
loop {
|
loop {
|
||||||
unsafe {
|
unsafe {
|
||||||
interrupt::disable();
|
interrupt::disable();
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
use collections::Vec;
|
|
||||||
|
|
||||||
use arch::memory::{free_frames, used_frames};
|
|
||||||
use syscall::error::Result;
|
|
||||||
|
|
||||||
pub fn resource() -> Result<Vec<u8>> {
|
|
||||||
let string = format!("Memory Used: {} KB\nMemory Free: {} KB\n", used_frames() * 4, free_frames() * 4);
|
|
||||||
|
|
||||||
Ok(string.into_bytes())
|
|
||||||
}
|
|
|
@ -12,7 +12,6 @@ use syscall::scheme::Scheme;
|
||||||
mod context;
|
mod context;
|
||||||
mod cpu;
|
mod cpu;
|
||||||
mod exe;
|
mod exe;
|
||||||
mod memory;
|
|
||||||
mod scheme;
|
mod scheme;
|
||||||
//mod interrupt;
|
//mod interrupt;
|
||||||
//mod log;
|
//mod log;
|
||||||
|
@ -41,7 +40,6 @@ impl SysScheme {
|
||||||
files.insert(b"context", Box::new(move || context::resource()));
|
files.insert(b"context", Box::new(move || context::resource()));
|
||||||
files.insert(b"cpu", Box::new(move || cpu::resource()));
|
files.insert(b"cpu", Box::new(move || cpu::resource()));
|
||||||
files.insert(b"exe", Box::new(move || exe::resource()));
|
files.insert(b"exe", Box::new(move || exe::resource()));
|
||||||
files.insert(b"memory", Box::new(move || memory::resource()));
|
|
||||||
files.insert(b"scheme", Box::new(move || scheme::resource()));
|
files.insert(b"scheme", Box::new(move || scheme::resource()));
|
||||||
//files.insert(b"interrupt", Box::new(move || interrupt::resource()));
|
//files.insert(b"interrupt", Box::new(move || interrupt::resource()));
|
||||||
//files.insert(b"log", Box::new(move || log::resource()));
|
//files.insert(b"log", Box::new(move || log::resource()));
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit fe68f368a7e8cf3a690651da596fb769ac1cb20e
|
Subproject commit 30dae30ee0c4d4628f08b04db9d7f986cc975763
|
Loading…
Reference in a new issue