projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make userspace actually work.
[pintos-anon]
/
src
/
threads
/
loader.S
diff --git
a/src/threads/loader.S
b/src/threads/loader.S
index 18086ede8993c44805e6ebe742c64bd2cdc5c524..c60e8dd6bd3347551b30f727617b113b88494388 100644
(file)
--- a/
src/threads/loader.S
+++ b/
src/threads/loader.S
@@
-153,6
+153,13
@@
read_sector:
movl %eax, %cr0
jmp 1f
1:
+
+##### Turn on EM bit in CR0, forcing most floating-point instructions
+##### to trap. We don't support floating-point or MMX.
+
+ movl %cr0, %eax
+ orl $CR0_EM, %eax
+ movl %eax, %cr0
##### Jump to kernel entry point.