aboutsummaryrefslogtreecommitdiffstats
path: root/core
Commit message (Collapse)AuthorAgeFilesLines
* dmi: check both the AC and ID flags at the same timeHEADmasterH. Peter Anvin2019-02-201-2/+4
| | | | | | | There is no reason to do the fairly complex flag-test sequence twice, when we might as well check for both flags at the same time. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Fix all warnings, and better separate code that should not be mixedsyslinux-6.04-pre3H. Peter Anvin (Intel)2019-02-07232-465/+460
| | | | | | | | | Clean up a number of warnings in the tree. Refactor especially the core code so we don't end up building a bunch of BIOS-specific code for EFI, and general build cleanups. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* Reorganize and clean up a bunch of the x86 codeH. Peter Anvin2019-02-0415-15/+15
| | | | | | | We were doing a bunch of i386-specific things even on x86-64. Fix this, and merge x86 definitions where possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/Makefile: sort to be reproducibleLukas Schwaighofer2018-10-251-5/+5
| | | | Signed-off-by: Lukas Schwaighofer <lukas@schwaighofer.name>
* ext4: Fix 64bit featurePaulo Alcantara2017-10-152-9/+15
| | | | | | | | | | | | | | | | | | | | | | As per ext4 specification: > In ext2, ext3, and ext4 (when the 64bit feature is not enabled), the > block group descriptor was only 32 bytes long and therefore ends at > bg_checksum. On an ext4 filesystem with the 64bit feature enabled, the > block group descriptor expands to at least the 64 bytes described below; > the size is stored in the superblock. Since block group descriptor has been expanded to 64 bytes long (when 64 bit feature is enabled), we cannot index ext2_group_desc and return it *directly* -- as we did it in ext2_get_group_desc -- it's still 32 bytes long. Instead, use s_desc_size field from superblock to correctly index and return block group descriptors. Cc: H. Peter Anvin <hpa@zytor.com> Cc: Gene Cumm <gene.cumm@gmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* core/legacynet/dnsresolv.c: weaken pxe_dns()Gene Cumm2016-11-271-1/+1
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* unload_pxe(): fix string in dprintf()H. Peter Anvin2016-06-161-1/+1
| | | | | | Fix a dprintf() message so it matches reality. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* spelling: Auxillary to AuxiliaryGene Cumm2016-06-082-3/+3
| | | | | Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* removing double l from auxilliaryGeert Stappers2016-06-071-1/+1
| | | | | | | This patch changes only strings, no program code. Reported-by: Ady <ady-sf@hotmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* pxe.c: fix stray line-end garbageH. Peter Anvin2016-04-061-1/+1
| | | | | | The previous commit had some unfortunate line-end garbage; remove. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* libupload: use url_set_ip()H. Peter Anvin2016-04-062-4/+17
| | | | | | | | We already have a core function for setting the IP address of an URL object based on network lookup or the server default. Export and use it instead of open-coding the equivalent logic in upload_tftp.c. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* pxe_dns: remove obsolete pxe_dns.c wrapperH. Peter Anvin2016-04-063-13/+3
| | | | | | | | | We used to need a wrapper around the core function dns_resolv() to implement pxe_dns(), because the former function required its argument to live in low memory. This is no longer the case and hasn't been for a while, so remove this unnecessary level of indirection. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* libupload: don't error out because the tftp functions are unavailableH. Peter Anvin2016-04-061-1/+3
| | | | | | | | Provide weak stubs for the case where the tftp functions aren't available. This prevents link failures for the case of running on top of non-network cores. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* head.inc: error out on NASM 2.11.06H. Peter Anvin2016-03-081-0/+2
| | | | | | | | | NASM 2.11.06 is known to miscompile Syslinux, so error out on that NASM version. Kind of embarrassing for me... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Makefile: error out if the core has undefined symbolssyslinux-6.04-pre1H. Peter Anvin2016-03-011-0/+2
| | | | | | | | --unresolved-symbols=report-all apparently doesn't report the case where a symbol is requested but never referenced. Error out if necessary. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/extern.inc: http_bake_cookies is not called from assemblyH. Peter Anvin2016-03-011-1/+1
| | | | | | | http_bake_cookies() is never called from assembly code, remove the declaration. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: remove unused stub pm_local_boot()H. Peter Anvin2016-03-012-8/+0
| | | | | | pm_local_boot is never used, remove it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* syslinux.ld: align the initial heap to 4K rather than 64KH. Peter Anvin2016-03-011-2/+2
| | | | | | | There is absolutely no reason to align to 64K. Correct the note about this being the heap; COM32R modules were Syslinux 4.x specific. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core/i386/syslinux.ld: Remove HIDDEN referenceGene Cumm2016-02-221-131/+131
| | | | | | | HIDDEN was added to ld in binutils version 2.23 published in August 2012. This helps preserve backwards compatibility for now. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* getfssec: update comment explaining next_extent() semanticsH. Peter Anvin2016-02-171-3/+8
| | | | | | | Update comments which explains next_extent() semantics to be slightly clearer, and also correct the statement that next_extent can be NULL. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* core/layout.inc: we don't need the _lma symbols except in one caseH. Peter Anvin2016-02-111-1/+3
| | | | | | | | | We don't need any of the _lma symbols, except for the one associated with .pm_code. Don't export them unconditionally in SECINFO, because that makes the linker request them as unknown symbols in the dynamic section. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* core: Clean up the i386-bios buildH. Peter Anvin2016-02-093-172/+143
| | | | | | | | Remove symbols and data structures not used in the i386-bios build, and clean up the linker script so that most internal symbols are HIDDEN. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Makefile: make the handling of firmware selection a little sanerH. Peter Anvin2016-02-091-28/+25
| | | | | | Clean up the handling of firmware selection inside the Makefiles. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Delete unused filesH. Peter Anvin2016-02-092-803/+0
| | | | | | Remove several files which aren't used at all during the build. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge ↵Gene Cumm2016-01-191-1/+57
|\ | | | | | | | | | | | | 'git://github.com/Celelibi/syslinux.git/fix/bios/tail-call-stack-overflows' FIXME: this circumvents some of the issue but is not the cleanest and may reoccur.
| * core: Fix stack overflow when reloading configSylvain Gault2015-10-131-1/+57
| | | | | | | | | | | | | | | | | | | | | | The behavior when running a "CONFIG" command line is to reload ldlinux.c32 with the new file as argument. This call never return. In order to avoid stacking up the calls to start_ldlinux, this patch introduce a setjmp/longjmp to return to the first call to start_ldlinux, thus freeing all the stack space. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
* | core/xfs: Silence compiler warningGene Cumm2016-01-191-2/+2
| | | | | | | | | | | | | | "may be used uninitialized in this function [-Wuninitialized]" even though logic dictates it must be OK. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* | Merge 'git://zytor.com/users/pcacjr/syslinux.git/xfs-v3-support' into masterGene Cumm2016-01-196-230/+399
|\ \
| * | xfs: Add support for v3 directoriesPaulo Alcantara2015-12-146-230/+399
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides supporting newer version of xfs file system, this patch also does some code refactoring and fix completely broken listing and searching on v2-3 node directories. Cc: Gene Cumm <gene.cumm@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Raphael S. Carvalho <raphael.scarv@gmail.com> Cc: Ady <ady-sf@hotmail.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com>
* | | btrfs: Fix logical to physical block address mappingPaulo Alcantara2015-12-272-16/+35
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current btrfs support did not handled multiple stripes stored in chunk items, hence skipping the physical addresses that were needed to do the mapping. Besides, the chunk tree may contain DEV_ITEM keys which store information on all of the underlying block devices, so we must skip them instead of finishing lookup. The bug was reproduced with btrfs-progs v4.2.2. Cc: Gene Cumm <gene.cumm@gmail.com> Cc: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Paulo Alcantara <pcacjr@zytor.com> --- v1 -> v2: * Do not set ignore_key multiple times. Set it before parsing chunk tree. v2 -> v3: * Replace an unnecessary goto with a continue statement.
* | 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>