From owner-freebsd-arch@FreeBSD.ORG Mon Nov 7 07:46:10 2005 Return-Path: X-Original-To: freebsd-arch@FreeBSD.ORG Delivered-To: freebsd-arch@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7AC616A41F for ; Mon, 7 Nov 2005 07:46:10 +0000 (GMT) (envelope-from rink@stack.nl) Received: from mailhost.stack.nl (vaak.stack.nl [131.155.140.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43FC143D48 for ; Mon, 7 Nov 2005 07:46:09 +0000 (GMT) (envelope-from rink@stack.nl) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mailhost.stack.nl (Postfix) with ESMTP id 8735CA2FD5; Mon, 7 Nov 2005 08:46:08 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1796) id 683EB2287D; Mon, 7 Nov 2005 08:46:08 +0100 (CET) Date: Mon, 7 Nov 2005 08:46:08 +0100 From: Rink Springer To: "M. Warner Losh" Message-ID: <20051107074608.GE46752@stack.nl> References: <20051106222359.GC46752@stack.nl> <20051106.223503.97843133.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="hoZxPH4CaxYzWscb" Content-Disposition: inline In-Reply-To: <20051106.223503.97843133.imp@bsdimp.com> X-Editor: Vim http://www.vim.org/ X-Info: http://rink.nu/ X-Operating-System: FreeBSD 5.4-RELEASE i386 User-Agent: Mutt/1.5.11 Cc: ed@fxq.nl, freebsd-arch@FreeBSD.ORG Subject: Re: FreeBSD/xbox: updated 7.0 patchset X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Nov 2005 07:46:10 -0000 --hoZxPH4CaxYzWscb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Warner, > I have just a few questions/comments on your patch. >=20 > First, options XBOX shouldn't be in opt_global.h, but rather in > opt_xbox.h that dev/fb/boot_font.c, i386/i386/machdep.c, > i386/i386/pmap.c, i386/i386/vm_machdep, i386/isa/clock.c, and > i386/pci/pci_cfgreg.c should be including. In general, we try to > reserve opt_global.h for really global stuff. Ah, ok. I'll update this; just curious: are guidelines like this outlined anywhere? > I don't understand the change to dev/fb/boot_font.c at all. Can you > explain it in more detail? You seem to have removed it alltogether already, just saw the commit :) > There's some style(9) issues with xboxfb.c. Specifically, there are a > few cases in some switches that are inconsistantly formatted wrt other > case statements. Ah ok, I'll see if I can fix these. > There are a few really gross hacks that are marked with XXX better > fixes welcome. I'm a little torn about committing those, but at least > they are all #ifdef XBOX. My question is how long do you think until > there's a better solution for them? Well, let's put them in an overview: 1) i386/i386/machdep.c: 64MB memory hardcoding on XBOX'es A normal XBOX as they are sold in most stores have 64MB RAM. However, so= me people have soldered 128MB memory on their XBOX, which also works but is non-standard. =20 Since BIOS interrupts are nonexistant in an XBOX, the only way is to hardcode or probe. I could a minor check which tries the 120th Megabyte of memory or so and adjust memory accordingly, would this be acceptable? The reason why I left it like this is because I have no way to test 128MB XBOX'es, they are quite rare. 2) i386/i386/pmap.c: Not clearing the pagetable This is indeed very gross. The framebuffer driver bluntly remaps the video memory to logical address 4KB and up; normally this space is unused and I use it for temporary video memory. Since we really want a console driver this early, but cannot yet do a sensible mapping, I used this hack. When the final console driver is used, it will make a good mapping using pmap_mapdev(). I am unsure how to fix this; I tried using pmap_mapdev() but this didn't work; perhaps due to the kmem_alloc_nofault() ? (malloc() isn't yet active there) People who have more experience with the VM are very welcome to assist here ... These are the main FIXME/XXX-es I can find. The xboxfb.c console driver stresses out the #2 and claims it should be fixed in a more neat way ;-) > This is absolutely great work! Don't let my few quibbles and such get > you down. I very much want to see xbox support committed to the tree. I'm very glad you are taking the time to help me out with this! I'll try to get an updated patch released tonight. Thanks! --=20 Rink P.W. Springer - http://rink.nu "God, root, what is difference?" - Pitr, Userfriendly --hoZxPH4CaxYzWscb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFDbwZAb3O60uztv/8RAtRcAJoDMwCC3GxDgfy6U8zmtoQBMZWVqACghSfK Z71ta/tH1hTGnyN83Nmbgfg= =Fn2d -----END PGP SIGNATURE----- --hoZxPH4CaxYzWscb--