From a54b2baac24a08b82791ede1491f31ce9408af3f Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Wed, 15 Mar 2006 20:25:50 +0100 Subject: Implement console for Mini-os and also fix 2 bugs: a) in initialising new page table frames b) in initialising idle thread. Signed-off-by: Grzegorz Milos --- extras/mini-os/mm.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'extras/mini-os/mm.c') diff --git a/extras/mini-os/mm.c b/extras/mini-os/mm.c index c26ae2817a..6facfe04b0 100644 --- a/extras/mini-os/mm.c +++ b/extras/mini-os/mm.c @@ -380,6 +380,10 @@ void new_pt_frame(unsigned long *pt_pfn, unsigned long prev_l_mfn, "prev_l_mfn=%lx, offset=%lx\n", level, *pt_pfn, prev_l_mfn, offset); + /* We need to clear the page, otherwise we might fail to map it + as a page table page */ + memset((unsigned long*)pfn_to_virt(*pt_pfn), 0, PAGE_SIZE); + if (level == L1_FRAME) { prot_e = L1_PROT; -- cgit v1.2.3