summaryrefslogtreecommitdiff
path: root/efi
Commit message (Collapse)AuthorAgeFilesLines
* efi/Makefile: remove effective double "//"Gene Cumm2016-06-141-3/+3
| | | | | | During the string substitution, an addtional '/' is added unnecessarily. 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_dns: remove obsolete pxe_dns.c wrapperH. Peter Anvin2016-04-061-1/+1
| | | | | | | | | 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>
* efi/udp: correct typo of SubnetMaskGene Cumm2016-02-291-1/+1
| | | | | | | Used wrong variable. Reported-By: Patrick Masotta <masottaus@yahoo.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Disable UseDefaultAddress if possibly deafGene Cumm2015-10-151-3/+28
| | | | | | | Some machines don't like UseDefaultAddress; fallback to manually configuring. HP EFI servers like DL160 Gen9 are affected. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: core_udp_configure()/core_tcp_connect(): Fix error messageGene Cumm2015-10-122-2/+2
| | | | | | Wrong translation type used. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Don't unnecessarily rebuild syslinux.soSylvain Gault2015-09-161-4/+3
| | | | | | | | | | | OBJ directory creation changed from a .PHONY target to a real target used through an order-only dependency. A target depending on another target marked .PHONY is always rebuilt, thus forcing all the .o files to be rebuilt everytime. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
* efi/x86_64: fix trivial compilation warningSylvain Gault2015-09-131-1/+1
| | | | | | | Missing */ at the end of a comment. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com> Reviewed-by: Paulo Alcantara <pcacjr@zytor.com>
* efi: Merge cleanupGene Cumm2015-09-102-4/+3
|\ | | | | | | | | | | Merge git://github.com/Celelibi/syslinux.git branch 'fix/efi/cleanup' Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
| * efi: fix warning about unused variableSylvain Gault2015-08-261-1/+0
| | | | | | | | Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
| * efi: fix pointer-type mismatch assigment warningSylvain Gault2015-08-261-1/+1
| | | | | | | | | | | | | | The assignment looks suspicious but is actually legit since it is protected by the type check. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
| * efi: fix warnings about argument typesSylvain Gault2015-08-261-2/+2
| | | | | | | | | | | | | | The function efi_get_MAC was given a pointer to array instead of a simple pointer, generating a warning with gcc. Signed-off-by: Sylvain Gault <sylvain.gault@gmail.com>
* | efi/x86_64: leave long mode properlyThomas Letan2015-09-061-20/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Syslinux 6.03 (efi64) fails to boot a 32-bit kernel. The way Syslinux leaves long mode in kernel_jump assembly routine does not follow AMD64 specifications. More precisely: 1. After setting a new GADT, `cs` has to be refresh by doing a long jump, but it is not 2. Other segments have to be updated, but they are not 3. Disabling paging has to be done before disabling long mode, but the implementation does the opposite In most cases, a computer that tries to execute the kernel_jump routine reboot (it can also hangs). This patch fixes the kernel_jump routine. Signed-off-by: Thomas Letan <thomas.letan@ssi.gouv.fr> Tested-by: Patrick Masotta <masottaus@yahoo.com> Tested-by: Celelibi <celelibi@gmail.com>
* | efi: Change status check when draining keyboardOliver Wagner2015-09-021-1/+1
|/ | | | | | | PCs without keyboards may hang as they might return a status other than EFI_NOT_READY. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/main: set/check for NULL in efi_create_binding()Patrick Masotta2015-08-011-2/+2
| | | | | | | | If LibLocateHandle() returns success and either 0 handles or we find no matching handles, treat it the same. Originally-By: Patrick Masotta <masottaus@yahoo.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Hunt for service binding handle if neededGene Cumm2015-07-191-7/+39
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: add efi_get_MAC()Gene Cumm2015-07-191-0/+36
| | | | | | | | Extracts a MAC address from a device path Originally-By: Patrick Masotta <masottaus@yahoo.com> [gene.cumm@gmail.com: Respace] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: rename pxe_handle to image_device_handleGene Cumm2015-07-193-9/+9
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/udp: Don't use AllowPromiscuousGene Cumm2015-07-181-2/+0
| | | | | | | Unnecessary. On some systems, opens NIC in promiscuous mode or breaks UseDefaultAddress. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Provide feedback on Configure() failuresGene Cumm2015-07-182-6/+10
| | | | | | | There are more unsuccessful returns that are ignored. Restructure to allow for trapping other values. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/main.c: don't close handle earlyPatrick Masotta2015-06-271-3/+0
| | | | | | This clause closes the protocol before creating the child Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe.c: missing returnPatrick Masotta2015-06-261-0/+1
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe: Reuse handleGene Cumm2015-06-253-35/+23
| | | | | | | | | | | | | | | Store and reuse handle found with EFI_LOADED_IMAGE_PROTOCOL for EFI_PXE_BASE_CODE_PROTOCOL and EFI_UDP4_SERVICE_BINDING_PROTOCOL This caused machines with multiple NICs to not reliably attach to the correct NIC handle. gnu-efi LoadedImageProtocol PxeBaseCodeProtocol Udp4ServiceBindingProtocol Reported-By: Holger Baust <holger.baust@freenet.ag> Reported-By: Michael Glasgow <glasgow@beer.net> Reported-By: Da Shi Cao <dscao999@gmail.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* core/pxe: extend parse_dhcp() for packet typeGene Cumm2015-06-201-3/+3
| | | | | | | 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>
* efi/pxe: save MAC after parsing last packetPatrick Masotta2015-06-091-9/+11
| | | | | | | | | parse_dhcp() does this also, seeming to set a bad value for some clients. Fixes some deaf clients. Signed-off-by: Patrick Masotta <masottaus@yahoo.com> [gene.cumm@gmail.com: Just move existing code] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe: Use the appropriate 3rd packetPatrick Masotta2015-05-261-1/+9
| | | | | | | | | | EFI allows us to have access to more DHCP-related packets. Choose the packet with the highest priority for the third to parse. Signed-off-by: Patrick Masotta <masottaus@yahoo.com> [gene.cumm@gmail.com: Only change the third parsing iteration; reflow to better fit code standards; don't reparse DhcpAck] Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi/pxe: Amend comments to clarify BIOS.Gene Cumm2015-05-251-3/+3
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* check-gnu-efi.sh: print the output of build-gnu-efi.shRobert Yang2015-01-051-1/+1
| | | | | | | | | The build would be failed and exit if build-gnu-efi.sh is failed, so we'd better not suppress the output of build-gnu-efi.sh, which is good for debugging. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: prevent git command in non-git tree #2Gene Cumm2015-01-051-1/+3
| | | | | | efi/clean-gnu-efi.sh presumes it's in a git repo. Test first. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: prevent git command in non-git treeErwan Velu2015-01-051-1/+3
| | | | | | efi/build-gnu-efi.sh presumes it's in a git repo. Test first. Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* efi: Tag __syslinux_adv* with __exportMatt Fleming2014-06-241-2/+2
| | | | | | | | | | | | | | | | | | | | | commit 415d571 ("adv: Remove double defintion") introduced a regression for the EFI boot loader. The commit is correct, but should have tagged the __syslinux_adv_ptr and __syslinux_adv_size data objects in the EFI core as __export. This change is required because symbols in the EFI code are not global by default, and so, when ldlinux.{e32,e64} tries to bind to the adv symbols it fails. The following demonstrates the ELF symbol changes, Before: 659: 0000000000034f40 8 OBJECT LOCAL DEFAULT 16 __syslinux_adv_ptr After: 957: 0000000000036fe0 8 OBJECT GLOBAL DEFAULT 16 __syslinux_adv_ptr Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* pxe: Add support for embedded options in EFIsyslinux-6.03-pre16H. Peter Anvin2014-06-161-0/+35
| | | | | | | | For EFI, rather than mucking with the PECOFF or ELF headers (we have both!) just use a fixed-size buffer embedded in the image with a large magic number that can be scanned for safely. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'nocomapi'syslinux-6.03-pre7H. Peter Anvin2014-03-031-4/+0
|\
| * comapi: Remove the comapi interfaces completelyH. Peter Anvin2014-02-131-4/+0
| | | | | | | | | | | | | | | | | | | | 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>
* | shuffler: Actually get the shuffler size sanelysyslinux-6.03-pre4H. Peter Anvin2014-02-271-1/+0
| | | | | | | | | | | | | | | | | | 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>
* | efi: fix up gnu-efi buildGene Cumm2014-02-224-13/+55
| | | | | | | | | | | | | | | | | | | | 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>
* | 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>
* 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>
* 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 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>