diff options
Diffstat (limited to 'src/as/paging.s')
| -rw-r--r-- | src/as/paging.s | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/as/paging.s b/src/as/paging.s index e1cf42a..c3a9a0d 100644 --- a/src/as/paging.s +++ b/src/as/paging.s @@ -1,14 +1,16 @@ +.text + .global loadPageDirectory loadPageDirectory: push %ebp - mov %esp, %ebp - mov 8(%esp), %eax - mov %eax, %cr3 + movl %esp, %ebp + movl 8(%esp), %eax + subl $0xC0000000, %eax + movl %eax, %cr3 mov %ebp, %esp pop %ebp ret -.text .global enablePaging enablePaging: push %ebp @@ -19,3 +21,13 @@ enablePaging: mov %ebp, %esp pop %ebp ret + +.global flushPaging +flushPaging: + push %ebp + mov %esp, %ebp + movl %cr3, %ecx + movl %ecx, %cr3 + mov %ebp, %esp + pop %ebp + ret |
