Stefanos Papanicolopoulos <[EMAIL PROTECTED]> writes:
> >From the webpage and the mailing list, it seems that Linuxbios has
> graphics support only for the embedded chip in SiS-based motherboards,
> and then it is supported by the fb driver of linux, which means you
> have to load a linux kernel to get text on your monitor (that is,
> unless your monitor is a terminal plugged on your serial port...). Am
> I right?
Yes you have the basic picture.
There are two use cases for linuxBIOS.
1) Embedded fixed function devices. In this case you probably
don't have a monitor or anything else interesting. And linuxBIOS
is needed as a very thin layer to read a kernel out of flash and
to start your kernel.
2) General purpose devices, running multiple kernels. In these the
linuxBIOS strategy is to include a bootloader (ideally a user space app
on top of the linux kernel) to load your real kernel from it's
home. Your hard drive the network, or wherever.
> Is there any code *in* linuxbios to set up a VGA adapter (either in
> 'hardare' text mode, or in graphics mode)?
No.
> Or perhaps I should be
> looking for it in some other project like TIARA?
>
> It seems that the linuxbios philosophy is ''if the kernel can do it,
> then let the kernel do it''. Yet, for cases where a linux kernel
> won't fit in the FLASH, it would be nice to have something like a list
> of choices on your video.
This is a bootloader question, and you will want it wether or not your
bootloader is based on the linux kernel. And yes being able to display
on a normal monitor could be nice.
> And now some more 'technical' questions:
>
> Does Linux use the VGA BIOS in any way? (IIRC it is used by vesafb,
> but are there any other cases?).
I think the most recent released of X can use it for card
initialization.
> Of course it relies on the VGA BIOS
> (or someone else) to have set up the card for text mode, but does it
> actually use INT10?
After the setup card initialization is done linux shouldn't call
int10. Unless you are running dosemu anyway :)
> Does it use any of the data present in the VGA
> BIOS (the whole BIOS is there, I can see it in /dev/mem, but is it
> ever read?). What I am getting to is: if I can set up my VGA card in
> 80x25 text mode (or any other text mode) from linuxbios, will Linux
> run happily? (And then, will X run happily? will switching from X to
> text mode and back again work?)
It should. But this doesn't always work even with a normal BIOS so
no guarantees.
> Do I have to setup the card in any way before I can access it's I/O
> ports from the CPU? (Actually I'm curious about the general question:
> how do the expansion cards 'register' their I/O ports? And what
> happens if I install two cards that would use the same ports (e.g. two
> VGA cards)? How do I access each of them?. I'm thinking about PCI
> cards, but I'm also curious about other types, like ISA)
This is a good question. And a real answer would take a while.
Read up on PCI and it should help. Generally it is pretty simple
but it can get extremely complicated.
> The VGA BIOS is present at 0C000h:0000 (or 0x000C0000, whichever you
> like). Is it mapped there automagically (like the PC BIOS is), or the
> PC BIOS maps it there?
Assume the PC BIOS maps it there.
> How do I switch between address 0x000C0000
> referencing the VGA ROM and the RAM memory (which usually contains a
> copy of the VGA BIOS
This is chipset/processor specific.
> , but in linuxbios it doesn't (does it?), and it
> would be useful to load stuff like the text mode fonts from the VGA
> ROM)?
There should be decent text mode fonts in linux already, with
no legal restrictions.
> Thanks for any reply to my (admittedly TOO many) questions,
The interest is good. Now go find some documentation and read, read
read until your pci question is answered.
Good Luck,
Eric