diff --git a/kernel-hal-bare/Cargo.toml b/kernel-hal-bare/Cargo.toml index 6c008fb0..18044a54 100644 --- a/kernel-hal-bare/Cargo.toml +++ b/kernel-hal-bare/Cargo.toml @@ -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" } diff --git a/kernel-hal/Cargo.toml b/kernel-hal/Cargo.toml index 0ab1032e..16280540 100644 --- a/kernel-hal/Cargo.toml +++ b/kernel-hal/Cargo.toml @@ -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"} diff --git a/prebuilt/zircon/fuchsia.zbi b/prebuilt/zircon/fuchsia.zbi old mode 100755 new mode 100644 index ca3f3dd0..c1b196a1 --- a/prebuilt/zircon/fuchsia.zbi +++ b/prebuilt/zircon/fuchsia.zbi @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:31f4bc961df5bc94cbec940142bc412a5485448b0102c5c53f68b9ad67d394ca -size 45560048 +oid sha256:d2b3ea66205362b99c64670465a3d5170b48b6185abcd851f5f8845356aca2ae +size 1644936 diff --git a/zCore/Cargo.toml b/zCore/Cargo.toml index eda2a1bb..96c59fd8 100644 --- a/zCore/Cargo.toml +++ b/zCore/Cargo.toml @@ -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" } diff --git a/zircon-object/src/object/handle.rs b/zircon-object/src/object/handle.rs index 99fa0e60..c9a40518 100644 --- a/zircon-object/src/object/handle.rs +++ b/zircon-object/src/object/handle.rs @@ -34,7 +34,7 @@ impl Handle { } #[repr(C)] -#[derive(Default)] +#[derive(Default, Debug)] pub struct HandleBasicInfo { pub koid: u64, rights: u32, diff --git a/zircon-syscall/src/lib.rs b/zircon-syscall/src/lib.rs index d98c4401..9da71ced 100644 --- a/zircon-syscall/src/lib.rs +++ b/zircon-syscall/src/lib.rs @@ -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).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()), diff --git a/zircon-syscall/src/object.rs b/zircon-syscall/src/object.rs index d1057eaa..4512bfe9 100644 --- a/zircon-syscall/src/object.rs +++ b/zircon-syscall/src/object.rs @@ -111,6 +111,8 @@ impl Syscall<'_> { if buffer_size < 8 { return Err(ZxError::BUFFER_TOO_SMALL); } + let thread = self.thread.proc().get_object::(handle_value)?; + assert!(Arc::ptr_eq(&thread, &self.thread)); let fsbase = UserInPtr::::from(ptr).read()?; info!("to set fsbase as {:#x}", fsbase); self.regs.fsbase = fsbase as usize; @@ -179,8 +181,9 @@ impl Syscall<'_> { UserOutPtr::::from(buffer).write(vmar.get_info())?; } ZxInfo::InfoHandleBasic => { - UserOutPtr::::from(buffer) - .write(self.thread.proc().get_handle_info(handle)?)?; + let info = self.thread.proc().get_handle_info(handle)?; + info!("basic info: {:?}", info); + UserOutPtr::::from(buffer).write(info)?; } _ => { warn!("not supported info topic");