summaryrefslogtreecommitdiff
path: root/vgasrc
Commit message (Collapse)AuthorAgeFilesLines
* vgasrc: Don't use VAR16 in header files to fix gcc warningKevin O'Connor2021-12-181-2/+2
| | | | | | | Some versions of gcc complain when VAR16 is used in both the header and C files - use only in the C file to fix the warning. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* svgamodes: add standard 4k modesGerd Hoffmann2021-12-181-0/+8
| | | | | | | | | | | Add all three 4k modes. Computer monitors typically use the first one (3840x2160). Add 16 and 32 bpp variants. 24bpp is dead these days, and software which is so old that still uses those modes most likely doesn't even know what 4k is. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vgasrc: ignore .node.gnu.property (binutils-2.36 support)Sergei Trofimovich2021-05-261-1/+8
| | | | | | | | | | | | | | | Modern binutils unconditionally tracks x86_64 ISA levels in intermediate files in .note.gnu.property. Custom liker script does not handle the section and complains about it: ld --gc-sections -T out/vgasrc/vgalayout.lds out/vgaccode16.o \ out/vgaentry.o out/vgaversion.o -o out/vgarom.o ld: section .note.gnu.property LMA [0000000000000000,0000000000000027] \ overlaps section .text LMA [0000000000000000,00000000000098af] The change ignores .note* sections. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* vgabios: Fix preserve memory flag in handle_1000Kevin O'Connor2020-07-131-4/+3
| | | | | | | | | Commit 5108c69c made a change to the ordering of some code which broke the check for the MF_NOCLEARMEM flag. Reported by felix.von.s@posteo.de Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vga: fix cirrus biosGerd Hoffmann2020-06-251-1/+1
| | | | | | | | | Little mistake, big effect. The patch adding the ati driver broke cirrus due to a missing "else", which effectively downgrades cirrus to standard vga. Fixes: 34b6ecc16074 ("vga: add atiext driver") Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ramfb: add copyright and license to ramfb.cGerd Hoffmann2019-10-281-0/+6
| | | | | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* bochsdisplay: add copyright and license to bochsdisplay.cGerd Hoffmann2019-10-281-0/+6
| | | | | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* svgamodes: Add copyright notice to vgasrc/svgamodes.cKevin O'Connor2019-10-281-0/+8
| | | | | | | Commit 004f5b3a moved part of vgasrc/bochsvga.c to vgasrc/svgamodes.c - copy over the copyright statements as well. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Remove dos line endings introduced in the last two commitsUwe Kleine-König2019-10-212-17/+17
| | | | | | | | | | | These were added somewhere between the mailing list server and Gerd's working copy (as the patch I got via the mailing list is fine). These don't disturb the compiler, but they look ugly so remove them. Reported-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Message-Id: <20191020200726.20116-1-uwe@kleine-koenig.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* Add additional resolutions for 16:9 displays: 1600x900 and 2560x1440Uwe Kleine-König2019-10-181-0/+8
| | | | | | | | | | | | This allows to have qemu run at the native screen resolution of my (physical) monitor. This is inspired by a patch created by Andreas Dangel that I found on https://adangel.org/2015/09/11/qemu-kvm-custom-resolutions/ . Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Message-Id: <20191017203353.18898-2-uwe@kleine-koenig.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga: reuse svga modes definitions from svgamodes.cUwe Kleine-König2019-10-181-71/+9
| | | | | | | | | | | | | | For cbvga only modes with MM_DIRECT are usable, so skip the other ones. This effectively adds the following modes: { 0x10D, { MM_DIRECT, 320, 200, 15, 8, 16, SEG_GRAPH } }, { 0x10E, { MM_DIRECT, 320, 200, 16, 8, 16, SEG_GRAPH } }, { 0x10F, { MM_DIRECT, 320, 200, 24, 8, 16, SEG_GRAPH } }, { 0x140, { MM_DIRECT, 320, 200, 32, 8, 16, SEG_GRAPH } }, Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Message-Id: <20191017203353.18898-1-uwe@kleine-koenig.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ati-vga: add rage128 edid supportGerd Hoffmann2019-06-241-0/+25
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ati-vga: try vga ddc firstGerd Hoffmann2019-06-241-0/+9
| | | | | | | Try vga ddc bus before dvi ddc bus. Return early in case we got valid data. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ati-vga: make i2c register and bits configurableGerd Hoffmann2019-06-241-7/+27
| | | | | | | Prepare to support other ati cards. Also log access mode and whenever we got a valid edid block. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ati-vga: fix ati_read()Gerd Hoffmann2019-06-241-1/+1
| | | | | | | Cut & paste bug probably. Had no bad effect so far because the code doesn't read registers larger than 0x100. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ati-vga: make less verboseGerd Hoffmann2019-06-241-1/+1
| | | | | | Reduce loglevel for mode line removals from 1 to 3. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* bochsdisplay: parse resolution from edid.Gerd Hoffmann2019-05-151-8/+16
| | | | | | Then use the resolution for the framebuffer. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* bochsdisplay: add edid support.Gerd Hoffmann2019-05-151-1/+7
| | | | | | Read EDID blob from mmio bar, store in VBE_edid. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* bochsvga: add edid support.Gerd Hoffmann2019-05-151-3/+16
| | | | | | Read EDID blob from mmio bar, store in VBE_edid. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* ati: add edid support.Gerd Hoffmann2019-05-151-0/+114
| | | | | | Read EDID blob via i2c, store in VBE_edid. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vbe: add edid support.Gerd Hoffmann2019-05-152-0/+31
| | | | | | | | | | | VBE subfunction 0x15, read ddc data. Add VBE_edid where drivers can fill in a EDID data blob. If we find valid data there (checking the first two header bytes), then report the function as supported and hand out the data. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: add ati bios tablesGerd Hoffmann2019-03-152-0/+46
| | | | | | | Needed to make drivers happy which try to gather informations from these tables. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: add atiext driverGerd Hoffmann2019-03-154-0/+270
| | | | | | | | | | | | Supports qemu emulated ati cards. They have been added in qemu 4.0. Acceleration support (in qemu) is pretty rough still. A simple framebuffer works fine though. Available models: * ati rage 128 pro * ati rv100 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: make memcpy_high() publicGerd Hoffmann2019-03-142-2/+2
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: move modelist from bochsvga.c to new svgamodes.cGerd Hoffmann2019-03-143-86/+108
| | | | | | So other drivers can simply use the same list too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* SeaVGABios/cbvga: Fix bpp for coreboot framebufferMatt DeVillier2018-09-181-2/+8
| | | | | | | | | | | | | | | | Commit 4b42cc4 [SeaVGABios/cbvga: Advertise correct pixel format] neglected to wrap the cbfb mask size components in GET_FARVAR(), which resulted in a bogus value for bpp, breaking output on most/all devices. Fix this by adding GET_FARVAR() as appropriate. Additionally, some newer ChromeOS devices still fail even with this fix, so fall back to using the coreboot reported bit depth if the calculated valid is invalid. TEST: build/boot a variety of devices (google/[reef,eve], purism/librem_skl) using coreboot framebuffer init, verify SeaBIOS boot menu prompt visible. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
* cbvga_set_mode: refine clear display logicGerd Hoffmann2018-06-261-8/+10
| | | | | | | There is no need to skip text mode clearing. Clearing the framebuffer should be safe on legacy calls too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qemu: add qemu ramfb supportGerd Hoffmann2018-06-224-13/+188
| | | | | | | | | | | | | | | | | Add support for qemu ramfb. This is a simple boot framebuffer device, with normal ram being used to back the framebuffer and fw_cfg being used to configure the device. Use case (on x86): boot display for vgpu devices (which neither emulate vga nor have a vgabios). Sharing fw_cfg code with seabios turned out to be difficuilt due to various dependencies the code has on infrastructure which only seabios has. So include a copy of the code here, with those dependencies removed and also stripped down because we don't need a non-dma fallback here. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vgasrc: add allocate_pmm()Gerd Hoffmann2018-06-222-16/+33
| | | | | | Factor out pmm allocation function from stack allocator. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* bochs_display_setup: return error on failureGerd Hoffmann2018-06-221-1/+1
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga_set_mode: disable clearmem in windows x86 emulator.Gerd Hoffmann2018-06-221-1/+9
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga_list_modes: don't list current mode twiceGerd Hoffmann2018-06-221-1/+5
| | | | | | | In case we've already added the framebuffer video mode to the list do not add number 0x140. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga_setup_modes: use real mode number instead of 0x140Gerd Hoffmann2018-06-221-0/+5
| | | | | | | In case the framebuffer size matches one of the cbvga video modes just use that mode number instead of 0x140. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* qemu: add bochs-display supportGerd Hoffmann2018-06-224-13/+94
| | | | | | | | | | Use coreboot text mode emulation to also support the qemu bochs-display device. This is a new display device supporting simple linear framebuffers, using the bochs register interface. No support for legacy vga (text modes, planar modes, cga modes, 8bpp palette modes all dropped). The bochs interface is compatible with the qemu stdvga. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga: factor out cbvga_setup_modes()Gerd Hoffmann2018-06-222-25/+33
| | | | | | Factor out generic data structure setup code from cbvga_setup(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* vga: Fix bug in stdvga_get_linesize()Kevin O'Connor2017-08-291-1/+1
| | | | | | Add required GET_GLOBAL() macro to vmode_g access. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* SeaVGABios/cbvga: Advertise compatible VESA modesPatrick Rudolph2017-06-121-1/+103
| | | | | | | | | | | | | | | | 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>
* SeaVGABios/cbvga: Use active mode to clear screenPatrick Rudolph2017-06-121-1/+1
| | | | | | As coreboot framebuffer is immutable always use CBmodeinfo. Signed-off-by: Patrick Rudolph <siro@das-labor.org>
* SeaVGABIOS/vbe: Query driver for scanline pitch v2Patrick Rudolph2017-06-125-1/+21
| | | | | | | | | | | 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>
* SeaVGABios/cbvga: Advertise correct pixel formatPatrick Rudolph2017-06-121-1/+3
| | | | | | | | | | | | 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>
* vgasrc: Increase debug levelPaul Menzel2017-01-291-1/+1
| | | | | | | | | | 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>
* version: Update header files now that version.c is not auto generatedKevin O'Connor2016-08-052-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgautil: Move definitions from cbvga.h and clext.h to vgautil.hKevin O'Connor2016-08-057-46/+30
| | | | | | | These files only need to export simple function definitions - move them to vgautil.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgautil: Move generic definitions from stdvga.h to vgautil.hKevin O'Connor2016-08-056-33/+37
| | | | | | | 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>
* vgautil: Add new header file with misc function and variable definitionsKevin O'Connor2016-08-0513-37/+57
| | | | | | | | 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>
* vgainit: Move video param setup to stdvga_build_video_param()Kevin O'Connor2016-08-054-14/+14
| | | | | | | 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>
* vgafb: Move header definitions from vgabios.h to new file vgafb.hKevin O'Connor2016-08-046-37/+47
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* swcursor: Concentrate swcursor logic in swcursor.cKevin O'Connor2016-08-045-20/+39
| | | | | | | | 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>
* swcursor: Move swcursor code from vgafb.c to new file swcursor.cKevin O'Connor2016-08-043-57/+67
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Simplify scroll logicKevin O'Connor2016-07-213-69/+64
| | | | | | | | | 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>