summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [mtnic] Add multiport support and some minor fixesItay Gazit2009-02-092-600/+702
| | | | Signed-off-by: Michael Brown <mcb30@etherboot.org>
* [sundance] Added NIC variantThomas Miletich2009-02-061-0/+1
| | | | | | | | | This previously unsupported NIC variant was was found to work using the current driver: PCI_ROM(0x13f0, 0x0200, "ip100a", "IC+ IP100A"), Signed-off-by: Marty Connor <mdc@etherboot.org>
* [pxe] Display the "Press F8" prompt rather than displaying menu with timeoutMichael Brown2009-02-051-58/+112
| | | | | | | | | | | The PXE spec dictates the rather ugly feature that we have to present a DHCP-specified prompt string to the user, then wait to see if they press F8 before displaying the menu. This seems to me to be a significant retrograde step from the current situation of displaying the menu with the timeout counting down against the default selected boot option, but apparently the lack of the "Press F8" prompt causes some confusion.
* [pxe] Obey lists of PXE Boot Servers and associated Discovery Control bitsMichael Brown2009-02-056-62/+195
| | | | | | | | Various combinations of options 43.6, 43.7 and 43.8 dictate which servers we send Boot Server Discovery requests to, and which servers we should accept responses from. Obey these options, and remove the explicit specification of a single Boot Server from start_pxebs() and dependent functions.
* [pxe] Skip PXE boot server discovery if directed to do soMichael Brown2009-02-052-6/+30
| | | | | Option 43.6 can direct us to skip PXE boot server discovery and just perform a standard DHCP filename boot.
* [pxe] Fall back to broadcast if no boot server multicast address existsMichael Brown2009-02-031-1/+2
| | | | | fetch_ipv4_setting() will zero its IPv4 address argument if no such setting exists, rather than leaving it untouched.
* [iobuf] Add iob_disown() and use it where it simplifies codeMichael Brown2009-02-018-18/+31
| | | | | | | | | | | | | | | | | | | | | | | | | There are many functions that take ownership of the I/O buffer they are passed as a parameter. The caller should not retain a pointer to the I/O buffer. Use iob_disown() to automatically nullify the caller's pointer, e.g.: xfer_deliver_iob ( xfer, iob_disown ( iobuf ) ); This will ensure that iobuf is set to NULL for any code after the call to xfer_deliver_iob(). iob_disown() is currently used only in places where it simplifies the code, by avoiding an extra line explicitly setting the I/O buffer pointer to NULL. It should ideally be used with each call to any function that takes ownership of an I/O buffer. (The SSA optimisations will ensure that use of iob_disown() gets optimised away in cases where the caller makes no further use of the I/O buffer pointer anyway.) If gcc ever introduces an __attribute__((free)), indicating that use of a function argument after a function call should generate a warning, then we should use this to identify all applicable function call sites, and add iob_disown() as necessary.
* [contrib] Update qemu documentationMichael Brown2009-02-011-18/+11Star
|
* [dhcp] Send user class in DHCP requestsMichael Brown2009-02-013-3/+29
|
* [tftp] Guard against invalid data block numbersMichael Brown2009-02-011-0/+5
| | | | | | | | A TFTP DATA packet with a block number of zero (representing a negative offset within the file) could potentially cause problems. Fixed by explicitly rejecting such packets. Identified by Stefan Hajnoczi <stefanha@gmail.com>.
* [dhcp] Split PXE menuing code out of dhcp.cMichael Brown2009-02-0117-961/+1367
| | | | | | | | | The DHCP client code now implements only the mechanism of the DHCP and PXE Boot Server protocols. Boot Server Discovery can be initiated manually using the "pxebs" command. The menuing code is separated out into a user-level function on a par with boot_root_path(), and is entered in preference to a normal filename boot if the DHCP vendor class is "PXEClient" and the PXE boot menu option exists.
* [settings] Avoid duplicate settings block namesMichael Brown2009-01-311-0/+5
| | | | | | | Automatically unregister any settings with the same name (and position within the settings tree) as a newly registered settings block. This functionality is generalised out from dhcp.c.
* [scsi] Cope with targets that send multiple CHECK CONDITIONS at power-onMichael Brown2009-01-301-5/+19
| | | | | | | | | | | | | | | Some targets send a spurious CHECK CONDITION message in response to the first SCSI command. We issue (and ignore the status of) an arbitary harmless SCSI command (a READ CAPACITY (10)) in order to draw out this response. The Solaris Comstar target seems to send more than one spurious CHECK CONDITION response. Attempt up to SCSI_MAX_DUMMY_READ_CAP dummy READ CAPACITY (10) commands before assuming that error responses are meaningful. Problem reported by Kristof Van Doorsselaere <kvandoor@aserver.com> and Shiva Shankar <802.11e@gmail.com>.
* [ui] Allow Ctrl-C to cancel wait for net device link-upMichael Brown2009-01-271-0/+9
| | | | | This really ought to be handled via monojob.c and the usual Ctrl-C mechanism that handles cancelling DHCP or file downloads.
* [dns] Append local domain to relative namesStefan Hajnoczi2009-01-272-11/+66
| | | | | | | | | | | | | | | Try to qualify relative names in the DNS resolver using the DHCP Domain Name. For example: DHCP Domain Name: etherboot.org (Relative) Name: www yields: www.etherboot.org Only names with no dots ('.') will be modified. A name with one or more dots is unchanged.
* [settings] Add fetch_string_setting_copy()Michael Brown2009-01-272-0/+35
|
* [tftp] Temporary fix for conveying TFTP block size to callersMichael Brown2009-01-272-8/+23
| | | | | | | | | | | | | | | | | | | | | pxe_tftp.c assumes that the first seek on its data-transfer interface represents the block size. Apart from being an ugly hack, this will also screw up file size calculation for files smaller than one block. The proper solution would be to extend the data-transfer interface to support the reporting of stat()-like data. This is not going to happen until the cost of adding interface methods is reduced (a fix I have planned since June 2008). In the meantime, abuse the xfer_window() method to return the block size, since it is not being used for anything else and is vaguely justifiable. Astonishingly, having returned the incorrect TFTP blocksize via PXENV_TFTP_OPEN for almost a year seems not to have affected any of the test cases run during that time; this bug was found only when someone tried running the heavily-patched version of pxegrub found in OpenSolaris.
* [dhcp] Include support for PXE boot menusMichael Brown2009-01-252-14/+197
| | | | | | | | | PXE dictates a mechanism for boot menuing, involving prompting the user with a variable message, waiting for a predefined keypress, displaying a boot menu, and waiting for a selection. This breaks the currently desirable abstraction that DHCP is a process that can happen in the background without any user interaction.
* [bios] Add F8 function key as a recognised BIOS keycodeMichael Brown2009-01-251-1/+3
|
* [console] Allow KEY_xxx constants to cover F8 function keyMichael Brown2009-01-252-22/+21Star
| | | | | | | F8 is represented by the ANSI escape sequence "^[[19~", which is not representable as a KEY_xxx constant using the current encoding scheme. Adapt the encoding scheme to allow F8 to be represented, since PXE requires that we may need to prompt the user to press F8.
* [dhcp] Clarify language surrounding ProxyDHCPMichael Brown2009-01-232-55/+56
| | | | | | Remove the lazy assumption that ProxyDHCP == "DHCP with option 60 set to PXEClient", and explicitly separate the notion of ProxyDHCP from the notion of packets containing PXE options.
* [dhcp] Handle missing ProxyDHCP serversMichael Brown2009-01-231-1/+8
| | | | | | | | | | | | | | | | It is possible to configure a DHCP server to hand out PXE options without a ProxyDHCP server present. This requires setting option 60 to "PXEClient", which will cause gPXE to attempt ProxyDHCP. We assume in several places that dhcp->proxydhcpack is set to the DHCPACK packet containing option 60 set to "PXEClient". When we transition into ProxyDHCPREQUEST, set dhcp->proxydhcpack=dhcp->dhcpack so that this assumption holds true. We ought to rename several references to "proxydhcp" to something more accurate, such as "pxedhcp". Treating a single DHCP response as potentially both DHCPOFFER and ProxyDHCPOFFER does make the code smaller, but the variable names get confusing.
* [dhcp] Pass PXE boot menu item to PXE Boot ServerMichael Brown2009-01-233-75/+133
| | | | | | | | Pick out the first boot menu item from the boot menu (option 43.9) and pass it to the boot server as the boot menu item (option 43.71). Also improve DHCP debug messages to include more details of the packets being transmitted.
* [tcp] Always set PUSH flag on TCP transmissionsMichael Brown2009-01-211-1/+1
| | | | | | | | | Apparently this can cause a major speedup on some iSCSI targets, which will otherwise wait for a timer to expire before responding. It doesn't seem to hurt other simple TCP test cases (e.g. HTTP downloads). Problem and solution identified by Shiva Shankar <802.11e@gmail.com>
* [dhcp] Add preliminary support for PXE Boot ServersMichael Brown2009-01-213-1/+109
| | | | | | | | | Some PXE configurations require us to perform a third DHCP transaction (in addition to the real DHCP transaction and the ProxyDHCP transaction) in order to retrieve information from a "Boot Server". This is an experimental implementation, since the actual behaviour is not well specified in the PXE spec.
* [tcpip] Allow for transmission to multicast IPv4 addressesMichael Brown2009-01-217-20/+29
| | | | | | | | | | | When sending to a multicast address, it may be necessary to specify the source address explicitly, since the multicast destination address does not provide enough information to deduce the source address via the miniroute table. Allow the source address specified via the data-xfer metadata to be passed down through the TCP/IP stack to the IPv4 layer, which can use it as a default source address.
* [ethernet] Fix eth_mc_hash() return statusMichael Brown2009-01-211-0/+1
| | | | | eth_mc_hash() was missing a return within a switch statement, and so always falling through to the default case and returning failure.
* [dhcp] Centralise DHCP successful state transitionsMichael Brown2009-01-211-19/+35
| | | | | | | Move all the DHCP state transition logic into a single function dhcp_next_state(). This will make it easier to add support for PXE Boot Servers, since it abstracts away the difference between "mark DHCP as complete" and "transition to boot server discovery".
* [dhcp] Allow for missing server ID in ProxyDHCPACKMichael Brown2009-01-211-9/+13
| | | | | | | | | | | | The Linux PXE server (http://www.kano.org.uk/projects/pxe) does not set the server identifier in its ProxyDHCP responses. If the server ID is missing, do not treat this as an error. This resolves the "vague and unsettling memory" mentioned in commit fdb8481d ("[dhcp] Verify server identifier on ProxyDHCPACKs"). Note that we already accept ProxyDHCPOFFERs without a server identifier; they get treated as potential BOOTP packets.
* [efi] Expose both GUIDs for the EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOLMichael Brown2009-01-121-7/+12
| | | | | | | At some point, it seems that someone decided to change the GUID for the EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL. Current EFI builds ignore the older GUID, older EFI builds ignore the newer GUID, so we have to expose both.
* [efi] Add an EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL interfaceMichael Brown2009-01-122-0/+98
| | | | | This allegedly optional interface seems to be compulsory if you want EFI's PXE code to bother trying to use your network interface.
* [efi] Provide component name protocol and device path protocol interfacesMichael Brown2009-01-122-22/+325
| | | | | | | | | | | | | | Include a minimal component name protocol so that the driver name shows up as something other than "<UNKNOWN>" in the driver list, and a device path protocol so that the network interface shows up as a separate device in the device list, rather than being attached directly to the PCI device. Incidentally, the EFI component name protocol reaches new depths for signal-to-noise ratio in program code. A typical instance within the EFI development kit will use an additional 300 lines of code to provide slightly less functionality than GNU gettext achieves with three additional characters.
* [efi] Ensure EFI ROM checksum is zeroMichael Brown2009-01-091-101/+60Star
| | | | | | | The UEFI specification does not mention ROM checksums, and reassigns the field typically used as a checksum byte. The UEFI shell "loadpcirom" utility does not verify ROM checksums, but it seems that some UEFI BIOSes do.
* [util] Tidy up output of disrom.plMichael Brown2009-01-091-21/+26
|
* [dhcp] Include gPXE version number within DHCP requestMichael Brown2009-01-084-10/+21
|
* [main] Print an "initialising devices" bannerMichael Brown2009-01-081-0/+3
| | | | | | | | | | | Some devices take a very long time to initialise. This can make it difficult to visually distinguish between the error cases of failing to start executing C code and failing to initialise a device. Add a "gPXE initialising devices..." message. The trailing ellipsis indicates to the user that this may take some time, and the presence of the message indicates to the developer that relocation etc. all succeeded.
* [efi] Add efirom utility and .efirom image formatMichael Brown2009-01-087-44/+939
|
* [efi] Allow for .efidrv images as well as .efi imagesMichael Brown2009-01-087-43/+172
| | | | | | Merge in the changes that allow for building EFI driver images (that can be loaded using the EFI shell's "load" command) as well as EFI applications.
* [efi] Use elf2efi utility in place of efilinkMichael Brown2009-01-0716-1258/+939Star
| | | | | | | | | | | elf2efi converts a suitable ELF executable (containing relocation information, and with appropriate virtual addresses) into an EFI executable. It is less tightly coupled with the gPXE build process and, in particular, does not require the use of a hand-crafted PE image header in efiprefix.S. elf2efi correctly handles .bss sections, which significantly reduces the size of the gPXE EFI executable.
* [build] Avoid strict-aliasing warnings when building with gcc 4.4Michael Brown2009-01-066-7/+6Star
| | | | | | | Conventional usage of the various struct sockaddr_xxx types involves liberal use of casting, which tends to trigger strict-aliasing warnings from gcc. Avoid these now and in future by marking all the relevant types with __attribute__((may_alias)).
* [efi] Inhibit harmless ld warning on unresolved symbol checkMichael Brown2009-01-052-2/+4
| | | | | | | | The check for unresolved symbols does not explicitly specify an output architecture format, and so causes a warning when building an i386 EFI binary on an x86_64 platform. This warning is harmless, and specifying the output architecture in multiple places is cumbersome, so just inhibit the warning.
* [infiniband] Call ib_open() only when opening the IPoIB net deviceMichael Brown2009-01-025-28/+60
| | | | | Defer the call to ib_open() until we want to actually open the device, rather than when the device is registered.
* [pcbios] Add additional sanity check for bogus e820 mapMarty Connor2008-12-181-0/+7
| | | | | | | | | | At POST time some BIOSes return invalid e820 maps even though they indicate that the data is valid. We add a check that the first region returned by e820 is RAM type and declare the map to be invalid if it is not. This extends the sanity checks from 8b20e5d ("[pcbios] Sanity-check the INT15,e820 and INT15,e801 memory maps").
* [etherfabric] Make use of pci_bar_start() 64-bit cleanMichael Brown2008-12-121-2/+3
| | | | | | | | Driver was storing the result of pci_bar_start() and pci_bar_size() in an int, rather than an unsigned long. (Bug was introduced in the vendor's tree in commit eac85cd "Port etherfabric driver to net_device api".)
* [pci] Enable memory cycles in adjust_pci_device()Michael Brown2008-12-121-1/+2
| | | | | | | adjust_pci_device() has historically enabled bus-mastering and I/O cycles, but has never previously needed to enable memory cycles. Some EFI systems seem not to enable memory cycles by default, so add that to the list of PCI command register bits that we force on.
* [e1000] Use PCI_BASE_ADDRESS_* symbols instead of integersMarty Connor2008-12-051-2/+2
| | | | | | | | | | | When compiling for the Linux kernel, PCI_BASE_ADDRESS_0 == 0, and PCI_BASE_ADDRESS_1 == 1. This is not so when compiling for gPXE. We must use the symbolic names rather than integers to get the correct values. Bug identified and patch supplied by: George Chou <george.chou@advantech.com>
* [x86_64] Add support for compilation as an x86_64 binaryMichael Brown2008-12-0534-51/+997
| | | | | | | | | | | | Currently the only supported platform for x86_64 is EFI. Building an EFI64 gPXE requires a version of gcc that supports __attribute__((ms_abi)). This currently means a development build of gcc; the feature should be present when gcc 4.4 is released. In the meantime; you can grab a suitable gcc tree from git://git.etherboot.org/scm/people/mcb30/gcc/.git
* [hermon] Fix permissions broken in 3a799e9 ("Add PCI ID for ConnectX QDR card")Michael Brown2008-12-051-0/+0
| | | | | | The patch file supplied for commit 3a799e9 ("[hermon] Add PCI ID for ConnectX QDR card") accidentally marked drivers/infiniband/hermon.c as being executable.
* [efi] Use EFI-native mechanism for accessing SMBIOS tableMichael Brown2008-12-0515-180/+376
| | | | | | EFI provides a copy of the SMBIOS table accessible via the EFI system table, which we should use instead of manually scanning through the F000:0000 segment.
* [efi] Allow use of EFI configuration tablesMichael Brown2008-12-052-4/+78
| | | | | | | EFI passes in copies of SMBIOS and other system configuration tables via the EFI system table. Allow configuration tables to be requested using a mechanism similar to the current method for requesting EFI protocols.