david/ipxe
david
/
ipxe
Archived
1
0
Fork 0
Commit Graph

4542 Commits

Author SHA1 Message Date
Michael Brown 717279a294 [efi] Include product short name in EFI SNP device names
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-21 03:43:43 +00:00
Michael Brown 1a79f6f37a [efi] Delegate to child device's EFI_COMPONENT_NAME2_PROTOCOL, if present
EFI's device naming model requires drivers to provide names for child
devices.  Allow the driver's GetControllerName() method to delegate to
an instance of EFI_COMPONENT_NAME2_PROTOCOL installed on the child
device itself (if present); this allows the SNP device to expose its
own device name via the PCI driver's GetControllerName() method.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-21 03:26:45 +00:00
Michael Brown d6b0b76a05 [bzimage] Allow initrds to be rearranged in place
At present, loading a bzImage via iPXE requires enough RAM to hold two
copies of each initrd file.  Remove this constraint by rearranging the
initrds in place.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 23:10:45 +00:00
Michael Brown 4ca98693b9 [initrd] Add ability to reshuffle initrds into image list order
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 21:56:20 +00:00
Michael Brown 603455bb06 [libc] Relicense x86 string.h
No code from the original source remains within this file; relicense
under GPL2+ with a new copyright notice.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown 53f3deee06 [libc] Fix and externalise memswap()
Make memswap() behave correctly if called with a length of zero.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown de20c526e6 [libc] Reduce overall code size by externalising strlen()
Typical saving is 5-20 bytes in each file using strlen().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown 06766875ad [libc] Reduce overall code size by externalising strncmp()
Typical saving is 20-30 bytes in each file using strncmp().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown f8ece72fc9 [libc] Remove unnecessary "cld" instruction from memset()
Saving is one byte per call to memset().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown 61c6af3f0b [libc] Convert memcpy() from a macro to an inline function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown fc30b13b25 [libc] Reduce overall code size by externalising memmove()
Typical saving is 15-20 bytes in each file using memmove().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown 7cbac68593 [libc] Remove obsolete implementation of memcpy()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown 520323e360 [test] Add self-tests for string functions
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-12 16:58:49 +00:00
Michael Brown fd141fb669 [umalloc] Split largest_memblock() function out from init_eheap()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-06 17:44:40 +00:00
Michael Brown 1494d41d0a [uaccess] Add userptr_sub() to find the difference between two user pointers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-05 16:15:14 +00:00
Michael Brown 54a861a7bd [list] Reduce overall code size by externalising many list functions
Typical saving is 10-20 bytes in each file using list functions.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-02 16:21:06 +00:00
Thomas Miletich f68b4069b1 [build] Make version.o depend on the git index
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>
2012-11-02 15:00:09 +00:00
Michael Brown 4867085c0c [build] Include version number within only a single object file
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-11-02 14:46:39 +00:00
Michael Brown 0932bc5156 [build] Inhibit .eh_frame on newer gcc versions
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>
2012-11-02 13:41:50 +00:00
Michael Brown f008698c68 [build] Use -maccumulate-outgoing-args if required by gcc
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>
2012-11-02 13:41:44 +00:00
Michael Brown 6586e03fba [forcedeth] Increase TX ring size to prevent dropped packets
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>
2012-10-29 10:14:00 +00:00
Michael Brown 0c5e3df6d9 [intel] Poll RX queue if hardware reports RX overflow
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>
2012-10-28 18:53:23 +00:00
Michael Brown c4ee23e7c6 [hermon] Use PCI VPD for non-volatile option storage
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-25 08:24:00 -07:00
Michael Brown 2c011d77ae [readline] Allow readline_history() to return a meaningful status
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-24 23:24:43 -07:00
Michael Brown 88e19fcda9 [netdevice] Clear network device setting before unregistering
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>
2012-10-24 22:44:00 -07:00
Michael Brown 34863a51c2 [settings] Prefill existing setting value in "read" command
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>
2012-10-24 20:47:39 -07:00
Michael Brown 4dedccfa1f [readline] Allow a prefilled input string to be provided
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-24 20:42:42 -07:00
Michael Brown c86790df5c [settings] Add fetchf_named_setting_copy()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-24 20:42:42 -07:00
Michael Brown 947976da0c [netdevice] Do not force a poll on net_tx()
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>
2012-10-24 14:04:41 -07:00
Michael Brown dace457baf [intel] Report receive overruns via network device errors
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-24 11:21:34 -07:00
Michael Brown 7cf6c6bfed [efi] Add EFI_COMPONENT_NAME2_PROTOCOL instance for each SNP device
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-23 14:07:50 -07:00
Michael Brown 1d38168064 [autoboot] Avoid excess backspacing after displaying Ctrl-B prompt
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>
2012-10-23 14:07:50 -07:00
Michael Brown 0e7819d298 [efi] Add missing RC_TO_EFIRC() conversion
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-22 08:42:53 -07:00
Michael Brown a27413c82a [util] Fix uninitialised-variable warning in einfo.c
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-22 08:26:43 -07:00
Michael Brown 34a81da0c8 [test] Remove self-test for empty formatted setting value
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>
2012-10-20 14:44:34 -07:00
Michael Brown 885384faf3 [arp] Increase robustness of ARP discarder
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>
2012-10-19 23:03:38 +01:00
Michael Brown a4d1250810 [efi] Expose net device non-volatile settings via HII
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-16 15:10:52 +01:00
Michael Brown 41ea18a455 [efi] Split SNP HII functionality into a separate file
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-16 15:10:52 +01:00
Michael Brown 0fd29e15b5 [nvo] Expose nvo_applies()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-15 18:32:16 +01:00
Michael Brown 08a6ae86a2 [nvo] Expose non-volatile options block name
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-15 18:32:16 +01:00
Michael Brown 5ad445fd0b [settings] Treat an empty formatted value as meaning "delete setting"
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-15 18:32:16 +01:00
Michael Brown 1c2b6d29ea [settings] Expose find_child_settings()
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-15 18:32:16 +01:00
Michael Brown 51b65d5f9c [libc] Add wcslen() function
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-15 18:32:16 +01:00
Shao Miller a712dae709 [serial] Don't enable serial console without serial support
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>
2012-10-05 15:18:57 +01:00
Michael Brown fcdfe81764 [int13] Do not zero %edx when jumping to a boot sector
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>
2012-10-05 15:04:27 +01:00
Michael Brown bab0a4c1ce [efi] Mark SNP formset compliant with IBM's Unified Configuration Manager
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-05 13:24:07 +01:00
Michael Brown 40044f9d43 [contrib] Enable bochs debug port by default
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-05 13:24:07 +01:00
Michael Brown dcbbf54eb2 [contrib] Allow more space for Bochs option ROM
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-10-05 13:24:07 +01:00
Michael Brown d23db28488 [tls] Fix potential memory leak
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-09-28 10:54:07 +01:00
Michael Brown 1e199c8260 [tls] Fix uninitialised variable
Reported-by: Christian Hesse <list@eworm.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
2012-09-28 10:52:17 +01:00