aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2014-03-13biosboot: This file is not for EFInocomapiH. Peter Anvin1-0/+4
This file causes dynamic link failures on EFI, and of course has no use in the EFI environment. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-03-03Merge branch 'nocomapi'syslinux-6.03-pre7H. Peter Anvin19-541/+117
2014-03-02lua: replace the syslinux module test with an automatic boot menu generatorsyslinux-6.03-pre6Ferenc Wágner1-0/+152
2014-03-02lua: base the package load paths on the Syslinux pathFerenc Wágner2-2/+35
2014-03-02lua: upgrade to 5.2.3Ferenc Wágner63-107/+160
2014-03-02lua: add demo of the cmenu binding (the simple example)Ferenc Wágner1-0/+34
2014-03-02lua: start of a binding module for libmenu.c32Ferenc Wágner2-0/+94
2014-03-01lua: make the dmi module standaloneFerenc Wágner2-4/+14
By copying two short functions from the cpu module. They do not warrant a separate module. Also make those functions static in both modules.
2014-03-01lua: also reactivate the cpu, dhcp, dmi, pci and vesa extension modulesFerenc Wágner7-8/+19
And document the change in usage.
2014-03-01lua: bind get_key() in the syslinux moduleFerenc Wágner1-0/+49
2014-03-01lua: reactivate the syslinux extension moduleFerenc Wágner2-2/+3
Under Lua 5.2 modules are not expected to set global variables to reduce namespace pollution. Explicit require() is preferred.
2014-03-01lua: add the LuaFileSystem libraryFerenc Wágner2-0/+297
2014-03-01lua: enable dynamic module loadingFerenc Wágner2-0/+48
2014-03-01sys/module.h: fix some typos in function documentationsFerenc Wágner1-2/+3
2014-03-01sys/module.h: remove the #ifdef DYNAMIC_MODULE conditionFerenc Wágner1-20/+0
This makes the module_* functions accessible to COM32 modules. MODULE_INIT and MODULE_EXIT are not used anymore.
2014-03-01lua: the COM32 API does not support freopen()Ferenc Wágner1-0/+2
Nor the concept of text vs. binary open mode, so it does not matter.
2014-03-01lua: the COM32 API does not support time()Ferenc Wágner1-0/+5
2014-03-01lua: the COM32 API actually supports exit() of oslibFerenc Wágner2-1/+11
2014-03-01stdlib.h: provide a stub definition for getenv()Ferenc Wágner1-1/+6
Which always returns NULL, representing an empty environment.
2014-03-01lua: the COM32 API supports only part of iolibFerenc Wágner2-0/+25
2014-03-01lua: the COM32 API does not provide strcoll()Ferenc Wágner1-0/+3
2014-03-01lua: use integer arithmeticFerenc Wágner6-11/+94
2014-03-01lua: the COM32 API does not provide locale.hFerenc Wágner1-0/+4
2014-03-01lua: explicitly put the console in standard modeFerenc Wágner1-0/+4
2014-03-01lua: the COM32 API does not provide signal.hFerenc Wágner1-0/+6
2014-03-01dev.h: get size_t definitionFerenc Wágner1-0/+1
2014-03-01lua: replace src/Makefile to build Lua as a Syslinux COM32 moduleFerenc Wágner1-172/+49
Start with the src/Makefile in Syslinux before importing Lua 5.2.2. Refresh the core Lua object list based on the original Makefile. Add the new builtin library objects. Temporarily remove the Syslinux extension library objects, as they need adjustments for the new API.
2014-03-01lua: import Lua 5.2.2Ferenc Wágner115-10901/+14357
Source downloaded from http://www.lua.org/ftp/lua-5.2.2.tar.gz. The com32/lua directory now matches exactly the source distribution, plus the various Syslinux extension modules and their documentation.
2014-02-28core, bios: Move __syslinux_shuffler_size to assemblysyslinux-6.03-pre5H. Peter Anvin2-8/+7
Putting the __syslinux_shuffler_size in a C file by itself caused it to not get included in the core, causing failures. Put it in assembly to make sure it really gets included there. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-27shuffler: Actually get the shuffler size sanelysyslinux-6.03-pre4H. Peter Anvin5-15/+23
Actually get the shuffler size sanely. At least for now, we are BIOS only, so stub out the functions on EFI (they shouldn't even be compiled for EFI; this stuff should be moved into some kind of BIOS-only directory.) Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-27Makefiles: export the firmware type as a cpp variableH. Peter Anvin7-9/+13
Export the firmware type as a cpp variable so we can #ifdef. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-26core, bios: Incorrect detection of EDD in /core/fs/diskio_bios.csyslinux-6.03-pre3Andy Alex1-0/+2
DL register is not set to drive number when detecting EDD for drive, so detection may fail. Signed-off-by: Andy Alex <andy at r-tt.com>
2014-02-26Merge branch 'syslinux-5.xx'H. Peter Anvin1-3/+3
Resolved Conflicts: core/init.c Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-26bios: Don't truncate memory size needed to 16 bitssyslinux-5.xxH. Peter Anvin1-1/+1
We can't truncate the memory size needed to 16 bits *before* we convert it to kilobytes... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-26bios: Fix lowmem checkH. Peter Anvin1-2/+2
The lowmem check was backwards and would report error when there wasn't any. This was missed because the Ctrl key check was *also* backwards and so the check would only be done when Ctrl was held down. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-23Makefile.private: archive the gnu-efi submodule, too.syslinux-6.03-pre2H. Peter Anvin1-0/+4
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-22mk/efi.mk: Add libefi.a dependencyGene Cumm1-2/+2
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-02-22efi: fix up gnu-efi buildGene Cumm5-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>
2014-02-22gnu-efi: update to ab54e2b4Gene Cumm1-0/+0
This allows gnu-efi to be built outside the source tree properly. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-02-21Makefile: make "make spotless" actually workH. Peter Anvin1-11/+17
The other cleaning targets might still have issues... Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-21efi: We need -m32/-m64 even when processing assemblyH. Peter Anvin1-6/+4
We need to specify -m32/-m64 even when we are processing assembly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-21mk/efi.mk: Disable stack protectorMagnus Granberg1-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>
2014-02-14efi: Useless relocation section in PE fileSylvain Gault1-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>
2014-02-14efi: PE file size differ from in-memory sizeSylvain Gault3-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>
2014-02-14efi: Remove buggy relocation in PE fileSylvain Gault1-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>
2014-02-14efi: Location, size and alignment of .text sectionSylvain Gault1-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>
2014-02-14efi: Fix PE header field rva_and_sizes_nrSylvain Gault2-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>
2014-02-13lib.mk: Add biosboot.oH. Peter Anvin1-1/+1
We need biosboot.o for shuffle and boot now. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-13comapi: Remove the comapi interfaces completelyH. Peter Anvin10-459/+17
Remove the last bits of the comapi interfaces completely. This does not install stub handlers for the INT 20-3Fh handlers, as we don't support loading old COMBOOT/COM32/COM32R images anymore. We could put those back if we really need them. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-13bios: Remove shuffle and boot comapi callH. Peter Anvin11-53/+89
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>
2014-02-13bios: Remove comapi calls related to the ADVH. Peter Anvin4-38/+20
The only comapi calls left are the ones related to the ADV and to shuffle and boot. Remove the ADV-related ones as part of getting rid of the comapi framework completely. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-02-13pxe: Export the initial stack and PXE(NV) structure, fix pxechnH. Peter Anvin5-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>
2014-02-13efi: Suspicious size reduction in emallocSylvain Gault1-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>
2014-02-12Merge remote-tracking branch 'origin/rockridge'H. Peter Anvin6-20/+793
Resolved Conflicts: com32/include/byteswap.h Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-02-06check-gnu-efi: remove bashismH. Peter Anvin1-1/+1
&>foo is a bashism, use >foo 2>&1 instead. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-02-01Merge branch 'syslinux-5.xx'Gene Cumm3-2/+76
2014-02-01Merge branch 'syslinux-4.xx' into syslinux-5.xxGene Cumm3-2/+76
2014-02-01isohybrid: Improve help/manGene Cumm2-7/+10
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-02-01Add manpages for isohybrid, memdiskfindPeter Jones2-0/+71
Signed-off-by: Peter Jones <pjones@redhat.com>
2014-01-31Merge remote-tracking branch 'erwan-github/hdt-memleak' into masterGene Cumm2-1/+2
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-31mk/efi.mk: Cancel old rulesGene Cumm1-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>
2014-01-29Merge remote-tracking branch 'zytor/firmware' into masterGene Cumm8-0/+32
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-29acpi: Removing memset of bufferErwan Velu1-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));
2014-01-29hdt: Fixing memory leak in cliFelipe Pena1-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.
2014-01-29efi/udp: zero token in recvGene Cumm1-0/+1
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-29efi: Loop on Configure when EFI_NO_MAPPING in udp.c/tcp.cGene Cumm3-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>
2014-01-29efu/udp: Unset modeGene Cumm1-2/+0
udata.AcceptAnyPort caused the udata.StationPort to return as 0. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-29efi: UseDefaultAddress in udp.c/tcp.cGene Cumm2-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>
2014-01-29efi/udp.c: Use existing UDP port in core_udp_sendto()Celelibi1-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>
2014-01-29efi/udp.c: Save UDP Port in core_udp_open()H. Peter Anvin1-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>
2014-01-25Add const qualifiersGene Cumm2-2/+2
Some functions are ignoring the const qualifier. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-25com32: fix __bswap_64_macroGene Cumm1-1/+1
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-25Merge branch 'syslinux-5.xx' into master; fixes loadkeysGene Cumm3-5/+4
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-25com32/moduless/poweroff.c: use __unused attribute insteadGene Cumm1-1/+1
Recommended-By: Matt Fleming <matt@console-pimps.org> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-25com32/modules/poweroff.c: fix main()Gene Cumm1-1/+1
Wrong prototype; use GCC unused Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-25ldlinux/readconfig.c: remove bail: from do_include()Gene Cumm1-1/+0
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-25Add const qualifiers to loadleysGene Cumm2-3/+3
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-24efi: Add Intel copyright noticesfirmwareMatt Fleming8-0/+32
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2014-01-23mem: Calling int15 for 0x8800Erwan Velu2-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 ;)
2014-01-22com32sys_t inreg shall be zeroified prior intcallErwan Velu25-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
2014-01-21Merge remote-tracking branch 'origin/syslinux-5.xx'H. Peter Anvin1-0/+1
2014-01-21localboot: Clear register image before usingH. Peter Anvin1-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>
2014-01-18Merge remote-tracking branch 'origin/syslinux-5.xx'H. Peter Anvin9-9/+9
Resolved Conflicts: version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-18Merge remote-tracking branch 'origin/syslinux-4.xx' into syslinux-5.xxH. Peter Anvin9-9/+9
Resolved Conflicts: version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-18Makefiles: don't include *.tmpH. Peter Anvin9-9/+9
Since checkin: bd09a6d828fa Major Makefile cleanups; gcc 4.3.0 compatiblity ... we include *.tmp into the Makefiles as well as .*.d. This seems to have been a mistake in made when adding *.tmp to cleanup rules, probably using a sed script. This causes problems, because *.tmp files are generated by the gcc_ok macro and do not contain Makefile rules at all. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-18syslxint: fix compilation on non-x86 architecturesH. Peter Anvin1-12/+10
The access functions for architectures which need bytewise access had type problems. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-01-18com32: Add missing dependencies to MakefileGene Cumm1-3/+3
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-18diag/geodsp: fix .img target in MakefileGene Cumm1-1/+1
Accomodates the per-firmware object directory support Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-18diag/geodsp: fix MakefileGene Cumm1-3/+3
Correct merge f88b4f47 Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-17dos: Remove redundant data_segment() definitionH. Peter Anvin1-13/+4
The definition for data_segment() was exactly the same as ds(). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-17dos: Add sparse address space annotationsH. Peter Anvin1-13/+16
Add sparse address space annotation to the actual DOS installer code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-17installer: fix 0 used as NULLH. Peter Anvin1-1/+1
0 used as NULL triggers a warning. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-17installer: Add sparse address space annotations to the syslinux imageH. Peter Anvin7-57/+116
Add sparse address space annotations for the syslinux boot image, to make it easier to catch errors that break the DOS installer build again. Use "make CC=cgcc" to run sparse. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-17version: Update year to 2014H. Peter Anvin1-1/+1
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-01-17version: Update year to 2014H. Peter Anvin1-1/+1
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-01-17version: Update to 4.08, update year to 2014H. Peter Anvin1-1/+1
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-01-17Merge branch 'elflink' into firmwareH. Peter Anvin3-8/+34
Resolved Conflict: diag/geodsp/Makefile Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-01-17Merge branch 'master' into elflinkelflinkH. Peter Anvin4-11/+37
Resolved Conflicts: NEWS core/fs/fs.c version Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2014-01-16.gitignore: Ignore the bios, efi32, efi64 object directoriesH. Peter Anvin1-0/+3
They are object output only. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-16dos: We cannot use memset() for a far object, introduce memset_sl()H. Peter Anvin3-1/+20
We started using memset() on the extents buffer in ldlinux.sys, which doesn't reside in the main segment, which worked on all the installer platforms except DOS. Fix DOS by introducing memset_sl() for this case. Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2014-01-08diag/geodsp: README fixesGene Cumm1-7/+25
Should clarify the situation; also word-wrap & save example Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-08diag/geodsp: fix MakefileGene Cumm1-3/+3
Results in null image Reported-By: ioannis Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-08core/legacynet: Enable dot quad resolutionGene Cumm1-0/+35
in dnsresolv.c:dns_resolv() Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2014-01-08efi: Make the gnu-efi build scripts more portableMatt Fleming3-17/+16
Not all distributions point /bin/sh at /bin/bash, so remove some bashisms (pushd/popd) and require that build-gnu-efi.sh be run from the Syslinux object directory. Also, swap realpath(1) for readlink(1) because the former isn't available on Debian. Reported-by: Ferenc Wagner <wferi@niif.hu> Reported-by: Celelibi <celelibi@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2014-01-02isolinux: Shorten a few of the debug messagesH. Peter Anvin1-2/+2
Apparently with some toolchains, isolinux-debug runs out of space by a few bytes. Shorted a few messages slightly to make up for that. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-12-30Remove some whitespaceRuben Kerkhof1-1/+1
Signed-off-by: Ruben Kerkhof <ruben at rubenkerkhof.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-12-11isolinux: Clear upper half of EDX before usingH. Peter Anvin1-1/+1
In checkin: cb015497a4e4 isolinux: Update LBA in getlinsec loop ... we use EDX as a sector count, but the sector count is actually in DX, and the upper half of EDX is uninitialized. If the BIOS enters with a nonzero value in the upper half of EDX, this breaks horribly. At least one set of BIOSes has been identified where if the LBA > 64K then the upper half of EDX will be nonzero. Reported-by: Carl Duff <cdrw2400@gmail.com> Reported-by: Philip Müller <philm@manjaro.org> Tested-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-12-11Merge remote-tracking branch 'origin/elflink' into firmwareH. Peter Anvin1-35/+11
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-12-11pxe, efi: Bad read of file size over TFTP on EFI64Celelibi1-35/+11
A fancy pointers logic has been replaced with a plain old if / else branches. It was assigning only half of a 64 bits integer which is then assigned to a size_t. Thus leading to a bug on platform where size_t is 64 bits. Resolves bug #26 Signed-off-by: Celelibi <celelibi@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-12-11version: Bump versionsyslinux-6.03-pre1Matt Fleming1-1/+1
We've now entered the 6.03 development cycle. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-12-11Merge branch 'efi-date-for-mfleming' of git://github.com/geneC/syslinux into ↵Matt Fleming2-2/+14
firmware Pull date fix for EFI from Gene Cumm, * 'efi-date-for-mfleming' of git://github.com/geneC/syslinux: efi/: Fix displayed version; add DATE
2013-12-11ansi: switch cindex type to attr_tJames Buren1-1/+2
To fully support color tables with more than 256 entries Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-12-11ldlinux: Fix recent pxe symbol regressionMatt Fleming1-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>
2013-12-11efi: Don't rebuild gnu-efi every timeMatt Fleming1-1/+1
There is a typo in the path used to decide whether to build gnu-efi. Since the condition "does a nonexistent file exist?" will never evaluate true, we're currently building gnu-efi unnecessarily. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-12-11efi: Check the gnu-efi build succeededMatt Fleming1-1/+5
Guard against future changes by requiring that the gnu-efi build scripts exit with success. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-12-11efi: Make gnu-efi build scripts more robustMatt Fleming3-5/+52
Modify the scripts to check that they're called with the correct number of arguments and error out otherwise after printing some helpful info. This change also stops relying on passing arguments through environment variables and instead passes them explicitly to the scripts, which is definitely more robust, and handles the case where the scripts are invoked directly. Of course, now that the scripts can be invoked directly we need to regard any input as hostile and exit immediately on error. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-12-10efi: Add build scripts for gnu-efiMatt Fleming4-58/+35
Now that we have a gnu-efi git submodule we need some scripts to build and install it into architecture-specific build directories. This actually simplifies things a bit because we no longer need to account for the variations in distribution installation paths - we now control the paths. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-12-10gnu-efi: Add gnu-efi as a submoduleMatt Fleming2-0/+3
Tracking the gnu-efi dependency has tripped up some users. We can make things easier when building Syslinux by including a copy of the gnu-efi source and building it for efi32 and efi64. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-12-06pxe: Make the SENDCOOKIES feature for HTTP worked againRussel Santillanes2-2/+2
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>
2013-12-04load_linux: Don't use size heuristic for non-relocatable kernelsH. Peter Anvin1-33/+40
For non-relocatable kernels, it really makes no sense to estimate how much space the kernel is going to need, as if we fail, there is really nothing we can do about it. Furthermore, it is actively wrong for zImage kernels (which aren't decompressed in place) and for non-Linux kernels. Additionally, tweak the code for assigning an address to the command line to handle a few more corner cases correctly, be simpler, and not need to build the memory map again since we already are doing that elsewhere. Reported-and-tested-by: Christian Hesse <list@eworm.de> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-26Merge remote-tracking branch 'origin/elflink' into firmwareH. Peter Anvin1-1/+1
Resolved Conflicts: com32/lib/syslinux/disk.c Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-11-26isolinux: Clear upper half of EDX before usingH. Peter Anvin1-1/+1
In checkin: cb015497a4e4 isolinux: Update LBA in getlinsec loop ... we use EDX as a sector count, but the sector count is actually in DX, and the upper half of EDX is uninitialized. If the BIOS enters with a nonzero value in the upper half of EDX, this breaks horribly. At least one set of BIOSes has been identified where if the LBA > 64K then the upper half of EDX will be nonzero. Reported-by: Carl Duff <cdrw2400@gmail.com> Reported-by: Philip Müller <philm@manjaro.org> Tested-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-10-31efi/: Fix displayed version; add DATEGene Cumm2-2/+14
Version string appeared to be a temporary generic string; complete out in the standard fashion Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-10-17core: don't leak the __lowmem and __bss16 macros to modulesH. Peter Anvin2-3/+5
The __lowmem and __bss16 macros are only useful in the core itself. Hide them from modules so people don't use them by mistake. extern declarations don't need them (and are safe in modules), they are only necessary at the point of definition (which must be in the core.) Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-10-17chain: Fix chainloading on 6.02Raphael S. Carvalho1-8/+14
My commit 09f4ac33 broke 'com32/lib/syslinux/disk.c' __lowmem doesn't work for declarations outside the core. Using __lowmem outside the core wouldn't have the desired effect, then lmalloc must be used instead to store dapa into the correct section (".lowmem"). Reported-by: Dark Raven <drdarkraven@gmail.com> Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-10-13NEWS: Add recent development newssyslinux-6.02Matt Fleming1-0/+4
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-09-30com32: Fix a bug on history of commands.Raphael S.Carvalho1-5/+8
Previously, even zero-length commands would be added to the history when they shoudn't, e.g: just typing enter. For example, if you type: FOO -> (ENTER) -> (ENTER), then to get FOO from the history you would have to press the UP key twice. It also saves a bit of memory. Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-09-30com32: Fix bugs on cmd_reverse_search (Triple fault dimension)Raphael S.Carvalho1-2/+9
cmd_reverse_search has a bug that the variable cursor is updated even if a command wasn't found. If this happens, and the next key falls into the default case, memmove's size parameter would be a negative number. This bug can be reproduced by doing the following: On cmd_reverse_search (ctrl-r), type multiple keys at the same time. 'Enjoy' the triple fault and a screen of random colors. There is also a small bug that turns the task of using (ctrl-r) on the first command impossible. Previously, this command was discarded. Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-09-30com32/disk: Code cleanup at disk_write_sectors and disk_read_sectors.Raphael S.Carvalho2-83/+97
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>
2013-09-30com32: Fix a bug on history of commands.Raphael S.Carvalho1-5/+8
Previously, even zero-length commands would be added to the history when they shoudn't, e.g: just typing enter. For example, if you type: FOO -> (ENTER) -> (ENTER), then to get FOO from the history you would have to press the UP key twice. It also saves a bit of memory. Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-09-30com32: Fix bugs on cmd_reverse_search (Triple fault dimension)Raphael S.Carvalho1-2/+9
cmd_reverse_search has a bug that the variable cursor is updated even if a command wasn't found. If this happens, and the next key falls into the default case, memmove's size parameter would be a negative number. This bug can be reproduced by doing the following: On cmd_reverse_search (ctrl-r), type multiple keys at the same time. 'Enjoy' the triple fault and a screen of random colors. There is also a small bug that turns the task of using (ctrl-r) on the first command impossible. Previously, this command was discarded. Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-09-30com32/disk: Code cleanup at disk_write_sectors and disk_read_sectors.Raphael S.Carvalho2-83/+97
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>
2013-09-30Merge branch 'elflink-pxe-fixes-for-mfleming-2' of ↵Matt Fleming18-69/+292
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
2013-09-30PXE ISR: Force polling on select hardware WORKAROUNDGene Cumm1-1/+21
By OUI == 00:23:ae and flags == 0xdc1b, detect select hardware. On select platforms (Dell OptiPlex 760, Dell OptiPlex 960; perhaps more), the interrupt appears to go "deaf" after a few seconds. By matching MAC OUI and flags value, force polling on these select platforms. I'm not sure if there's any better data available that shallow in the core. I believe PCI IDs can be fetched with functions from other libraries and the UUID and DMI data (the most likely to be useful is SYSPRODUCT) is available in ldlinux.c32. Commit message expanded with Matt Fleming's assistance Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-09-23PXE ISR: Force polling on select hardware WORKAROUNDGene Cumm1-0/+20
By OUI == 00:23:ae and flags == 0xdc1b, detect select hardware. On select platforms (Dell OptiPlex 760, Dell OptiPlex 960; perhaps more), the interrupt appears to go "deaf" after a few seconds. By matching MAC OUI and flags value, force polling on these select platforms. I'm not sure if there's any better data available that shallow in the core. I believe PCI IDs can be fetched with functions from other libraries and the UUID and DMI data (the most likely to be useful is SYSPRODUCT) is available in ldlinux.c32. Commit message expanded with Matt Fleming's assistance Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-09-23core/lwip: Fix NULL pointer checkGene Cumm1-1/+1
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-09-23PXE: use ddprintf macroGene Cumm3-26/+26
Messages are needed before ldlinux.c32 is loaded Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-09-23com32: Define ddprintf() macroGene Cumm1-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>
2013-09-23PXELINUX: specify PXE/lwIPGene Cumm2-2/+8
Styled after SYSLINUX Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-09-23undiif: show thread of execution on UNDIIF_ID_DEBUGGene Cumm1-3/+7
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-09-23core: dprintf() the banner.Gene Cumm1-0/+2
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-09-23PXELINUX: Use sendto() instead of connect()/send()/disconnect()Gene Cumm4-8/+94
This commit prevents a race-condition on systems that have functional interrupts (observed with iPXE and select other Dell systems). Without this, the reply packet could be received by the core prior to the disconnect() call, see that it doesn't have a matching PCB (protocol control block, iirc) since the reply has a different far-end UDP port than the original request, and lwIP will discard the packet before PXELINUX can see it. net_core_sendto() instead of net_core_connect() net_core_send() net_core_disconnect() Commit message expanded with Matt Fleming's assistance Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-08-31pxe, ftp: Don't convert an IP address to host byte orderH. Peter Anvin1-1/+1
FTP passes an IP address and port number as decimal string encoded comma-separated octets. The first four are the IP number and the second two the port. We consider port numbers as ordinary integers and they should be in host byte order when passed into core_tcp_connect(), but IP addresses are simply kept in network byte order at all times and thus should not be converted. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2013-08-03core: make mbox_post()/__sem_down_slow() check if validGene Cumm2-2/+2
If the mailbox/semaphore is invalid, disallow additions. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-08-03core: mbox/semaphore NULL checksGene Cumm5-24/+41
Also set mbox invalid and mbox pointer NULL when free()d Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-08-03core/lwip/undi: Improve UNDIIF_ID_DEBUG messagesGene Cumm1-8/+9
Remove extra space; add TCP flags Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-08-02efi: implement LOCALBOOTsyslinux-6.02-pre16Matt Fleming1-1/+10
Booting the next device is in fact fairly trivial under EFI. We simply need to return control to the firmware with an error code that indicates we couldn't execute our OS loader properly. Unlike under BIOS, we don't take any notice of any integer arguments passed to LOCALBOOT for EFI, since there is no variation for "boot next entry". Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-29cmenu: Add libmenu.c32 to $(C_LIBS)syslinux-6.02-pre15Matt Fleming2-1/+3
The menu modules, display, text, etc, require libmenu.c32 to be listed as a dependency. Append to $(C_LIBS) in mk/elf.mk so that module Makefiles can make use of the suffix rules. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-29cmenu: the order of entries in $(LIBMENU) is vitalMatt Fleming4-6/+18
Unresolved symbols in an object file cannot be resolved from shared libraries that are listed earlier in $(LIBMENU). We need to put the shared libraries at the end of $(LIBMENU). commit 1408e6ca ("Add per-firmware object directory support") appears to have broken this rule, which resulted in hdt.c32 (among other modules) failing to load with, "Undef symbol FAIL: symbol console_ansi_raw" Add a simple regression test that loads hdt.c32. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-26module: convert to dprintf() to aid debuggingsyslinux-6.02-pre14Matt Fleming3-16/+23
dprintf() is much more useful than DBG_PRINT() when trying to figure out where a module is failing to load because we can enable the debug statements at runtime. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-26Merge branch 'elflink-undi-debug-for-mfleming' of ↵syslinux-6.02-pre13Matt Fleming5-44/+300
git://github.com/geneC/syslinux into firmware Pull UNDIIF packet header debug patch series from Gene Cumm, * 'elflink-undi-debug-for-mfleming' of git://github.com/geneC/syslinux: Allow for UNDIIF_ID_DEBUG in 1 mk line core/lwip/undiif: dprint MAC/ARP/IP/ICMP/TCP/UDP headers; poll debug lwip/undiif: split arphdr._hwlen_protolen lwip: Allow LWIP_PLATFORM_* output to use dprintf lwip: undiif: Fix debug options to unique *_DEBUG macros Conflicts: core/kaboom.c
2013-07-26tests: unit test bios_boot_linux()Matt Fleming7-1/+206
The constraints for allocating the kernel cmdline buffer under bios are pretty involved and filled with historic rules. Unit test the bios linux loader to ensure we never violate any of them, while at the same time making sure we actually find a usable chunk of memory. This commit is designed to test the changes in commit 77cadda8 ("load_linux: dynamically calculate the cmdline region"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-26video.h: we need one syslinux_force_text_mode() prototypeMatt Fleming10-3/+9
Use the one from syslinux/video.h. This makes it easier to write unit tests for syslinux/load_linux.c without pulling in loads of core definitions from core/include/graphics.h. It can also be argued that syslinux_* symbols should have prototypes in syslinux/*.h files. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-26tests: syslinux_memmap_highest() unit testsMatt Fleming1-0/+66
Exercise the new syslinux_memmap_highest() function. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-25load_linux: dynamically calculate the cmdline regionsyslinux-6.02-pre12Matt Fleming3-4/+74
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>
2013-07-25tests: verify kernel cmdline parameterMatt Fleming3-2/+14
Add a new test that verifies the kernel cmdline arguments we setup in our config file are passed to the kernel correctly. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-25load_linux: extract the logic for cmdline_offsetMatt Fleming1-4/+10
There's bits of historical baggage surrounding these values. Pull the calculation out into a separate function for clarity. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-25pxe: use bios_fbm() and real_base_mem to calculate free spaceMatt Fleming1-47/+7
We don't need to individually add the PXE regions, we already have two symbols that denote the memory region that will be freed when calling unload_pxe(). This essentially reverts commit 03dda0f1 ("pxe: mark all PXE regions as SMT_TERMINAL"). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-25NEWS: document changes in 4.07syslinux-4.07Matt Fleming1-0/+8
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-24pxe: mark all PXE regions as SMT_TERMINALsyslinux-6.02-pre11Matt Fleming1-17/+49
There are more than just the UNDI code and data regions. Mark all of the regions as SMT_TERMINAL if the start address and size are non-zero. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-24tests: delete test executables after each runMatt Fleming1-3/+1
The unit tests are designed to be small and should build very quickly, so there should be no downside to rebuilding them for every run. The upside is that we don't litter our build trees with target executables and we don't need to explicitly list dependencies in Makefiles to ensure our tests get rebuilt whenever a dependency changes. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-24tests: unit tests for core/memMatt Fleming6-1/+142
We can exercise the memory subsystem through unit tests with a little bit of coaxing. We need to create a number of fake data objects in order to get it to build. This is less than ideal, but once we've got good test coverage and confidence in our tests we can begin refactoring. Had this unit test already been in place, commit 33c4ab1b ("mem: fix regression in recent memscan changes") would have never been required because buggy commit a1331f8d ("memscan: pass enum syslinux_memmap_types around") would have broke the unit test. Ordinarily, this unit test would have been part of the bugfix commit 33c4ab1b, but the bugfix needs to be backported to 5.xx on its own. test_mem_init_reserved() tests whether SMT_RESERVED regions are incorrectly added to the memory subsystems's freelist. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-24tests: make mmap_entry globally available to unit testsMatt Fleming7-25/+26
There's a bunch of places that need to deal with mmap_entry entries when doing tests, so make the structure readily available. Since we're going to get a collection of header files that could be considered the "unit test infrastructure" we might as well create a new directory for them. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-24mem: explicitly include dprintf.hMatt Fleming1-0/+1
It is good practice to explicitly include required header files as it clearly highlights dependencies. This practice also makes it easier to write unit tests since we explicitly include dummy header files from unittest/include. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-23mem: fix regression in recent memscan changessyslinux-6.02-pre10Matt Fleming1-1/+1
A thinko in commit a1331f8d ("memscan: pass enum syslinux_memmap_types around") causes many machines not to boot because the expression "!SMT_FREE" always evaluates to "false", regardless of the value of 'type', which means that mem_init() may use reserved memory regions for general allocation. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-23tests: delete tests before making releaseMatt Fleming1-0/+5
Binary files exist in tests/ which can dramatically increase the size of the release tarballs. Delete both regression and unit tests when building any kind of a release. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-23tests: Syslinux unit testsMatt Fleming18-2/+549
Improve our faith in the validity of the Syslinux code by writing unit tests where possible. These should be used in addition to the regression tests - unit tests are a means of doing very fine-grained testing of code, whereas the regression tests are end-to-end tests that exercise abstract functionality. Unit tests run on your development machine and above all else, their execution time should be kept to a minimum to encourage repeated runs of the unit testsuite. The Syslinux header hierarchy has been reconstructed under tests/unittest/include. This allows us to reuse header files where appropriate by simply creating a file with the same name and including the original, e.g. tests/unittest/include/com32.h: #include <../../../com32/include/com32.h> Places where we need to override definitions (so that the tests build in a dev environment) obviously won't include the original header file, but such scenarios should be kept to a minimum, since you're not really testing any Syslinux code that way. To execute the collection of unit tests type, make unittest Sample output might look like, Executing unit tests Running library unit tests... [+] zonelist passed [+] movebits passed [+] memscan passed Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-23tests: Regression testsuiteMatt Fleming19-2/+409
A number of Syslinux releases have contained regressions when compared with previous versions. Now that the size of the derivative grid has exploded (PXELINUX, SYSLINUX,.... bios, efi32, efi64) we need to have some means of ensuring we don't introduce regressions so easily. Start building a suite of regression tests. Regression tests should test end-to-end functionality, e.g. loading a Linux kernel. If a test fails, that failure represents a regression in some behaviour, e.g. Syslinux behaves differently than it previously did. The idea is that when bugs are reported in Syslinux, we can create new tests that reproduce the buggy behaviour. Once a fix has been committed the new test should pass. From that point forward, the test provides a means of ensuring we never reintroduce that bug. The collection of tests illustrates the agreed upon behaviour of Syslinux. To execute the regression testsuite type, make regression Sample output might look like, Executing regression tests for SYSLINUX Running Linux kernel regression tests... [+] empty passed [+] kernelhello passed Running COM32 module regression tests... [+] chaindisk passed Executing regression tests for PXELINUX Running Linux kernel regression tests... [!] empty failed [+] kernelhello passed [+] pxetest passed Qemu is used to execute the regression tests in a virtual environment. Because it takes time to load Qemu, we can forgive the regression testsuite for not executing instantaneously. However, developers should keep in mind the idea of "failing fast" in their regression tests to minimize execution time - that is, if a test is going to fail, make it fail as quickly as possible to reduce the testrun time. It's possible to have derivative-specific tests, where the test only runs for a specific Syslinux boot loader. For an example see pxetest in tests/linux/Makefile. Currently the regression testsuite requires root privileges to execute and makes several calls to sudo(8). In future it would be nice to get rid of this requirement. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-22derivative_info: be sure not to dereference pointerssyslinux-6.02-pre9Matt Fleming3-15/+15
All the BIOS get_derivative_info() implementations are incorrect. They all dereference pointers to various deriviative-specific data objects instead of using the address of the objects. This broke chain loading on SYSLINUX because the ->partoffset field contained the dereferenced value of 'Hidden' rather than the address. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-20Allow for UNDIIF_ID_DEBUG in 1 mk linesyslinux-5.11-pre9Gene Cumm2-1/+5
Add comments and 1 line to mk/devel.mk to debug headers of all packets sent/recieved through undiif.c. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-07-20core/lwip/undiif: dprint MAC/ARP/IP/ICMP/TCP/UDP headers; poll debugGene Cumm2-1/+220
Encapsulate in #ifdef; use snprintf and 1 dprintf-like statement. Print debug message that polling has been forced Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-07-19Revert "Makefile.private: only delete mk/devel.mk for production releases"syslinux-6.02-pre8Matt Fleming1-4/+3
This reverts commit 8dc346bfdc871329624378d4b48db94b40d0b2a4. Users are reporting a regression caused by this commit, as unlikely as it seems. Revert in the hope that things will begin working for them again. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-19Merge branch 'pxe-dns-dotquad-for-mfleming' of ↵syslinux-6.02-pre7Matt Fleming1-0/+35
git://github.com/geneC/syslinux into firmware Pull PXE legacynet DNS dotquad fix from Gene Cumm, * 'pxe-dns-dotquad-for-mfleming' of git://github.com/geneC/syslinux: core/legacynet: Enable dot quad resolution
2013-07-18core/legacynet: Enable dot quad resolutionGene Cumm1-0/+35
in dnsresolv.c:dns_resolv() Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-07-18movebits: Handle arbitrary combinations of SMT_FREE and SMT_TERMINALsyslinux-6.02-pre6H. Peter Anvin1-29/+13
In theory we may have multiple subregions with SMT_FREE and SMT_TERMINAL. This can be fairly easily integrated into a small loop. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-07-17zonelist: allow syslinux_memmap_type() to demote SMT_FREE to SMT_TERMINALH. Peter Anvin1-5/+16
Allow syslinux_memmap_type() to report any combination of SMT_FREE and SMT_TERMINAL as SMT_TERMINAL. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-07-17movebits: add an inline to test for SMT_FREE || SMT_TERMINALH. Peter Anvin1-0/+5
Introduce a predicate inline to test for a valid terminal address. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2013-07-17movebits: allow allocation across region boundaryMatt Fleming1-1/+16
It's OK to allocate across some region boundaries, provided that the region types are compatible. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-17PXELINUX: Add bios memscan functionMatt Fleming1-0/+35
We can mark the memory region occupied by the PXE stack as SMT_TERMINAL provided that KeepPXE isn't set. Historically some very old non-relocatable kernel images (memtest86+) have a load address that falls within the PXE stack region, so we need to attempt to load into that region if at all possible. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-17memscan: build a linked list of memory scannersMatt Fleming5-129/+171
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>
2013-07-17movebits: Add SMT_TERMINAL - a last resort region typeMatt Fleming3-2/+3
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>
2013-07-17memscan: pass enum syslinux_memmap_types aroundMatt Fleming4-14/+18
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>
2013-07-17movebits: Add syslinux_memmap_find()Matt Fleming3-74/+84
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>
2013-07-17zonelist: rename syslinux_memmap_find()...Matt Fleming5-10/+10
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>
2013-07-13lwip/undiif: split arphdr._hwlen_protolenGene Cumm1-5/+7
lwIP already split this in etharp.h Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-07-12lwip: Allow LWIP_PLATFORM_* output to use dprintfGene Cumm1-2/+12
Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-07-12lwip: undiif: Fix debug options to unique *_DEBUG macrosGene Cumm2-35/+56
Don't reuse *_DEBUG macros intended for other source files. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
2013-07-12Merge branch 'firmware' of git://daniel-baumann.ch/git/upstream/syslinux ↵Matt Fleming1-1/+1
into firmware Pull Makefile patch from Daniel Baumann, * 'firmware' of git://daniel-baumann.ch/git/upstream/syslinux: Excluding git metadata files in release tarballs.
2013-07-12efi, udp: implement receive timeoutsyslinux-6.02-pre5Matt Fleming1-1/+16
We currently wait indefinitely in core_udp_recv() when reading packets. Implement a timeout, which is what all the other network stacks do. By timing out we are now able to handle packet loss on the network, e.g. we'll now re-send TFTP requests instead of waiting for ACK packets that will never come. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-12Excluding git metadata files in release tarballs.Daniel Baumann1-1/+1
2013-07-12Makefile.private: only delete mk/devel.mk for production releasessyslinux-6.02-pre4Matt Fleming1-3/+4
Since we've now got support for dynamic debug, include mk/devel.mk in prerelease tarballs so that users can enable that feature when building from source. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-12NEWS: Mention fixing of make targetsMatt Fleming1-0/+3
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-12cmenu: only the spotless target should delete *.c32Matt Fleming1-3/+3
If distribution package maintainers follow the advice in doc/distrib.txt for rebuilding the installers, they'll currently hit the following error when executing 'make install' install: cannot stat ‘com32/cmenu/libmenu/*.c32’: No such file or directory Follow what every other module does and only delete .c32 files for the spotless target. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-12Makefile: add netinstall target for efiMatt Fleming1-2/+10
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-12version: bump version and datesyslinux-4.07-pre1Matt Fleming1-1/+1
Welcome to the 4.07 release cycle Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-11Makefile: explicitly reference ldlinux.*Matt Fleming1-1/+1
Avoid warnings about not being able to find any *.c32 files in {efi32,efi64}/com32/elflink/ldlinux/ by explicitly referencing $(LDLINUX). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-11efi: 'install' target shouldn't depend on 'all'Matt Fleming1-1/+1
Typing 'make efi64 install' from a release tarball results in the following make error, make[3]: *** No rule to make target `/syslinux-6.02-pre3/efi64/efi/../core//writestr.o', needed by `syslinux.so'. Stop. because make tries to build syslinux.so as it is missing from the tarball. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-09efi: restore console before invoking handover_boot()syslinux-6.02-pre3Matt Fleming1-0/+1
Otherwise the kernel may print "invisible" characters on the serial console, because it doesn't reset the output device's character attributes. Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-09efi: setup ramdisk before invoking handover protocolMatt Fleming1-3/+3
The EFI handover protocol expects us to have setup the following fields, o hdr.code32_start o hdr.cmd_line_ptr o hdr.ramdisk_image (if applicable) o hdr.ramdisk_size (if applicable) Which means we need to call handle_ramdisks() before handover_boot(). Signed-off-by: Matt Fleming <matt.fleming@intel.com>
2013-07-09efi: Convert printf() to Print()Matt Fleming1-1/+1
We haven't loaded ldlinux.* at this point so we can't rely on the console code being in a useful state. Use the EFI-specific Print() instead. Signed-off-by: Matt Fleming <matt.fleming@intel.com>