[LinuxBIOS] Geode GX1 PCI, VGA and Sound configuration -- was Re: Televideo TC7020 successfully booted with LinuxBiosV2

Juergen Beisert juergen127 at kreuzholzen.de
Tue May 8 09:04:55 CEST 2007


On Tuesday 08 May 2007 04:40, Kenji Noguchi wrote:
> 2007/5/5, Peter Stuge <stuge-linuxbios at cdy.org>:
> > On Fri, May 04, 2007 at 11:04:45PM -0700, Kenji Noguchi wrote:
> > > //CS5530A
> > > pdev = dev_find_slot(0, (0x12 << 3) + 0);
> > > pci_write_config8(pdev, 0x5c, 0xab);
> > > pci_write_config8(pdev, 0x5d, 0x09);
> > > pci_assign_irqs(0, 0x13, usb_irq);
> > > pci_assign_irqs(0, 0x15, nic_irq);
> > >
> > > I couldn't find a code in LinuxBIOSv2 that does the same thing
> > > Where should I put these lines if such code does not exist, and
> > > mainboard.c is not a right place?
> >
> > I think this goes into the mainboard Config.lb, where the PCI devices
> > are listed.
>
> I still don't understand fully how LB initializes stuff, or what the scope
> of LB is in terms of PCI IRQ configuration.  So please bare with my noob
> questions.

On my system LinuxBIOS left all PCI irq registers at their reset value.

> 3) Or, can/should I leave the configuration part to a OS as long as
> irq_tables.c sets a proper irq_routing_table?   I've read about people
> who booted LB with GX1 in the ML. Did they solely rely on the
> irq_routin_table?

Yes. With a working irq routing table and a (small) special Linux kernel patch 
(only with this patch Linux is able to setup the IRQ routing correctly. The 
patch was rejected in mainline, because it breaks other systems. The current 
kernel implementation is wrong, as it permuts the nibbles in the routing 
register. I have no idea how this could work on the other systems...)

> > > doesn't work:  VGA,
> >
> > Not even with geodefb?
>
> I wasn't aware of the driver existed.  I loaded the driver but the
> VGA is still not on.   I will read documents of the driver.
>
> tv:~# modprobe gx1fb
> gx1fb 0000:00:12.4: 4096 Kibyte of video memory at 0x40800000
> Console: switching to colour frame buffer device 80x30
> fb0: GX1 frame buffer device

Hmmm, should work. Don't know why it fails in your system.

> > > Sound ,
> >
> > There is a FreeBSD driver but that doesn't help you of course. See if
> > you can find a native CS5530 ALSA driver that does the same thing.
>
> It seems the same topic was discussed in the ML sometime back.
> Anyone still working on it? If not, I'll try to port the driver when I
> have more time.

I'm working on it. And I can play sounds with it. But under higher system load 
it crashes yet. There is not interrupt available to setup the next sound data 
if the current one is finished. The hardware can only generate SMIs. So a 
second part of my driver polls the SMI statusbits and calls the sound driver 
when it flags "ready" for next data.

> >> Reset(rebooting hangs the machine)
> >
> > Dunno about this one.
>
> CONFIG_X86_REBOOTFIXUPS=y in ther kernel  config fixed the problem.

Ack.

I can send you my whole embedded project. It contains graphics (special 
framebuffer driver and Xorg, both with acceleration), audio (not finished 
yet), irq-routing table (but for my hardware only) and a build system to 
build a cross compiler and the root filesystem, kernel and LinuxBIOS.

Maybe it could help you. Sorry, documentation is not finished yet... ;-)

Juergen




More information about the coreboot mailing list