Generic VESA framebuffer driver and Video card BOOT?
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 9 lines · Alan Cox
Quoted 3 lines · Kendall Bennett
a way to spawn a user mode process that early in the boot sequence (it would have to come from the initrd image I expect) then the only option is to compile it into the kernel.
There is exactly that in 2.6 - the hotplug interfaces allow the kernel to fire off userspace programs. Jon Smirl (who you should definitely talk to about this stuff) has been hammering out a design for moving almost all the mode switching into user space for kernel video.
The problem is that this would imply that the console would only work after user space is running. Even with initrd that's quite late.
The only way I see to make that fly would be a very good early console implementation, otherwise tracking down any problems will be hell (how do you display "panic no rootfs found" without console?) And writing a good early console implementation would have all the same problems as the current one.
So I can see Kendall's point.
-Andi
Quoted 7 lines · Andi Kleen
Quoted 4 lines
There is exactly that in 2.6 - the hotplug interfaces allow the kernel to fire off userspace programs. Jon Smirl (who you should definitely talk to about this stuff) has been hammering out a design for moving almost all the mode switching into user space for kernel video.
The problem is that this would imply that the console would only work after user space is running. Even with initrd that's quite late.
It doesn't imply this at all. You set an initial mode with the BIOS during boot up. When your initrd runs you gain the ability to flip mode and do cool stuff - arguably it doesn't even need to be in initrd.
Quoted 6 lines · Alan Cox
Quoted 5 lines · Andi Kleen
Quoted 4 lines
There is exactly that in 2.6 - the hotplug interfaces allow the kernel to fire off userspace programs. Jon Smirl (who you should definitely talk to about this stuff) has been hammering out a design for moving almost all the mode switching into user space for kernel video.
Quoted 6 lines
Quoted 2 lines
The problem is that this would imply that the console would only work after user space is running. Even with initrd that's quite late.
It doesn't imply this at all. You set an initial mode with the BIOS during boot up. When your initrd runs you gain the ability to flip mode and do cool stuff - arguably it doesn't even need to be in initrd.
That works great on x86, but this solution was developed for PowerPC and MIPS embedded systems development not x86 desktop systems. For those platforms you either need a boot loader that can bring up the system into graphics mode (possible with U-Boot) or to init the video right when the framebuffer console driver is brought up.
Quoted 1 line
From the sound of it that might be too early to spawn a user mode
process?
Regards,
---
Kendall Bennett
Chief Executive Officer
SciTech Software, Inc.
Phone: (530) 894 8400
http://www.scitechsoft.com
~ SciTech SNAP - The future of device driver technology! ~
Quoted 5 lines · Kendall Bennett
That works great on x86, but this solution was developed for PowerPC and MIPS embedded systems development not x86 desktop systems. For those platforms you either need a boot loader that can bring up the system into graphics mode (possible with U-Boot) or to init the video right when the framebuffer console driver is brought up.
Right there are certainly cases where you need to do stuff very early. Even then you may benefit because you can keep the kernel side init pretty basic and also marked "__init" so it is freed post boot.
Quoted 2 lines
Quoted 1 line
From the sound of it that might be too early to spawn a user mode
process?
Do the embedded folks want the kernel boot messages via the display or are they happy with that via debug port/serial anyway. If so is it an issue ? You can bring up the video at the point user space begins.
Quoted 11 lines · Alan Cox
Quoted 5 lines · Kendall Bennett
That works great on x86, but this solution was developed for PowerPC and MIPS embedded systems development not x86 desktop systems. For those platforms you either need a boot loader that can bring up the system into graphics mode (possible with U-Boot) or to init the video right when the framebuffer console driver is brought up.
Right there are certainly cases where you need to do stuff very early. Even then you may benefit because you can keep the kernel side init pretty basic and also marked "
__init" so it is freed post boot.
Right. I haven't yet figured out how to mark the code as __init so it can get tossed out, although if we use the VESA driver after the fact you would want to keep it around in that case. But to just boot the card and use say the Radeon FB driver it would be nice to toss out the code.
I should probably look into that.
Quoted 7 lines
Quoted 2 lines
Quoted 1 line
From the sound of it that might be too early to spawn a user mode
process?
Do the embedded folks want the kernel boot messages via the display or are they happy with that via debug port/serial anyway. If so is it an issue ? You can bring up the video at the point user space begins.
Well in most cases I think what they really want is for the video to come on as soon as possible (instantly would be best) after the power is applied, but they probably want their own boot logo on the screen at that point and not Linux kernel boot messages.
Also is it possible to run X on a machine that is running from a serial console and have it start up on the graphics card at that point? I thought about that option since then everything would be in user space, but wasn't sure how that would work (plus there would be a long delay between when the machine is powered on and something shows up on the screen, which is generally not a good thing for consumer products).
Regards,
---
Kendall Bennett
Chief Executive Officer
SciTech Software, Inc.
Phone: (530) 894 8400
http://www.scitechsoft.com
~ SciTech SNAP - The future of device driver technology! ~
Quoted 4 lines · Kendall Bennett
Right. I haven't yet figured out how to mark the code as
__initso it can get tossed out, although if we use the VESA driver after the fact you would want to keep it around in that case. But to just boot the card and use say the Radeon FB driver it would be nice to toss out the code.
Every function that starts __init, and every data object starting __initdata gets magically blown away at the end of boot.
ie
int __init messy_horrible_boot_function(blah)
Quoted 2 lines
Also is it possible to run X on a machine that is running from a serial console and have it start up on the graphics card at that point? I
Yes
Quoted 6 lines · Kendall Bennett
Also is it possible to run X on a machine that is running from a serial console and have it start up on the graphics card at that point? I thought about that option since then everything would be in user space, but wasn't sure how that would work (plus there would be a long delay between when the machine is powered on and something shows up on the screen, which is generally not a good thing for consumer products).
I'm actually doing this in practice.
-- wli
Hi!
Quoted 11 lines
Quoted 10 lines
Quoted 5 lines
That works great on x86, but this solution was developed for PowerPC and MIPS embedded systems development not x86 desktop systems. For those platforms you either need a boot loader that can bring up the system into graphics mode (possible with U-Boot) or to init the video right when the framebuffer console driver is brought up.
Right there are certainly cases where you need to do stuff very early. Even then you may benefit because you can keep the kernel side init pretty basic and also marked "
__init" so it is freed post boot.
Quoted 6 lines
Right. I haven't yet figured out how to mark the code as
__initso it can get tossed out, although if we use the VESA driver after the fact you would want to keep it around in that case. But to just boot the card and use say the Radeon FB driver it would be nice to toss out the code.I should probably look into that.
On any machine trying to do suspend-to-RAM, that POST code is likely to be needed for suspend, too.
Pavel
Signature · 2 lines
People were complaining that M$ turns users into beta-testers... ...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
hi :)
Quoted 9 lines · Kendall Bennett
Quoted 3 lines · Alan Cox
It doesn't imply this at all. You set an initial mode with the BIOS during boot up. When your initrd runs you gain the ability to flip mode and do cool stuff - arguably it doesn't even need to be in initrd.
That works great on x86, but this solution was developed for PowerPC and MIPS embedded systems development not x86 desktop systems. For those platforms you either need a boot loader that can bring up the system into graphics mode
not neccessarily.
If anything goes wrong before console is initialized, then that could be displayed by the firmware.
Is there any arch which doesn't have some basic text-output functunality in its firmware?
Signature · 1 line
Martin Waitz
Quoted 11 lines · Martin Waitz
Quoted 9 lines · Kendall Bennett
Quoted 3 lines · Alan Cox
It doesn't imply this at all. You set an initial mode with the BIOS during boot up. When your initrd runs you gain the ability to flip mode and do cool stuff - arguably it doesn't even need to be in initrd.
That works great on x86, but this solution was developed for PowerPC and MIPS embedded systems development not x86 desktop systems. For those platforms you either need a boot loader that can bring up the system into graphics mode
Quoted 5 lines
not neccessarily.
If anything goes wrong before console is initialized, then that could be displayed by the firmware. Is there any arch which doesn't have some basic text-output functunality in its firmware?
I am not sure what you mean by basic text output? If you mean to a display, then yes, embedded boxes using U-Boot and OpenBIOS usually do not have any text output. But if you mean serial output that is usually the method of choice for the embedded machines that don't have support for a physical display in the firmware.
Regards,
---
Kendall Bennett
Chief Executive Officer
SciTech Software, Inc.
Phone: (530) 894 8400
http://www.scitechsoft.com
~ SciTech SNAP - The future of device driver technology! ~
hoi :)
Quoted 5 lines · Kendall Bennett
I am not sure what you mean by basic text output? If you mean to a display, then yes, embedded boxes using U-Boot and OpenBIOS usually do not have any text output. But if you mean serial output that is usually the method of choice for the embedded machines that don't have support for a physical display in the firmware.
I mean: text output on the preferred console.
Embedded devices have a serial console anyway and all other machines have firmware support for drawing text.
That is: switching into graphics mode can be done by the firmware, bootloader, or by userspace and doesn't have to be in the kernel.
Signature · 1 line
Martin Waitz
Quoted 11 lines · Martin Waitz
Quoted 5 lines · Kendall Bennett
I am not sure what you mean by basic text output? If you mean to a display, then yes, embedded boxes using U-Boot and OpenBIOS usually do not have any text output. But if you mean serial output that is usually the method of choice for the embedded machines that don't have support for a physical display in the firmware.
I mean: text output on the preferred console.
Embedded devices have a serial console anyway and all other machines have firmware support for drawing text.
No, all other machines don't have firmware support for drawing text. That is why we wrote this code in the first place.
Quoted 2 lines
That is: switching into graphics mode can be done by the firmware, bootloader, or by userspace and doesn't have to be in the kernel.
U-Boot and OpenBIOS on the machines we are working with do not have any support for initialising the video card. Both could be modified but at present neither support this so the only way to bring up the video card for framebuffer console support is in the kernel.
Regards,
---
Kendall Bennett
Chief Executive Officer
SciTech Software, Inc.
Phone: (530) 894 8400
http://www.scitechsoft.com
~ SciTech SNAP - The future of device driver technology! ~
Quoted 2 lines · Andi Kleen
The problem is that this would imply that the console would only work after user space is running. Even with initrd that's quite late.
klibc + initramfs + early userspace?
Gerd
Signature · 1 line
return -ENOSIG;
Quoted 6 lines · Gerd Knorr
Quoted 2 lines · Andi Kleen
The problem is that this would imply that the console would only work after user space is running. Even with initrd that's quite late.
klibc + initramfs + early userspace?
That's still quite late in my book (by my perspective may be skewed a bit from low level architecture hacking)
Ok I guess for debugging architectures it would work as long as you have usable early console support everywhere that can be easily enabled when anything goes wrong.
-Andi
Quoted 10 lines · Andi Kleen
Quoted 6 lines · Gerd Knorr
Quoted 2 lines · Andi Kleen
The problem is that this would imply that the console would only work after user space is running. Even with initrd that's quite late.
klibc + initramfs + early userspace?
That's still quite late in my book (by my perspective may be skewed a bit from low level architecture hacking)
Framebuffer console _is_ quite late compared vgacon or even early_printk, all the basic stuff is already up+running at that point.
I think initialization in early userspace can be done in a way that it wouldn't delay the initial console display compared to todays vesafb (or any other framebuffer). Of course you need some way to turn it off and use vgacon instead ...
Gerd
Signature · 1 line
return -ENOSIG;