summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* [romprefix] Add UNDI ROMID structure bus type fieldMichael Brown2008-08-271-0/+1
| | | | | The IBM iSCSI Firmware Initiator complains that we don't have a bus type field in the UNDI ROMID structure, so include one.
* [phantom] Fix P3 B1 silicon bug workaroundMichael Brown2008-08-271-1/+3
| | | | | | Commit f58cc3f introduced a temporary workaround for a bug in current prototype silicon, but failed to apply it to all eight PCI functions within the device.
* [util] Fix interpretation of short jumps in Option::ROMMichael Brown2008-08-271-1/+3
| | | | | | Option::ROM was assuming that ROM images using a short jump instruction for the init entry point would have a zero byte at offset 5; this is not necessarily true.
* [romprefix] Preserve %edi when issuing INT 1A,B101Michael Brown2008-08-261-1/+3
| | | | INT 1A,B101 (get PCI BIOS version) will overwrite %edi.
* [phantom] Remove comment that no longer matches realityMichael Brown2008-08-261-3/+0Star
|
* [romprefix] Add more diagnostic messages to ROM prefixMichael Brown2008-08-261-27/+28
| | | | | | | | | Include PMM allocation result in POST banner. Include full product string in "starting execution" message. Also mark ourselves as supporting DDIM in PnP header, for completeness.
* [phantom] Temporary workaround for bug in prototype (P3 B1) siliconMichael Brown2008-08-262-1/+14
|
* [romprefix] Fix regression in UNDI loaderMichael Brown2008-08-231-2/+2
| | | | | Commit 12f203c introduced a bug that caused the UNDI loader to attempt to load the UNDI code and data segments to incorrect addresses.
* [romprefix] On a PCI3.0, non-BBS system, use the correct %cs for INT19Michael Brown2008-08-221-26/+45
| | | | | | | | On a system that doesn't support BBS, we end up hooking INT19 to gain control of the boot process. If the system is PCI3.0, we must take care to use the runtime value for %cs, rather than the POST-time value, otherwise we end up pointing INT19 to the temporary option ROM POST scratch area.
* [elf] Add execution entry point debug messages for elf/multiboot imagesMichael Brown2008-08-222-0/+3
|
* [pxe] Add extra debug messages to the PXE UDP API callsMichael Brown2008-08-211-4/+16
|
* [pxe] Fix broadcast transmissions via PXENV_UDP_WRITEMichael Brown2008-08-211-0/+1
| | | | | pxenv_udp_write() needs to specify a net device, otherwise ipv4 is unable to route broadcast transmissions.
* [undi] Fill in ProtType correctly in PXENV_UNDI_ISRMichael Brown2008-08-205-65/+145
| | | | | | | | | Determine the network-layer packet type and fill it in for UNDI clients. This is required by some NBPs such as emBoot's winBoot/i. This change requires refactoring the link-layer portions of the gPXE netdevice API, so that it becomes possible to strip the link-layer header without passing the packet up the network stack.
* [undi] Work around broken UNDI polling behaviour in winBoot/iMichael Brown2008-08-201-3/+17
| | | | | | | | Some dumb NBPs (e.g. emBoot's winBoot/i) never call PXENV_UNDI_ISR with FuncFlag=PXENV_UNDI_ISR_START; they just sit in a tight polling loop merrily violating the PXE spec with repeated calls to PXENV_UNDI_ISR_IN_PROCESS. Force a extra calls to netdev_poll() to cope with these out-of-spec clients.
* [smbios] Print SMBIOS version number in debugging messagesMichael Brown2008-08-191-2/+2
|
* [pcbios] Support arbitrary splits of the e820 memory mapMichael Brown2008-08-185-360/+123Star
| | | | | | | | | | | | | | | | | | | | | | Allow for an arbitrary number of splits of the system memory map via INT 15,e820. Features of the new map-mangling algorithm include: Supports random access to e820 map entries. Requires only sequential access support from the underlying e820 map, even if our caller uses random access. Empty regions will always be stripped. Always terminates with %ebx=0, even if the underlying map terminates with CF=1. Allows for an arbitrary number of hidden regions, with underlying regions split into as many subregions as necessary. Total size increase to achieve this is 193 bytes.
* [pcbios] Prepare for multiple splits of hidden e820 memory regionsMichael Brown2008-08-182-2/+328
| | | | | | | | | | | | | | | | | | | Define a list of N allowed memory regions, and split each underlying e820 region into up to N subregions. Strip resulting empty regions out of the map, avoiding using the "return with CF set to strip last empty region" trick, because it seems that bootmgr.exe in Win2k8 gets upset if the memory map is terminated with CF set. This is an intermediate checkin that defines a single allowed memory region covering the entire 64-bit address space, and uses the existing map-mangling code on top of the new region-splitting code. This sanitises the memory map to the point that Win2k8 is able to boot even on a system that defines a final zero-length region at the 4GB mark. I'm checking this in because it may be useful for future debugging efforts to be able to run with the existing and known-working map mangling code together with the map sanitisation capabilities of the new map mangling code.
* [util] Allow Option::ROM to understand and modify initialisation entry pointMichael Brown2008-08-153-7/+66
| | | | | | | | | | | | | | Add support for manipulating the jump instruction that forms the option ROM initialisation entry point, so that mergerom.pl can treat it just like other entry points. Add support for merging the initialisation entry point (and IBM BOFM table) to mergerom.pl; this is another slightly icky but unfortunately necessary GPL vs. NDA workaround. When mergerom.pl replaces an entry point in the original ROM, it now fills in the corresponding entry point in the merged ROM with the original value; this allows (for example) a merged initialisation entry point to do some processing and then jump back to the original entry point.
* [settings] Avoid overwriting the start of .text in fetch_string_setting()Michael Brown2008-08-141-1/+2
| | | | | | | | | | fetch_string_setting() was subtracting one from the length of the to-be-NUL-terminated buffer in order to obtain the length of the unterminated buffer to be passed to fetch_setting(). This works extremely well unless the length of the to-be-NUL-terminated buffer is zero, at which point we end up giving fetch_setting() a buffer of length -1UL, thereby inviting it to overwrite as much memory as it wants...
* [dhcp] Do not restrict minimum retry time for ProxyDHCPREQUESTMichael Brown2008-08-131-0/+1
| | | | | | | | | | | The ProxyDHCPREQUEST is a unicast packet, so the first request will almost always be lost due to not having the IP address in the ARP cache. If the minimum retry time is set to one second (as per commit ff2b6a5), then ProxyDHCP will time out and give up before managing to successfully transmit a request. The DHCP timers need to be reworked anyway, so this mild hack is acceptable for now.
* [retry] Added configurable timeouts to retry timerAndrew Schran2008-08-124-13/+37
| | | | | | | | New min_timeout and max_timeout fields in struct retry_timer allow users of this timer to set their own desired minimum and maximum timeouts, without being constrained to a single global minimum and maximum. Users of the timer can still elect to use the default global values by leaving the min_timeout and max_timeout fields as 0.
* [iSCSI] Add support for mutual CHAPMichael Brown2008-08-116-82/+390
| | | | Allow initiator to verify target authentication using CHAP.
* [libc] Add missing __attribute__ (( format ( printf ) )) to ssnprintf()Michael Brown2008-08-111-1/+2
|
* [romprefix] Fix ROM image copy on PCI 3.0 BIOSesMichael Brown2008-08-061-1/+3
| | | | | | | Add the missing instructions to the code path that I never tested due to not having a PCI 3.0 system available. (D'oh)
* [pxe] If no ProxyDHCPACK exists, use DHCPACK for the fake ProxyDHCPACK packetMichael Brown2008-08-021-5/+3Star
| | | | | | | | | | | | | WinPE seems to have a bug that causes it to always use the TFTP server IP address and filename from the ProxyDHCPACK packet, even if the ProxyDHCPACK packet doesn't exist. This causes it to end up attempting to fetch a file such as tftp://0.0.0.0/bootmgr.exe If we don't have a ProxyDHCPACK to use, we pretend that it was a copy of the DHCPACK packet. This works around the problem, and hopefully won't surprise any NBPs.
* [dhcp] Work around a bug in Altiris RDPMichael Brown2008-08-011-2/+2
| | | | | | | Altiris erroneously cares about the ordering of DHCP options, and will get confused if we don't construct them in the order it expects. This is observed (so far) only when attempting to deploy 64-bit Win2k3.
* [virtio] Add legacy driver for KVM virtio-netStefan Hajnoczi2008-08-014-0/+723
| | | | | | | | This patch adds support for the virtio-net adapter provided by KVM. Written by Laurent Vivier <Laurent.Vivier@bull.net> for Etherboot. Wrapped as legacy driver for gPXE by Stefan Hajnoczi <stefanha@gmail.com>.
* [autoboot] Retain initial-slash (if present) when constructing TFTP URIsMichael Brown2008-07-312-3/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we boot from a DHCP-supplied filename, we previously relied on the fact that the current working URI is set to tftp://[next-server]/ in order to resolve the filename into a full tftp:// URI. However, this process will eliminate the distinction between filenames with and without initial slashes: cwuri="tftp://10.0.0.1/" filename="vmlinuz" => URI="tftp://10.0.0.1/vmlinuz" cwuri="tftp://10.0.0.1/" filename="/vmlinuz" => URI="tftp://10.0.0.1/vmlinuz" This distinction is important for some TFTP servers. We now explicitly construct a string of the form "tftp://[next-server]/filename" so that a filename with an initial slash will result in a URI containing a double-slash, e.g. "tftp://10.0.0.1//vmlinuz" The TFTP code always strips a single initial slash, and so ends up presenting the correct path to the server. URIs entered explicitly by users at the command line must include a double slash if they want an initial slash presented to the TFTP server: "kernel tftp://10.0.0.1/vmlinuz" => filename="vmlinuz" "kernel tftp://10.0.0.1//vmlinuz" => filename="/vmlinuz"
* [cleanup] Remove obsolete README.cvs fileMichael Brown2008-07-311-65/+0Star
|
* [util] Add mergerom.plMichael Brown2008-07-311-0/+80
| | | | | | | | | | | | | | This utility is required as a workaround for legal restrictions on including GPL and non-GPL code within the same expansion ROM image. While this is not encouraged, we are prepared to accept that concatenation of ROM images and updating of the ROM header data structures can be classed as "mere aggregation" within the terms of the GPL. If in any doubt, assume that you cannot include GPL and non-GPL code within the same expansion ROM image. Contact the Etherboot team for clarification on your specific circumstances.
* [util] Add Option::ROM library and rewrite disrom.pl to use it.Michael Brown2008-07-312-100/+520
| | | | | The Option::ROM module provides an easy way to read and edit fields within option ROM headers.
* [ftp] Terminate processing after receiving an errorSergey Vlasov2008-07-301-0/+1
| | | | | | | | | When an error reply (not 1xx, 2xx or 3xx) was received, ftp_reply() invoked ftp_done() to close connections, but did not return, and the rest of code in this function could try to send commands to the closed control connection. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
* [ftp] Cope with RETR completion prior to all data receivedMichael Brown2008-07-301-15/+33
| | | | | | | | | | | | Based on a patch contributed by Sergey Vlasov <vsu@altlinux.ru> : In my testing with "qemu -net user" the 226 response to RETR was often received earlier than final packets of the data connection; this caused the received file to become truncated without any error indication. Fix this by adding an intermediate state FTP_TRANSFER between FTP_RETR and FTP_QUIT, so that the transfer is considered to be complete only when both the end of data connection is encountered and the final reply to the RETR command is received.
* [romprefix] Update PCI ROM structure to PCI 3.0Michael Brown2008-07-301-20/+84
|
* [prefix] Reasonable value for lkrn initrd_addr_maxStefan Hajnoczi2008-07-301-2/+8
| | | | | | | | | | | H. Peter Anvin <hpa@zytor.com> sent word that Sergey Vlasov <vsu@altlinux.ru> discovered gPXE lkrn images fail to load in SYSLINUX 3.70 because we have initrd_addr_max zeroed. This patch sets the same value as the Linux kernel. Also change the header jmp instruction to use a hardcoded opcode value like Linux does. Just in case the assembler decides to use a three-byte instruction instead of the desired two-byte jmp.
* [smbios] Add named settings for manufacturer, product name, and serial no.Michael Brown2008-07-271-0/+28
|
* [cmdline] Add setting expansion using ${...} syntaxMichael Brown2008-07-271-2/+96
| | | | | | | | | Allow settings to be expanded in arbitrary commands, such as kernel http://10.0.0.1/boot.php?uuid=${uuid} Also add the "echo" command, as being the easiest way to test this features.
* [ui] Add progress dots while waiting on any foreground jobMichael Brown2008-07-241-3/+10
| | | | | | | | | Print one dot per second while waiting in monojob.c (e.g. for DHCP, for file downloads, etc.), to inform user that the system has not locked up. Patch contributed by Andrew Schran <aschran@google.com>, minor modification by me.
* [cmdline] Minor tidy-ups to shell_banner.cMichael Brown2008-07-241-4/+4
|
* [cmdline] Added configurable shell banner timeoutAndrew Schran2008-07-242-5/+8
| | | | | | This change allows the time for which shell banners are displayed to be configured in the config.h file. The ability to access the shell can also be effectively disabled by setting this timeout to zero.
* [tg3] Added support for tg3-5754.Andrew Schran2008-07-243-25/+67
| | | | | | | In tg3_chip_reset(), the PCI_EXPRESS change is taken from the Linux tg3 driver. I am not sure what exactly it does (it is not documented in the Linux driver), but it is necessary for the NIC to work correctly.
* [makefile] Suppress "No such file or directory" warnings at start of buildMichael Brown2008-07-241-2/+2
| | | | | | | | Use "-include" rather than "include" for the generated Makefile fragments, in order to suppress the long list of warnings that otherwise appears at the start of a clean build. Contributed by Edward Waugh <ewaugh@netxen.com>
* [phantom] Add new board typeMichael Brown2008-07-242-0/+2
|
* [iSCSI] Support Windows Server 2008 direct iSCSI installationMichael Brown2008-07-1718-51/+115
| | | | | | | | | | | | | Add yet another ugly hack to iscsiboot.c, this time to allow the user to inhibit the shutdown/removal of the iSCSI INT13 device (and the network devices, since they are required for the iSCSI device to function). On the plus side, the fact that shutdown() now takes flags to differentiate between shutdown-for-exit and shutdown-for-boot means that another ugly hack (to allow returning via the PXE stack on BIOSes that have broken INT 18 calls) will be easier. I feel dirty.
* [phantom] Guard against partially-written status descriptorsMichael Brown2008-07-171-15/+28
| | | | | | | | | | | Conjecture: The hardware issues 64-bit DMA writes of status descriptors, which some PCI bridges seem to split into two 32-bit writes in reverse order (i.e. dword 1 first). This means that we sometimes observe a partial status descriptor. Add an explicit check to ensure that the descriptor is complete before processing it. Also ensure that the RDS consumer counter is incremented only when we know that we have actually consumed an RX descriptor.
* [int13] Pairwise swap drive numbers, instead of shifting all drive numbersMichael Brown2008-07-162-22/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shifting all INT13 drive numbers causes problems on systems that use a sparse drive number space (e.g. qemu BIOS, which uses 0xe0 for the CD-ROM drive). The strategy now is: Each drive is assigned a "natural" drive number, being the next available drive number in the system (based on the BIOS drive count). Each drive is accessed using its specified drive number. If the specified drive number is -1, the natural drive number will be used. Accesses to the specified drive number will be delivered to the emulated drive, masking out any preexisting drive using this number. Accesses to the natural drive number, if different, will be remapped to the masked-out drive. The overall upshot is that, for examples: System has no drives. Emulated INT13 drive gets natural number 0x80 and specified number 0x80. Accesses to drive 0x80 go to the emulated drive, and there is no remapping. System has one drive. Emulated INT13 drive gets natural number 0x81 and specified number 0x80. Accesses to drive 0x80 go to the emulated drive. Accesses to drive 0x81 get remapped to the original drive 0x80.
* [udp] Avoid reusing auto-allocated ports after connection close.Michael Brown2008-07-101-2/+3
| | | | | This duplicates a fix made to tcp.c in commit d5735c631cf26d8e1bcf7b5e635623b52d6b48aa.
* [dhcp] Verify DHCP server source portMichael Brown2008-07-101-16/+45
| | | | | | Verifying server ID and DHCP transaction ID is insufficient to differentiate between DHCPACK and ProxyDHCPACK when the DHCP server and Proxy DHCP server are the same machine.
* [forcedeth] Add support for PCI ID 10de:0373Andrew Schran2008-07-101-0/+4
|
* [hermon] Add support for MT26418 deviceMichael Brown2008-07-091-0/+1
| | | | | PCI ID supplied (and tested) by Frederic Temporelli <frederic.temporelli@bull.net>