Subject: Re: AMD Geode GX reboot workaround
To: Juan RP <juan@xtrarom.org>
From: Allen Briggs <briggs@netbsd.org>
List: tech-kern
Date: 06/26/2007 15:59:08
--uCPdOCrL+PnN2Vxy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Jun 26, 2007 at 09:56:23PM +0200, Juan RP wrote:
> I'll let you know in the following hours, I have to build a release with
> that patch to install it on the decTOP.

OK.  When you get a chance, please try this (again, against a
current and unmodified machdep.c)--I think we really should be
ignoring regions less than a page size.

-allen

-- 
Allen Briggs  |  http://www.ninthwonder.com/~briggs/  |  briggs@ninthwonder.com

--uCPdOCrL+PnN2Vxy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="machdep.diffs"

Index: machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/machdep.c,v
retrieving revision 1.603
diff -p -u -r1.603 machdep.c
--- machdep.c	17 May 2007 14:51:21 -0000	1.603
+++ machdep.c	26 Jun 2007 19:57:05 -0000
@@ -1604,6 +1604,13 @@ init386(paddr_t first_avail)
 			}
 
 			/*
+			 * If the segment is smaller than a page, skip it.
+			 */
+			if (bim->entry[x].size < NBPG) {
+				continue;
+			}
+
+			/*
 			 * Sanity check the entry.
 			 * XXX Need to handle uint64_t in extent code
 			 * XXX and 64-bit physical addresses in i386

--uCPdOCrL+PnN2Vxy--