Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
educg-net-14238-914330
OSKernel2022-健康向上好青年
Commits
2fca3652
Commit
2fca3652
authored
3 years ago
by
Dh2zZ
Browse files
Options
Download
Patches
Plain Diff
try to 102
parent
50cb4096
main
K210_Hifive
cow2
cow_g
finalcomp
hifive-SingleCore
libc-test
lmbench
lmbench-f
optimizing
porting
pre-k210
pthread
sd-debug
submit
submit2
usershell
usershell_merge
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
os/src/syscall/process.rs
+0
-1
os/src/syscall/process.rs
os/src/trap/page_fault.rs
+3
-3
os/src/trap/page_fault.rs
with
3 additions
and
4 deletions
+3
-4
os/src/syscall/process.rs
+
0
−
1
View file @
2fca3652
...
...
@@ -262,7 +262,6 @@ pub fn sys_mmap(
let
aligned_len
=
aligned_up
(
len
);
let
ret
=
current_process
()
.mmap
(
start
,
aligned_len
,
prot
,
flags
,
fd
,
offset
);
println!
(
"[debug] sys_mmap(aligned_start: {:#x?}, aligned_len: {}, prot: {:x?}, flags: {:x?}, fd: {}, offset: {} ) = {:#x?}"
,
start
,
aligned_len
,
prot
,
flags
,
fd
,
offset
,
ret
);
gdb_println!
(
SYSCALL_ENABLE
,
"sys_mmap(aligned_start: {:#x?}, aligned_len: {}, prot: {:x?}, flags: {:x?}, fd: {}, offset: {} ) = {:#x?}"
,
start
,
aligned_len
,
prot
,
flags
,
fd
,
offset
,
ret
);
ret
}
...
...
This diff is collapsed.
Click to expand it.
os/src/trap/page_fault.rs
+
3
−
3
View file @
2fca3652
...
...
@@ -28,12 +28,12 @@ pub fn page_fault_handler(vaddr: usize) -> isize {
let
heap_top
=
current_process
()
.inner_exclusive_access
()
.user_heap_top
;
let
mmap_top
=
current_process
()
.inner_exclusive_access
()
.mmap_area_top
;
println!
(
"va = {:#x?}, mmap_top = {:#x?}"
,
vaddr
,
mmap_top
);
//
println!("va = {:#x?}, mmap_top = {:#x?}", vaddr, mmap_top);
if
vaddr
>=
heap_base
&&
vaddr
<
heap_top
{
println!
(
"[kernel] alloc heap memory {:#x?}"
,
vaddr
);
//
println!("[kernel] alloc heap memory {:#x?}", vaddr);
lazy_alloc_heap_page
(
vaddr
)
}
else
if
vaddr
>=
MMAP_BASE
&&
vaddr
<
mmap_top
{
println!
(
"[kernel] alloc mmap memory {:#x?}"
,
vaddr
);
//
println!("[kernel] alloc mmap memory {:#x?}", vaddr);
lazy_alloc_mmap_page
(
vaddr
)
}
else
{
-
1
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets