Hi.
I'm using LinuxBios on an SiS630 motherboard (PC-Chips M810L).
Is is essential to use the framebuffer device for video output under LinuxBios, or can I boot it into a 'standard VGA' mode ?
I tried changing HAVE_FRAMEBUFFER=1 to =0 and also removing it entirely from my config file, but I just got no video output at all - the serial port told me everything else was starting up okay though.
If it is essential to use the framebuffer, is there any way to change the refresh rate, because I'm using an old monitor which loses the top & bottom of the screen (it doesn't have a vertical size control :-( ) when I boot under LinuxBios.
Hope someone can help,
Antony.
On Mon, 2002-09-09 at 23:50, Antony Stone wrote:
Hi.
I'm using LinuxBios on an SiS630 motherboard (PC-Chips M810L).
Is is essential to use the framebuffer device for video output under LinuxBios, or can I boot it into a 'standard VGA' mode ?
I tried changing HAVE_FRAMEBUFFER=1 to =0 and also removing it entirely from my config file, but I just got no video output at all - the serial port told me everything else was starting up okay though.
Do you want VGA frame buffer or not ?? If you want framebuffer for SiS 630, you have to enable SiSFB Lite in the SiS LinuxBIOS patch.
If it is essential to use the framebuffer, is there any way to change the refresh rate, because I'm using an old monitor which loses the top & bottom of the screen (it doesn't have a vertical size control :-( ) when I boot under LinuxBios.
SiSFB Lite accept standard kernel parameter for video mode. Read linux/Documentation/fb/modedb for more detail.
Ollie
On Tuesday 10 September 2002 2:14 am, ollie lho wrote:
On Mon, 2002-09-09 at 23:50, Antony Stone wrote:
Hi.
I'm using LinuxBios on an SiS630 motherboard (PC-Chips M810L).
Is is essential to use the framebuffer device for video output under LinuxBios, or can I boot it into a 'standard VGA' mode ?
I tried changing HAVE_FRAMEBUFFER=1 to =0 and also removing it entirely from my config file, but I just got no video output at all - the serial port told me everything else was starting up okay though.
Do you want VGA frame buffer or not ?? If you want framebuffer for SiS 630, you have to enable SiSFB Lite in the SiS LinuxBIOS patch.
Yes, I can do that, and the framebuffer works fine.
What I'm asking is whether I can boot LinuxBios *without* using the framebuffer device, and still get a display ? ie what you'd normally get on a 'standard' (non-LinuxBios) Linux machine if you didn't select framebuffer output.
Antony.
On Tue, 2002-09-10 at 15:56, Antony Stone wrote:
On Tuesday 10 September 2002 2:14 am, ollie lho wrote:
On Mon, 2002-09-09 at 23:50, Antony Stone wrote:
Hi.
I'm using LinuxBios on an SiS630 motherboard (PC-Chips M810L).
Is is essential to use the framebuffer device for video output under LinuxBios, or can I boot it into a 'standard VGA' mode ?
I tried changing HAVE_FRAMEBUFFER=1 to =0 and also removing it entirely from my config file, but I just got no video output at all - the serial port told me everything else was starting up okay though.
Do you want VGA frame buffer or not ?? If you want framebuffer for SiS 630, you have to enable SiSFB Lite in the SiS LinuxBIOS patch.
Yes, I can do that, and the framebuffer works fine.
What I'm asking is whether I can boot LinuxBios *without* using the framebuffer device, and still get a display ? ie what you'd normally get on a 'standard' (non-LinuxBios) Linux machine if you didn't select framebuffer output.
No. You have to use framebuffer. LinuxBIOS does not init VGA.
Ollie
I am hoping to get standard alphanumeric vga setup into the linuxbios code base, as part of the stpc initialization, in the very near future. Linux assumes the vga registers are already initialized in vgacon.c (in drivers/video), and changes only a few register settings. But (hopefully) for alpha mode (not graphics!), the register settings are standard for most vga cards and the init can be done in linuxbios without a vga bios. If it turns out that this not true for most modern VGA cards (I am not sure right now), and there are extended register settings for alpha mode, then it will likely be too difficult to setup alpha mode from linux bios. Extended registers are poorly documented and can be a mess.
Maybe someone knows if alphanumeric mode setup is via the standard VGA register set on most modern VGA cards.
-Steve
On Wed, 2002-09-11 at 00:27, Steve M. Gehlbach wrote:
I am hoping to get standard alphanumeric vga setup into the linuxbios code base, as part of the stpc initialization, in the very near future. Linux assumes the vga registers are already initialized in vgacon.c (in drivers/video), and changes only a few register settings. But (hopefully) for alpha mode (not graphics!), the register settings are standard for most vga cards and the init can be done in linuxbios without a vga bios. If it turns out that this not true for most modern VGA cards (I am not sure right now), and there are extended register settings for alpha mode, then it will likely be too difficult to setup alpha mode from linux bios. Extended registers are poorly documented and can be a mess.
Maybe someone knows if alphanumeric mode setup is via the standard VGA register set on most modern VGA cards.
I am afraid your are wrong. For modern VGA cards, there is actually no alphanumeric mode. These alphanumeric mode were simulated by BIOS or drivers. The worst thing, if you have no documents about these extended registers, you have no way to drive the clock gen for Dot clock, Hsync, Vsync.
Ollie
-Steve
Maybe someone knows if alphanumeric mode setup is via the standard VGA register set on most modern VGA cards.
I am afraid your are wrong. For modern VGA cards, there is actually no alphanumeric mode. These alphanumeric mode were simulated by BIOS or drivers. The worst thing, if you have no documents about these extended registers, you have no way to drive the clock gen for Dot clock, Hsync, Vsync.
Are you saying that it is not possible to use a text console with Linux (vgacon.c) with modern VGA cards (BIOS mode 3)? Only framebuffer? Or are you saying that without extra information (ie, the BIOS or the manuals) you can't init it into mode 3? I don't understand your answer.
I thought most vga cards were register compatible with the legacy VGA register set, only that there were a lot of other (sometimes secret) things to setup. Is this wrong?
Fortunately regular vga cards are not very important to me, actually, I am really most interested in integrated chipsets, such as the stpc and the via apollo ple133 northbridge, both of which are legacy VGA register compatible. They have a lot of other registers to setup, of course, but at least the problem is reduced if you have the standard register setup code already done. And of course the documentation is complete and not a secret. I am only interested in text mode right now.
-Steve
On Wednesday 11 September 2002 7:22 am, Steve M. Gehlbach wrote:
Maybe someone knows if alphanumeric mode setup is via the standard VGA register set on most modern VGA cards.
I am afraid you are wrong. For modern VGA cards, there is actually no alphanumeric mode. These alphanumeric mode were simulated by BIOS or drivers. The worst thing, if you have no documents about these extended registers, you have no way to drive the clock gen for Dot clock, Hsync, Vsync.
Are you saying that it is not possible to use a text console with Linux (vgacon.c) with modern VGA cards (BIOS mode 3)? Only framebuffer? Or are you saying that without extra information (ie, the BIOS or the manuals) you can't init it into mode 3? I don't understand your answer.
I thought most vga cards were register compatible with the legacy VGA register set, only that there were a lot of other (sometimes secret) things to setup. Is this wrong?
Forgive my ignorance, but isn't this what the Bios chip on the VGA card itself is for (in the case where you have a physical card plugged into the motherboard, and not an all-in-one integrated motherboard chipset) ?
I mean, surely that's the reason why, when you turn on a 'standard' PC with a normal graphics card and a normal Bios, you see the starup messages for the graphics card *first*, and *then* you see the Bios logo and config screen....?
Couldn't LinuxBios simply call the appropriate init code in a graphics card Bios in order to get a text console, and then carry on afterwards in the same way a normal boot loader would ?
Antony.
* Antony Stone Antony@soft-solutions.co.uk [020911 09:26]:
Forgive my ignorance, but isn't this what the Bios chip on the VGA card itself is for (in the case where you have a physical card plugged into the motherboard, and not an all-in-one integrated motherboard chipset) ?
exactly.
I mean, surely that's the reason why, when you turn on a 'standard' PC with a normal graphics card and a normal Bios, you see the starup messages for the graphics card *first*, and *then* you see the Bios logo and config screen....?
the system bios has no way of user notification/interaction before vga is initialized. When PCI/AGP is initialized, all expansion cards containing an option rom are initialized by executing their initialization functions.
Couldn't LinuxBios simply call the appropriate init code in a graphics card Bios in order to get a text console, and then carry on afterwards in the same way a normal boot loader would ?
There's already code in linuxbios to do something like this. (as well as a userspace emulation program, which is kind of incomplete) The problem is that you have to emulate quite some legacy pc bios functionality to be able to do this. As that's all 16bit code (and LinuxBIOS is completely 32bit) this is not always trivial.
Stefan
Stefan Reinauer wrote:
Is there a flaw somewhere in my reasoning ?
Unfortunately, yes. The problem is that video BIOSes run in real mode and tend to rely on legacy system BIOS services. These _can_ be rewritten but noone on this list is very interested in doing so because it is a LOT of work that might never be worthwhile anyway. On the other hand, if it DOES get written it might also be used for booting other, legacy, operating systems like MS-DOS or maybe older Windows systems, both of these cases have been mentioned on the list, but I do not believe either has very high priority.
Couldn't LinuxBios simply call the appropriate init code in a graphics card Bios in order to get a text console, and then carry on afterwards in the same way a normal boot loader would ?
There's already code in linuxbios to do something like this. (as well as a userspace emulation program, which is kind of incomplete) The problem is that you have to emulate quite some legacy pc bios functionality to be able to do this. As that's all 16bit code (and LinuxBIOS is completely 32bit) this is not always trivial.
There's quite a bit of work going on that will support this over at:
http://www.missl.cs.umd.edu/Projects/sebos/winint/
Windowz and VGA support isn't very high priority for many on this list that mainly work with clusters but there is a great deal of interest in embedded and industrial computing for an open source BIOS that can support VGA and legacy operating systems. For many embedded projects the costs of securing source code and the royalty payments for a legacy spaghetti-code BIOSes are higher than the hardware development costs.
Bari
On Wed, 11 Sep 2002, Antony Stone wrote:
Couldn't LinuxBios simply call the appropriate init code in a graphics card Bios in order to get a text console, and then carry on afterwards in the same way a normal boot loader would ?
see vgabios support in linuxbios. We can do that.
ron
On Wednesday 11 September 2002 7:22 am, Steve M. Gehlbach wrote:
Maybe someone knows if alphanumeric mode setup is via the standard VGA register set on most modern VGA cards.
I am afraid your are wrong. For modern VGA cards, there is actually no alphanumeric mode. These alphanumeric mode were simulated by BIOS or drivers. The worst thing, if you have no documents about these extended registers, you have no way to drive the clock gen for Dot clock, Hsync, Vsync.
Are you saying that it is not possible to use a text console with Linux (vgacon.c) with modern VGA cards (BIOS mode 3)? Only framebuffer? Or are you saying that without extra information (ie, the BIOS or the manuals) you can't init it into mode 3?
Excuse the second posting to this thread so soon after my last, but I've found a far more succinct way of expressing my point:
If I go out and buy the latest whizz-bang graphics card, just released onto the market, and plug it into my three year old PC, whose designers knew nothing abut today's graphics cards, I expect to see a text console screen when I turn it on.
This means one of two things. Either:
1. there's a standard way for the motherboard Bios to initialise _any_ graphics card, so it can initialise a new one it's never heard of before (and presumably LinuxBios could do the same), or:
2. there's a standard init call to the bios chip on the graphics card, which knows how to set up that particular model, which again LinuxBios could perform in exactly the same way when it starts up ?
Is there a flaw somewhere in my reasoning ?
Antony.
- there's a standard way for the motherboard Bios to initialise _any_
graphics card, so it can initialise a new one it's never heard of before (and presumably LinuxBios could do the same), or:
this is what is the case.
BIOS has notion of "extensions", which just piece of firmware on each card put into extension slot (ISA,PCI,etc). bios will just jump to that (in 16 bit mode) and execute it.
On Wed, Sep 11, 2002 at 08:55:21AM +0100, Antony Stone wrote:
- there's a standard way for the motherboard Bios to initialise _any_
graphics card, so it can initialise a new one it's never heard of before (and presumably LinuxBios could do the same), or:
This is the case. The way you reset a VGA card is to far call the real mode address 0xc000:3. This is what the system BIOS does pretty early on, before saying anything to anyone looking at the screen. Try starting debug.exe in MS-DOS and enter a 100 call c000:3 retn <blank line> g q
Is there a flaw somewhere in my reasoning ?
Unfortunately, yes. The problem is that video BIOSes run in real mode and tend to rely on legacy system BIOS services. These _can_ be rewritten but noone on this list is very interested in doing so because it is a LOT of work that might never be worthwhile anyway. On the other hand, if it DOES get written it might also be used for booting other, legacy, operating systems like MS-DOS or maybe older Windows systems, both of these cases have been mentioned on the list, but I do not believe either has very high priority.
Why need for textmode? Why not just use the framebuffer? Try playing with the old package SVGATextMode too.
//Peter
On Wed, 11 Sep 2002, Peter Stuge wrote:
This is the case. The way you reset a VGA card is to far call the real mode address 0xc000:3. This is what the system BIOS does pretty early on, before saying anything to anyone looking at the screen. Try starting debug.exe in MS-DOS and enter a 100 call c000:3 retn
<blank line> g q
yes. we have code in linuxbios and a user-mode emulator to do this.
Unfortunately, yes. The problem is that video BIOSes run in real mode and tend to rely on legacy system BIOS services.
I've done bits of it.
ron
On Wed, 11 Sep 2002, Antony Stone wrote:
- there's a standard way for the motherboard Bios to initialise _any_
graphics card, so it can initialise a new one it's never heard of before (and presumably LinuxBios could do the same), or:
we already can do this, see the vgabios stuff.
- there's a standard init call to the bios chip on the graphics card, which
knows how to set up that particular model, which again LinuxBios could perform in exactly the same way when it starts up ?
yes.
ron
On Wed, 2002-09-11 at 15:55, Antony Stone wrote:
On Wednesday 11 September 2002 7:22 am, Steve M. Gehlbach wrote:
Maybe someone knows if alphanumeric mode setup is via the standard VGA register set on most modern VGA cards.
I am afraid your are wrong. For modern VGA cards, there is actually no alphanumeric mode. These alphanumeric mode were simulated by BIOS or drivers. The worst thing, if you have no documents about these extended registers, you have no way to drive the clock gen for Dot clock, Hsync, Vsync.
Are you saying that it is not possible to use a text console with Linux (vgacon.c) with modern VGA cards (BIOS mode 3)? Only framebuffer? Or are you saying that without extra information (ie, the BIOS or the manuals) you can't init it into mode 3?
Excuse the second posting to this thread so soon after my last, but I've found a far more succinct way of expressing my point:
If I go out and buy the latest whizz-bang graphics card, just released onto the market, and plug it into my three year old PC, whose designers knew nothing abut today's graphics cards, I expect to see a text console screen when I turn it on.
This means one of two things. Either:
- there's a standard way for the motherboard Bios to initialise _any_
graphics card, so it can initialise a new one it's never heard of before (and presumably LinuxBios could do the same), or:
Yes.
- there's a standard init call to the bios chip on the graphics card, which
knows how to set up that particular model, which again LinuxBios could perform in exactly the same way when it starts up ?
Yes.
Is there a flaw somewhere in my reasoning ?
The flaw is the these standard are "Legacy BIOS standard". You have to provide various legacy BIOS functions since these VGA BIOS/init stuff will call back to system BIOS. LinuxBIOS just doest not or incompletely support these functions.
Ollie
On Tue, Sep 10, 2002 at 11:22:58PM -0700, Steve M. Gehlbach wrote:
Maybe someone knows if alphanumeric mode setup is via the standard VGA register set on most modern VGA cards.
I am afraid your are wrong. For modern VGA cards, there is actually no alphanumeric mode. These alphanumeric mode were simulated by BIOS or drivers. The worst thing, if you have no documents about these extended registers, you have no way to drive the clock gen for Dot clock, Hsync, Vsync.
Are you saying that it is not possible to use a text console with Linux (vgacon.c) with modern VGA cards (BIOS mode 3)? Only framebuffer? Or are you saying that without extra information (ie, the BIOS or the manuals) you can't init it into mode 3? I don't understand your answer.
I thought most vga cards were register compatible with the legacy VGA register set, only that there were a lot of other (sometimes secret) things to setup. Is this wrong?
That's Ollie's point AFAICS.
Fortunately regular vga cards are not very important to me, actually, I am really most interested in integrated chipsets, such as the stpc and the via apollo ple133 northbridge, both of which are legacy VGA register compatible.
In this case, when the chips really ARE VGA compatible, of course you can program the neccessary registers with appropriate values and get the expected results. You could try this for all graphics chips, just for fun. With a little luck it will work better than we expect.
You will want to dump the VGA registers on a running system, and of course you're interested in 0x3c0, 0-0x14@0x3c0:0x3c0, 0x3c3, 0-4@0x3c4:0x3c5, 0x3c6-0x3c9, 0-8@0x3ce:0x3cf and 0-0x14@0x3d4:0x3d5.
One number above is just the port, a-b@x:y means registers a through b at port y after index is written to port x.
Good luck with this. :)
//Peter
Fortunately regular vga cards are not very important to me,
actually, I am
really most interested in integrated chipsets, such as the stpc
and the via
apollo ple133 northbridge, both of which are legacy VGA register compatible.
In this case, when the chips really ARE VGA compatible, of course you can program the neccessary registers with appropriate values and get the expected results. You could try this for all graphics chips, just for fun. With a little luck it will work better than we expect.
You will want to dump the VGA registers on a running system, and of course you're interested in 0x3c0, 0-0x14@0x3c0:0x3c0, 0x3c3, 0-4@0x3c4:0x3c5, 0x3c6-0x3c9, 0-8@0x3ce:0x3cf and 0-0x14@0x3d4:0x3d5.
Thanks, I have done a fair amount of vga register progamming with the stpc, and have the scars to prove it.
For the other comments....
I think fb vga is okay as well, but, I need some kind of vga up very early in the boot process for my application. I believe the fb enable in linuxbios is a vga bios call (not sure about this, someone correct me if I have that wrong), so this code is not helpful for integrated chipsets. Text vga is also a little simpler to interface from rom.
The reason for vga, BTW, is that some embedded products require a screen for user setup or diagnosis. It is a major support hassle to try and talk a non-technical user through hooking up a serial console to their Windows machine. A web browser interface is the next best thing, for the non-technical user, but if they have network problems the sure thing is to hook up a vga monitor. Anyone can do that, these days, even your Aunt Millie.
So I think the bottom line to my Q's is that any vga register code I contribute for the stpc (or the ple133) might be useful for other integrated chipsets, to the extent they have legacy register compatibility, but is unlikely to be useful for much of anything else.
Thanks to all for the helpful replies.
-Steve
On Wed, 2002-09-11 at 16:09, Peter Stuge wrote:
On Tue, Sep 10, 2002 at 11:22:58PM -0700, Steve M. Gehlbach wrote:
Maybe someone knows if alphanumeric mode setup is via the standard VGA register set on most modern VGA cards.
I am afraid your are wrong. For modern VGA cards, there is actually no alphanumeric mode. These alphanumeric mode were simulated by BIOS or drivers. The worst thing, if you have no documents about these extended registers, you have no way to drive the clock gen for Dot clock, Hsync, Vsync.
Are you saying that it is not possible to use a text console with Linux (vgacon.c) with modern VGA cards (BIOS mode 3)? Only framebuffer? Or are you saying that without extra information (ie, the BIOS or the manuals) you can't init it into mode 3? I don't understand your answer.
I thought most vga cards were register compatible with the legacy VGA register set, only that there were a lot of other (sometimes secret) things to setup. Is this wrong?
That's Ollie's point AFAICS.
What is AFAICS ??
Fortunately regular vga cards are not very important to me, actually, I am really most interested in integrated chipsets, such as the stpc and the via apollo ple133 northbridge, both of which are legacy VGA register compatible.
In this case, when the chips really ARE VGA compatible, of course you can program the neccessary registers with appropriate values and get the expected results. You could try this for all graphics chips, just for fun. With a little luck it will work better than we expect.
You will want to dump the VGA registers on a running system, and of course you're interested in 0x3c0, 0-0x14@0x3c0:0x3c0, 0x3c3, 0-4@0x3c4:0x3c5, 0x3c6-0x3c9, 0-8@0x3ce:0x3cf and 0-0x14@0x3d4:0x3d5.
The catch is, for most cases, you have to program those "non-standard" undocumented extended register first then these Standard VGA registers become "Standard". You can try it anyway.
Ollie
ollie lho ollie@sis.com.tw writes:
What is AFAICS ??
As Far As I Can See
The catch is, for most cases, you have to program those "non-standard" undocumented extended register first then these Standard VGA registers become "Standard". You can try it anyway.
Ollie I haven't looked but do you know if there is anything comparable to the memory initialization hassels LinuxBIOS has to go through? Or has your experience been just dumping the correct values in the correct registers?
The other catch that I have seen is that in addition to requiring BIOS services, the some vga init roms also assume that some legacy hardware is present.
Eric
On Thu, 2002-09-12 at 09:51, Eric W. Biederman wrote:
ollie lho ollie@sis.com.tw writes:
What is AFAICS ??
As Far As I Can See
The catch is, for most cases, you have to program those "non-standard" undocumented extended register first then these Standard VGA registers become "Standard". You can try it anyway.
Ollie I haven't looked but do you know if there is anything comparable to the memory initialization hassels LinuxBIOS has to go through? Or has your experience been just dumping the correct values in the correct registers?
It depends, I think. For integrated VGA like SiS', it is not necessary to do Video DRAM init/sizing so a stupid save/restore procedure is sufficient to turn VGA to correct mode. (well, there are still two problems, 1. you have to know where are these registers, 2. sometimes the 'sequence' of save/restore does matter). But for standalone VGA chips with its own DRAM, it requires almost the same hassles as system DRAM.
Ollie