grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can we get video card information in EFI environment ?


From: Bean
Subject: Re: Can we get video card information in EFI environment ?
Date: Mon, 9 Jun 2008 01:08:13 +0800

On Sun, Jun 8, 2008 at 2:38 AM, Bean <address@hidden> wrote:
> Hi,
>
> I encounter a small problem when writing the x86_64 EFI code. The
> loader does work, but I'm struggle to get the frame buffer to work. In
> order to do so, I need some information to fill in the linux header:
>
> 1. frame buffer address
> 2. frame buffer size
> 3. line buffer length
>
> Other information, width, height and color depth can be retrieved
> using UGA Draw protocol.
>
> I have figured out the correct value for my macbook. By setting them
> manually, I can get vesafb and efifb to work properly. intelfb is
> supposed to work by accessing video card directly,  but it doesn't
> work for me. imacfb is just a hack, it works if I feed in the value
> properly.
>
> But for a normal user, they can't know the values. Is there a way to
> query them using pci interface, or is there some EFI service that I
> miss ?
>
> BTW, EFI 2.0 support Gop protocol which can be used to returned the
> above information. Unfortunately, apple don't support it. When would
> they upgrade to 2.0 ?

Hi,

I figure it out. The new patch query pci base address registry to get
the frame buffer address, I hope it works.

To load the framebuffer, you need to use the video parameter:

linux /boot/vmlinuz video=vesafb root=/dev/sda3

You can also use efifb.

BTW, you need to remove the udev start script from /etc/rcS.d,
otherwise the screen would scramble again. I believe the cause is
agppart. Fame buffer of EFI is a little strange, the line length is
not equal to width * 4, for example, my macbook:

width: 1280
depth: 32
line length: 8192

So there is some invisible space after the screen boundary. But in
bios emulation mode, the length is exactly width * 4. I think the
driver should take this into account, or reconfigure the video
hardware to use the new line length. (Anyone know how to do it ?)

-- 
Bean

Attachment: efi_3.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]