Port-macppc archive

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

Re: Installing 5.0.2 on a PowerBook G4



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

On Oct 16, 2010, at 6:27 AM, Frank Wille wrote:

Michael wrote:

[..750 powersaving..]
This kind of powersaving also needs no port-specific support (like
gpios), so I would make the new sysctl in sys/arch/powerpc/oea.

Absolutely.

I have a 750CXe in my Pegasos2. Maybe I will look into it some time later,
when you don't want to do it.

I'll look into it on tuesday or wednesday when I'm off work unless you beat me to it.

[..radeonfb corrupt display..]
The the stride is wrong. But why? And how can I find the right stride?

What's in the OF properties? It should have a 'linebytes' property.

Yes, and it's set to 1280, which is also the stride readonfb is using.

Then that should work since genfb uses it.

[..X11..]
When running "X -configure":

[...]
(II) RADEON(0): initializing int10
(WW) xf86MapVidMem: could not mmap screen [s=20000,a=a0000] (Invalid
argument)(II) RADEON(0): No legacy BIOS found -- trying PCI
Fatal server error:
Caught signal 10.  Server aborting

It's trying to map the legacy VGA framebuffer, for some reason I don't
see that problem on my iBook.
I thought I got rid of that.
Either way, with
options OFB_FAKE_VGA_FB
this should go away.

That's for ofb(4), but the mmap problem disappeared indeed when using
WSFB_FAKE_VGA_FB. ;)

Hmm, I just looked at my iBook's kernel config and without too much thinking grabbed the fake vga option present. Now why the hell do I not need it then? Must be some uncommitted bit of code lurking somewhere.

It's not in any config file, BTW. Maybe we should change that?

Yeah, I'll add it to GENERIC at least ( or if you want to do it go ahead )

Unfortunately it didn't have any influence on the fatal server error:
[...]
(II) RADEON(0): initializing int10
(II) RADEON(0): No legacy BIOS found -- trying PCI
Fatal server error:
Caught signal 10.  Server aborting


Here is the ktrace dump between "initializing int10" and the fatal server
error:

  579      1 Xorg     CALL  write(0,0x1a2c9d0,0x23)
  579      1 Xorg     GIO   fd 0 wrote 35 bytes
      "(II) RADEON(0): initializing int10\n"
  579      1 Xorg     RET   write 35/0x23
