On Wed, Jan 24, 2007 at 08:06:06PM +0100, Markus Ritzer wrote: > Hello! > > I try to port OpenBSD to the Microsoft Xbox (the old one). My OpenBSD Kernel > boots until it crashes while handling memory related things. FreeBSD, which > is already ported, has this code: > > arch_i386_is_xbox tells if it is an Xbox and > arch_i386_xbox_memsize is set to 64 oder 128, depend how much memory you have. > > > #ifdef XBOX > if (arch_i386_is_xbox) { > /* > * We queried the memory size before, so chop off 4MB for > * the framebuffer and inform the OS of this. > */ > physmap[0] = 0; > physmap[1] = (arch_i386_xbox_memsize * 1024 * 1024) - > XBOX_FB_SIZE; > physmap_idx = 0; > goto physmap_done; > } > #endif > > > It sets up the physmap. I looked for hours on the code of OpenBSD, but I > cannot really find out how this is done here. The code belongs to the > function init386() in machdep.c. > > Is there an equivalent struct in OpenBSD to FreeBSD's physmap ? > > > Thank you in advance, > > Markus Ritzer
You are better off looking at the NetBSD changes such as http://mail-index.netbsd.org/source-changes/2007/01/04/0019.html http://mail-index.netbsd.org/source-changes/2007/01/05/0040.html and all the additional drivers they have added. Seems they match on the PCI bridge and hard code sizes which is rather gross: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/i386/machdep.c.diff?r1=1.586&r2=1.587&f=h