Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Nov 2005 08:46:08 +0100
From:      Rink Springer <rink@stack.nl>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        ed@fxq.nl, freebsd-arch@FreeBSD.ORG
Subject:   Re: FreeBSD/xbox: updated 7.0 patchset
Message-ID:  <20051107074608.GE46752@stack.nl>
In-Reply-To: <20051106.223503.97843133.imp@bsdimp.com>
References:  <20051106222359.GC46752@stack.nl> <20051106.223503.97843133.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--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--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051107074608.GE46752>