579 1 Xorg CALL mmap(0,0x100000,3,0x14001002,0xffffffff, 0,0,0)
  579      1 Xorg     RET   mmap -283115520/0xef200000
  579      1 Xorg     CALL  mmap(0,0x20000,3,1,6,0,0,0xa0000)
  579      1 Xorg     RET   mmap -281804800/0xef340000
  579      1 Xorg     CALL  ioctl(7,PCI_IOC_BDF_CFGREAD,0xffffd678)
  579      1 Xorg     GIO   fd 7 wrote 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0\^D\0\0\0A"
  579      1 Xorg     GIO   fd 7 read 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0\^D\^B\M-0\0\a"
  579      1 Xorg     RET   ioctl 0
  579      1 Xorg     CALL  ioctl(7,PCI_IOC_BDF_CFGREAD,0xffffd678)
  579      1 Xorg     GIO   fd 7 wrote 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0000\^B\M-0\0\a"
  579      1 Xorg     GIO   fd 7 read 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0000\M-0\^B\0\0"
  579      1 Xorg     RET   ioctl 0
  579      1 Xorg     CALL  ioctl(7,PCI_IOC_BDF_CFGWRITE,0xffffd678)
  579      1 Xorg     GIO   fd 7 wrote 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0000\M-0\^B\0\^A"
  579      1 Xorg     RET   ioctl 0
  579      1 Xorg     CALL  write(2,0xffffce40,0x28)
  579      1 Xorg     GIO   fd 2 wrote 40 bytes
      "Using rom_base = 0xb0020000 (pci_rom=1)\n"
  579      1 Xorg     RET   write 40/0x28
  579      1 Xorg     CALL  open(0xefdc57b8,0,0x28)
  579      1 Xorg     NAMI  "/dev/mem"
  579      1 Xorg     RET   open 10/0xa
  579      1 Xorg     CALL  mmap(0,0x20000,1,1,0xa,0,0,0xb0020000)
  579      1 Xorg     RET   mmap -281935872/0xef320000
  579      1 Xorg     CALL  munmap(0xef320000,0x20000)
  579      1 Xorg     RET   munmap 0
  579      1 Xorg     CALL  close(0xa)
  579      1 Xorg     RET   close 0
  579      1 Xorg     CALL  ioctl(7,PCI_IOC_BDF_CFGWRITE,0xffffd678)
  579      1 Xorg     GIO   fd 7 wrote 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0000\M-0\^B\0\0"
  579      1 Xorg     RET   ioctl 0
  579      1 Xorg     CALL  write(0,0x1a2c9d0,0x33)
  579      1 Xorg     GIO   fd 0 wrote 51 bytes
      "(II) RADEON(0): No legacy BIOS found -- trying PCI\n"
  579      1 Xorg     RET   write 51/0x33
  579      1 Xorg     CALL  ioctl(7,PCI_IOC_BDF_CFGREAD,0xffffd678)
  579      1 Xorg     GIO   fd 7 wrote 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0\^D\0\0\0000"
  579      1 Xorg     GIO   fd 7 read 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0\^D\^B\M-0\0\a"
  579      1 Xorg     RET   ioctl 0
  579      1 Xorg     CALL  ioctl(7,PCI_IOC_BDF_CFGREAD,0xffffd678)
  579      1 Xorg     GIO   fd 7 wrote 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0000\^B\M-0\0\a"
  579      1 Xorg     GIO   fd 7 read 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0000\M-0\^B\0\0"
  579      1 Xorg     RET   ioctl 0
  579      1 Xorg     CALL  ioctl(7,PCI_IOC_BDF_CFGWRITE,0xffffd678)
  579      1 Xorg     GIO   fd 7 wrote 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0000\M-0\^B\0\^A"
  579      1 Xorg     RET   ioctl 0
  579      1 Xorg     CALL  write(2,0xffffce40,0x28)
  579      1 Xorg     GIO   fd 2 wrote 40 bytes
      "Using rom_base = 0xb0020000 (pci_rom=1)\n"
  579      1 Xorg     RET   write 40/0x28
  579      1 Xorg     CALL  open(0xefdc57b8,0,0x28)
  579      1 Xorg     NAMI  "/dev/mem"
  579      1 Xorg     RET   open 10/0xa
  579      1 Xorg     CALL  mmap(0,0x20000,1,1,0xa,0,0,0xb0020000)
  579      1 Xorg     RET   mmap -281935872/0xef320000
  579      1 Xorg     CALL  munmap(0xef320000,0x20000)
  579      1 Xorg     RET   munmap 0
  579      1 Xorg     CALL  close(0xa)
  579      1 Xorg     RET   close 0
  579      1 Xorg     CALL  ioctl(7,PCI_IOC_BDF_CFGWRITE,0xffffd678)
  579      1 Xorg     GIO   fd 7 wrote 20 bytes
      "\0\0\0\0\0\0\0\^P\0\0\0\0\0\0\0000\M-0\^B\0\0"
  579      1 Xorg     RET   ioctl 0
  579      1 Xorg     PSIG  SIGBUS caught handler=0x187475c mask=(10):
code=BUS_OBJERR, addr=0xef368b04, trap=512)
  579      1 Xorg     CALL
__sigaction_sigtramp(SIGBUS,0xffffd238,0xffffd220,0xefb0b064,2)

Looks like it's trying to read the graphics chip's firmware ROM which most Apple laptops don't have. I need to check what it does on my iBook but the firmware should put something obviously nonsensical in the ROM BAR so the Xserver leaves it alone. Trying to map and access a nonexisting ROM would probably give a bus error. If that was the problem the SIGBUS should have happened before unmap though.
Here it just errors out, says it can't read the ROM and continues.
So, the address it mmap()s looks right, 128kB isn't unreasonable either, on macppc PCI addresses are identical to physical addresses so reading it via /dev/mem /should/ work. I need to finally fix that code to use the appropriate /dev/pci* instead though. The code in question is in libpciaccess, I'm not sure the ROM reading/ parsing code is entirely sane.

have fun
Michael

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iQEVAwUBTLpDccpnzkX8Yg2nAQLYjwf/V9+ZVOIcE0AEO6SU7KgT4hu8bBzPivYL
v0S7OXwLxaQNWbuvxMvbXvJKRex5I9hXK7OPl8QP5FTIVrgXMQ78TjY//sRftNeL
z5mwHCT4qEWuo/Y5MsYJF3I6nBX5pbLhGrbnI2wdsQohiywNXE+CDLgDlkmjLbAH
mVKNXGVgHooG5sX2wCKMbSVVpKKKs8/Pp6D/z8UuFtF7GISZ/HYsbIdkHeRkrojo
Am0XKMKHW01tp+uEW+tN3PboynGb3hWgibAjuBkI1nIvO1HYkfFBwYF3hOvb2I0P
n3f0lgbamk7e2FXPqMqXZtm3q8lvZByCSzy14VhgsVpkwuANKqEX/Q==
=z3/3
-----END PGP SIGNATURE-----


Home | Main Index | Thread Index | Old Index