From: Roberto R. <rob...@te...> - 2000-12-07 10:35:38
|
Hi, I don't know why but precompiled kernels 2000814 and 20000927 don't start on my CyberstormPPC 604e@150; the screen goes white and nothing happens. According to bootmesg the kernel is launched. I'm running APUS since the first days, and I'm not doing silly errors: last boothack, correct options, etc... No problem with 20000518. A couple of weeks ago I downloaded the 2.2 CVS tree to compile a kernel myself. Well, my own-compiled kernel does start and run. Good. But I found that the Virge (CV64/3D) console acceleration was corrupted (but X didn't suffer any problems): something was wrong with the blitting. I compared the source with older versions and it was exactly identical! So I thought there was a compiler problem, and, yes, I was right. I'm using gcc 2.95.2 (from LinuxPPC 2000), which reorders memory access, and it's not a good thing if you reorder register writes. I added a "-fno-scrict-aliasing" to CFLAGS in the main Makefile and patched the virgefb.c driver to be more careful about register access. Maybe I added too many mb(), but I really don't think they could cause mesaurable speed degradation, so I chose to be on the safe side. Here's the patch: --- virgefb.c_orig Thu May 25 21:08:31 2000 +++ virgefb.c Sun Nov 26 16:56:57 2000 @@ -51,18 +51,18 @@ #if 1 #define vgawb_3d(reg,dat) \ if (cv3d_on_zorro2) { \ - *((unsigned char volatile *)((Cyber_vcode_switch_base) + 0x04)) = \ - (0x01 & 0xffff); asm volatile ("nop"); \ + mb(); *((unsigned char volatile *)((Cyber_vcode_switch_base) + 0x04)) = \ + (0x01 & 0xffff); asm volatile ("nop"); mb(); \ } \ - (*((unsigned char *)(CyberVGARegs + (reg ^ 3))) = dat); \ + mb(); (*((unsigned char *)(CyberVGARegs + (reg ^ 3))) = dat); mb(); \ if (cv3d_on_zorro2) { \ - *((unsigned char volatile *)((Cyber_vcode_switch_base) + 0x04)) = \ - (0x02 & 0xffff); asm volatile ("nop"); \ + mb(); *((unsigned char volatile *)((Cyber_vcode_switch_base) + 0x04)) = \ + (0x02 & 0xffff); asm volatile ("nop"); mb(); \ } #define vgaww_3d(reg,dat) \ - (*((unsigned word *)(CyberVGARegs + (reg ^ 2))) = swab16(dat)) + mb(); (*((unsigned word *)(CyberVGARegs + (reg ^ 2))) = swab16(dat)); mb(); #define vgawl_3d(reg,dat) \ - (*((unsigned long *)(CyberVGARegs + reg)) = swab32(dat)) + mb(); (*((unsigned long *)(CyberVGARegs + reg)) = swab32(dat)); mb(); #else /* * Dunno why this doesn't work at the moment - we'll have to look at @@ -80,18 +80,18 @@ * We asume P5 mapped the big-endian version of these registers. */ #define wb_3d(reg,dat) \ - (*((unsigned char volatile *)(CyberRegs + reg)) = dat) + mb(); (*((unsigned char volatile *)(CyberRegs + reg)) = dat); mb(); #define ww_3d(reg,dat) \ - (*((unsigned word volatile *)(CyberRegs + reg)) = dat) + mb(); (*((unsigned word volatile *)(CyberRegs + reg)) = dat); mb(); #define wl_3d(reg,dat) \ - (*((unsigned long volatile *)(CyberRegs + reg)) = dat) + mb(); (*((unsigned long volatile *)(CyberRegs + reg)) = dat); mb(); #define rl_3d(reg) \ - (*((unsigned long volatile *)(CyberRegs + reg))) + (*((unsigned long volatile *)(CyberRegs + reg))); mb(); #define Select_Zorro2_FrameBuffer(flag) \ do { \ - *((unsigned char volatile *)((Cyber_vcode_switch_base) + 0x08)) = \ - ((flag * 0x40) & 0xffff); asm volatile ("nop"); \ + mb(); *((unsigned char volatile *)((Cyber_vcode_switch_base) + 0x08)) = \ + ((flag * 0x40) & 0xffff); asm volatile ("nop"); mb(); \ } while (0) /* * may be needed when we initialize the board? Now, if only someone could add X acceleration and mode switching... BTW, ide-doubler fails to detect the third and fourth IDE drives. It tries, but gets garbage instead of the drive names. -- |||||||. |||||||. *Roberto Ragusa* <rob...@te...> ||....|| ||....|| - electronic engineering student ||||||.. ||||||.. - Amiga user ||..||.. ||..||.. - satellite TV enthusiast ||....|| ||....|| (PGP public key available) |