diff --git a/src/core/paging.h b/src/core/paging.h index 58a33b2..5329384 100644 --- a/src/core/paging.h +++ b/src/core/paging.h @@ -9,7 +9,7 @@ #else #define PAGING_MAX_DIR_ENTRY PAGING_MAX_PAGES/1024 #endif -#define PADDR(entry) (entry&0xFFFFF000) +#define PADDR(entry) (((u32)entry)&0xFFFFF000) /** * Configure and enable paging diff --git a/src/core/scheduler.c b/src/core/scheduler.c index 7b1c421..848b7b7 100644 --- a/src/core/scheduler.c +++ b/src/core/scheduler.c @@ -24,7 +24,7 @@ void clock(){ void run_task(int *page_dir, void *task, int task_size){ // 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 *ustack=(void*)((int)entry_point+0xFF);