aboutsummaryrefslogtreecommitdiffstats
path: root/com32/include
Commit message (Collapse)AuthorAgeFilesLines
* dmi: check both the AC and ID flags at the same timeHEADmasterH. Peter Anvin2019-02-201-6/+11
| | | | | | | There is no reason to do the fairly complex flag-test sequence twice, when we might as well check for both flags at the same time. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* cpu_has_eflag(): mark output registers as earlyclobbersH. Peter Anvin2019-02-201-1/+1
| | | | | | | | | | | We assign values to the output registers before the input operand is used, so we have to use =&r to make sure the input operand isn't clobbered. Note: "ri" is correct; it cannot safely be a memory operand, because the stack pointer isn't where the compiler would expect it to be. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* cpu_has_eflag(): eliminate if the answer is already knownH. Peter Anvin2019-02-202-1/+20
| | | | | | | There is no need to test for a flag if the answer can be given at compile time. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* 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-047-4355/+6050
| | | | | | 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-0413-389/+322
| | | | | | | 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>
* zlib: update to version 1.2.11H. Peter Anvin2019-01-283-291/+914
| | | | | | Update zlib to version 1.2.11 due to errata in previous versions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe_api.h: finish revert of 9acbffdGene Cumm2016-11-271-3/+3
| | | | | | | | 9acbffd33b9200ffe37833463b4d4478e824295a caused more issues than it solves. There appears to be a bigger underlying issue that the __weak argument masks. Until the underlying issue is solved, we need __weak. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* partial revert 9acbffdGene Cumm2016-11-271-2/+2
| | | | | | | | | Weaken 2 declarations. Seems to be the minimal amount for now. First exhibited issues with EFI but later also with BIOS beyond *pxelinux.0 when compiled with gcc-5.3.1 and gcc-6. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* removing double l from auxilliaryGeert Stappers2016-06-071-1/+1
| | | | | | | This patch changes only strings, no program code. Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* pxe_dns: remove obsolete pxe_dns.c wrapperH. Peter Anvin2016-04-061-1/+1
| | | | | | | | | We used to need a wrapper around the core function dns_resolv() to implement pxe_dns(), because the former function required its argument to live in low memory. This is no longer the case and hasn't been for a while, so remove this unnecessary level of indirection. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* pxe_api.h: remove __weak from prototypesH. Peter Anvin2016-04-061-5/+5
| | | | | | | The prototypes themselves are not weak, and declaring them as such forces the core definitions, which should not be weak, as weak. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* com32/include/menu.h: Extend my_isspaceGene Cumm2015-07-181-1/+1
| | | | | | Add 0x7f as a space character Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* fix a few typosJonathan Boeing2015-05-031-1/+1
| | | | Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* libansi.h: depends on stdbool.h and stdio.hFerenc Wágner2014-10-111-0/+3
| | | | Signed-off-by: Ferenc Wágner <wferi@niif.hu>
* Centralize shift_is_held(), make it work to force the command linesyslinux-6.03-pre11H. Peter Anvin2014-04-201-0/+1
| | | | | | | Holding down shift is supposed to force a command line unless noescape is provided; make it behave that way. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* kbd: Make getting the keyboard shift state a firmware methodH. Peter Anvin2014-04-201-0/+1
| | | | | | | Getting the keyboard shift state is a firmware method. It is unfortunately unclear if it is even possible on EFI. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add filesystem UUID to SYSAPPEND for FATSerj Kalichev2014-03-131-0/+1
| | | | | | | | | | Filesystem UUID shows the partition we boot kernel from. The kernel parameter has format like FSUUID=DA1A-0B2E. The SYSAPPEND bit is 0x40000. Now the FAT only supports FSUUID. The patch is based on 67aaaeeb228. Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'nocomapi'syslinux-6.03-pre7H. Peter Anvin2014-03-031-0/+3
|\
| * bios: Remove shuffle and boot comapi callH. Peter Anvin2014-02-131-0/+3
| | | | | | | | | | | | | | | | Remove the shuffle and boot comapi call. This is the last of the comapi calls left; we should now be able to completely remove the comapi support. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | sys/module.h: fix some typos in function documentationsFerenc Wágner2014-03-011-2/+3
| |
* | sys/module.h: remove the #ifdef DYNAMIC_MODULE conditionFerenc Wágner2014-03-011-20/+0
| | | | | | | | | | This makes the module_* functions accessible to COM32 modules. MODULE_INIT and MODULE_EXIT are not used anymore.
* | stdlib.h: provide a stub definition for getenv()Ferenc Wágner2014-03-011-1/+6
| | | | | | | | Which always returns NULL, representing an empty environment.
* | dev.h: get size_t definitionFerenc Wágner2014-03-011-0/+1
|/
* pxe: Export the initial stack and PXE(NV) structure, fix pxechnH. Peter Anvin2014-02-131-2/+2
| | | | | | | | | | Export the initial stack and PXE(NV) structure pointers properly, even for users which need seg:offs. Use this in pxechn.c rather than the already-removed INT 22h AX=000Ah call. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Gene Cumm <gene.cumm@gmail.com>
* Merge remote-tracking branch 'origin/rockridge'H. Peter Anvin2014-02-122-16/+138
|\ | | | | | | | | | | | | Resolved Conflicts: com32/include/byteswap.h Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Generic facilities for byteswapping and unaligned referencesH. Peter Anvin2013-04-022-11/+141
| | | | | | | | | | | | | | For future portability, add functions to access both littleendian and bigendian numbers, and to perform unaligned memory references. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Add const qualifiersGene Cumm2014-01-251-1/+1
| | | | | | | | | | | | Some functions are ignoring the const qualifier. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | com32: fix __bswap_64_macroGene Cumm2014-01-251-1/+1
| | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | ldlinux: Fix recent pxe symbol regressionMatt Fleming2013-12-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | commit 60dabb5b1d6d ("pxe: Make the SENDCOOKIES feature for HTTP worked again") introduced a regression for ldlinux because it references the 'SendCookies' symbol, which is only provided by PXELINUX. The regression was caused because the '__weak' tag was dropped from the declaration of SendCookies. Tested-by: "Santillanes, Russel" <Russel.Santillanes@gs.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | pxe: Make the SENDCOOKIES feature for HTTP worked againRussel Santillanes2013-12-061-1/+1
| | | | | | | | | | | | | | | | Code refactoring had caused the http_bake_cookies() function to become inaccessible and the SendCookies variable to be duplicated, causing the sendcookies feature to not work. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | com32/disk: Code cleanup at disk_write_sectors and disk_read_sectors.Raphael S.Carvalho2013-09-301-0/+7
| | | | | | | | | | | | | | | | Pulled common code out of these functions into new ones. The functions chs_setup and ebios_setup were created for this purpose. Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge branch 'elflink-pxe-fixes-for-mfleming-2' of ↵Matt Fleming2013-09-301-0/+3
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://github.com/geneC/syslinux into firmware Pull various network stack fixes from Gene Cumm and adapt to the 6.xx core_udp_* API, * 'elflink-pxe-fixes-for-mfleming-2' of git://github.com/geneC/syslinux: PXE ISR: Force polling on select hardware WORKAROUND core/lwip: Fix NULL pointer check PXE: use ddprintf macro com32: Define ddprintf() macro PXELINUX: specify PXE/lwIP undiif: show thread of execution on UNDIIF_ID_DEBUG core: dprintf() the banner. PXELINUX: Use sendto() instead of connect()/send()/disconnect() core: make mbox_post()/__sem_down_slow() check if valid core: mbox/semaphore NULL checks core/lwip/undi: Improve UNDIIF_ID_DEBUG messages Conflicts: core/fs/pxe/pxe.c core/fs/pxe/tftp.c core/init.c
| * | com32: Define ddprintf() macroGene Cumm2013-09-231-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Duplicating Debug Printf; Certain warning/error printf() statements are not visible if they occur before ldlinux.c32 is loaded Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | load_linux: dynamically calculate the cmdline regionsyslinux-6.02-pre12Matt Fleming2013-07-251-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Users are hitting issues where the offset calculated by, (0x9ff0 - cmdline_size) & ~15; is not useable memory, e.g. it is SMT_RESERVED. Instead we should be trying to find the highest lowmem address. Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | movebits: add an inline to test for SMT_FREE || SMT_TERMINALH. Peter Anvin2013-07-171-0/+5
| | | | | | | | | | | | | | | | | | Introduce a predicate inline to test for a valid terminal address. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | memscan: build a linked list of memory scannersMatt Fleming2013-07-172-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By registering memory scanners at runtime we can support multiple memory scanner functions, which helps us to isolate them and keep things modular, only registering them for specific platform/derivative combinations. This is preparation for adding a memory scanner that is specific to PXELINUX on bios and understands when the memory region occupied by the PXE stack can be reused. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | movebits: Add SMT_TERMINAL - a last resort region typeMatt Fleming2013-07-171-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some memory regions are usable, but only as a last resort just before we hand over control to a kernel image. Add the necessary movebits infrastructure to use these regions when all other options have been exhausted. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | memscan: pass enum syslinux_memmap_types aroundMatt Fleming2013-07-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The memscan interface should be using SMT_* to describe the types of memory regions as SMT_* are platform agnostic values. This will allow us to be much more descriptive about the type of memory regions in future. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | movebits: Add syslinux_memmap_find()Matt Fleming2013-07-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Refactor the code for finding a suitable location for kernel protected-mode and real-mode data. It's complicated enough that it deserves to be separated into its own function. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | zonelist: rename syslinux_memmap_find()...Matt Fleming2013-07-171-3/+3
| | | | | | | | | | | | | | | | | | | | | to syslinux_memmap_find_type(), which more accurately reflects its function and frees up the old name for another use. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | Merge branch 'kernel-loader' into for-hpa/elflink/firmwareMatt Fleming2013-07-081-1/+8
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: efi/efi.h
| * | | efi: implement Linux kernel handover protocol supportMatt Fleming2013-07-081-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The handover protocol is the preferred method of booting kernels on EFI because it allows workarounds for various firmware bugs to be contained in one place and applied irrespective of the chosen bootloader. Use it if available, but ensure that we fallback to the legacy boot method. Also, update the linux_header structure with recent changes made in the kernel source. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | | Merge tag 'syslinux-5.11-pre8' into firmwaresyslinux-6.02-pre1Matt Fleming2013-07-082-2/+23
|\ \ \ \ | | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syslinux-5.11-pre8 Conflicts: NEWS com32/lib/Makefile core/conio.c mk/devel.mk mk/elf.mk
| * | | debug.c32: Dynamically enable/disable debug code at runtimeMatt Fleming2013-07-052-2/+23
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's useful to be able to enable (and disable) debug code at runtime, particularly for allowing users that are unable to build their own Syslinux releases the chance to provide useful debugging output. For example, say a user reports trouble with their PXE stack but doesn't have a development environment setup to turn on the debug code themselves. With this change you can simply request that they do, debug.c32 -e pxe_call unload_pxe open_file to enable the debug in those functions. By only turning on code in specific functions we reduce the chance of disrupting the buggy behaviour and improve the signal to noise ratio for print statements. To disable debug code use the -d flag, debug.c32 -d pxe_call To use this new feature simply do, if (syslinux_debug_enabled) { debug1(); debug2(); .... } from within the function you wish to add debug code. Note that this feature is not limited to print statements - you can put any code within the conditional, such as verifying a checksum or checking for memory leaks. The plan is to leave the dynamic debug code built in for all prereleases and to turn it off for final releases. People may still want to build with all dprintf() statements enabled, and so a new symbol, DYNAMIC_DEBUG, was introduced rather than repurposing the old DEBUG, DEBUG_STDIO and DEBUG_PORT symbols. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | firmware: s/set_mode/text_mode/Matt Fleming2013-07-041-1/+1
| |/ |/| | | | | | | | | | | We only ever use ->set_mode() to transition into text mode, so rename it to something more suitable and drop the unused 'mode' argument. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | ipappend: delete .ipappend_strings()Matt Fleming2013-06-191-1/+0
| | | | | | | | | | | | | | It's no longer referenced anywhere as everything has now moved to *sysappend*. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | firmware: correct the get_cursor() argument typesMatt Fleming2013-06-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | We only ever pass uint8_t * to get_cursor(), so update the prototypes and fix the following compiler warnings, In function ‘__ansicon_open’: com32/lib/sys/ansicon_write.c:93:6: warning: passing argument 1 of ‘firmware->o_ops->get_cursor’ from incompatible pointer type [enabled by default] com32/lib/sys/ansicon_write.c:93:6: note: expected ‘int *’ but argument is of type ‘uint8_t *’ com32/lib/sys/ansicon_write.c:93:6: warning: passing argument 2 of ‘firmware->o_ops->get_cursor’ from incompatible pointer type [enabled by default] com32/lib/sys/ansicon_write.c:93:6: note: expected ‘int *’ but argument is of type ‘uint8_t *’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | com32: add prototype for get_derivative_info()Matt Fleming2013-06-191-0/+2
| | | | | | | | | | | | | | | | | | and fix the following compiler warning, In function ‘__syslinux_get_derivative_info’: com32/lib/syslinux/dsinfo.c:37:5: warning: implicit declaration of function ‘get_derivative_info’ [-Wimplicit-function-declaration] Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Merge tag 'syslinux-5.10-pre2' into for-hpa/elflink/firmwareMatt Fleming2013-03-2214-113/+233
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | syslinux-5.10-pre2 Conflicts: NEWS com32/include/netinet/in.h com32/include/sys/cpu.h com32/lib/Makefile core/Makefile core/fs/diskio.c core/fs/pxe/pxe.h core/init.c core/mem/free.c core/mem/malloc.c mk/devel.mk version