aboutsummaryrefslogtreecommitdiff
path: root/kernel/paging-as.S
diff options
context:
space:
mode:
authorFranklin Wei <frankhwei536@gmail.com>2015-02-28 20:42:57 -0500
committerFranklin Wei <frankhwei536@gmail.com>2015-02-28 20:42:57 -0500
commit2dc45e8cac33313e847f6097cbe2ba3bb3ceab2a (patch)
tree973fa836d725659a6f0a8edfc108dd9e037430d0 /kernel/paging-as.S
parentd4a70e316e0991d788fb922e3e4eafae97fe950e (diff)
downloadkappa-2dc45e8cac33313e847f6097cbe2ba3bb3ceab2a.zip
kappa-2dc45e8cac33313e847f6097cbe2ba3bb3ceab2a.tar.gz
kappa-2dc45e8cac33313e847f6097cbe2ba3bb3ceab2a.tar.bz2
kappa-2dc45e8cac33313e847f6097cbe2ba3bb3ceab2a.tar.xz
Implement paging
Diffstat (limited to 'kernel/paging-as.S')
-rw-r--r--kernel/paging-as.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/paging-as.S b/kernel/paging-as.S
new file mode 100644
index 0000000..cafaab4
--- /dev/null
+++ b/kernel/paging-as.S
@@ -0,0 +1,9 @@
+ .global do_paging_enable
+do_paging_enable:
+ movl 4(%esp), %eax # loads page directory address
+ mov %eax, %cr3
+ mov %cr0, %eax
+ orl $0x80000000, %eax # set PG bit
+ sti
+ mov %eax, %cr0
+ ret