Subject: radeonfb on Pegasos
To: None <port-ofppc@NetBSD.org>
From: Frank Wille <frank@phoenix.owl.de>
List: port-ofppc
Date: 11/10/2007 22:12:07
As mentioned in an earlier posting on this list radeonfb_attach() failed
when writing to the register space of the card. Now I did some debugging:

It happens in radeonfb_scratch_test(). First it reads a 32-bit register, which
works. Then it writes to the same register and crashes, because the
bus_space_map_write4-function (pbs_scalr.pbss_write_4) is a null-pointer!

Inspecting the memory with ddb showed me that the whole bus_space_tag_t
structure is destroyed! But only after the first read-access, although
nothing spectacular happens in between!

Looking at the address of the PCI mem-tag irritated me. It was something
like 0xd00053xx, which is in the same region as the Radeon's register space,
starting at 0xd0000000.

Then I remembered the KERNEL_SR and VM_MIN_KERNEL_ADDRESS defines, which, as
I understand it, define the start address of kernel-memory allocations?
KERNEL_SR is 13, so it is 0xd0000000 as well!

Maybe we have a conflict on the Pegasos?

The memory space for both PCI hosts occupy a memory range from 0x80000000 to
0xdfffffff. KERNEL_SR 13 probably won't work?

Without exactly knowing what I do, I changed KERNEL_SR to 10, KERNEL2_SR to
11 and USER_SR (which was at 11) to 14. But then the kernel panics
immediately (before the copyright):

panic: _uvm_mapent_check: bad entry 0xa0001018 (/home/frank/netbsd/current/src/sys/uvm/uvm_map.c:1488)

Hmm... I'm lost at the moment...

-- 
    _  Frank Wille (frank@phoenix.owl.de)
 _ //  http://sun.hasenbraten.de/~frank/
 \X/   Phx @ #AmigaGer