Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
X
xv6-riscv-tp
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cidre-public
Systemes d exploitation
xv6-riscv-tp
Commits
09b96474
Commit
09b96474
authored
4 years ago
by
Tronel Frederic
Browse files
Options
Downloads
Patches
Plain Diff
Ajout d'un nouvel appel système côté noyau pour lire dans la mémoire kernel directement.
parent
2f05baf5
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
kernel/syscall.c
+2
-0
2 additions, 0 deletions
kernel/syscall.c
kernel/syscall.h
+2
-0
2 additions, 0 deletions
kernel/syscall.h
kernel/sysproc.c
+11
-0
11 additions, 0 deletions
kernel/sysproc.c
with
15 additions
and
0 deletions
kernel/syscall.c
+
2
−
0
View file @
09b96474
...
@@ -109,6 +109,7 @@ extern uint64 sys_nice(void);
...
@@ -109,6 +109,7 @@ extern uint64 sys_nice(void);
extern
uint64
sys_create_mutex
(
void
);
extern
uint64
sys_create_mutex
(
void
);
extern
uint64
sys_acquire_mutex
(
void
);
extern
uint64
sys_acquire_mutex
(
void
);
extern
uint64
sys_release_mutex
(
void
);
extern
uint64
sys_release_mutex
(
void
);
extern
uint64
sys_read_kmem
(
void
);
static
uint64
(
*
syscalls
[])(
void
)
=
{
static
uint64
(
*
syscalls
[])(
void
)
=
{
[
SYS_fork
]
sys_fork
,
[
SYS_fork
]
sys_fork
,
...
@@ -137,6 +138,7 @@ static uint64 (*syscalls[])(void) = {
...
@@ -137,6 +138,7 @@ static uint64 (*syscalls[])(void) = {
[
SYS_create_mutex
]
sys_create_mutex
,
[
SYS_create_mutex
]
sys_create_mutex
,
[
SYS_acquire_mutex
]
sys_acquire_mutex
,
[
SYS_acquire_mutex
]
sys_acquire_mutex
,
[
SYS_release_mutex
]
sys_release_mutex
,
[
SYS_release_mutex
]
sys_release_mutex
,
[
SYS_read_kmem
]
sys_read_kmem
,
};
};
void
void
...
...
This diff is collapsed.
Click to expand it.
kernel/syscall.h
+
2
−
0
View file @
09b96474
...
@@ -32,4 +32,6 @@
...
@@ -32,4 +32,6 @@
#define SYS_acquire_mutex 25
#define SYS_acquire_mutex 25
#define SYS_release_mutex 26
#define SYS_release_mutex 26
#define SYS_read_kmem 30
#endif
#endif
This diff is collapsed.
Click to expand it.
kernel/sysproc.c
+
11
−
0
View file @
09b96474
...
@@ -100,3 +100,14 @@ sys_uptime(void)
...
@@ -100,3 +100,14 @@ sys_uptime(void)
release
(
&
tickslock
);
release
(
&
tickslock
);
return
xticks
;
return
xticks
;
}
}
uint64
sys_read_kmem
(
void
)
{
uint64
addr
;
argaddr
(
0
,
&
addr
);
printf
(
"Call read kernel mem with addr: %p
\n
"
,
addr
);
return
*
(
int
*
)
addr
;
}
This diff is collapsed.
Click to expand it.
Tronel Frederic
@ftronel
mentioned in commit
71393deb
·
4 years ago
mentioned in commit
71393deb
mentioned in commit 71393deb21f13780dd9be788928404395c3d0438
Toggle commit list
Preview
0%
Loading
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