Port-powerpc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: new evbppc console



Hi Kiyohara,

KIYOHARA Takashi wrote:

> I wrote new evbppc console for MI/MD.
> How is it?
> 
> [ ... ]
> 
> Index: arch/evbppc/evbppc/evbppc_machdep.c
> ===================================================================
> RCS file: /cvsroot/src/sys/arch/evbppc/evbppc/evbppc_machdep.c,v
> retrieving revision 1.4
> diff -c -r1.4 evbppc_machdep.c
> *** arch/evbppc/evbppc/evbppc_machdep.c       2003/07/25 11:44:19     1.4
> --- arch/evbppc/evbppc/evbppc_machdep.c       2004/01/12 11:52:56
> ***************
> *** 115,118 ****
> --- 118,139 ----
>       }
>       pmap_update(pmap_kernel());
>       return (void *)(va + off);
> + }
> + 
> + /*
> +  * consinit:
> +  * initialize the system console.
> +  * XXX - shouldn't deal with this initted thing, but then,
> +  * it shouldn't be called from initppc either.
> +  */
> + void
> + consinit()
> + {
> +     (*consinit_machdep)();
> + }
> + 
> + void
> + generic_cnattach(int conspeed, int com_freq, int comcnmode)
> + {
> +     com_opb_cnattach(conspeed, com_freq, comcnmode);
>   }

Non-4xx machines also use evbppc, so we can't hardwire a call to
a 4xx cnattach routine in evbppc_machdep.c.  With your current patches
we have:

        consinit calls *consinit_machdep (which is consinit_obs405)
        consinit_obs405 calls generic_cnattach
        generic_cnattach calls com_opb_cnattach

I would simply have:

        consinit calls *consinit_machdep (which is consinit_obs405)
        consinit_obs405 calls com_opb_cnattach

and not use generic_cnattach at all.

I haven't yet looked too closely at the rest of these patches, but the
idea of cleaning up console attachment (as long as it is still generic)
is appealing.

Simon.
--
Simon Burge                            <simonb%wasabisystems.com@localhost>
NetBSD Support and Service:         http://www.wasabisystems.com/



Home | Main Index | Thread Index | Old Index