projects
/
pintos-anon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f09512e
)
Improve comments.
author
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 1 Sep 2004 01:16:25 +0000
(
01:16
+0000)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Wed, 1 Sep 2004 01:16:25 +0000
(
01:16
+0000)
src/threads/loader.S
patch
|
blob
|
history
diff --git
a/src/threads/loader.S
b/src/threads/loader.S
index 970d2e213dd03a6e12d60bca4ce77f4173811c3c..8e5eeb722e1051c7b94df7f3b7ff1ce8f8b51268 100644
(file)
--- a/
src/threads/loader.S
+++ b/
src/threads/loader.S
@@
-133,33
+133,33
@@
read_sector:
cmpl $KERNEL_LOAD_PAGES*8 + 1, %ebx
jnz read_sector
cmpl $KERNEL_LOAD_PAGES*8 + 1, %ebx
jnz read_sector
-##### Create temporary
PDE and PTE, set page directory pointer, and turn
-##### on paging.
+##### Create temporary
page directory and page table, set page
+#####
directory pointer, and turn
on paging.
##### FIXME? We could use a single 4 MB page instead of 1024 4 kB pages.
##### FIXME? We could use a single 4 MB page instead of 1024 4 kB pages.
- # Create
PDE
at 64 kB.
+ # Create
page directory
at 64 kB.
movl $0x10000, %edi
movl %edi, %cr3
movl $0x10000, %edi
movl %edi, %cr3
- # Fill
PDE
with zeroes.
+ # Fill
page directory
with zeroes.
subl %eax, %eax
movl $0x400, %ecx
rep stosl
subl %eax, %eax
movl $0x400, %ecx
rep stosl
- # Set PDE
entrie
s for 0 and LOADER_PHYS_BASE to point to the
- #
PTE
.
+ # Set PDEs for 0 and LOADER_PHYS_BASE to point to the
+ #
page table
.
movl $0x11000 | PG_U | PG_W | PG_P, %eax
movl %eax, 0x10000
movl %eax, 0x10000 | (LOADER_PHYS_BASE >> 20)
movl $0x11000 | PG_U | PG_W | PG_P, %eax
movl %eax, 0x10000
movl %eax, 0x10000 | (LOADER_PHYS_BASE >> 20)
- # Initialize
PTE
.
+ # Initialize
page table
.
movl $PG_U | PG_W | PG_P, %eax
movl $0x400, %ecx
1: stosl
addl $0x1000, %eax
loop 1b
movl $PG_U | PG_W | PG_P, %eax
movl $0x400, %ecx
1: stosl
addl $0x1000, %eax
loop 1b
- #
Enable
paging.
+ #
Turn on
paging.
movl %cr0, %eax
orl $CR0_PG, %eax
movl %eax, %cr0
movl %cr0, %eax
orl $CR0_PG, %eax
movl %eax, %cr0