david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

12 Commits

Author SHA1 Message Date
Michael Brown b6ee89ffb5 [legal] Relicense files under GPL2_OR_LATER_OR_UBDL
Relicense files for which I am the sole author (as identified by
util/relicense.pl).

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2015-03-02 14:17:31 +00:00
Michael Brown 43c8c272ae [cmdline] Rename "console" command's --bpp option to --depth
Rename the "--bpp" option to "--depth", to free up the single-letter
option "-b" for "--bottom" in preparation for adding margin support.

This does not break backwards compatibility with documented features,
since the "console" command has not yet been documented.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-01-22 14:28:49 +00:00
Michael Brown 11ad25933f [vesafb] Allow for an arbitrary margin around the text area
Allow for an arbitrary margin to be specified in the console
configuration.  If the actual screen size does not match the requested
screen size, then update any margins specified so that they remain in
the same place relative to the requested screen size.  If margins are
unspecified (i.e. zero), then leave them as zero.

The underlying assumption here is that any specified margins are
likely to describe an area within a background picture, and so should
remain in the same place relative to that background picture.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-01-22 14:28:32 +00:00
Michael Brown 608d6cac9e [fbcon] Allow for an arbitrary margin around the text area
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-01-22 14:26:31 +00:00
Michael Brown b20fe32315 [vesafb] Handle failures from fbcon_init()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2014-01-22 14:16:30 +00:00
Michael Brown 8f0173b5c8 [vesafb] Set "magic" colour to transparent when a background picture is used
Use the magic colour facility to cause the user interface background
to become transparent when we have a background picture.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-09 15:34:14 +00:00
Michael Brown 54c5d08df1 [vesafb] Work around data corruption bug in bochs/qemu VBE implementation
The vgabios used by bochs and qemu (and other virtualisation products)
has a bug in its implementation of INT 10,4f00 which causes the high
16 bits of %ebx and %edx to become corrupted.

The vgabios code uses a "pushaw"/"popaw" pair to preserve the low 16
bits of all non-segment registers.  The vgabios code is compiled using
bcc, which generates 8086-compatible code and so never touches the
high 16 bits of the 32-bit registers.  However, the function
vbe_biosfn_return_controller_information() includes the line:

    size_64k = (Bit16u)((Bit32u)cur_info->info.XResolution *
				cur_info->info.XResolution *
				cur_info->info.BitsPerPixel) >> 19;

which generates an implicit call to the "lmulul" function.  This
function is implemented in vbe.c as:

    ; helper function for memory size calculation
    lmulul:
      and eax, #0x0000FFFF
      shl ebx, #16
      or  eax, ebx
      SEG SS
      mul eax, dword ptr [di]
      mov ebx, eax
      shr ebx, #16
      ret

which modifies %eax, %ebx, and %edx (as a result of the "mul"
instruction, which places its result into %edx:%eax).

Work around this problem by marking %ebx and %edx as being clobbered
by the call to INT 10,4f00.  (%eax is already used as an output
register, so does not need to be on the clobber list.)

Reported-by: Oliver Rath <rath@mglug.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-12-06 02:54:13 +00:00
Michael Brown d4f7816de7 [vesafb] Select an optimal mode, rather than the first acceptable mode
There is no requirement for VBE modes to be listed in increasing order
of resolution.  With the present logic, this can cause e.g. a 1024x768
mode to be selected if the user asks for 640x480, if the 1024x768 mode
is earlier in the mode list.

Define a scoring system for modes as

  score = ( width * height - bpp )

and choose the mode with the lowest score among all acceptable modes.
This should prefer to choose the mode closest to the requested
resolution, with a slight preference for higher colour depths.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 14:59:48 +00:00
Michael Brown 00bb19257f [vesafb] Return meaningful error when no suitable mode is found
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 12:12:05 +00:00
Michael Brown 405416e4c4 [vesafb] Skip modes for which we cannot get mode information
The VirtualBox BIOS fails to retrieve mode information (with status
0x0100) for some modes within the mode list.  Skip any such modes,
rather than treating this as a fatal error.

Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 11:51:47 +00:00
Michael Brown 9678fedbe4 [vesafb] Include raw status value within VBE error messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 11:51:32 +00:00
Michael Brown aa2e04fe1c [vesafb] Add VESA frame buffer console
The VESA frame buffer console uses the VESA BIOS extensions (VBE) to
enumerate video modes, selects an appropriate mode, and then hands off
to the generic frame buffer code.

The font is extracted from the VGA BIOS, avoiding the need to provide
an external font file.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2013-11-28 05:55:45 +00:00