aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/arch/x86/mm.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2008-01-22 11:35:26 +0000
committerKeir Fraser <keir.fraser@citrix.com>2008-01-22 11:35:26 +0000
commitdfba81d2fcc227ffc2ce546d9884580f682e68b5 (patch)
treeb3b9cb1c870750bbbde0d0aa1d44c7c502192e11 /extras/mini-os/arch/x86/mm.c
parentc6c6a0890d23024c78426352d3da55aec2e472d5 (diff)
downloadxen-dfba81d2fcc227ffc2ce546d9884580f682e68b5.tar.gz
xen-dfba81d2fcc227ffc2ce546d9884580f682e68b5.tar.bz2
xen-dfba81d2fcc227ffc2ce546d9884580f682e68b5.zip
minios: fix case when _text is not 0
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras/mini-os/arch/x86/mm.c')
-rw-r--r--extras/mini-os/arch/x86/mm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/extras/mini-os/arch/x86/mm.c b/extras/mini-os/arch/x86/mm.c
index b8f55b7c58..5e6f180efd 100644
--- a/extras/mini-os/arch/x86/mm.c
+++ b/extras/mini-os/arch/x86/mm.c
@@ -497,11 +497,11 @@ static void clear_bootstrap(void)
int n = sizeof(mfns)/sizeof(*mfns);
pte_t nullpte = { };
- /* Use page 0 as the CoW zero page */
- memset(NULL, 0, PAGE_SIZE);
- mfn_zero = pfn_to_mfn(0);
- if (HYPERVISOR_update_va_mapping(0, nullpte, UVMF_INVLPG))
- printk("Unable to unmap page 0\n");
+ /* Use first page as the CoW zero page */
+ memset(&_text, 0, PAGE_SIZE);
+ mfn_zero = pfn_to_mfn((unsigned long) &_text);
+ if (HYPERVISOR_update_va_mapping((unsigned long) &_text, nullpte, UVMF_INVLPG))
+ printk("Unable to unmap first page\n");
set_xen_guest_handle(reservation.extent_start, mfns);
reservation.nr_extents = n;