aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* mk/efi.mk: Add libefi.a dependencygnuefi-build-fix-5Gene Cumm2014-02-221-2/+2
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: fix up gnu-efi buildGene Cumm2014-02-225-18/+61
| | | | | | | | | | This eliminates the forking and pushes the build under the efi32/ and efi64/ object directories eliminating a build race and preventing the build from breaking as gnu-efi takes a few seconds to complete. Depends on gnu-efi commit 52d88dd Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* gnu-efi: update to ab54e2b4Gene Cumm2014-02-221-0/+0
| | | | | | This allows gnu-efi to be built outside the source tree properly. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* Makefile: make "make spotless" actually workH. Peter Anvin2014-02-211-11/+17
| | | | | | The other cleaning targets might still have issues... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* efi: We need -m32/-m64 even when processing assemblyH. Peter Anvin2014-02-211-6/+4
| | | | | | We need to specify -m32/-m64 even when we are processing assembly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* mk/efi.mk: Disable stack protectorMagnus Granberg2014-02-211-1/+2
| | | | | | | | Disable the stack protector if on by default. Copied from https://bugs.gentoo.org/show_bug.cgi?id=495146. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* efi: Useless relocation section in PE fileSylvain Gault2014-02-141-18/+2
| | | | | | | | | There is no need to have a relocation section that nothing points at. The image is still seen as relocatable as long as the Characteristics of the FileHeader do not say otherwise. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* efi: PE file size differ from in-memory sizeSylvain Gault2014-02-143-101/+45
| | | | | | | | | | | | | | | PE headers code_sz and image_sz indicate more or less, the size of the file and the size of the in-memory image. They are now given the right value. In the ELF format, only the program headers are reliable to determine the actually needed part of the file and the in-memory size. The .bss section should always be marked as NOLOAD for ld since its content shouldn't be included into the binary file. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* efi: Remove buggy relocation in PE fileSylvain Gault2014-02-141-12/+6
| | | | | | | | | | | | OVMF and probably other UEFI implementation refuse a file with a relocation entry inside the headers. And since the dummy relocation wasn't used at all, better remove it. Moreover, the field base_relocation_table wasn't initialized properly, leading to unpredictable bugs. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* efi: Location, size and alignment of .text sectionSylvain Gault2014-02-141-19/+29
| | | | | | | | | | | | | In the generated PE file, the section header for the .text section used to address more than the whole file. Starting at offset 0 (before the end of the headers) is illegal and is rejected by OVMF. Giving a size greater than the actual file size is also illegal and rejected. Moreover, the body of the PE file have to be aligned to at least 512 bytes. Hence, .text need to be aligned as well. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* efi: Fix PE header field rva_and_sizes_nrSylvain Gault2014-02-142-15/+19
| | | | | | | | | The value of the field rva_and_sizes_nr is used by OVMF to check the consistency of the PE file with respect to the field optional_hdr_sz. It now have the right value. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* pxe: Export the initial stack and PXE(NV) structure, fix pxechnH. Peter Anvin2014-02-135-26/+43
| | | | | | | | | | 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>
* efi: Suspicious size reduction in emallocSylvain Gault2014-02-131-3/+1
| | | | | | | | | | | It could happen on 32 bits architecture that the memory size really allocated could be less than required. On 64 bits, allocate_pages may be called more times than needed. This closes bug #39. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Merge remote-tracking branch 'origin/rockridge'H. Peter Anvin2014-02-126-20/+793
|\ | | | | | | | | | | | | Resolved Conflicts: com32/include/byteswap.h Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * iso9660.c did not copy terminating 0 of Rock Ridge nameThomas Schmitt2013-04-251-1/+1
| | | | | | | | | | I noticed that the trailing 0-byte is not copied to the result of iso_readdir(). The function iso_convert_name() does append a trailing 0.
| * iso9660: use generic get_le32() accessor in SUSP/Rock Ridge codeH. Peter Anvin2013-04-021-12/+7
| | | | | | | | | | | | | | Use the new get_le32() accessor in the SUSP/Rock Ridge code. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Thomas Schmitt <scdbackup@gmx.net>
| * 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>
| * iso9660: read littleendian ISO 9660/SUSP numbersH. Peter Anvin2013-04-021-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | Attached is a patch which switches susp_rr.c from reading the big-endian ISO 9660 and SUSP numbers to reading the little-endian ones. Tested within libisofs on my collection of ISO images. [ hpa: more mastering programs are known which botch the bigendian information than the littleendian information, so most systems only read the littleendian info regardless of the native byte order. ]
| * iso9660: Avoid arbitrarily large malloc()sThomas Schmitt2013-04-021-0/+4
| | | | | | | | | | | | | | | | | | | | After explaining the slightly wasteful usage of malloc()/memcpy() with multi-block CE entries, i noticed that i did not install a safety cap on the malloc size. I could not challenge this in practice but only by gdb manipulation. My most CE-happy test image has 3 occasions of multi-block CE. All three only span over 2 blocks each.
| * iso9660: Add support for Rock Ridge filenamesThomas Schmitt2013-03-314-4/+659
| | | | | | | | | | | | | | | | | | Add support for parsing SUSP and RRIP records, and support for Rock Ridge filename extensions, thus avoiding the filename limitations (length and character set) of plain iso9660. This will be a part of using UTF-8 for filenames and console. [ hpa: manually rebased to the elflink branch ]
* | check-gnu-efi: remove bashismH. Peter Anvin2014-02-061-1/+1
| | | | | | | | | | | | &>foo is a bashism, use >foo 2>&1 instead. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge branch 'syslinux-5.xx'Gene Cumm2014-02-013-2/+76
|\ \
| * \ Merge branch 'syslinux-4.xx' into syslinux-5.xxGene Cumm2014-02-013-2/+76
| |\ \
| | * | isohybrid: Improve help/manGene Cumm2014-02-012-7/+10
| | | | | | | | | | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| | * | Add manpages for isohybrid, memdiskfindPeter Jones2014-02-012-0/+71
| | | | | | | | | | | | | | | | Signed-off-by: Peter Jones <pjones@redhat.com>
* | | | Merge remote-tracking branch 'erwan-github/hdt-memleak' into masterGene Cumm2014-01-312-1/+2
|\ \ \ \ | | | | | | | | | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * | | | acpi: Removing memset of bufferErwan Velu2014-01-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to memset the buffer since the strncat will end the string with a \0. The memset was also almost wrong as doing a sizeof() on a char * could return 1 if buff was malloc'ed. We had chance as all the current calls are done with static buffers. Removing this memset call will make things clearer but also will prevent compilation warnings like : com32/gpllib/acpi/acpi.c:38:29: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to provide an explicit length? [-Wsizeof-pointer-memaccess] memset(buffer, 0, sizeof(buffer));
| * | | | hdt: Fixing memory leak in cliFelipe Pena2014-01-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dynamically alloc'd string to protect from strtok modification has not been free'd on start_auto_mode() function. This patch insure the free is done properly.
* | | | | mk/efi.mk: Cancel old rulesGene Cumm2014-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a dependency is added to the newer rules, make will choose the easier rules instead of the preferred rules. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | | | Merge remote-tracking branch 'zytor/firmware' into masterGene Cumm2014-01-298-0/+32
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * | | | | efi: Add Intel copyright noticesfirmwareMatt Fleming2014-01-248-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* | | | | | efi/udp: zero token in recvGene Cumm2014-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | | | | efi: Loop on Configure when EFI_NO_MAPPING in udp.c/tcp.cGene Cumm2014-01-293-8/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should help hardware that doesn't return EFI_SUCCESS immediately. Reported-by: Jason Matthews <jason.david.matthews@gmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | | | | efu/udp: Unset modeGene Cumm2014-01-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udata.AcceptAnyPort caused the udata.StationPort to return as 0. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | | | | efi: UseDefaultAddress in udp.c/tcp.cGene Cumm2014-01-292-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need to re-inform EFI what IPv4 address and subnet mask to use. This change should help to re-use the exising routes. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | | | | efi/udp.c: Use existing UDP port in core_udp_sendto()Celelibi2014-01-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | core_udp_open() obtained a port allocation. Continue using it. Author: Celelibi <celelibi@gmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | | | | efi/udp.c: Save UDP Port in core_udp_open()H. Peter Anvin2014-01-291-15/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | core_udp_open() should obtain a UDP port allocation and save it for core_udp_connect() and core_udp_sendto() to reuse. Author: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | | | | Add const qualifiersGene Cumm2014-01-252-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | Merge branch 'syslinux-5.xx' into master; fixes loadkeysGene Cumm2014-01-253-5/+4
|\ \ \ \ \ \ | |_|/ / / / |/| | / / / | | |/ / / | |/| | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * | | | com32/moduless/poweroff.c: use __unused attribute insteadGene Cumm2014-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Recommended-By: Matt Fleming <matt@console-pimps.org> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * | | | com32/modules/poweroff.c: fix main()Gene Cumm2014-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Wrong prototype; use GCC unused Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * | | | ldlinux/readconfig.c: remove bail: from do_include()Gene Cumm2014-01-251-1/+0
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * | | | Add const qualifiers to loadleysGene Cumm2014-01-252-3/+3
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | | | | mem: Calling int15 for 0x8800Erwan Velu2014-01-232-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2225-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | Merge remote-tracking branch 'origin/syslinux-5.xx'H. Peter Anvin2014-01-211-0/+1
|\ \ \ \ \ | |/ / / /
| * | | | localboot: Clear register image before usingH. Peter Anvin2014-01-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using a register image on the stack without initializing it is not a good idea. Reported-by: Erwan Velu <erwanaliasr1@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | | | | Merge remote-tracking branch 'origin/syslinux-5.xx'H. Peter Anvin2014-01-189-9/+9
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | Merge remote-tracking branch 'origin/syslinux-4.xx' into syslinux-5.xxH. Peter Anvin2014-01-189-9/+9
| |\ \ \ \ | | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: version Signed-off-by: H. Peter Anvin <hpa@zytor.com>