Port-zaurus archive

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

Re: NetBSD/zaurus 8.1 problems and possible fixes



I wrote:
> Unresolved issue:
> 
> - "Alignment Fault 3" failure on NetBSD/zaurus 8.1 with LCD console
>   (not happens on 9.0_BETA)

Addressed.

sys/dev/rasops.h has the following lines:
---
struct rasops_info {
	/* These must be filled in by the caller */
	int	ri_depth;	/* depth in bits */
 :
#if NRASOPS_ROTATION > 0
	/* Used to intercept putchar to permit display rotation */
	struct	wsdisplay_emulops ri_real_ops;
#endif
};

---
but this rasops.h doesn't explicitly include "rasops_glue.h"
for NRASOPS_ROTATION.

sys/dev/rasops/rasops.c includes it and writes data into the member
in "NRASOPS_ROTATION > 0" case, but sys/arch/zaurus/dev/zlcd.c
and sys/arch/arm/xscale/pxa2x0_lcd.c don't include rasops_glue.h.

As the result, pxa2x0_lcd_softc doesn't have space for the
ri_real_ops member, then unfortunate memory allocated by
the further malloc() call could be corrupted.

I'll commit the folloing fix to remove the above
"#if NRASOPS_ROTATION > 0" statement to keep the struct definition
regardless of kernel options:

Index: dev/rasops/rasops.h
===================================================================
RCS file: /cvsroot/src/sys/dev/rasops/rasops.h,v
retrieving revision 1.32
diff -u -p -d -r1.32 rasops.h
--- dev/rasops/rasops.h	22 Apr 2017 15:05:02 -0000	1.32
+++ dev/rasops/rasops.h	31 Oct 2019 16:10:18 -0000
@@ -132,10 +132,8 @@ struct rasops_info {
 	/* Callbacks so we can share some code */
 	void	(*ri_do_cursor)(struct rasops_info *);
 
-#if NRASOPS_ROTATION > 0
 	/* Used to intercept putchar to permit display rotation */
 	struct	wsdisplay_emulops ri_real_ops;
-#endif
 };
 
 #define DELTA(p, d, cast) ((p) = (cast)((char *)(p) + (d)))

> - zaudio(4) is not proped properly on all C700, C1000, and C3x00,
>   though reverting MI i2c(4) changes seems to work around
>   https://gist.github.com/tsutsui/8455b390c32d18f80d0a73c588d73bce
>   https://video.twimg.com/ext_tw_video/1188873099862659072/pu/vid/1280x720/tIdWR6rDZubtRlkc.mp4

Filed as PR kern/54658:
 https://gnats.netbsd.org/54658

> - The default MACHINE_ARCH for zaurus in build.sh is earm,
>   not earmv5 preferred for XScale

I'm told that earm was an alias of earmv5, so it is not actual problem.

One more issue I forget to note:

- PR xsrc/54167 (Xorg wsfb server "Rotate" does not work on NetBSD 8.0)
   https://gnats.netbsd.org/54167
  also affects C1000 and C3x00.
  (C7x0 and C860 are not affected because they use hardware rotation)

It looks this only happens on screens height > width.
No corruption on C700 which uses hardware rotation (i.e. height < width)
even if "Rotate CCW" Option is specified in xorg.conf.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index