aboutsummaryrefslogtreecommitdiffstats
path: root/com32/mboot/map.c
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* 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>
* mboot.c32: autodetect SolarisH. Peter Anvin2010-05-031-0/+4
| | | | | | | 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>
* mboot.c32: add VESA mode setting supportsyslinux-3.84-pre2H. Peter Anvin2009-11-131-16/+16
| | | | | | Add VESA mode setting support per the Multiboot specification. 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>
* 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>
* 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-021-35/+34
| | | | | | | | | 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: reimplement the Solaris DHCP hack, add compliant a.out modesyslinux-3.80-pre1H. Peter Anvin2009-04-261-1/+1
| | | | | | | | | | | | | 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-261-8/+12
| | | | | | | | | | 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: make sure we actually succeed when we finishedH. Peter Anvin2009-04-261-16/+38
| | | | | | | 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-261-0/+286
First attempt at rewriting the mboot module to use the Syslinux shuffle APIs. Signed-off-by: H. Peter Anvin <hpa@zytor.com>