diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-12-02 15:55:19 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-12-02 15:55:19 +0000 |
commit | cc6f15397de00ac4c73efcf550971680b9dabfff (patch) | |
tree | 426d787b5e35e7bb7fbdf8c0e66cd6fb7002814d /sys/dev/rasops/rasops8.c | |
parent | d2c8d56da6a0b1f99fd3b3e9fed1871cf1cfc577 (diff) |
On frame buffers which endianness differs from the host CPU, we can not afford
using ovbcopy() in the erasecols emulop, as the ovbcopy implementation might
do larger-than-byte loads and store, which will not have the expected result
if the source and destination addresses are not similarly aligned.
Instead, roll our own byte-only ovbcopy() in this case. This is made dependent
on a config(8) attribute to avoid bloating platforms which do not need this,
thus frame buffers which may set RI_BSWAP in ri_flg need to depend on this
attribute.
Problem spotted by matthieu@ using tcsh on sparc64 console.
Diffstat (limited to 'sys/dev/rasops/rasops8.c')
-rw-r--r-- | sys/dev/rasops/rasops8.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/rasops/rasops8.c b/sys/dev/rasops/rasops8.c index 9d45f66e45d..2d9933a2084 100644 --- a/sys/dev/rasops/rasops8.c +++ b/sys/dev/rasops/rasops8.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops8.c,v 1.6 2002/07/27 22:17:49 miod Exp $ */ +/* $OpenBSD: rasops8.c,v 1.7 2006/12/02 15:55:18 miod Exp $ */ /* $NetBSD: rasops8.c,v 1.8 2000/04/12 14:22:29 pk Exp $ */ /*- @@ -195,8 +195,10 @@ rasops8_makestamp(ri, attr) stamp[i] |= ((i & 4 ? fg : bg) << 16); stamp[i] |= ((i & 8 ? fg : bg) << 24); #endif +#if NRASOPS_BSWAP > 0 if (ri->ri_flg & RI_BSWAP) stamp[i] = swap32(stamp[i]); +#endif } } |