[OLPC-devel] Re: AMD Geode GX framebuffer: support OLPC
Ronald G Minnich
rminnich at lanl.gov
Mon Aug 14 21:27:04 EDT 2006
Now we need to bother Ollie, he is our real vga expert :-)
Ollie, how should we do this. I have ideas, but I want to hear your
ideas, they will be better than mine.
ron
Marcelo Tosatti wrote:
> (switching to olpc-devel)
>
> On Mon, Aug 14, 2006 at 01:14:04PM -0600, Jordan Crouse wrote:
>
>>On 14/08/06 14:49 -0400, David Zeuthen wrote:
>>
>>>> since VGA probing must be disabled in OLPC's kernel.
>>>>Unfortunately, as far as I could gather, there exists no native
>>>>framebuffer driver for the emulated Cirrus CLGD 5446 PCI VGA device.
>>>
>>>How about disabling vga probing only if we know we are on the OLPC
>>>hardware? Surely this must be fixable...
>>
>>VGA probing happens pretty darn early in the boot process, so we would
>>probably have to communicate the existence of the OLPC hardware from the
>>BIOS through one of the usual methods.
>>
>>The reasoning behind the patch was that we were purposely ignoring VGA
>>all together and I wanted to eliminate the possibility that random bits would
>>be returned to the probing function which may or may not cause the code to
>>do stupid things. Far better, I reasoned, to just ignore the VGA stuff
>>all together (plus it saved us a bit of space).
>>
>>We could probably avoid this patch all together if the kernel gurus agree
>>that nothing bad would happen if we left it in, or if we did the extra work
>>to return sane values in LinuxBIOS.
>
>
> Ronald,
>
> The aim is to kill the CONFIG_VGA_NOPROBE option which was added by
> Jordan for safety reasons (see comments above).
>
> For that to happen, it must be certain that LinuxBIOS returns
> sane values for the following Linux VGA detection routines, at
> arch/i386/kernel/video.S:
>
>
> # This is the main entry point called by setup.S
> # %ds *must* be pointing to the bootsector
> video: pushw %ds # We use different segments
> pushw %ds # FS contains original DS
> popw %fs
> pushw %cs # DS is equal to CS
> popw %ds
> pushw %cs # ES is equal to CS
> popw %es
> xorw %ax, %ax
> movw %ax, %gs # GS is zero
> cld
> call basic_detect # Basic adapter type testing (EGA/VGA/MDA/CGA)
> #ifdef CONFIG_VIDEO_SELECT
> movw %fs:(0x01fa), %ax # User selected video mode
> cmpw $ASK_VGA, %ax # Bring up the menu
> jz vid2
>
> call mode_set # Set the mode
> jc vid1
>
> leaw badmdt, %si # Invalid mode ID
> call prtstr
> vid2: call mode_menu
> vid1:
> #ifdef CONFIG_VIDEO_RETAIN
> call restore_screen # Restore screen contents
> #endif /* CONFIG_VIDEO_RETAIN */
> call store_edid
> #endif /* CONFIG_VIDEO_SELECT */
> call mode_params # Store mode parameters
> popw %ds # Restore original DS
> ret
>
> More especifically "basic_detect" and "mode_params".
>
> Thoughts/comments?
More information about the Devel
mailing list