summaryrefslogtreecommitdiff
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* xfs: rename xfs_is_valid_magicnum to xfs_is_valid_sbPaulo Alcantara2015-11-082-17/+15
| | | | | | | | xfs_is_valid_magicnum is not actually a generic function that checks for magic numbers, instead it checks only for superblock's one. Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> Reviewed-by: Gene Cumm <gene.cumm@gmail.com>
* bios: Don't try to guess the sections alignmentSylvain Gault2015-11-082-102/+24
| | | | | | | | | | | | | | For the compression / decompression to succeed, the sections layout must be the same between the virtual memory and load memory. The section alignment was kept in sync by introducing aligment that should be greater or equal to the actual section alignment. This patch compute the load memory addresses of the sections so that the layout is the same as the virtual memory addresses. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Tested-by: poma <pomidorabelisima@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* bios: Fix alignment change with gcc 5Sylvain Gault2015-11-082-6/+6
| | | | | | | | | The section aligment specified in the ld scripts have to be greater or equal to those in the .o files generated by gcc. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Tested-by: poma <pomidorabelisima@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* core/http: Append port number to Host field if neededGene Cumm2015-10-101-2/+15
| | | | | | | | HTTP/1.1 header Host must contain the port number if not default for the protocol. Host isn't a part of HTTP/1.0 but let's implement it right. Reported-By: Michael DeCandia <michael.decandia@gmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe: Allow DHCP option 54 Server IdentifierGene Cumm2015-10-081-2/+6
| | | | | | | | | | | Apparently some servers don't bother setting siaddr when pointing to itself for TFTP. Re-allow 54 but always set IPInfo.serverip from siaddr/dhcp->sip in packet #3 (PXEReply/proxyDHCP). Always set from siaddr if good in case parsing after-DHCP options. Reported-by: Celelibi <celelibi@gmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core: readd gPXE/iPXE support for HTTP on pxelinux.0Gene Cumm2015-09-273-81/+108
| | | | | | | | | | | When adding lwIP functionality, the gPXE/iPXE callback was broken. This prevented pxelinux.0 from calling gPXE/iPXE for HTTP and FTP URLs. Re-add for pxelinux.0 and add code to find file size. Move to core/legacynet/core.c to access packet_buf and leave a dummy function for lpxelinux.0. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/fs/lib/loadconfig.c: Add architecture-specific config name to searchAdy2015-09-201-0/+5
| | | | | | | | When multiple architectures are on a single media, all will try to use the same config, preventing PATH from pointing to an architecture-specific directory. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* pxe/dhcp_option: Don't parse DHCP option 54 Server IdentifierGene Cumm2015-09-121-1/+0
| | | | | | | Server Identifier is NEVER the next server where Syslinux was loaded from. BOOTP field siaddr, BOOTP field sname and DHCP option 66 TFTP server name may contain this information. For now, just use siaddr.
* libupload: Reworking tftp support to use core functionsErwan Velu2015-09-043-1/+182
| | | | | | | | | | | | | | | The libupload was using the pxe_call() directly for doing the tftp uploading stuff. This was only working with pxelinux. Since we do have lpxelinux, the libupload should use the core functions to get rid of thoses direct PXE calls. This patch does - add a tftp_put() function which supports core functions. - implement the call from libupload making the code much more simplier As a result {l}pxelinux can upload data to a tftp server is a similar way. HDT is getting the benefit of such code.
* tftp: Report server IP address on debug messageErwan Velu2015-09-041-1/+10
| | | | | When debugging, it is very useful to get the ip adress of the server that reponsded to that packet.
* debug: Adding -DDEBUG_THREADErwan Velu2015-09-041-0/+4
| | | | | | | | | When debugging some syslinux code with debugging enabled, the threading code is so verbose that it completly slow down syslinux but also is so verbose that any other trace is invisible in the flood. This commit aims at requesting people to explicitly enable the threading logs by using -DDEBUG_THREAD.
* core: dprintf on malloc/free if -DDEBUG_MALLOCErwan Velu2015-09-022-0/+6
| | | | | | | | | | | When dynamic debug is engaged, the output is pretty flooded by malloc/free messages while you are looking at other traces. As devel.mk have a DEBUG_MALLOC option, it seems pretty logical to enable the malloc/free dprintf() only if this option is engaged. That patch make the dynamic debug output less floody while letting the choice to get the malloc/free dprintf() messages.
* core/serirq: Use memset not memcpyGene Cumm2015-07-181-1/+1
| | | | | | | The intention is to nullify not copy the IRQ pointers Reported-By: Thomas Schmitt <scdbackup@gmx.net> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe/dhcp_option: Filter options based on pkt_typeGene Cumm2015-06-251-1/+4
| | | | | | | | Filter (by setting a minimum option number) the options based on pkt_type. DHCPDiscover/PXEReply should only contain info about client ID, boot server and PXELINUX options. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe: Don't prevent serverip overrideGene Cumm2015-06-251-3/+0
| | | | | | | This prevented a proxyDHCP/PXEReply from overriding the IPInfo.serverip, most often stored in BOOTP field siaddr or DHCP option 54. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe: extend parse_dhcp() for packet typeGene Cumm2015-06-203-6/+8
| | | | | | | Add packet type so we can eventually only grab certain data elements from the DHCP packets appropriately Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/fs/pxe/dhcp_option: comment spellingGene Cumm2015-06-091-1/+1
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* pxe: fix truncation warningJonathan Boeing2015-05-031-1/+1
| | | | | | | | When building efi64, there's a size mismatch between the uint32_t variable (32 bits) and the -1UL (64 bits). This fixes the warning: large integer implicitly truncated to unsigned type Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* fix a few typosJonathan Boeing2015-05-032-2/+2
| | | | Signed-off-by: Jonathan Boeing <jonathan.n.boeing@gmail.com>
* core/diskboot.inc: spellingGene Cumm2015-02-161-1/+1
| | | | | | Remove 1 spelling error Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* SYSAPPEND: Fix space strippingDany St-Amant2015-01-051-1/+1
| | | | | | | | The description of SYSAPPEND for the DMI information states that the spaces are replaced by underscores, but this replacement does not occur in 6.03. Signed-off-by: Dany St-Amant <dany.ephemeral.2014@icloud.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* build: sort sources to build in a more deterministic wayPhilippe Coval2015-01-051-5/+5
| | | | | | | | | | | | | | | | | It has been observed that binaries contents are depending on the order of linked objects. This order is caused by GNU make's wildcard function and the position of sources on filesystem. This change tries to prevent this kind of randomness. Also consider building using -j1 flag to make it even more reproductible. Change-Id: Ie8eee7f336e6f1fa2863c4150d967afd15519f1d Bug: http://bugzilla.syslinux.org/show_bug.cgi?id=57#related Signed-off-by: Philippe Coval <philippe.coval at open.eurogiciel.org>
* btrfs: Suffix 64b macroMartinS2015-01-051-1/+1
| | | | | | | | gcc complains about the size of the constant of BTRFS_MAGIC_N. It is a 64bit value, so it needs the ULL suffix. Signed-off-by: MartinS <ams@luminous.ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* PXE ISR: Force polling on select hardware #3 WORKAROUNDGene Cumm2014-08-021-0/+1
| | | | | | | | Like 2fe3a7bd, certain Dell machines (Latitude E6510) state interrupts should work but effectively don't. Force polling. Reported-by: Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core, pxe: Don't push on one stack and pop from the other in pxenvsyslinux-6.03-pre19H. Peter Anvin2014-07-291-0/+4
| | | | | | | | | | | | | | When saving/restoring the flags around the stack switch test, we cannot leave live data on the stack *across* the stack switch that we are going to use on the other side (unlike the "big" stack frame which we only use once we are back on the original stack.) Use register BP, which is not live at either point, as a temporary holding place for the flags from the stack. Reported-by: Frank Mehnert <frank.mehnert@googlemail.com> Link: http://bugzilla.syslinux.org/show_bug.cgi?id=54 Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* PXE ISR: Force polling on select hardware WORKAROUNDGene Cumm2014-07-131-3/+2
| | | | | | | | Like 2fe3a7bd, certain Dell machines (OptiPlex 990) state interrupts should work but effectively don't. Force polling. Reported-by: Alexander Perlis <aperlis@math.lsu.edu> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* lzo: Upgrade to LZO 2.07H. Peter Anvin2014-06-277-123/+10
| | | | | | Use version 2.07 of the LZO compression library. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* pxe: Re-add support for embedded DHCP optionssyslinux-6.03-pre15H. Peter Anvin2014-06-164-3/+23
| | | | | | | | | | Fix the support for embedded DHCP options. Although we were diligently saving them away, we never actually parsed them. This fixes embedded options for BIOS only -- for EFI we need to modify the encoding scheme so that it can fit inside an EFI PECOFF image. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Make symbols defined in linker script HIDDENH. Peter Anvin2014-06-101-149/+149
| | | | | | | This makes symbols defined in com32.ld and syslinux.ld HIDDEN, to avoid collisions. Additional linker scripts should have this done, too. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/fs: Add support to Unix File system 1/2.syslinux-6.03-pre13Raphael S. Carvalho2014-06-024-0/+944
| | | | | | | | It's already loading modules successfully, booting Linux, and both UFS version 1 and 2 seem to be working correctly. Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* ntfs: fix incorrect file->offset usage in ntfs_readdirAndy Alex2014-06-021-6/+4
| | | | | | | | | | | | | file->offset is used to store position in index root between ntfs_readdir calls. Previously, pointer to buffer was stored in this field. However this buffer is reallocated and read each ntfs_readdir call so the pointer may become incorrect. Now offset in index root rather than pointer is stored in this field. [ hpa: applied patch manually as it arrived whitespace-corrupted ] Signed-off-by: Andy Alex <andy at r-tt.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* cache, btrfs: Provide a general cached read routineH. Peter Anvin2014-05-263-34/+41
| | | | | | | | btrfs_read() was really just a function to read data linearly while using the metadata cache. Move it to cache.c and rename it cache_read() so other filesystems can make use of it as well. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* btrfs: Remove static variablesH. Peter Anvin2014-05-262-77/+100
| | | | | | | Remove the use of static variables and replace them with per-instance allocations that can be found from the fs_info structure. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* btrfs: Fix stack smash with node size > 4Ksyslinux-6.03-pre12H. Peter Anvin2014-05-262-41/+62
| | | | | | | | | | | Newer btrfs has a node size of more than 4K. Make sure we have a buffer big enough to hold a node -- instead of allocating it on the stack, allocate it at startup time. While changing this code, remove a completely unnecessary arbitrary 64-bit divide. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Centralize shift_is_held(), make it work to force the command linesyslinux-6.03-pre11H. Peter Anvin2014-04-201-0/+9
| | | | | | | Holding down shift is supposed to force a command line unless noescape is provided; make it behave that way. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* kbd: Use the extended keyboard state query for bios_shiftflags()H. Peter Anvin2014-04-201-3/+18
| | | | | | Mixing extended and non-extended keyboard functions can be a bad idea. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* kbd: Make getting the keyboard shift state a firmware methodH. Peter Anvin2014-04-202-1/+22
| | | | | | | Getting the keyboard shift state is a firmware method. It is unfortunately unclear if it is even possible on EFI. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NTFS: Fragmented $MFT file was not handledAndy Alex2014-04-171-100/+93
| | | | | | | | | | NTFS $MFT file may be fragmented by itself (and actually is in most cases). However, such a situation was not handled. This patch adds support for a fragmented $MFT file. Signed-off-by: Andy Alex <andy at r-tt.com> Fixed-by: Ady <ady-sf@hotmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: Avoid initializing the cache more than onceRaphael S. Carvalho2014-04-034-2/+7
| | | | | | | | | | Most of file system drivers initialize the cache themselves. The problem is that the same cache could be again initialized later, then invalidating the previous one. This patch fixes this. Problem found while auditing the code. Signed-off-by: Raphael S. Carvalho <raphael.scarv@gmail.com>
* ntfs: Make byte_shift a constH. Peter Anvin2014-03-131-1/+1
| | | | | | byte_shift is a constant, label it as such. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NTFS: Incorrect parsing of file runsAndy Alex2014-03-131-6/+2
| | | | | | | Length of some extents of NTFS files is parsed in wrong way. Signed-off-by: Andy Alex <andy at r-tt.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* FSUUID for ext2 filesystemSerj Kalichev2014-03-132-1/+40
| | | | | | | | | The ext2 filesystem supports volume UUID now. The FSUUID variable can be set to kernel command line. Patch is based on FSUUID for FAT patch. Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add filesystem UUID to SYSAPPEND for FATSerj Kalichev2014-03-1312-1/+74
| | | | | | | | | | Filesystem UUID shows the partition we boot kernel from. The kernel parameter has format like FSUUID=DA1A-0B2E. The SYSAPPEND bit is 0x40000. Now the FAT only supports FSUUID. The patch is based on 67aaaeeb228. Signed-off-by: Serj Kalichev <serj.kalichev@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'nocomapi'syslinux-6.03-pre7H. Peter Anvin2014-03-0314-528/+71
|\
| * comapi: Remove the comapi interfaces completelyH. Peter Anvin2014-02-138-454/+16
| | | | | | | | | | | | | | | | | | | | 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>
| * bios: Remove shuffle and boot comapi callH. Peter Anvin2014-02-138-45/+44
| | | | | | | | | | | | | | | | 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>
| * bios: Remove comapi calls related to the ADVH. Peter Anvin2014-02-134-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>
* | core, bios: Move __syslinux_shuffler_size to assemblysyslinux-6.03-pre5H. Peter Anvin2014-02-282-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>
* | shuffler: Actually get the shuffler size sanelysyslinux-6.03-pre4H. Peter Anvin2014-02-272-1/+15
| | | | | | | | | | | | | | | | | | 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>
* | Makefiles: export the firmware type as a cpp variableH. Peter Anvin2014-02-271-1/+2
| | | | | | | | | | | | Export the firmware type as a cpp variable so we can #ifdef. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>