Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jan 1999 13:26:09 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Simon Shapiro <shimon@simon-shapiro.org>
Cc:        Matthew Jacob <mjacob@feral.com>, freebsd-alpha@FreeBSD.ORG
Subject:   Re: Alpha Driver Help Requested
Message-ID:  <Pine.BSF.4.01.9901271315270.95594-100000@herring.nlsystems.com>
In-Reply-To: <XFMail.990126052812.shimon@simon-shapiro.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 26 Jan 1999, Simon Shapiro wrote:

> 
> Matthew Jacob, On 27-Jan-99 you wrote:
> >  
> >  Simon- I even have a DPT and an Alpha (PC164), but lack of time, really,
> >  to help much with this.
> 
> I appreciate the though, but I am rather capable of handling the DPT part. 
> Why outl panics on a ``lie'' is a bit beyond my immediate knowledge.
> 
> I narrowed down the failure to line 467 in sys/alpha/bus.h which simply
> says:
> 
>         outl(bsh + offset, value);
> 
> In turn, outl is really a bizzare thing;  In chipset.h we find:
> 
> typedef void          alpha_chipset_outl_t(u_int32_t port,
>                                            u_int32_t data);
> 
> Later, in the same file, there is a structure called alpha_chipset:
> 
> typedef struct alpha_chipset {
>     /*
>      * I/O port access
>      */
>     alpha_chipset_inb_t*        inb;
>     alpha_chipset_inw_t*        inw;
>     alpha_chipset_inl_t*        inl;
>     alpha_chipset_outb_t*       outb;
>     alpha_chipset_outw_t*       outw;
>     alpha_chipset_outl_t*       outl;
>     ...
> 
>     void*           
> } alpha_chipset_t;
> 
> extern alpha_chipset_t chipset;
> 
> Now, in sys/alpha/alpha/machdep.c there is a global declaration:
> 
> alpha_chipset_t chipset;
> 
> I tried to find references to chipset elsewhere, but there is none.  It
> must be that it is initialized by some black magin in the boot process.

This global abstracts the several different ways that alpha's implement
the pci and isa bus, including accessing ports and memory.  It is
initialised in the specific chipset code (e.g. alpha/pci/cia.c,
alpha/pci/apecs.c).

> 
> I am quite certain that the function pointer outl in chipset is bogus, or
> points to a function other than outl, or the function it points to takes
> different arguments than specified in the source.
> 
> I hope for someone who already knows the mysteries of the chipsets to come
> to my rescue...
> 
> >  
> >  Which  alpha  platform are you using?
> 
> I have two;  Source is on a PW 433au.  The panics are on some no name
> Motherboard in a box.  Here is the dmesg top portion.  Interesting how the
> panic form te PREVIOUS boot is there in the buffer.  How do they do that?

The kernel message buffer is in the last page(s) of physical memory.  If
the firmware doesn't disturb it, it is available to read from on the next
boot.

It looks like your machine is the same as one of mine, with a 164lx
motherboard.  The specific implementation of outl on this machine is
cia_bwx_outl in alpha/pci/cia.c.  I'm pretty sure that this function
works.

According to the fault address (a0 in the trap dump), you are attempting
to perform an outl to port 0x10192.  This is not a longword aligned
address and therefore an unaligned trap was generated.  We do not support
outw and outl to addresses which aren't naturally aligned (2 byte for outw
and 4 byte for outl) and I don't think we should support them, since it
would require two separate accesses.

If you really need to write a longword to this address, perhaps you can
change the driver to use two calls to outw.  It is certainly not possible
to do an atomic longword write to this address on the alpha.

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.01.9901271315270.95594-100000>