projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
086c09c
)
Improve wording.
author
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 13 Apr 2006 17:35:41 +0000
(17:35 +0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 13 Apr 2006 17:35:41 +0000
(17:35 +0000)
src/userprog/pagedir.c
patch
|
blob
|
history
diff --git
a/src/userprog/pagedir.c
b/src/userprog/pagedir.c
index ea3c1f458409ec7c3b0771cbb3af1761d785c1ff..b242d3b6b909b6420aee0e0677476ab9089b8c6b 100644
(file)
--- a/
src/userprog/pagedir.c
+++ b/
src/userprog/pagedir.c
@@
-85,8
+85,9
@@
lookup_page (uint32_t *pd, const void *vaddr, bool create)
return &pt[pt_no (vaddr)];
}
return &pt[pt_no (vaddr)];
}
-/* Adds a mapping from user virtual page UPAGE to kernel virtual
- address KPAGE in page directory PD.
+/* Adds a mapping in page directory PD from user virtual page
+ UPAGE to the physical frame identified by kernel virtual
+ address KPAGE.
UPAGE must not already be mapped.
KPAGE should probably be a page obtained from the user pool
with palloc_get_page().
UPAGE must not already be mapped.
KPAGE should probably be a page obtained from the user pool
with palloc_get_page().
@@
-118,9
+119,10
@@
pagedir_set_page (uint32_t *pd, void *upage, void *kpage,
return false;
}
return false;
}
-/* Returns the kernel virtual address that user virtual address
- UADDR is mapped to in PD, or a null pointer if UADDR is not
- present. */
+/* Looks up the physical address that corresponds to user virtual
+ address UADDR in PD. Returns the kernel virtual address
+ corresponding to that physical address, or a null pointer if
+ UADDR is unmapped. */
void *
pagedir_get_page (uint32_t *pd, const void *uaddr)
{
void *
pagedir_get_page (uint32_t *pd, const void *uaddr)
{
@@
-255,8
+257,7
@@
invalidate_pagedir (uint32_t *pd)
{
if (active_pd () == pd)
{
{
if (active_pd () == pd)
{
- /* We cleared a page-table entry in the active page table,
- so we have to invalidate the TLB. See [IA32-v3a] 3.12
+ /* Re-activating PD clears the TLB. See [IA32-v3a] 3.12
"Translation Lookaside Buffers (TLBs)". */
pagedir_activate (pd);
}
"Translation Lookaside Buffers (TLBs)". */
pagedir_activate (pd);
}