Subject: Re: Quick question regarding the GENERIC kernel
To: John <jhu@grex.cyberspace.org>
From: Michael Lorenz <macallan@netbsd.org>
List: port-macppc
Date: 11/10/2006 12:05:12
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Nov 10, 2006, at 10:57, John wrote:

> Haven't been able to get OFB_FAKE_VGA_FB to work. Is this only in the 
> -current kernel? Or does it also depend on something else in the 
> kernel configuration? Also, while perusing the mail archives I came 
> upon this post: 
> http://mail-index.netbsd.org/port-macppc/2004/03/09/0004.html

It is an old enough hack to be in 3.0. Originally intended for ofb only 
but most other wsdisplay drivers respect it ( machfb, chipsfb, voodoofb 
and radeonfb do )
And what exactly did you do? "Haven't been able to get <whatever> to 
work" is not a useful problem description.

> Basically, /xc/programs/Xserver/hw/xfree86/os-support/bsd/ppc_video.c 
> was patched instead. I haven't tried it out yet though.

Don't bother, this patch is dangerous.
The problem is that many X drivers want to mmap the legacy VGA 
framebuffer at 0xa0000 which is pointless on a mac since it isn't used 
for anything. The patch allows you to mmap whatever is on physical 
address 0xa0000 which could be anything but certainly nothing 
VGA-related even if your VGA board has the legacy fb mapping enabled - 
anything below 0x80000000 on a mac is RAM, PCI memory can only be 
accessed from 0x8000000 and above so you'd be messing around in system 
memory instead.
OFB_FAKE_VGA_FB is a little more sane - it redirects attempts to 
mmap(0xa0000 - 0xbffff) to the beginning of the actual framebuffer.
The reason why X is doing that is to save and restore VGA textmode 
information which is useless on macppc since nobody uses VGA textmode, 
the right thing to do would be to disable this code in X. Some drivers 
( like atimisc ) do it, others don't.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBRVSxScpnzkX8Yg2nAQJrkQgAtLJyXnB9TY+egWh79rbhTA+H4WePTNMu
ZfZEWau6/oF6ukikCNPbGggNe++CrCsQc9RMVSc4sF63OXYDNKjDEhYEnAnt3ND9
kp5P2++xtHAaD6LzjcjT+P3/1AMT2FPlnzhY8e7bWXZJnKxYqP6PEKPOoFjALNL5
y6ZRf4Q9ZGsDj/aqrF34FJFErwZttReIYXsW9jJgEqrac5sg47c0atQKlntfbRN7
yy74iFQdwGDlOjjZ+WnduJUQ2Z4QJGaXX+7L7KHwHOq95qY4s3Yk1s/D4Ylzd2wi
m7a73qxVG+DnQoB6hmeSMQk/2jFuF2Cx6Bg5le7PnKkxzbZZ0n6AWQ==
=l42W
-----END PGP SIGNATURE-----