Skip to content

Commit

Permalink
Runable
Browse files Browse the repository at this point in the history
  • Loading branch information
yfblock committed Apr 15, 2024
1 parent f2e7cf3 commit 9e632a2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 19 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ fdt:
@qemu-system-riscv64 -M 128m -machine virt,dumpdtb=virt.out
fdtdump virt.out

justrun: build
justrun: fs-img
rust-objcopy --binary-architecture=$(ARCH) $(KERNEL_ELF) --strip-all -O binary $(KERNEL_BIN)
$(QEMU_EXEC)

cv1811h-build: build
Expand Down
6 changes: 1 addition & 5 deletions kernel/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,6 @@ impl ArchInterface for ArchInterfaceImpl {
fn main(hart_id: usize) {
disable_irq();
if hart_id == 0 {
// if hart_id != 0 {
// loop {}
// }

extern "C" {
fn start();
fn end();
Expand Down Expand Up @@ -225,7 +221,7 @@ impl ArchInterface for ArchInterfaceImpl {
// enable_irq();

loop {
// info!("aux core");
info!("aux core");
}
}
}
Expand Down
11 changes: 6 additions & 5 deletions modules/executor/src/task.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ use alloc::{
sync::{Arc, Weak},
vec::Vec,
};
use arch::addr::{PhysPage, VirtAddr, VirtPage};
use arch::pagetable::{MappingFlags, MappingSize, PageTableWrapper};
use arch::{TrapFrame, TrapFrameArgs, PAGE_SIZE};
use arch::{
addr::{PhysPage, VirtAddr, VirtPage},
pagetable::{MappingFlags, MappingSize, PageTableWrapper},
{TrapFrame, TrapFrameArgs, PAGE_SIZE}
};
use frame_allocator::{ceil_div, frame_alloc_much, FrameTracker};
use fs::File;
use log::{debug, warn};
use signal::REAL_TIME_SIGNAL_NUM;
pub use signal::{SigAction, SigProcMask, SignalFlags};
use signal::{REAL_TIME_SIGNAL_NUM, SigAction, SigProcMask, SignalFlags};
use sync::{Mutex, MutexGuard, RwLock};
use vfscore::OpenFlags;

Expand Down
1 change: 0 additions & 1 deletion modules/logging/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ log = "0.4"
arch = { path = "../../arch" }
devices = { path = "../devices" }
sync = { path = "../sync" }
irq_safety = { path = "../../crates/irq_safety" }
6 changes: 0 additions & 6 deletions modules/logging/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#![no_std]

#[macro_use]
extern crate alloc;

use arch::{console_getchar, console_putchar};
use core::fmt::{self, Write};
use devices::MAIN_UART;
use irq_safety::MutexIrqSafe;

use log::{self, info, Level, LevelFilter, Log, Metadata, Record};

pub struct Logger;
Expand All @@ -22,9 +19,6 @@ impl Log for Logger {
return;
}

static LOG_LOCK: MutexIrqSafe<()> = MutexIrqSafe::new(());
LOG_LOCK.lock();

let file = record.file();
let line = record.line();

Expand Down

0 comments on commit 9e632a2

Please sign in to comment.