Stefanos Papanicolopoulos wrote:
>
> >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, currently you have to have a fbdev for you VGA card.
> Is there any code *in* linuxbios to set up a VGA adapter (either in
> 'hardare' text mode, or in graphics mode)? Or perhaps I should be
> looking for it in some other project like TIARA?
>
No, LinuxBIOS does nothing with VGA. Everything is done in fbdev.
> 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.
>
> 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?). 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? 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 depends on your X server. For some new X server (4.x.x) they use
BIOS for mode setting with VM86 hack. You are doom with these servers.
If your X server is smart enough to set video mode itself, you don't
have to have VGA BIOS.
> 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)
>
Don't think about IAS card, there is just no ISA VGA card anymore.
For PCI VGA cards, their IO and Memory address space are relocatable,
and most of them have a register to enable/disable Legacy IO/MEM address
decoding (i.e. 0x3?4 0x3?5, 0x[A-C]000:0x0000).
> 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? How do I switch between address 0x000C0000
> referencing the VGA ROM and the RAM memory (which usually contains a
> copy of the VGA BIOS, 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)?
>
It depends on your VGA card. If your VGA card has relocatable address
space, the BIOS address is not fixed at C segment as described above.
You should take a look at PCI spec. Most of your question are answered
there.
Ollie