summaryrefslogtreecommitdiff
path: root/com32/mboot
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* mboot: fix cmdline; a few more layout tweaksH. Peter Anvin2009-04-264-30/+38
| | | | | | | | | | Fix module command lines (it was overwriting the main kernel command line); a few minor layout tweaks. In particular, we require the section header to be page-aligned, but not the subsequent sections. With this, I can get Xen to boot. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: skip --- marker; decompress all filesH. Peter Anvin2009-04-261-7/+5
| | | | | | | | | When walking the argument list we need to skip --- markers. Grub, and the old mboot.c32, seem to transparently decompress all files, not just the main one, so do the same. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: make sure we actually succeed when we finishedH. Peter Anvin2009-04-262-18/+44
| | | | | | | When we actually finished mapping the image, return 0 and don't bail. Add error messages to most failure cases. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* mboot: set up a stack even though the spec doesn't require itH. Peter Anvin2009-04-261-0/+18
| | | | | | | Set up a stack for the Multiboot OS even though it is not required by spec. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* First attempt at a rewritten mboot moduleH. Peter Anvin2009-04-268-0/+1227
First attempt at rewriting the mboot module to use the Syslinux shuffle APIs. Signed-off-by: H. Peter Anvin <hpa@zytor.com>