public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: accessing ROM on Rage 128 chips in aty128fb
@ 2003-03-31 18:17 Jon Burgess
  2003-04-02 17:21 ` Martin Murray
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Burgess @ 2003-03-31 18:17 UTC (permalink / raw)
  To: mmurray; +Cc: linux-kernel

  Martin Murray (mmurray@deepthought.org) wrote:

 > Why does the linux PCI code not set up a mapping for the ROM
 > automatically?

It expects the BIOS to do it. You can force it to try with the option 
"pci=rom"

Assuming this is the active grahpics card, then you should be able to 
access the rom via the legacy VGA address range 0xc0000...0xc7fff which 
should be shown in /proc/iomem.

Try:
dd if=/dev/mem skip=768 bs=1k | od -x | more

In these days of integrated peripherals the graphics bios might not even 
be attached to the VGA controller. The VGA device in my i810 system 
doesn't even report an expansion rom.

 > and found that the X driver maps the ROM through configuration
 > space.

I'm fairly sure the XFree code falls back to the VGA region as well if 
it can't find anything else. I think this is true on my machine, the X 
log says:
... Primary V_BIOS Segment is 0xc000

	Jon




^ permalink raw reply	[flat|nested] 4+ messages in thread
* accessing ROM on Rage 128 chips in aty128fb
@ 2003-03-30 23:59 Martin Murray
  0 siblings, 0 replies; 4+ messages in thread
From: Martin Murray @ 2003-03-30 23:59 UTC (permalink / raw)
  To: linux-kernel

I have a thinkpad A21p and am trying to use the aty128fb fbcon driver.
With 2.4.20 and 2.5.63, the lcd becomes garbled and erratic upon modprobe
of the module. I am trying to solve this problem.

I believe the aty128fb needs the correct pll values for my LCD which
stored in the Rage 128 ROM, however, the aty128fb does not find the ROM. I
compared the aty128fb initialization sequence to the ati driver from
X4.3.0, and found that the X driver maps the ROM through configuration
space.

I have been trying to implement this in the aty128fb driver, and have the
following questions:

How can I find a linear segment of address space [64k] to map the ROM to?

Why does the linux PCI code not set up a mapping for the ROM
automatically? pci_resource_start(pdev, PCI_ROM_RESOURCE) is 0, where
pdev is the Rage 128 chip.

Do I need to do anything further than write the base to the
PCI_ROM_ADDRESS register in the pci configuration space?
 - I tried this with the value 0xe8000001 without success. The last 1 is
the enable bit.

I noticed the AGP bridge had memory ranges mapped that encompassed those
required by the Rage 128 chip. Do I need to make another entry to properly
map the ROM?

I also noticed that the AGP bridge had mapped 64 megs of memory, and the
Rage 128 chip had also mapped 64 megs of memory, however, the chip has
only 16 megs of ram. There are seperate regions for the memory mapped
register and memory mapped I/O. Can I use the space above 16 megs to map
the ROM?

I inserted this code into aty128_pci_register() and it did not work:

unsigned char *ptr;
pci_write_config_dword(pdev, PCI_ROM_ADDRESS, 0xe8000001);
ptr = ioremap(0xe8000000, 0x10000);

if this were correct, ptr[0] would be 0x55 and ptr[1] would be 0xaa,
however, I read 0xff, 0xff respectively.

Any Suggestions?

Thank you, Martin Murray

Martin Murray, <mmurray@deepthought.org>, :\\//\\//:
- What is Industrial Music? It's the sound of angry
  Belgians having a fight with a washing machine.
Fear: Seeing B8:00:4C:CD:21, and knowing what it means.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-04-02 17:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-31 18:17 accessing ROM on Rage 128 chips in aty128fb Jon Burgess
2003-04-02 17:21 ` Martin Murray
2003-04-02 17:42   ` Jon Burgess
  -- strict thread matches above, loose matches on Subject: below --
2003-03-30 23:59 Martin Murray

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox