Port-atari archive

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

Re: Question on the images in /miniroot



I wrote:

> dross00%hotmail.com@localhost wrote:
> 
> > The second one doesn't have this problem.  It boots up further without a 
> > delay.
> 
> Okay, then there are some gcc4 specific issue around atari sources.

Ah, no, there is an obvious bug in atari5380.c, which was introduced
between 3.0 and 4.0.

Could you try this one (compiled by gcc4 with the attched patch)?
http://www.ceres.dti.ne.jp/~tsutsui/netbsd/netbsd-atari-BOOT-20080616.gz

---
Index: atari5380.c
===================================================================
RCS file: /cvsroot/src/sys/arch/atari/dev/atari5380.c,v
retrieving revision 1.41
diff -u -r1.41 atari5380.c
--- atari5380.c 10 May 2006 06:24:02 -0000      1.41
+++ atari5380.c 16 Jun 2008 15:34:08 -0000
@@ -138,14 +138,14 @@
 
 #define        set_scsi_dma(addr, val) (void)(                                 
\
        {                                                               \
-       u_char  *address = (u_char*)__UNVOLATILE(addr+1);               \
+       volatile u_char *address = (volatile u_char *)addr + 1;         \
        u_long  nval     = (u_long)val;                                 \
        __asm("movepl   %0, %1@(0)": :"d" (nval), "a" (address));       \
        })
 
 #define        get_scsi_dma(addr, res) (                                       
\
        {                                                               \
-       u_char  *address = (u_char*)__UNVOLATILE(addr+1);               \
+       volatile u_char *address = (volatile u_char *)addr + 1;         \
        u_long  nval;                                                   \
        __asm("movepl   %1@(0), %0": "=d" (nval) : "a" (address));      \
        res = (u_long)nval;                                             \
---
Maybe it's much better to rewrite them to use inline functions, though.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index