blob: c8e626041866d96082f4ad7bccc09a5a971abd8a [file] [log] [blame]
swissChili825d46b2021-02-21 10:14:16 -08001 [section .text]
2 [bits 32]
3
swissChili825d46b2021-02-21 10:14:16 -08004 [global load_page_directory]
5load_page_directory:
swissChilie0a79bb2021-02-22 19:54:48 -08006 mov ecx, [esp + 4] ; Pointer to directory
7 mov cr3, ecx
swissChili825d46b2021-02-21 10:14:16 -08008 ret
9
10 [global enable_paging]
11enable_paging:
swissChilie0a79bb2021-02-22 19:54:48 -080012 mov ecx, cr0
swissChili825d46b2021-02-21 10:14:16 -080013 or eax, 0x80000000
swissChilie0a79bb2021-02-22 19:54:48 -080014 mov cr0, ecx
swissChili825d46b2021-02-21 10:14:16 -080015 ret