From owner-freebsd-alpha Wed Jan 27 04:33:43 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA09484 for freebsd-alpha-outgoing; Wed, 27 Jan 1999 04:33:43 -0800 (PST) (envelope-from owner-freebsd-alpha@FreeBSD.ORG) Received: from zaphod.in.tu-clausthal.de (zaphod.in.tu-clausthal.de [139.174.100.142]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA09476 for ; Wed, 27 Jan 1999 04:33:41 -0800 (PST) (envelope-from jc@joerch.org) Received: from eressea.in.tu-clausthal.de (36af0758e6699@eressea.in.tu-clausthal.de [139.174.100.9]) by zaphod.in.tu-clausthal.de (8.8.7/8.8.7) with SMTP id NAA23834; Wed, 27 Jan 1999 13:32:25 +0100 (MET) Date: Wed, 27 Jan 1999 13:32:25 +0100 (MET) Message-Id: <199901271232.NAA23834@zaphod.in.tu-clausthal.de> From: Joerg Czeranski To: shimon@simon-shapiro.org Cc: freebsd-alpha@FreeBSD.ORG In-Reply-To: Subject: Re: Alpha Driver Help Requested Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Simon Shapiro wrote: > * The driver panics on trap entry 0x4 (unaligned access fault). This > happens in the following code snippet: > > dpt_outl(dpt, HA_WDMAADDR, cmd_busaddr); > > All the arguments are of the correct type. And: > I narrowed down the failure to line 467 in sys/alpha/bus.h which simply > says: > > outl(bsh + offset, value); And: > fatal kernel trap: > > trap entry = 0x4 (unaligned access fault) > a0 = 0xfffffca900010192 > a1 = 0x2c > a2 = 0x11 > pc = 0xfffffc00004a77bc > ra = 0xfffffc000034f958 > curproc = 0 Decoding the values: /usr/src/sys/dev/dpt/dpt.h: #define HA_WDMAADDR 0x02 alpha/pci/ciareg.h: #define CIA_EV56_BWIO 0x8900000000UL The base address of the DPT probably is 0x10190. Thus a0 is a bus space address (for use with the Byte/Word/eXtension of >= EV56 implementations) aligned to a word (16bit), but it is used by outl for a longword (32bit) access. This results in the unaligned access fault. Either a 32 bit access wasn't intended (it overlaps with HW_WCODE and HW_WCODE2 anyway, maybe a bug?) or it must be split into two 16 bit writes. joerch To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message