aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/vesa
Commit message (Collapse)AuthorAgeFilesLines
* Fix all warnings, and better separate code that should not be mixedsyslinux-6.04-pre3H. Peter Anvin (Intel)2019-02-071-1/+1
| | | | | | | | | Clean up a number of warnings in the tree. Refactor especially the core code so we don't end up building a bunch of BIOS-specific code for EFI, and general build cleanups. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* libpng: update to 1.6.36H. Peter Anvin2019-02-041-7/+14
| | | | | | Update libpng to version 1.6.36 due to errata in earlier versions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Reorganize and clean up a bunch of the x86 codeH. Peter Anvin2019-02-042-2/+2
| | | | | | | We were doing a bunch of i386-specific things even on x86-64. Fix this, and merge x86 definitions where possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Revert "vesa: Correct screencpy() prototype"Matt Fleming2013-01-111-2/+2
| | | | | | | | | | | | | | This reverts commit 15a67011987c341814533ac4d8e23c9a72dc7605, because as Peter points out, The objects are uint32_t and so the prototype is correct. It should not "leak" outside the screencpy function that we play ugly tricks with these pointers; that is better handled by an internal cast. So do the necessary casting inside bios_vesacon_screencpy(). Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* Merge tag 'syslinux-5.00' into firmwaresyslinux-6.00-pre3Matt Fleming2012-12-071-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile com32/elflink/ldlinux/Makefile com32/lib/sys/module/elf_module.c core/cleanup.c core/comboot.inc core/conio.c core/fs/fs.c core/init.c core/mem/free.c core/mem/malloc.c core/timer.inc diag/geodsp/Makefile extlinux/main.c mk/embedded.mk modules/Makefile Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * vesa: Fix double close() bug in vesacon_load_background()Matt Fleming2012-11-151-1/+0
| | | | | | | | | | | | | | We always call fclose() on 'fp' if fopen() was successful, so delete the extraneous fclose() call in read_jpeg_file(). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | sys/vesa: Modularise common vesa codeMatt Fleming2012-11-1515-2996/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There's lots of the vesa infrastructure that can be shared for both BIOS and EFI, so share the things that are common and split out the things that are not into firmware-specific functions and use the 'firmware' structure to access them. This commit is part of a series of changes that removes all EFI-specific code from everywhere except efi/, which means we can delete inclusion of any gnu-efi header files and remove gnu-efi paths from CFLAGS. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | vesa: Change the prototype of __vesacon_init()Matt Fleming2012-11-052-5/+5
| | | | | | | | | | | | | | | | commit 97402a0a1639 ("efi, vesa: Fix vesa initialization and video mode resolution") should have updated the BIOS version of the vesa code too. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | i915resolution.c: cast to 64-bit sized ptrMatt Fleming2012-11-051-1/+1
| | | | | | | | Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | screencpy.c: Delete unused variables and cleanupMatt Fleming2012-10-261-86/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Delete unused variable 'winn' * Delete unused variable 'win_pos' * Mark parameter __unused * Delete unused variable 'l' * Delete unused variable 'omask' * Delete BIOS code * Delete unused variable 'win_size' * Delete set_window_pos unused function Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | initvesa.c: Delete unused variables (set but not used) and cleanupMatt Fleming2012-10-261-253/+2
| | | | | | | | | | | | | | | | | | | | | | | | * Delete set but not used variables * Rip out non-EFI code * Delete defined but not used function. * Defined but not used variables. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: Fix warning about discarding const qualifierMatt Fleming2012-10-261-1/+2
| | | | | | | | | | | | | | Cast away the const-ness of cp865_8x16_font_data when passing it to unpack_font() so that gcc doesn't generate a warning. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi, vesa: Fix vesa initialization and video mode resolutionChandramouli Narayanan2012-09-062-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed undefined symbol dprintf for production build. Now dprintf.h is included so that both debug and production builds are ok. Fixed the initialization of mode_info structure to point to a valid GOP mode structure prior to printing it. Fixed the case when the requested video mode resolution is unsupported on a platform. Essentially, VESA initialization is passed a desirable video resolution. The underlying platform may either grant it or return a system supported default value. This fix is necessitated by EFI-enabled platforms. Appropriate changes to callers of the vesa initialization and the BIOS centric code are made as well. Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | efi: Fix the screen setup for Graphics Output ProtocolChandramouli Narayanan2012-09-053-34/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Earlier version of this routine was erroneously handling locating the protocol. The check for error conditions have been fixed. The handling of more than one GOP handle has been fixed as well. Added copyright info to the file cp865_8x16.h. Fixed vesacon_set_mode() to use malloc() instead of lmalloc() and cleaned up debug traces. Fixed __vesacon_copy_to_screen() by directly writing to the frame buffer. Signed-off-by: Chandramouli Narayanan <chandramouli.narayanan@intel.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | This is the first cut checkin for GOP supporting the menu subsystem.chandramouli narayanan2012-07-1311-0/+3042
|/ | | | | | | | | | | | | | | | | | | | | | | | | For the initial cut, all of vesa code is dropped into vesa/efi with code buildable for EFI with a build option. There is VESA only code that is in the efi subdirectory as well that should go away eventually. Other files not dependent on EFI or not relevant to EFI need to be removed as well (e.g. i915resolution.c). The crux of the code is in initvesa.c and screencpy.c. The GOP initialization code sets up a matching graphics mode for the caller's resolution needs. The VESA data structure is populated and mapped to the EFI implementation as much as possible with some EFI extensions. Since there is no way to query EFI for font, raw font data for cp865_8x16 is added. The code should build. Initial issues with testing the code are: GOP mode on qemu-x86_64 does not match 640x480 and secondly querying for the mode info on qemu fails. However, a simple program querying GOP modes on efi64 platform works ok though. Testing the resulting syslinux.efi on an efi64 platform does not seem to print output other than in efi_main() routine . I suspect that it may be due to loading failure or file system initialization. The issue does not show up on qemu. In summary, there are issues on qemu and an efi64 platform that need to be resolved.
* Unify instances of integer log2H. Peter Anvin2010-06-092-8/+3
| | | | | | Unify multiple open-coded instances of integer binary logarithm. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* com32: replace hard-coded bounce buffer use in com32/libsyslinux-4.00-pre25H. Peter Anvin2010-02-241-16/+36
| | | | | | Replace hard-coded bounce buffer uses in com32/lib with lmalloc/lfree. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* i915resolution: use libpci to access PCI config spacesyslinux-3.85-pre13syslinux-3.85H. Peter Anvin2010-02-161-19/+11
| | | | | | | | Use libpci to access PCI config space. This *hopefully* will make it less likely that some old machine hangs when failing to set the requested video mode. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'master' into i915ressyslinux-3.85-pre63H. Peter Anvin2010-02-081-9/+37
|\
| * vesa: for jpg or png images, tile the image across the screenH. Peter Anvin2010-02-081-9/+37
| | | | | | | | | | | | | | | | | | | | | | If we specify a smaller image than the screen size, tile it across the screen rather than leaving a big black box. This may have to be made configurable. Also note that Syslinux currently does not handle the case of an image bleeding off the end of the screen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | vesa: allow arbitrary resolutions on some Intel chipsetsH. Peter Anvin2010-01-223-2/+812
|/ | | | | | | Add some code from the tool "915resolution" to allow arbitrary resolutions to be set on some Intel chipsets. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* vesa: formatting fixH. Peter Anvin2009-12-221-1/+1
| | | | | | Code formatting fix in screencpy.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* vesamenu: unbreak the default backgroundH. Peter Anvin2009-12-221-4/+11
| | | | | | Unbreak the default background image; it would clobber all of memory. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* video: implement long-promised video functions; use themH. Peter Anvin2009-12-181-12/+7
| | | | | | | | Implement long-since-promised video functions defined in <syslinux/video.h>. Use these functions in initvesa.c instead of open-coding the same functionality. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* vesacon: don't display the cursor when doing a quiet bootH. Peter Anvin2009-12-072-2/+3
| | | | | | | | | Don't display the cursor on the graphical screen while doing a quiet boot. When doing a quiet boot we will probably show the graphical screen for a fair bit of time; as a result, we really don't want a completely bogus cursor blob on the bottom of the screen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* vesacon: not all JPEG images are JFIFH. Peter Anvin2009-12-071-2/+1
| | | | | | | There are a fair number of valid JPEG images which we can validly decode that aren't JFIF-complient, so don't require the JFIF header. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* vesacon: infrastructure support for arbitrary resolutionsH. Peter Anvin2009-08-054-75/+102
| | | | | | | Drop the hard-coding of 640x480 resolution in preparation for being able to handle other resolutions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/video.hH. Peter Anvin2009-05-291-10/+10
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/video.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/vesa.hH. Peter Anvin2009-05-291-50/+51
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/vesa.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/screencpy.cH. Peter Anvin2009-05-291-66/+66
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/screencpy.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/initvesa.cH. Peter Anvin2009-05-291-222/+221
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/initvesa.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/fmtpixel.cH. Peter Anvin2009-05-291-40/+39
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/fmtpixel.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/fill.hH. Peter Anvin2009-05-291-25/+22
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/fill.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/drawtxt.cH. Peter Anvin2009-05-291-203/+207
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/drawtxt.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/debug.hH. Peter Anvin2009-05-291-10/+10
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/debug.h using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/lib/sys/vesa/background.cH. Peter Anvin2009-05-291-270/+264
| | | | | | | | | Automatically reformat com32/lib/sys/vesa/background.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* vesa: fixing wrong total_memory sizeErwan Velu2009-03-141-1/+1
| | | | | | Regarding the vesa spec, total_memory is reported to be 16bits That 32bits field had shifted the whole structure and prevented reading other fields properly.
* VESA: Simplify the lss16 decoderH. Peter Anvin2008-03-031-11/+6
| | | | Simplify the lss16 decoder slightly.
* Drop unnecessary CLD instructions.H. Peter Anvin2008-03-032-4/+4
| | | | | | The EFI ABI spec states that DF=0 on ABI boundaries, and gcc expects this. Assume it is safe to rely upon everywhere; drop unnecessary cld instructions, except on entry and (obviously) after std.
* VESA library: add support for reading lss16 imagesH. Peter Anvin2008-03-031-1/+130
| | | | Add support for reading lss16 images, for compatibility with the CLI.
* background.c: remove unused filesize() functionH. Peter Anvin2008-02-271-9/+0
| | | | Remove obsolete and now unused filesize() function.
* Comboot/Com32 changes for unspecified file lengthsH. Peter Anvin2008-02-271-8/+6
| | | | | Handle unspecified file length for comboot/com32 modules; do changes to the appropriate part of libcom32 to handle this properly.
* Whitespace cleanup...syslinux-3.62-pre11H. Peter Anvin2008-02-193-7/+7
|
* VESA: work around bug in the Bochs VESA BIOSsyslinux-3.62-pre10H. Peter Anvin2008-02-162-5/+15
| | | | | | | The Bochs VESA BIOS returns a value other than 1 for the number of banks in unbanked modes. Ignore the number of banks if bank_size == 0 (the spec says that for unbanked modes, banks == 1 && bank_size == 0; for banked modes banks > 1 and bank_size != 0).
* VESA: suppress an unused arguments warningH. Peter Anvin2008-02-141-0/+1
| | | | Suppress a warning about unused arguments.
* VESA: align the row buffer to a multiple of 4 bytes.H. Peter Anvin2008-02-141-1/+1
| | | | We do dword accesses to the row buffer, so align it to 4 bytes.
* VESA: Minor cleanupssyslinux-3.62-pre6H. Peter Anvin2008-02-132-9/+12
| | | | Minor cleanups for clarity
* VESA: move debugging code to separate header fileH. Peter Anvin2008-02-132-25/+38
| | | | | Move the debugging function to a separate header file, so we can include it at will when convenient.
* Set the window size to 2 GB for linear framebufferH. Peter Anvin2008-02-131-1/+5
| | | | | | | | | Set the window size to 2 GB for linear framebuffer, lest the calculation: l = min(bytes, win_size-win_off); ... incorrectly returns zero when win_off == 0.
* Bypass pixel conversion when the output format is BGRA32H. Peter Anvin2008-02-133-21/+21
| | | | | When the output format is BGRA32, we don't need any conversion at all. Skip the dummy copy.