summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [libc] Remove unnecessary "cld" instruction from memset()Michael Brown2012-11-121-11/+18
| | | | | | Saving is one byte per call to memset(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Convert memcpy() from a macro to an inline functionMichael Brown2012-11-122-4/+25
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Reduce overall code size by externalising memmove()Michael Brown2012-11-122-24/+74
| | | | | | Typical saving is 15-20 bytes in each file using memmove(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Remove obsolete implementation of memcpy()Michael Brown2012-11-121-12/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add self-tests for string functionsMichael Brown2012-11-122-0/+134
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [umalloc] Split largest_memblock() function out from init_eheap()Michael Brown2012-11-063-49/+106
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uaccess] Add userptr_sub() to find the difference between two user pointersMichael Brown2012-11-054-0/+39
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [list] Reduce overall code size by externalising many list functionsMichael Brown2012-11-022-122/+215
| | | | | | Typical saving is 10-20 bytes in each file using list functions. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Make version.o depend on the git indexThomas Miletich2012-11-021-0/+4
| | | | | | | | | | | The version number string is currently updated only if version.o happens to be rebuilt due to changes in its dependencies. Add a dependency upon the git index, so that the version number is updated after any checkout. Signed-off-by: Thomas Miletich <thomas.miletich@gmail.com> Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include version number within only a single object fileMichael Brown2012-11-0211-21/+87
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Inhibit .eh_frame on newer gcc versionsMichael Brown2012-11-021-2/+5
| | | | | | | | | | | | Using -fno-dwarf2-cfi-asm is not sufficient to prevent the .eh_frame section from being generated on newer versions of gcc. Add -fno-exceptions -fno-unwind-tables -fno-asynchronous-unwind-tables; this is sufficient to inhibit the .eh_frame section on gcc 4.7.1. This does not affect the overall binary size, but does fix the numbers reported by "size" for individual object files. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Use -maccumulate-outgoing-args if required by gccMichael Brown2012-11-021-0/+12
| | | | | | | | | | | | | Current versions of gcc require -maccumulate-outgoing-args if any sysv_abi functions call ms_abi functions. This requirement is likely to be lifted in future gcc versions, so test explicitly to see if the current version of gcc requires -maccumulate-outgoing-args. This problem is currently masked since the implied -fasynchronous-unwind-tables (which is the default in current gcc versions) implies -maccumulate-outgoing-args. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [forcedeth] Increase TX ring size to prevent dropped packetsMichael Brown2012-10-291-1/+1
| | | | | | | | | | | Commit 947976d ("[netdevice] Do not force a poll on net_tx()") requires network devices to have TX rings that are sufficiently large to allow a transmitted response to all packets received during a single poll. Reported-by: Robin Smidsrød <robin@smidsrod.no> Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [intel] Poll RX queue if hardware reports RX overflowMichael Brown2012-10-281-1/+1
| | | | | | | | | | | | | | | The Intel NIC emulation in some versions of VMware seems to suffer from a flaw whereby the Interrupt Cause Register (ICR) fails to assert the usual "packet received" bit (ICR.RXT0) if a receive overflow (ICR.RXO) has also occurred. Work around this flaw by polling for completed descriptors whenever either ICR.RXT0 or ICR.RXO is asserted. Reported-by: Miroslav Halas <miroslav.halas@bankofamerica.com> Debugged-by: Miroslav Halas <miroslav.halas@bankofamerica.com> Tested-by: Miroslav Halas <miroslav.halas@bankofamerica.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [hermon] Use PCI VPD for non-volatile option storageMichael Brown2012-10-252-2/+40
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Allow readline_history() to return a meaningful statusMichael Brown2012-10-255-20/+32
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Clear network device setting before unregisteringMichael Brown2012-10-251-0/+2
| | | | | | | Avoid memory leaks by clearing any (non-child) settings immediately before unregistering the network device settings block. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Prefill existing setting value in "read" commandMichael Brown2012-10-251-8/+22
| | | | | | | | When prompting the user to enter a setting value via the "read" command, prefill the input buffer with the setting's current value. Requested-by: Ján Ondrej (SAL) <ondrejj@salstar.ks> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [readline] Allow a prefilled input string to be providedMichael Brown2012-10-253-3/+11
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Add fetchf_named_setting_copy()Michael Brown2012-10-252-0/+40
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Do not force a poll on net_tx()Michael Brown2012-10-241-7/+0Star
| | | | | | | | | | | | | | Including a netdev_poll() within net_tx() can cause the net_step() loop to end up processing hundreds or thousands of packets within a single step, since each received packet being processed may trigger a response which, in turn causes a poll for further received packets. Network devices must now ensure that the TX ring is at least as large as the RX ring, in order to avoid running out of TX descriptors. This should not cause any problems; unlike the RX ring, there is no substantial memory cost incurred by increasing the TX ring size. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [intel] Report receive overruns via network device errorsMichael Brown2012-10-242-1/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add EFI_COMPONENT_NAME2_PROTOCOL instance for each SNP deviceMichael Brown2012-10-232-0/+75
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [autoboot] Avoid excess backspacing after displaying Ctrl-B promptMichael Brown2012-10-231-1/+3
| | | | | | | Remove the newline from the "Press Ctrl-B..." prompt string, so that prompt() does not attempt to backspace beyond the start of the line. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add missing RC_TO_EFIRC() conversionMichael Brown2012-10-221-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [util] Fix uninitialised-variable warning in einfo.cMichael Brown2012-10-221-2/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Remove self-test for empty formatted setting valueMichael Brown2012-10-201-2/+0Star
| | | | | | | | | | | Commit 5ad445f ("[settings] Treat an empty formatted value as meaning "delete setting"") (re)defined the semantics of storing an empty formatted setting as meaning "delete setting". Remove the existing self-test using an empty formatted hex setting value, since it no longer conforms to the defined semantics. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [arp] Increase robustness of ARP discarderMichael Brown2012-10-201-7/+10
| | | | | | | Take ownership from the ARP cache at the start of arp_destroy(), to ensure that no code path can lead to arp_destroy() being re-entered. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Expose net device non-volatile settings via HIIMichael Brown2012-10-163-339/+1143
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Split SNP HII functionality into a separate fileMichael Brown2012-10-164-418/+508
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nvo] Expose nvo_applies()Michael Brown2012-10-152-2/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [nvo] Expose non-volatile options block nameMichael Brown2012-10-152-1/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Treat an empty formatted value as meaning "delete setting"Michael Brown2012-10-151-2/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Expose find_child_settings()Michael Brown2012-10-152-2/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [libc] Add wcslen() functionMichael Brown2012-10-152-0/+45
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [serial] Don't enable serial console without serial supportShao Miller2012-10-053-4/+13
| | | | | | | | | | | serial_console_init() would enable serial console support without knowing if the serial driver succeeded or not. As a result, the serial console would interfere with a normal keyboard on a system lacking serial support. Reported-by: Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> Signed-off-by: Shao Miller <sha0.miller@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Do not zero %edx when jumping to a boot sectorMichael Brown2012-10-051-1/+1
| | | | | | | | | | | Commit 73eb3f1 ("[int13] Zero all possible registers when jumping to a boot sector") introduced a regression preventing the SAN-booting of boot sectors which rely upon %dl containing the correct drive number (such as most CD-ROM boot sectors). Fix by not zeroing %edx. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Mark SNP formset compliant with IBM's Unified Configuration ManagerMichael Brown2012-10-052-2/+8
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [contrib] Enable bochs debug port by defaultMichael Brown2012-10-051-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [contrib] Allow more space for Bochs option ROMMichael Brown2012-10-051-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Fix potential memory leakMichael Brown2012-09-281-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Fix uninitialised variableMichael Brown2012-09-281-2/+1Star
| | | | | Reported-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tls] Split received records over multiple I/O buffersMichael Brown2012-09-272-168/+304
| | | | | | | | | | | | | | | TLS servers are not obliged to implement the RFC3546 maximum fragment length extension, and many common servers (including OpenSSL, as used in Apache's mod_ssl) do not do so. iPXE may therefore have to cope with TLS records of up to 16kB. Allocations for 16kB have a non-negligible chance of failing, causing the TLS connection to abort. Fix by maintaining the received record as a linked list of I/O buffers, rather than a single contiguous buffer. To reduce memory pressure, we also decrypt in situ, and deliver the decrypted data via xfer_deliver_iob() rather than xfer_deliver_raw(). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [crypto] Allow in-place CBC decryptionMichael Brown2012-09-271-1/+3
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add speed tests for cipher algorithmsMichael Brown2012-09-263-4/+94
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [test] Add speed tests for digest algorithmsMichael Brown2012-09-265-0/+54
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Provide guaranteed space in transmitted packetsMichael Brown2012-09-141-6/+7
| | | | | | | | | | | | | eIPoIB requires space to expand a transmitted ARP packet. This guarantee is met by ensuring that a transmitted packet consists of at least MAX_LL_HEADER_LEN bytes from the start of the I/O buffer up to the end of the link-layer header, and at least IOB_ZLEN bytes thereafter. Adjust the I/O buffer allocation for SNP transmitted packets to ensure that this guarantee is met. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Zero all possible registers when jumping to a boot sectorMichael Brown2012-09-141-1/+14
| | | | | | | | | | | | At least one boot sector (the DUET boot sector used for bootstrapping EFI from a non-EFI system) fails to initialise the high words of registers before using them in calculations, leading to undefined behaviour. Work around such broken boot sectors by explicitly zeroing the contents of all registers apart from %cs:%ip and %ss:%sp. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Use correct size when estimating floppy disk geometryMichael Brown2012-09-141-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Add support for the bochs/qemu debug port consoleMichael Brown2012-09-103-0/+90
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>