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:28:23
--/3yNEOqWowh/8j+e
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
On Tue, Jun 26, 2007 at 09:14:31PM +0200, Juan RP wrote:
> I believe that the region that starts from 0x00700000 to 0x01000000, is
> causing the problem.
There is no such region in the BIOS map. There is one from 0x07000000
to 0x08000000. And that one is type 2, which is BIM_Reserved and should
be skipped by add_mem_cluster().
Can you try the attached patch (against the original machdep.c)?
-allen
--
Allen Briggs | http://www.ninthwonder.com/~briggs/ | briggs@ninthwonder.com
--/3yNEOqWowh/8j+e
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:28:20 -0000
@@ -1632,9 +1632,11 @@ init386(paddr_t first_avail)
bim->entry[x].type);
add_mem_cluster(0x100000, seg_end,
bim->entry[x].type);
- } else
+ } else if ( bim->entry[x].type != BIM_Memory
+ || bim->entry[x].size > 0x400) {
add_mem_cluster(seg_start, seg_end,
bim->entry[x].type);
+ }
}
}
--/3yNEOqWowh/8j+e--