mirror of
https://github.com/tailix/kernel.git
synced 2024-10-30 12:03:52 -04:00
Reorder code
This commit is contained in:
parent
a90279cb8b
commit
b1cd004fe8
2 changed files with 7 additions and 7 deletions
|
@ -5,6 +5,12 @@
|
|||
#include <kernaux/libc.h>
|
||||
#include <kernaux/stdlib.h>
|
||||
|
||||
void paging_load(struct Paging *const paging)
|
||||
{
|
||||
uint32_t page_dir_phys = (uint32_t)&paging->page_dir;
|
||||
kernaux_arch_i386_write_cr3(page_dir_phys);
|
||||
}
|
||||
|
||||
void paging_enable()
|
||||
{
|
||||
uint32_t cr0 = kernaux_arch_i386_read_cr0();
|
||||
|
@ -35,12 +41,6 @@ void paging_enable()
|
|||
kernaux_arch_i386_write_cr4(cr4);
|
||||
}
|
||||
|
||||
void paging_load(struct Paging *const paging)
|
||||
{
|
||||
uint32_t page_dir_phys = (uint32_t)&paging->page_dir;
|
||||
kernaux_arch_i386_write_cr3(page_dir_phys);
|
||||
}
|
||||
|
||||
void paging_clear(struct Paging *const paging)
|
||||
{
|
||||
memset(&paging->page_dir, 0, sizeof(paging->page_dir));
|
||||
|
|
|
@ -21,8 +21,8 @@ __attribute__((packed))
|
|||
__attribute__((aligned((PAGE_DIR_ALIGN))))
|
||||
;
|
||||
|
||||
void paging_enable();
|
||||
void paging_load(struct Paging *paging);
|
||||
void paging_enable();
|
||||
|
||||
void paging_clear(struct Paging *paging);
|
||||
void paging_identity(struct Paging *paging);
|
||||
|
|
Loading…
Reference in a new issue