summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* [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>
* [phantom] Remove warning relating to now-fixed firmware bugMichael Brown2008-07-081-11/+0Star
|
* [phantom] Add NetXen dual copyrightMichael Brown2008-07-083-0/+21
|
* [phantom] Initialise RCVPEG before reading MAC addressesMichael Brown2008-07-081-4/+4
|
* [image] Fail "imgexec"/"boot" if the image to execute is ambiguousMichael Brown2008-07-082-6/+10
| | | | | | | | | | | | | | | If there is more than one loaded image, refuse to automatically select the image to execute. There are at least two possible cases, with different "correct" answers: 1. User loads image A by mistake, then loads image B and types "boot". User wants to execute image B. 2. User loads image A, then loads image B (which patches image A), then types "boot". User wants to execute image A. If a user actually wants to load multiple images, they must explicitly specify which image is to be executed.
* [image] Revert "clear LOADED flag" patchMichael Brown2008-07-081-10/+1Star
| | | | | | | | | Clearing the LOADED flag actually prevents users from doing clever things such as loading an image, then loading a patch image, then executing the first image. (image_exec() checks for IMAGE_LOADED, so this sequence of operations will fail if the LOADED flag gets cleared.) This reverts commit 14c080020fb37cb34fe74213393f47bd2ad8b9bc.
* [image] Clear LOADED flag on all other images when loading a new imageMichael Brown2008-07-081-1/+10
| | | | | | Loading an image may overwrite part or all of any previously-loaded images, so we should clear the LOADED flag for all images prior to attempting to load a new image.
* [settings] Allow "config" command to access root settings blockMichael Brown2008-07-081-7/+7
|
* [bzimage] Kill off the initrd image typeMichael Brown2008-07-084-76/+6Star
| | | | | | | We can just treat all non-kernel images as initrds, which matches our behaviour for multiboot kernels. This allows us to eliminate initrd as an image type, and treat the "initrd" command as just another synonym for "imgfetch".
* [dhcp] Allow DHCP non-option settings to be clearedMichael Brown2008-07-081-0/+3
| | | | | | dhcppkt_store() is supposed to clear the setting if passed NULL for the setting data. In the case of fixed-location fields (e.g. client IP address), this requires setting the content of the field to all-zeros.
* [phantom] Add support for NetXen Phantom NICsMichael Brown2008-07-057-0/+3067
|
* [tftp] Strip the initial '/' to keep Windows TFTP servers happy.Michael Brown2008-07-031-6/+19
|
* [i386] Change semantics of __from_data16 and __from_text16Michael Brown2008-07-019-30/+23Star
| | | | | | | | | __from_data16 and __from_text16 now take a pointer to a .data16/.text16 variable, and return the real-mode offset within the appropriate segment. This matches the use case for every occurrence of these macros, and prevents potential future bugs such as that fixed in commit d51d80f. (The bug arose essentially because "&pointer" is still syntactically valid.)
* [pxe] Fix a typo in PXENV_GET_CACHED_INFO that broke AltirisMichael Brown2008-07-011-1/+1
| | | | | | __from_data16 takes the value pointed to, rather than the pointer itself. This was silently causing gPXE to return a dud buffer pointer when the caller did not supply a buffer for PXENV_GET_CACHED_INFO.
* [dhcp] Verify server identifier on ProxyDHCPACKsMichael Brown2008-07-011-7/+25
| | | | | | | | | | Perform the same test for a matching DHCP_SERVER_IDENTIFIER on ProxyDHCPACKs as we do for DHCPACKs. Otherwise, a retransmitted DHCPACK can end up being treated as the ProxyDHCPACK. I have a vague and unsettling memory that this test was deliberately omitted, but I can't remember why, and can't find anything in the VC logs.
* [Config] remove src/ConfigH. Peter Anvin2008-06-303-381/+1Star
| | | | | | | Remove src/Config as it has no more users, and conflicts with src/config on case-deficient filesystems. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* [ns8390] Use stub files instead of src/ConfigH. Peter Anvin2008-06-305-6/+23
| | | | | | | | | | | ns8390.c can produce four different drivers (one PCI, three ISA.) The ISA driver requires setting a few macros; do that by setting defines in stub files instead of using src/Config. Currently, all the ISA drivers are broken (they were not enabled by default), so #if 0 them out. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* [lkrnprefix] Make gPXE .lkrn images conform to the zImage 2.07 formatStefan Hajnoczi2008-06-301-39/+88
|
* [bzImage] Support loading zImage kernelsStefan Hajnoczi2008-06-301-1/+3
| | | | | zImage kernels require the real-mode portion to be loaded at 9000:0000 rather than 1000:0000.
* [GDB] Provide functions to manually enter GDB stub.Stefan Hajnoczi2008-06-304-32/+79
|
* [GDB] Obey flow control when GDB connects.Stefan Hajnoczi2008-06-301-0/+4
|
* [GDB] Remove unused DR6 debug register variableStefan Hajnoczi2008-06-301-4/+3Star
|
* [GDB] UDP clean up and add netdev refcntStefan Hajnoczi2008-06-301-19/+47
|
* [GDB] Zero-extend 16-bit segment registersStefan Hajnoczi2008-06-302-8/+14
| | | | | | | When the 16-bit segment registers are accessed using 32-bit instructions the high order bytes are undefined on older CPUs. We now explicitly zero the high order bytes when snapshotting the CPU state. This ensures that the GDB stub reports consistent values for the segment registers.
* [GDB] Add copyright header for gdbmach.cStefan Hajnoczi2008-06-301-0/+24
|
* [GDB] Add watch and rwatch hardware watchpointsStefan Hajnoczi2008-06-307-2/+221
|
* [GDB] Remote debugging over UDPStefan Hajnoczi2008-06-308-50/+501
| | | | | | | | | | | | | | | | | This commit implements GDB over UDP. Using UDP is more complex than serial and has required some restructuring. The GDB stub is now built using one or both of GDBSERIAL and GDBUDP config.h options. To enter the debugger, execute the gPXE shell command: gdbstub <transport> [<options>...] Where <transport> is "serial" or "udp". For "udp", the name of a configured network device is required: gdbstub udp net0 The GDB stub listens on UDP port 43770 by default.
* [GDB] Atomic read/write for device memoryStefan Hajnoczi2008-06-301-13/+53
|
* [GDB] Handle kill and detach packets.Stefan Hajnoczi2008-06-303-5/+19
| | | | | This commit also includes a test to ensure that single stepping works, since continue, kill, detach, and single step all share code.
* [romprefix] Fix PMM detection start addressMichael Brown2008-06-291-1/+1
| | | | | | | | | Commit fd0aef9 introduced a typo that caused PMM detection to start at paragraph 0xe00 rather than 0xe000. (Detection would still work, since it would scan until it ran out of base memory, but it would end up scanning an unnecessarily large portion of base memory.) Spotted by Sebastian Herbszt <herbszt@gmx.de>.
* [nvs] Add support for ST M25P32 SPI flash devicesMichael Brown2008-06-271-0/+9
|
* [misc] Fix building on OpenBSDMichael Brown2008-06-272-4/+3Star
| | | | | | | OpenBSD throws compiler warnings that we can't reproduce on Linux, for some reason. Original patch from Dewey Hylton <dewey@hyltown.com>.
* [a20] Send a null command to the KBC after changing A20H. Peter Anvin2008-06-271-0/+3
| | | | | | | | | | | | Send a null command, specifically "pulse outputs" with no outputs selected, to the KBC after changing A20. This was apparently done by DOS, presumably as a synchronization hack, and the authors of the UHCI spec thought it was inherent. Therefore, there are systems out there (e.g. HP DL360 G5) which will stop responsing to "legacy USB" unless they see the null command, 0xFF, written to port 0x64 at the end of the A20 toggling sequence. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* [libc] Remove unused le32_to_cpup(x) and cpu_to_le16p() macrosMichael Brown2008-06-271-3/+0Star
| | | | | If we ever need these macros, they should be defined in include/{big,little}_bswap.h, and the whole family should be defined.
* [tg3] Recognize the BCM5789Steven Walter2008-06-271-0/+1
| | | | | | Add an entry to tg3_nics for the BCM5789 Signed-off-by: Steven Walter <stevenrwalter@gmail.com>
* [cmdline] Fix image command-line construction for zero-length argument listsMichael Brown2008-06-271-5/+8
| | | | This fixes a bug introduced in commit 4c85017.
* [script] Remove arbitrary limit on script line lengthsMichael Brown2008-06-182-28/+36
|
* [legacy] Align legacy drivers' __shared data to the maximum possibleMichael Brown2008-06-141-1/+1
| | | | | | | | | | | | | | Some drivers that still use the legacy-driver wrapper (tg3 in particular) apparently do not specify their alignment constraints properly. This hack forces any __shared data to be maximally aligned. Note that this provides only 16-byte alignment; it is not possible to request alignment to any greater than 16 bytes using __attribute__((aligned)), since the relocation code will preserve only 16 byte alignment (and operation under -DKEEP_IT_REAL cannot preserve more that 16 byte alignment). Idea proposed by Tim Hockin <thockin@google.com>
* [prefix] When we have to hook INT 19, chain to original handler if possibleMichael Brown2008-06-141-2/+14
| | | | | | | | When the BIOS doesn't support BBS, hooking INT 19 is the only way to add ourselves as a boot device. If we have to do this, we should at least try to chain to the original INT 19 vector if our boot fails. Idea suggested by Andrew Schran <aschran@google.com>
* [via-rhine] Fix erroneous uses of memory I/O instead of port I/OStefan Hajnoczi2008-06-121-3/+3
|
* [cleanup] Remove long-obsolete gpxe/async.h header fileMichael Brown2008-06-122-229/+0Star
|
* [bzimage] Support kernel command lines of greater than 256 charactersMichael Brown2008-06-122-2/+18
| | | | | | 2.6.22+ kernels have an extra field in the bzimage_header structure to indicate the maximum permitted command-line length. Use this if it is available.
* [cmdline] Remove arbitrary limit on the length of image command linesMichael Brown2008-06-121-8/+17
|
* [smbios] Fix SMBIOS string fetchingMichael Brown2008-06-111-4/+2Star
| | | | | | | | A bug in read_smbios_string() was causing the starting offset of the SMBIOS structure to be added twice, resulting in completely the wrong strings being returned. Bug identified by Martin Herweg <m.herweg@gmx.de>
* [slam] Add support for SLAM window lengths of greater than one packetMichael Brown2008-06-111-11/+30
| | | | | | | | | | | Add the definition of SLAM_MAX_BLOCKS_PER_NACK, which is roughly equivalent to a TCP window size; it represents the maximum number of packets that will be requested in a single NACK. Note that, to keep the code size down, we still limit ourselves to requesting only a single range per NACK; if the missing-block list is discontiguous then we may request fewer than SLAM_MAX_BLOCKS_PER_NACK blocks.
* [console] Call cpu_nap() only if there is no input waitingMichael Brown2008-06-111-6/+8
| | | | | | | | | | | | | | | | | | | | Avoid calling cpu_nap() until after we have determined that there is no input ready to read. This avoids delaying for one timer interrupt (~50ms) in the case of if ( iskey() ) char = getkey() which happens to be present in monojob.c, which is where we spend most of our time looping (e.g. during any download). This should eliminate the irritating tendency of gPXE to lose keypresses. Discovered on a Dell system where the serial port seems to send in a constant stream of 0xff characters; this wouldn't be a problem in itself except that each one triggers the 50ms delay (as mentioned above), which really kills performance.