bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Bug that prevents non-PAE Xen GNU Mach from booting


From: Thomas Schwinge
Subject: [PATCH] Bug that prevents non-PAE Xen GNU Mach from booting
Date: Sat, 22 Nov 2008 22:37:57 +0100
User-agent: Mutt/1.5.11

Hello!

With this patch GNU Mach will boot on Xen in a non-PAE configuration
again.  I can't check in a PAE configuration.  Samuel, is this OK to be
checked in?

Index: i386/intel/pmap.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/intel/pmap.c,v
retrieving revision 1.4.2.16.2.20
diff -u -p -r1.4.2.16.2.20 pmap.c
--- i386/intel/pmap.c   11 Nov 2008 02:46:32 -0000      1.4.2.16.2.20
+++ i386/intel/pmap.c   22 Nov 2008 21:33:12 -0000
@@ -793,6 +793,9 @@ void pmap_clear_bootstrap_pagetable(pt_e
                                void *pgt = (void*) ptoa(pfn);
                                if (pde & INTEL_PTE_VALID && pfn != -1)
                                        hyp_free_page(atop(pgt), pgt);
+                               else
+                                       /* Reached end of start of bootstrap 
area */
+                                       break;
                        }
 #if PAE
                        hyp_free_page(atop(dir), dir);


For reference, here is the old code vs. the new one:

Index: i386/intel/pmap.c
===================================================================
RCS file: /cvsroot/hurd/gnumach/i386/intel/pmap.c,v
retrieving revision 1.4.2.16.2.20
diff -u -p -r1.4.2.16.2.20 pmap.c
--- i386/intel/pmap.c   11 Nov 2008 02:46:32 -0000      1.4.2.16.2.20
+++ i386/intel/pmap.c   22 Nov 2008 21:32:51 -0000
@@ -789,10 +789,23 @@ void pmap_clear_bootstrap_pagetable(pt_e
 #endif /* PAE */
                        for (i = 0; i < PAGE_SIZE / sizeof (pt_entry_t); i++) {
                                pt_entry_t pde = dir[i];
+#if 0 /* old */
+                               unsigned long *ptable = (void*) (pde & 
INTEL_PTE_PFN);
+                               unsigned long pa = ma_to_pa(ptable);
+                               if (pde & INTEL_PTE_VALID)
+                                       hyp_free_page(atop(pa), pa);
+                               else
+                                       /* Reached end of start of bootstrap 
area */
+                                       break;
+#elif 1 /* new */
                                unsigned long pfn = mfn_to_pfn(atop(pde));
                                void *pgt = (void*) ptoa(pfn);
                                if (pde & INTEL_PTE_VALID && pfn != -1)
                                        hyp_free_page(atop(pgt), pgt);
+                               else
+                                       /* Reached end of start of bootstrap 
area */
+                                       break;
+#endif
                        }
 #if PAE
                        hyp_free_page(atop(dir), dir);


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]