assert(page_table != 0);
}
-
- page_dir[npde] = (unsigned long) page_table | flags;
+ page_dir[npde] = (unsigned long) page_table | flags | PAGE_P | PAGE_WR;
page_table = pa2va(page_table);
page_table[npte] = paddr | flags;
}
disable_irq();
pt_regs_t *regs = ((pt_regs_t *)(TASK_SIZE+(unsigned long)current)) - 1;
-#if 0
+#if 1
memset((void*)regs, 0, sizeof(pt_regs_t));
regs->ss = SELECTOR_USER_DS;
regs->ds = SELECTOR_USER_DS;
void do_no_page(void *addr)
{
- //printk("%s addr %08x\n", __func__, (unsigned long)addr);
-
+ printk("%s addr %08x\n", __func__, (unsigned long)addr);
#if 1
pde_t *page_dir = (pde_t *)current->cr3;
pte_t *page_tbl = 0;
void do_wp_page(void *addr)
{
+ printk("%s addr %08x\n", __func__, (unsigned long)addr);
#if 1
int npde = get_npd(addr);
int npte = get_npt(addr);