Repos / kernel.git / commitdiff
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 985381f)
raw | patch | inline | side by side (parent: 985381f)
| author | zhaoyanbai <zhaoyanbai@126.com> | |
| Mon, 28 Jul 2014 16:36:51 +0000 (00:36 +0800) | ||
| committer | zhaoyanbai <zhaoyanbai@126.com> | |
| Wed, 3 Nov 2021 02:45:40 +0000 (10:45 +0800) |
| kernel/syscall.c | patch | blob | history | |
| mm/page.c | patch | blob | history |
diff --git a/kernel/syscall.c b/kernel/syscall.c
--- a/kernel/syscall.c
+++ b/kernel/syscall.c
int sysc_debug(unsigned int v)
{
static unsigned int cnt=0;
- printl(MPL_DEBUG, "Task Debug Syscall %u Value %08x", cnt++, v);
+#if 1
+ printl(MPL_DEBUG, "task debug syscall %u", cnt++);
+#else
+ printl(MPL_DEBUG, "task debug syscall %u value %08x", cnt++, v);
+#endif
}
void init_sysc_handler_table()
diff --git a/mm/page.c b/mm/page.c
--- a/mm/page.c
+++ b/mm/page.c
void do_wp_page(void *addr)
{
printk("%s addr %08x\n", __func__, (unsigned long)addr);
+ if((unsigned long) addr >= PAGE_OFFSET)
+ {
+ panic("%s invalid addr", __func__);
+ }
#if 1
int npde = get_npd(addr);
int npte = get_npt(addr);
pde_t *page_dir = (pde_t *)current->cr3;
pte_t *page_tbl = pa2va(PAGE_ALIGN(page_dir[npde]));
+ //printk("%s addr %08x dirent %08x\n", __func__, (unsigned long)addr, page_dir[npde]);
+ //assert(page_dir[npde] != 0);
+
unsigned long wp_pa_addr = PAGE_ALIGN(page_tbl[npte]);
page_t *page = pa2page(wp_pa_addr);
}
page_tbl[npte] |= PAGE_WR;
+#if 0
+ page_tbl[npte] |= PAGE_US;
+ page_dir[npde] |= PAGE_WR;
+ page_dir[npde] |= PAGE_US;
+#endif
load_cr3(current);