| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Add required GET_GLOBAL() macro to vmode_g access.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Advertise compatible VESA modes, that are smaller or equal to
coreboot's active framebuffer. Only modes that have the same Bpp
are advertise and can be selected.
Allows the Windows 7 bootloader NTLDR to show up in VESA mode.
Allows to show the Windows 7 boot logo.
Allows Windows to boot in safe mode and in normal boot using
VgaSave driver with resolution up to 1600x1200.
This fixes most likely other bootloader and operating systems as well,
in case the are relying on VESA framebuffer support.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
|
|
|
|
|
|
| |
As coreboot framebuffer is immutable always use CBmodeinfo.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Query the driver for the real scanline pitch in bytes.
As cbvga doesn't change the pitch on mode change, always
return the same pitch, that might exceed width times Bytes-per-pixel.
Report the default stdvga pitch for all other drivers.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Accumulate the pixel format's bits instead relying on coreboot's
bits_per_pixel, which says nothing about the active pixel format.
Allows VBE to correctly advertise XRGB8 and BGRX8 framebuffer formats,
commonly used by coreboot.
Fixes at least Windows Bootloader and gfxboot.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
|
|
|
|
|
|
|
|
|
|
| |
You only want this information for debugging. As it also slows down the
boot considerably, as, for example, for every character of the GRUB
menu, something is sent over the serial console.
Therefore, increase the debugging level to 9.
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
These files only need to export simple function definitions - move
them to vgautil.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Don't use stdvga.h for function definitions of code in stdvgamodes.c
and stdvgaio.c. Move them to vgautil.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Move the generic function and variable definitions from vgabios.h to a
new file vgautil.h. This reduces the size and complexity of
vgabios.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Move the full video_param_table[] setup (including the updating of the
BDA) to stdvga_build_video_param().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
The software cursor code is not frequently used (only the coreboot
framebuffer vga code uses it). Move its logic out of the main code
and into swcursor.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Introduce a new function vgafb_scroll() to scroll a window on the
screen and update vgabios.c to use only that function for scrolling.
This makes the low-level vgafb_move_chars() and vgafb_clear_chars()
local to vgafb.c, and it simplifies the callers.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Rework set_cursor_pos() to be slightly simpler.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
The original "lgpl vgabios" internally used page=0xff as a mechanism
for specifying the current page. It also would allow int1013 calls to
externally specify bh==0xff for the current page. However, there is
no documentation supporting this as an externally available feature.
SeaVGABIOS does not need the internal shortcut; this patch removes the
code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
The original "lgpl vgabios" had a special case for dh==0xff in its
int1013 (write string) code. There does not appear to be any VGABIOS
documentation supporting this as an externally available feature. It
appears this was for its own internal use when writing its strings to
the screen. SeaVGABIOS doesn't use this hack; this patch removes it
from the code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Attempt to extract the gcc and binutils versions. Report that
information in the debug log.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Convert the script to generate the build version from a shell script
to a python script.
Remove the ability to override the version at build time via "make
VERSION=xyz". Replace it with ability to add extra version
information at build time via "make EXTRAVERSION=xyz".
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
| |
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Add the dependency to CONFIG_VGA_FIXUP_ASM so the menu option only
appears when appropriate.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
| |
Unlike planned earlier virtio-vga will be compatible with
the qemu stdvga, with the framebuffer in bar 0. Drop the
virtio-vga chunk, update comment accordingly.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
| |
Add a kconfig menu to pick the vga variant, stick the vendorr
and device ids as defaults into Kconfig.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
| |
Emulate the "leal" instruction so that the vgabios can run on older
versions of x86emu. (This removes the previous "leal" trap.)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Add a kconfig build option (CONFIG_VGA_FIXUP_ASM) to allow users to
build the vgabios without the complex assembler fixups that work
around emulator bugs.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Commit 251e2638 introduced the "smsww" instruction to the vgabios.
Unfortunately, it appears at least some versions of x86emu crash when
executing that instruction (eg, FC13 installer crashes). That
instruction wasn't required to work around the problem fixed in
251e2638, so just avoid it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the last mode set (while not in vm86 mode) was done from a VBE mode
set call then disable the extra stack. This works under the premise
that only a modern OS would invoke the VBE mode changing facilities
and a modern OS would always call the vgabios with sufficient stack
space.
This is an ugly hack to work around a problem Windows Vista (and
possibly later Windows releases) has with the VGA BIOS using a stack
in the e-segment.
Reported-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
When restoring a saved state, make sure to remove any flags from the
video mode prior to searching for that mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When emulating text mode on "coreboot framebuffer" SeaVGABIOS, return
a foreground and background attribute from gfx_read_char() and prefer
returning a space character (instead of null) on blank cells.
This also returns the foreground color (instead of always returning
zero) for regular graphics mode gfx_read_char() calls. This seems
fine as tests show other vgabios implementations also return various
values here.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GWBasic relies on this, so implement it to enable some serious retrocomputing.
There is no better way to do it than trying to match all characters one by one
against the current font.
This makes it possible to actually do something in SCREEN 1 and SCREEN 2
(without it, you can use graphics in the programs but not in direct mode).
I couldn't find documentation for what to return as the attribute, but
experimenting with DOSBox suggests 0 (and GWBasic accepts it).
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
For legacy VGA modes that do not set the VBE_DISPI_ENABLED bit,
bochsvga_get_linelength returns 0. Thus all characters are squashed
into the first scanline. Fix this by falling back to stdvga for
the legacy modes.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The size of 'struct bregs' is not evenly divisible by four and where
the assembler placed a 'struct bregs' on the extra stack as part of
entering into the C functions it caused the C functions to run with a
non-aligned stack. It's technically not correct to use an unaligned
stack and it is certainly less efficient.
This patch avoids using BREGS_size (the sizeof struct bregs) and
instead introduces PUSHBREGS_size (the size of the general purpose
registers in struct bregs) in the assembler. Where the code actually
did use the %cs:%ip and flags, an extra 8 (instead of 6) bytes are
added to maintain a sane alignment.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Add mechanism for drawing a cursor to the framebuffer to implement a
cursor in software. The timer interrupt is "hooked" so that the
cursor can blink. This can be useful for "coreboot native vga".
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Add support for simple text mode attribute emulation while in graphics
mode. This improves text highlighting and background color on some
boot-loaders. Enable it only for CBVGA vgabios and only when a text
mode is requested.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Support reading high memory "direct" framebuffers and translating the
results to 8 bit attribute values.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Instead of hard coding the list of modes, fill them in from the list
of supported modes.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Move the standard video bios definitions into a new header file.
Also, define a struct with the layout for the static functionality
table.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Don't set the device details when changing modes, and don't set mode
details outside of mode setting.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Rework the code so that it is possible to calculate the current cursor
shape even when not changing it.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The "cursor scaling" mode is determined by the first bit of the
video_ctl bda value, not the modeset_ctl value. Also, on a
set_scan_lines() call, the shape should be set to lines-3/lines-2 and
the shape must be set after char_height has been updated.
The existing cursor shape code matches the legacy "lgpl vgabios", but
the behavior doesn't match bios documentation nor observations with an
ati vga bios.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Allow the custom bda field vbe_flags to be used for flags outside of
vbe.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
Now that a pointer to the current video mode info struct is cached in
memory, it's not necessary to pass the struct into the vgafb code.
The vgafb code can lookup the struct itself.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Cache a pointer to the current mode 'vgamode_s' struct in the BDA to
avoid doing a linear scan of all available vga modes when the struct
is needed.
This uses an additional two bytes in the BDA (at offset 0xbc). It's
possible this could conflict with some other software, but that seams
unlikely because that part of the BDA seems reserved for BIOS and
VGABIOS uses. (And neither SeaBIOS nor Bochs BIOS currently make use
of that area.)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
The vgabios uses storage in the BDA at offset 0xb9 for internal custom
storage (the contents do not appear to be part of any bios standard).
Move the description of this custom vgabios area from std/bda.h to
vgasrc/vgabios.h. Add two new macros (GET_BDA_EXT and SET_BDA_EXT).
This should make it more clear that the area is for custom internal
storage.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Create macros SAVEBREGS_POP_DSEAX and RESTOREBREGS_DSEAX for saving
and restoring the cpu state. These are similar to the existing
PUSHBREGS and POPBREGS macros.
This also fixes a bug in __farcall16 which inadvertently restored %ds
in %es and vice-versa.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
| |
The e5749978 commit added -fno-merge-constants to the compile flag.
That option changes the names of ".rodata" sections. Update
vgalayout.lds.S so that the vgabios can continue to build.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|