forked from rcore-os/zCore
renew zbi, remove cmdline
This commit is contained in:
parent
03a75d5f52
commit
ef8c93e57a
|
@ -11,7 +11,7 @@ description = "Kernel HAL implementation for bare metal environment."
|
|||
log = "0.4"
|
||||
spin = "0.5"
|
||||
executor = { git = "https://github.com/PanQL/executor.git", rev = "1818b01" }
|
||||
trapframe = "0.1.3"
|
||||
trapframe = { git = "https://github.com/rcore-os/trapframe-rs.git", rev = "b0ce75d"}
|
||||
core = { package = "core-futures-tls", version = "0.1.0" }
|
||||
kernel-hal = { path = "../kernel-hal" }
|
||||
|
||||
|
|
|
@ -9,4 +9,4 @@ description = "Kernel HAL interface definations."
|
|||
|
||||
[dependencies]
|
||||
bitflags = "1.2"
|
||||
trapframe = "0.1.3"
|
||||
trapframe = { git = "https://github.com/rcore-os/trapframe-rs.git", rev = "b0ce75d"}
|
||||
|
|
Binary file not shown.
|
@ -15,7 +15,7 @@ rboot = { path = "../rboot", default-features = false }
|
|||
kernel-hal-bare = { path = "../kernel-hal-bare" }
|
||||
lazy_static = { version = "1.4", features = ["spin_no_std" ] }
|
||||
bitmap-allocator = { git = "https://github.com/rcore-os/bitmap-allocator" }
|
||||
trapframe = "0.1.3"
|
||||
trapframe = { git = "https://github.com/rcore-os/trapframe-rs.git", rev = "b0ce75d"}
|
||||
greenthread-future = "0.1.0"
|
||||
executor = { git = "https://github.com/PanQL/executor.git", rev="1818b01" }
|
||||
core = { package = "core-futures-tls", version = "0.1.0" }
|
||||
|
|
|
@ -34,7 +34,7 @@ impl Handle {
|
|||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Default)]
|
||||
#[derive(Default, Debug)]
|
||||
pub struct HandleBasicInfo {
|
||||
pub koid: u64,
|
||||
rights: u32,
|
||||
|
|
|
@ -42,7 +42,12 @@ pub struct Syscall<'a> {
|
|||
|
||||
impl Syscall<'_> {
|
||||
pub async fn syscall(&mut self, sys_type: SyscallType, args: [usize; 8]) -> isize {
|
||||
info!("{:?}=> args={:x?}", sys_type, args);
|
||||
info!(
|
||||
"{} {:?}=> args={:x?}",
|
||||
(self.thread.clone() as Arc<dyn KernelObject>).name(),
|
||||
sys_type,
|
||||
args
|
||||
);
|
||||
let [a0, a1, a2, a3, a4, a5, a6, a7] = args;
|
||||
let ret = match sys_type {
|
||||
SyscallType::HANDLE_DUPLICATE => self.sys_handle_duplicate(a0 as _, a1 as _, a2.into()),
|
||||
|
|
|
@ -111,6 +111,8 @@ impl Syscall<'_> {
|
|||
if buffer_size < 8 {
|
||||
return Err(ZxError::BUFFER_TOO_SMALL);
|
||||
}
|
||||
let thread = self.thread.proc().get_object::<Thread>(handle_value)?;
|
||||
assert!(Arc::ptr_eq(&thread, &self.thread));
|
||||
let fsbase = UserInPtr::<u64>::from(ptr).read()?;
|
||||
info!("to set fsbase as {:#x}", fsbase);
|
||||
self.regs.fsbase = fsbase as usize;
|
||||
|
@ -179,8 +181,9 @@ impl Syscall<'_> {
|
|||
UserOutPtr::<VmarInfo>::from(buffer).write(vmar.get_info())?;
|
||||
}
|
||||
ZxInfo::InfoHandleBasic => {
|
||||
UserOutPtr::<HandleBasicInfo>::from(buffer)
|
||||
.write(self.thread.proc().get_handle_info(handle)?)?;
|
||||
let info = self.thread.proc().get_handle_info(handle)?;
|
||||
info!("basic info: {:?}", info);
|
||||
UserOutPtr::<HandleBasicInfo>::from(buffer).write(info)?;
|
||||
}
|
||||
_ => {
|
||||
warn!("not supported info topic");
|
||||
|
|
Loading…
Reference in New Issue