Skip to content

Commit

Permalink
Merge pull request #999 from mkroening/image-start-address
Browse files Browse the repository at this point in the history
feat: add `sys_image_start_address`
  • Loading branch information
mkroening authored Dec 18, 2023
2 parents e812edf + 8f79b74 commit ccdfb6d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/syscalls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,12 @@ extern "C" fn __sys_dup(fd: i32) -> i32 {
pub extern "C" fn sys_dup(fd: i32) -> i32 {
kernel_function!(__sys_dup(fd))
}

extern "C" fn __sys_image_start_addr() -> usize {
crate::mm::kernel_start_address().0.try_into().unwrap()
}

#[no_mangle]
pub extern "C" fn sys_image_start_addr() -> usize {
kernel_function!(__sys_image_start_addr())
}

0 comments on commit ccdfb6d

Please sign in to comment.