summaryrefslogtreecommitdiffstats
path: root/src/core
Commit message (Collapse)AuthorAgeFilesLines
* [image] Allow for zero embedded imagesMichael Brown2009-02-241-6/+10
| | | | | | | | | | | | | | | | | | Having a default script containing #!gpxe autoboot can cause problems when entering commands to load and start a kernel manually; the default script image will still be present when the kernel is started and so will be treated as an initrd. It is possible to work around this by typing "imgfree" before any other commands, but this is counter-intuitive. Fix by allowing the embedded image list to be empty (in which case we just call autoboot()), and making this the default. Reported by alkisg@gmail.com.
* [login] Add "login" command and UIMichael Brown2009-02-171-0/+3
|
* [settings] Allow store_setting() to access the root settings blockMichael Brown2009-02-171-3/+3
|
* [comboot] Fix reference counting on replacement imagesMichael Brown2009-02-171-2/+1Star
| | | | When chaining COMBOOT images, the old images now get freed correctly.
* [comboot] Allow for tail recursion of COMBOOT imagesMichael Brown2009-02-171-3/+27
| | | | | | | | | | | | Multi-level menus via COMBOOT rely on the COMBOOT program being able to exit and invoke a new COMBOOT program (the next menu). This works, but rapidly (within about five iterations) runs out of space in gPXE's internal stack, since each new image is executed in a new function context. Fix by allowing tail recursion between images; an image can now specify a replacement image for itself, and image_exec() will perform the necessary tail recursion.
* [uri] Allow use of relative URIs when calling churi()Michael Brown2009-02-161-1/+4
|
* [image] Allow multiple embedded imagesMichael Brown2009-02-162-4/+12
| | | | | | | | | | This patch extends the embedded image feature to allow multiple embedded images instead of just one. gPXE now always boots the first embedded image on startup instead of doing the hardcoded DHCP boot (aka autoboot). Based heavily upon a patch by Stefan Hajnoczi <stefanha@gmail.com>.
* [xfer] Make consistent assumptions that xfer metadata can never be NULLMichael Brown2009-02-151-2/+9
| | | | | | | | | | | | | The documentation in xfer.h and xfer.c does not say that the metadata parameter is optional in calls such as xfer_deliver_iob_meta() and the deliver_iob() method. However, some code in net/ is prepared to accept a NULL pointer, and xfer_deliver_as_iob() passes a NULL pointer directly to the deliver_iob() method. Fix this mess of conflicting assumptions by making everything assume that the metadata parameter is mandatory, and fixing xfer_deliver_as_iob() to pass in a dummy metadata structure (as is already done in xfer_deliver_iob()).
* [base64] Add base64 encoding functionsMichael Brown2009-02-131-0/+66
|
* [settings] Handle errors in fetchf_uristring()Michael Brown2009-02-121-1/+4
| | | | | | | | | fetchf_uristring() was failing to handle error values from fetch_setting(), resulting in its attempting to allocate extremely large temporary buffers on the stack (and so overrunning the stack and locking up the machine). Problem reported by Shao Miller <Shao.Miller@yrdsb.edu.on.ca>.
* [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.
* [settings] Add fetch_string_setting_copy()Michael Brown2009-01-271-0/+32
|
* [console] Allow KEY_xxx constants to cover F8 function keyMichael Brown2009-01-251-6/+8
| | | | | | | 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.
* [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.
* [i386] Move iSCSI and AoE boot code to arch/i386/interface/pcbiosMichael Brown2008-11-192-454/+0Star
|
* [i386] Change [u]int32_t to [unsigned] int, rather than [unsigned] longMichael Brown2008-11-192-3/+3
| | | | | | This brings us in to line with Linux definitions, and also simplifies adding x86_64 support since both platforms have 2-byte shorts, 4-byte ints and 8-byte long longs.
* [i386] Rename __cdecl to __asmcallMichael Brown2008-11-191-1/+1
| | | | | __cdecl is a misleading name, since it currently encapsulates both cdecl and regparm(0) attributes. Rename to __asmcall.
* [settings] Ensure fetch_string_setting() returns a NUL-terminated stringMichael Brown2008-11-071-0/+1
| | | | | | | | | | | | | | | This fixes a regression introduced in commit 612f4e7: [settings] Avoid returning uninitialised data on error in fetch_xxx_setting() in which the memset() was moved from fetch_string_setting() to fetch_setting(), in order that it would be useful for non-string setting types. However, this neglects to take into account the fact that fetch_string_setting() shrinks its buffer by one byte (to allow for the NUL) before calling fetch_setting(). Restore the memset() in fetch_string_setting(), so that the terminating NUL is guaranteed to actually be a NUL.
* [romprefix] Add vendor branding facilities and guidelinesMichael Brown2008-10-311-2/+14
| | | | | | | | | | | | | Some hardware vendors have been known to remove all gPXE-related branding from ROMs that they build. While this is not prohibited by the GPL, it is a little impolite. Add a facility for adding branding messages via two #defines (PRODUCT_NAME and PRODUCT_SHORT_NAME) in config/general.h. This should accommodate all known OEM-mandated branding requirements. Vendors with branding requirements that cannot be satisfied by using PRODUCT_NAME and/or PRODUCT_SHORT_NAME should contact us so that we can extended this facility as necessary.
* [settings] Add the notion of a "tag magic" to numbered settingsMichael Brown2008-10-302-1/+2
| | | | | | | | | | | | | | | | | | | Settings can be constructed using a dotted-decimal notation, to allow for access to unnamed settings. The default interpretation is as a DHCP option number (with encapsulated options represented as "<encapsulating option>.<encapsulated option>". In several contexts (e.g. SMBIOS, Phantom CLP), it is useful to interpret the dotted-decimal notation as referring to non-DHCP options. In this case, it becomes necessary for these contexts to ignore standard DHCP options, otherwise we end up trying to, for example, retrieve the boot filename from SMBIOS. Allow settings blocks to specify a "tag magic". When dotted-decimal notation is used to construct a setting, the tag magic value of the originating settings block will be ORed in to the tag number. Store/fetch methods can then check for the magic number before interpreting arbitrarily-numbered settings.
* [uri] Avoid interpreting DOS-style path names as opaque URIsMichael Brown2008-10-241-2/+6
| | | | | | | | | | A DOS-style full path name such as "C:\Program Files\tftpboot\nbp.0" satisfies the syntax requirements for a URI with a scheme of "C" and an opaque portion of "\Program Files\tftpboot\nbp.0". Add a check in parse_uri() to ignore schemes that are apparently only a single character long; this avoids interpreting DOS-style paths in this way, and shouldn't affect any practical URI scheme.
* [settings] Avoid returning uninitialised data on error in fetch_xxx_setting()Michael Brown2008-10-221-5/+15
| | | | | | | | | | Callers (e.g. usr/autoboot.c) may not check the return values from fetch_xxx_setting(), assuming that in error cases the returned setting value will be "empty" (for some sensible value of "empty"). In particular, if the DHCP server did not specify a next-server address, this would result in gPXE using uninitialised data for the TFTP server IP address.
* [efi] Add EFI image format and basic runtime environmentMichael Brown2008-10-131-0/+6
| | | | | | | | | We have EFI APIs for CPU I/O, PCI I/O, timers, console I/O, user access and user memory allocation. EFI executables are created using the vanilla GNU toolchain, with the EXE header handcrafted in assembly and relocations generated by a custom efilink utility.
* [sanboot] Quick and dirty hack to make SAN boot protocols selectableMichael Brown2008-10-131-0/+11
|
* [monojob] Release reference on completed jobMichael Brown2008-10-131-0/+1
| | | | | | monojob_wait() was holding a reference to the completed job, meaning that various objects would not be freed until the next job was plugged in to the monojob interface.
* [timer] Remove now-obsolete references to TIMER_BIOS and TIMER_RDTSCMichael Brown2008-10-131-10/+0Star
|
* [nap] Formalise the CPU sleeping APIMichael Brown2008-10-133-6/+5Star
|
* [monojob] Allow for extremely slow system timersMichael Brown2008-10-121-1/+1
| | | | | The EFI timer runs at one tick per second, so using ">" rather than ">=" results in a two-second gap between dots.
* [timer] Formalise the timer APIMichael Brown2008-10-122-84/+13Star
| | | | | | We now have two implementations for the timer API: one using the time-of-day counter at 40:70 and one using RDTSC. Both make use of timer2_udelay().
* [process] Add DBG2() messages to help track down frozen processesMichael Brown2008-10-121-0/+2
|
* [config] Split console configuration out to config/console.hMichael Brown2008-10-121-12/+3Star
|
* [ioapi] Remove old io.h file and switch all users over to <gpxe/io.h>Michael Brown2008-10-124-4/+4
|
* [settings] Allow for setting fetchers to fail in fetchf_hex()Michael Brown2008-09-261-0/+2
|
* [settings] Add the uristring setting typeMichael Brown2008-09-241-0/+53
| | | | | | | | | | | | | | | This allows settings to be expanded in a way that is safe to include within a URI string, such as kernel http://10.0.0.1/boot.php?mf=${manufacturer:uristring} where the ${manufacturer} setting may contain characters that are not permitted (or have reserved purposes) within a URI. Since whitespace characters will be URI-encoded (e.g. "%20" for a space character), this also works around the problem that spaces within an expanded setting would cause the shell to split command-line arguments incorrectly.
* [uri] Add uri_encode() and uri_decode() functions for URI character encodingMichael Brown2008-09-241-0/+78
|
* [comboot] Add COMBOOT and COM32 supportDaniel Verkamp2008-08-291-0/+8
|
* [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...
* [iSCSI] Add support for mutual CHAPMichael Brown2008-08-111-14/+67
| | | | Allow initiator to verify target authentication using CHAP.
* [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.
* [iSCSI] Support Windows Server 2008 direct iSCSI installationMichael Brown2008-07-175-18/+27
| | | | | | | | | | | | | 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.
* [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.
* [GDB] Provide functions to manually enter GDB stub.Stefan Hajnoczi2008-06-302-32/+38
|
* [GDB] Obey flow control when GDB connects.Stefan Hajnoczi2008-06-301-0/+4
|
* [GDB] UDP clean up and add netdev refcntStefan Hajnoczi2008-06-301-19/+47
|
* [GDB] Add watch and rwatch hardware watchpointsStefan Hajnoczi2008-06-301-1/+21
|
* [GDB] Remote debugging over UDPStefan Hajnoczi2008-06-304-43/+324
| | | | | | | | | | | | | | | | | 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-301-5/+8
| | | | | This commit also includes a test to ensure that single stepping works, since continue, kill, detach, and single step all share code.