Re: FreeBSD/xbox: updated 7.0 patchset

From: Rink Springer (rink_at_stack.nl)
Date: 11/07/05

  • Next message: Gleb Smirnoff: "ARP request retransmitting"
    Date: Mon, 7 Nov 2005 08:46:08 +0100
    To: "M. Warner Losh" <imp@bsdimp.com>
    
    
    

    Hi Warner,

    > I have just a few questions/comments on your patch.
    >
    > 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, some
       people have soldered 128MB memory on their XBOX, which also works but
       is non-standard.
     
       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!

    -- 
    Rink P.W. Springer                                - http://rink.nu
    "God, root, what is difference?"                  - Pitr, Userfriendly
    
    



  • Next message: Gleb Smirnoff: "ARP request retransmitting"

    Relevant Pages