Correct cast

This commit is contained in:
Loic Guegan 2021-04-14 18:16:31 +02:00
parent 2fc03e597e
commit 28870fc375
2 changed files with 2 additions and 2 deletions

View file

@ -9,7 +9,7 @@
#else #else
#define PAGING_MAX_DIR_ENTRY PAGING_MAX_PAGES/1024 #define PAGING_MAX_DIR_ENTRY PAGING_MAX_PAGES/1024
#endif #endif
#define PADDR(entry) (entry&0xFFFFF000) #define PADDR(entry) (((u32)entry)&0xFFFFF000)
/** /**
* Configure and enable paging * Configure and enable paging

View file

@ -24,7 +24,7 @@ void clock(){
void run_task(int *page_dir, void *task, int task_size){ void run_task(int *page_dir, void *task, int task_size){
// Compute various addresses // Compute various addresses
int*pt_addr=PADDR(page_dir[1]); int*pt_addr=(int*)PADDR(page_dir[1]);
void *entry_point=(void*)(PADDR(pt_addr[3])); void *entry_point=(void*)(PADDR(pt_addr[3]));
void *ustack=(void*)((int)entry_point+0xFF); void *ustack=(void*)((int)entry_point+0xFF);