aboutsummaryrefslogtreecommitdiffstats
path: root/com32/mboot
Commit message (Collapse)AuthorAgeFilesLines
* com32: Use z size specifier for printf-ing size_t variableMartin Str|mberg2015-01-051-1/+1
| | | | | | | | | Use the z size specifier to printf-ing size_t variables to get rid of gcc warning format ‘%08x’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ Author: Martin Str|mberg <ams@ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* mem: Calling int15 for 0x8800Erwan Velu2014-01-231-0/+1
| | | | | | | | On some code, the intcall 0x15 was missing when playing with 0x8800 making code useless. That's not a big deal since e820 or e801 shall be provided by host but anyway, let's fix it ;)
* com32sys_t inreg shall be zeroified prior intcallErwan Velu2014-01-223-0/+6
| | | | | | | | | | | As per commit f775e740a3a817a4ff5ba26bea99dbfd735456b3, inreg parameters of intcall() shall be zeroified. Having unclean inreg could trigger bad behaviors on some hosts. This patch is about adding memset() calls prior any intcall() : - some intcall didn't had any memset at all - some successive intcall() calls didn't memset inreg in between calls
* zonelist: rename syslinux_memmap_find()...Matt Fleming2013-07-171-1/+1
| | | | | | | 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 tag 'syslinux-5.01' into firmwaresyslinux-6.00-pre4Matt Fleming2013-01-291-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: Makefile NEWS com32/cmenu/Makefile com32/elflink/ldlinux/Makefile com32/gfxboot/Makefile com32/gpllib/Makefile com32/include/sys/module.h com32/lib/Makefile com32/lib/sys/module/elf_module.c com32/menu/Makefile com32/rosh/Makefile com32/samples/Makefile core/init.c mk/elf.mk Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| * Always strip all the modulesH. Peter Anvin2013-01-171-1/+1
| | | | | | | | | | | | | | | | Always strip the modules; they are too big unstripped. Specifically, we generate unstripped *.elf files, and then convert them to stripped *.c32 files. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge tag 'syslinux-5.00-pre9' into for-hpa/elflink/firmwareMatt Fleming2012-11-051-1/+1
|\| | | | | | | | | | | | | | | | | | | | | This merge also includes the Syslinux-4.06 release. Conflicts: Makefile com32/hdt/Makefile com32/modules/Makefile com32/samples/hello.c mtools/Makefile
| * Merge branch 'master' into elflinkMatt Fleming2012-10-241-1/+1
| |\ | | | | | | | | | | | | | | | | | | | | | | | | The following conflict is a result of the fact comapi_chainboot was only stubbed out on the 'elflink' branch but was properly marked as obsolete in 'master'. Conflicts: core/comboot.inc
| | * mboot: fix typo in commentFrediano Ziglio2012-10-091-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Frediano Ziglio <frediano.ziglio@citrix.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
| | * com32: make syslinux_dump_*() pure debugging functionsH. Peter Anvin2011-06-271-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | Make the syslinux_dump_*() functions pure debugging functions; that is the way that they are used anyway, and this way they log to the same place as dprintf. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | Add per-firmware object directory supportMatt Fleming2012-10-161-3/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have multiple firmware backends it no longer makes sense to write object files to the same directory as their source. A better solution is to write the object files to a per-firmware directory under a top-level object directory. The top-level object directory can be specified on the command-line with the O= variable, e.g. make O=/tmp/obj. If no top-level object directory is specified an 'obj' directory is created in the top-level of the Syslinux source repository. All the existing make targets continue to work as before, however now they apply to all firmware backends, e.g. 'make installer' will build the BIOS, 32-bit EFI and 64-bit EFI installers and place them under $(OBJ)/bios, $(OBJ)/efi32 and $(OBJ)/efi64 respectively. Note unlike every other bit of Syslinux, the gpxe objects are still kept in the src directory, e.g. gpxe/src, since gpxe is only required by the BIOS backend. It is possible to specify a make target for a specific firmware or list of firmware with the following syntax, make [firmware[,firmware]] [target[,target]] To clean the object directory for just the BIOS firmware type, 'make bios clean' To build both the 32-bit and 64-bit EFI installers type, 'make efi32 efi64 installer' Since the Syslinux make infrastructure is now more complex a new file doc/building.txt has been created to explain how to build Syslinux. The top-level Makefile now exports some make variables for use in module Makefiles, - topdir - the top-level source directory of the Syslinux repository, e.g. /usr/src/syslinux - objdir - the top-level object directory for the firmware backend currently being built, e.g. /obj/syslinux/bios - SRC - the source directory in the Syslinux repository for the module currently being built, e.g. /usr/src/syslinux/com32/libupload - OBJ - the object directory for the module currently being built, e.g. /obj/syslinux/bios/com32/libupload Since we're rewriting the Makefile infrastructure anyway it seemed like a good idea to add parallel support. By writing subdirectories as prequisites for make targets the objects in those subdirectories can be built in parallel. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | Delete all references to __com32.cs_bounceMatt Fleming2012-06-082-18/+41
| | | | | | | | | | | | | | | | | | The COM32 cs_bounce buffer is not usable with ELF modules, as we're trying to move to an environment where memory is dynamically allocated. All users of __com32.cs_bounce have been converted to using lmalloc() to allocate low memory. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | com32: make syslinux_dump_*() pure debugging functionsH. Peter Anvin2012-05-181-3/+2
| | | | | | | | | | | | | | | | Make the syslinux_dump_*() functions pure debugging functions; that is the way that they are used anyway, and this way they log to the same place as dprintf. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | graphics: report video mode change from protected-mode codePaulo Alcantara2012-05-121-11/+8
| | | | | | | | | | | | | | | | | | | | | | Syslinux used to call __intcall() for calling routines of the old COMBOOT API to report video mode change (INT 22h, AX=0x0017) that seemed pointless, since INT 22h, AX=0x0017 does call the protected-mode function pm_using_vga() already when calling INT 22h, AX=0x0017. So for reporting video mode changes (VGA in this case) we must call graphics_using_vga() instead for now. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | elflink: Make ELF the default object formatMatt Fleming2011-04-261-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com32/elflink/modules was originally created to house ELF modules and keep them separate from the COM32 modules as the elflink branch was being developed. However, this has inadvertently created a maintenance nightmare because code was copied from elsewhere in the tree into com32/elflink/modules, resulting in duplication. Bug fixes have been going into the original code but have not been merged onto the elflink branch, leaving the duplicate code in com32/elflink/modules buggy. So let's delete this directory. There really is no reason to keep ELF and COM32 modules separate because there's no reason to need both COM32 and ELF modules to coexist. ELF is a far superior object file format and all modules are not emitted as ELF objects. Now that we're outputting ELF modules we can use dynamic memory instead of the cs_bounce bounce buffer. This commit requires a certain amount of shuffling for some files. quicksort.c isn't a module and belongs as part of the util library. cli.h belongs in com32/include so that other modules can make use of the cli code in ldlinux.c32. All libraries are now ELF shared libraries which are only loaded to fixup unresolved symbols for executable modules and renamed from *.a to *.c32. This reduces the runtime memory footprint because libraries are only loaded when needed and because every executable no longer gets its own copy of code/data (as it would if linking with a static library). Also, remove MINLIBOBJS from libcom32.c32 because it is already part of libcom32min.a and we don't want to have any duplicate symbols between the core (which links with libcom32min.a) and libcom32.c32. Welcome to the New World Order of ELF modules! Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* mboot.c32: Delete superfluous $(LIBS) prerequisiteMatt Fleming2011-04-111-2/+1
| | | | | | | com32.mk already includes the necessary archive libraries in $(C_LIBS), we don't need to list them again in $(LIBS). Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* Makefile: Move Makefile fragments into mk/Matt Fleming2011-04-071-1/+2
| | | | | | | | | | | | | | | | | | Move the MCONFIG files into a mk/ directory and give them more descriptive names. This is purely a cosmetic change to make the 'include' directives a bit more coherent by making it obvious exactly which MCONFIG file we're including. For example, in com32/lua/src/Makefile we exchange the line, include ../../MCONFIG for the much more comprehensible, include $(MAKEDIR)/com32.mk Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* mboot.h: use <dprintf.h>H. Peter Anvin2010-06-291-7/+1
| | | | | | Use <dprintf.h> like more and more of the system does... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* mboot.c32: don't rely on possibly incomplete fieldsH. Peter Anvin2010-06-081-6/+9
| | | | | | | | | Since load_end_addr and bss_end_addr may be incomplete, we can't actually use them for information. An alternative would be to actually modify these fields in-memory, but it is unclear if that is permitted by the spec. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* mboot.c32: handle non-self-terminating imagesH. Peter Anvin2010-06-081-6/+14
| | | | | | | | | Handle non-ELF Multiboot images with 0 entries for data and/or bss end, which means "until end of the file" and "nothing" for the two fields, respectively. Reported-and-tested-by: Thomas Bächler <thomas@archlinux.org> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge branch 'master' into pathbasedH. Peter Anvin2010-05-114-8/+32
|\
| * mboot.c32: autodetect SolarisH. Peter Anvin2010-05-034-8/+32
| | | | | | | | | | | | | | Autodetect Solaris kernels (based on the ELF header OSABI field) and use the Solaris workarounds in that case. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge branch 'master' into pathbasedH. Peter Anvin2010-03-294-3/+54
|\| | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: MCONFIG.embedded com32/MCONFIG com32/include/com32.h core/com32.inc core/pxelinux.asm doc/comboot.txt Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * mboot: set boot loader nameH. Peter Anvin2010-03-294-3/+54
| | | | | | | | | | | | | | Set the boot loader name based on syslinux_version()->version_string. Based on a prior patch by Sebastian Herbszt <herbszt@gmx.de>. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge branch 'master' into fscH. Peter Anvin2009-12-226-19/+354
|\| | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: com32/Makefile com32/lib/sys/open.c com32/modules/Makefile dos/Makefile dos/com16.ld dos/syslinux.c version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * mboot.c32: fix the video mode selection algorithmH. Peter Anvin2009-11-131-4/+11
| | | | | | | | | | | | Make the video mode selection algorithm do what was intended... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * mboot.c32: add VESA mode setting supportsyslinux-3.84-pre2H. Peter Anvin2009-11-136-19/+347
| | | | | | | | | | | | Add VESA mode setting support per the Multiboot specification. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'master' into fscH. Peter Anvin2009-11-061-1/+1
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: com32/modules/Makefile core/pxelinux.asm core/serirq.inc Note: hardwired options will need to be re-implemented in PXELINUX. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * mboot: correct the detection of the multiboot headerH. Peter Anvin2009-10-121-1/+1
| | | | | | | | | | | | | | | | | | | | Correct the detection of the multiboot header. The logic for when the header extends past the file was backwards, which broke non-ELF multiboot kernels completely. Apparently they are few and far between. Reported-by: Klaus T. <nightos@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | com32: remove strpcpy() - we already have stpcpy()H. Peter Anvin2009-08-121-1/+1
|/ | | | | | | | Remove strpcpy(); it is exactly the same thing as stpcpy() which we already have, and which is more "standard" (in the sense that none of these are actually standard...) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Run Nindent on com32/mboot/solaris.cH. Peter Anvin2009-05-291-9/+10
| | | | | | | | | Automatically reformat com32/mboot/solaris.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/mboot/mem.cH. Peter Anvin2009-05-291-137/+136
| | | | | | | | | Automatically reformat com32/mboot/mem.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/mboot/mboot.hH. Peter Anvin2009-05-291-3/+3
| | | | | | | | | Automatically reformat com32/mboot/mboot.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/mboot/mboot.cH. Peter Anvin2009-05-291-167/+168
| | | | | | | | | Automatically reformat com32/mboot/mboot.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/mboot/mb_info.hH. Peter Anvin2009-05-291-96/+92
| | | | | | | | | Automatically reformat com32/mboot/mb_info.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/mboot/mb_header.hH. Peter Anvin2009-05-291-26/+26
| | | | | | | | | Automatically reformat com32/mboot/mb_header.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/mboot/map.cH. Peter Anvin2009-05-291-232/+235
| | | | | | | | | Automatically reformat com32/mboot/map.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/mboot/apm.cH. Peter Anvin2009-05-291-45/+44
| | | | | | | | | Automatically reformat com32/mboot/apm.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>
* Drop support for ACPI 3 E820 extended memory attributesH. Peter Anvin2009-05-211-9/+0
| | | | | | | | | | | | | | Drop all support for ACPI 3 E820 extended memory attributes. There are BIOSes in the field that report completely bogus information here, resulting in no memory at all being detected (we then fall back to E801 detection, but that is problematic in its own ways.) There is strong reasons to believe at this point that the extended memory attributes are not usable in their current form, so drop them and revert back to simple 20-byte support, including for MEMDISK spoofing. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: handle ELF Multiboot kernel where paddr != vaddrH. Peter Anvin2009-05-031-4/+11
| | | | | | | | | The way Grub handles ELF Multiboot kernels where paddr != vaddr is to load at the paddr, but to also adjust the entry point (e_entry) so that the previous vaddr becomes a paddr. Since the Multiboot spec is pretty much "Grub wins", follow this behavior. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: align the stack to a 16-byte boundaryH. Peter Anvin2009-05-021-1/+1
| | | | | | Align the stack to a 16-byte boundary, just in case... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: move setting regs.eax to mboot_run()H. Peter Anvin2009-05-021-2/+1
| | | | | | | The setting of regs.eax in map_image() doesn't really make any sense; move it to mboot_run() instead. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: move map initialization out of map_image()H. Peter Anvin2009-05-023-35/+38
| | | | | | | | | The amap/mmap initialization were buried randomly inside map_image(), which at the very least makes the code needlessly hard to read. Furthermore, it is at least possible that we may want to be able to map multiple images in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: disable DEBUGH. Peter Anvin2009-04-301-1/+1
| | | | | | | | Disable DEBUG in mboot.c32, which was accidentally enabled in a previous commit. Reported-by: Sebastian Herbszt <herbszt@gmx.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* linux.c32: move handling of mem= and vga= into the library functionsyslinux-3.80-pre5H. Peter Anvin2009-04-291-1/+1
| | | | | | | Move the handling of mem= and vga= into syslinux_boot_linux(), so that the user of that function doesn't need to worry about it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: silence warningH. Peter Anvin2009-04-281-0/+1
| | | | | | Silence warning of unused argc. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: include module filenames in the command lineH. Peter Anvin2009-04-281-1/+4
| | | | | | | Grub includes the kernel and module filenames in the command lines it passes, so match that behavior and don't strip them off. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: add header guards; use <inttypes.h>; formatting changesH. Peter Anvin2009-04-272-46/+36
| | | | | | | Reformat the mboot header files slightly, use <inttypes.h> types, and add header inclusion guards. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot/solaris.c: fix failure case; correct copyright noticeH. Peter Anvin2009-04-271-5/+6
| | | | Better handling of failed mapping; correct copyright notice.
* mboot: reimplement the Solaris DHCP hack, add compliant a.out modesyslinux-3.80-pre1H. Peter Anvin2009-04-265-6/+83
| | | | | | | | | | | | | Reimplement the Solaris DHCP information passing hack. Add a spec-compliant mode for the "a.out kludge". The spec is pretty clear that the bit should override the ELF header (after all, otherwise there wouldn't be any need for the bit), but Grub disagrees. We default to Grub-compliant mode, as Solaris seems to set the bit even though it's an ELF kernel, but add the option to enable spec-compliant mode, as apparently some versions of FreeBSD need it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>