summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/interface
Commit message (Collapse)AuthorAgeFilesLines
...
* [settings] Explicitly separate the concept of a completed fetched settingMichael Brown2013-12-051-1/+1
| | | | | | | | | | The fetch_setting() family of functions may currently modify the definition of the specified setting (e.g. to add missing type information). Clean up this interface by requiring callers to provide an explicit buffer to contain the completed definition of the fetched setting, if required. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Select an optimal mode, rather than the first acceptable modeMichael Brown2013-11-281-49/+91
| | | | | | | | | | | | | | | | | | There is no requirement for VBE modes to be listed in increasing order of resolution. With the present logic, this can cause e.g. a 1024x768 mode to be selected if the user asks for 640x480, if the 1024x768 mode is earlier in the mode list. Define a scoring system for modes as score = ( width * height - bpp ) and choose the mode with the lowest score among all acceptable modes. This should prefer to choose the mode closest to the requested resolution, with a slight preference for higher colour depths. Reported-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Return meaningful error when no suitable mode is foundMichael Brown2013-11-281-44/+75
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Skip modes for which we cannot get mode informationMichael Brown2013-11-281-2/+1Star
| | | | | | | | | The VirtualBox BIOS fails to retrieve mode information (with status 0x0100) for some modes within the mode list. Skip any such modes, rather than treating this as a fatal error. Reported-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Include raw status value within VBE error messagesMichael Brown2013-11-281-5/+5
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vesafb] Add VESA frame buffer consoleMichael Brown2013-11-281-0/+420
| | | | | | | | | | | The VESA frame buffer console uses the VESA BIOS extensions (VBE) to enumerate video modes, selects an appropriate mode, and then hands off to the generic frame buffer code. The font is extracted from the VGA BIOS, avoiding the need to provide an external font file. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Allow console input and output to be disabled independentlyMichael Brown2013-11-281-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [netdevice] Make all net_driver methods optionalMichael Brown2013-11-011-10/+0Star
| | | | | | | | Most network upper-layer drivers do not implement all three methods (probe, notify, and remove). Save code by making all methods optional. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Always retrieve cached DHCPACK and apply to relevant network deviceMichael Brown2013-10-251-70/+0Star
| | | | | | | | | | | | When chainloading, always retrieve the cached DHCPACK packet from the underlying PXE stack, and apply it as the original contents of the "net<X>.dhcp" settings block. This allows cached DHCP settings to be used for any chainloaded iPXE binary (not just undionly.kkpxe). This change eliminates the undocumented "use-cached" setting. Issuing the "dhcp" command will now always result in a fresh DHCP request. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Work around bug in gcc >= 4.8Michael Brown2013-09-251-3/+5
| | | | | | | | | | | | | Commit 238050d ("[build] Work around bug in gcc >= 4.8") works around one instance of a bug in recent versions of gcc, in which "ebp" cannot be specified within an asm clobber list. Some versions of gcc seem to exhibit the same bug on other points in the codebase. Fix by changing all instances of "ebp" in a clobber list to use the push/pop %ebp workaround instead. Originally-implemented-by: Víctor Román Archidona <contacto@victor-roman.es> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Introduce the generalised concept of a numeric settingMichael Brown2013-08-011-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Clarify usage of the term "named setting"Michael Brown2013-07-181-4/+3Star
| | | | | | | | | | | | There are currently two conflicting usages of the term "named setting" within iPXE: one refers to predefined settings (such as show up in the "config" UI), the other refers to settings identified by a name (such as "net0.dhcp/ip"). Split these usages into the term "predefined setting" and "named setting" to avoid ambiguity. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add "poweroff" commandMarin Hannache2013-07-151-0/+108
| | | | | | Modified-by: Michael Brown <mcb30@ipxe.org> Signed-off-by: Marin Hannache <git@mareo.fr> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Work around bug in gcc >= 4.8Michael Brown2013-06-071-3/+5
| | | | | | | | | | | | | | | | | | | gcc 4.8 and 4.9 fail to compile pxe_call.c with the error "bp cannot be used in asm here". Other points in the codebase which use "ebp" in the asm clobber list do not seem to be affected. Unfortunately gcc provides no way to specify %ebp as an output register, so we cannot use this as a workaround. The only viable solution is to explicitly push/pop %ebp within the asm itself. This is ugly for two reasons: firstly, it may be unnecessary; secondly, it may cause gcc to generate invalid %esp-relative addresses if the asm happens to use memory operands. This specific block of asm uses no memory operands and so will not generate invalid code. Reported-by: Daniel P. Berrange <berrange@redhat.com> Reported-by: Christian Hesse <list@eworm.de> Originally-fixed-by: Christian Hesse <list@eworm.de> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [settings] Eliminate settings "tag magic"Michael Brown2013-05-011-1/+1
| | | | | | | Create an explicit concept of "settings scope" and eliminate the magic values used for numerical setting tags. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Convert external PXE API errors into iPXE platform-generated errorsMichael Brown2013-04-292-13/+19
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [cmdline] Add ability to perform a warm rebootMichael Brown2013-03-221-1/+8
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [efi] Add "reboot" command for EFIMichael Brown2013-03-221-0/+41
| | | | | | | | | Abstract out the ability to reboot the system to a separate reboot() function (with platform-specific implementations), add an EFI implementation, and make the existing "reboot" command available under EFI. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [smbios] Provide SMBIOS version number via smbios_version()Michael Brown2013-03-201-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Split out ISO9660 and El Torito definitions to separate header filesMichael Brown2013-03-201-0/+2
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [tftp] Allow TFTP block size to be controlled via the PXE TFTP APIMichael Brown2013-03-061-7/+20
| | | | | | | | | | | | | | The PXE TFTP API allows the caller to request a particular TFTP block size. Since mid-2008, iPXE has appended a "?blksize=xxx" parameter to the TFTP URI constructed internally; nothing has ever parsed this parameter. Nobody seems to have cared that this parameter has been ignored for almost five years. Fix by using xfer_window(), which provides a fairly natural way to convey the block size information from the PXE TFTP API to the TFTP protocol layer. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [umalloc] Split largest_memblock() function out from init_eheap()Michael Brown2012-11-061-49/+8Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include version number within only a single object fileMichael Brown2012-11-021-1/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Use correct size when estimating floppy disk geometryMichael Brown2012-09-141-1/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ipoib] Expose Ethernet-compatible eIPoIB link-layer addresses and headersMichael Brown2012-08-311-1/+2
| | | | | | | | | | | | | Almost all clients of the raw-packet interfaces (UNDI and SNP) can handle only Ethernet link layers. Expose an Ethernet-compatible link layer to local clients, while remaining compatible with IPoIB on the wire. This requires manipulation of ARP (but not DHCP) packets within the IPoIB driver. This is ugly, but it's the only viable way to allow IPoIB devices to be driven via the raw-packet interfaces. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vmware] Fix compilation under OpenBSDThomas Miletich2012-07-231-1/+1
| | | | | Reported-by: Jiri B <jirib@devio.us> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-2025-25/+50
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Add PXENV_FILE_CMDLINE API callMichael Brown2012-07-111-0/+38
| | | | | | | Allow a PXE NBP to obtain its command line (if any) via the new PXE API call PXENV_FILE_CMDLINE. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vmware] Allow settings to be specified in the VMware .vmx fileMichael Brown2012-04-171-0/+281
| | | | | | | | | | | | | Allow iPXE settings to be specified in the .vmx file via the VMware GuestInfo mechanism. For example: guestinfo.ipxe.filename = "http://boot.ipxe.org/demo/boot.php" guestinfo.ipxe.dns = "192.168.0.1" guestinfo.ipxe.net0.ip = "192.168.0.15" guestinfo.ipxe.net0.netmask = "255.255.255.0" guestinfo.ipxe.net0.gateway = "192.168.0.1" Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Fix compilation on some versions of gccMichael Brown2012-04-101-4/+3Star
| | | | | | | | | Using __from_text16() and __from_data16() in inline asm constraints sometimes defeats gcc's ability to simplify expressions down to compile-time constants. Reported-by: Jason Kohles <jkohles@palantir.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [int13] Add support for emulating floppy disk drivesMichael Brown2012-03-301-56/+244
| | | | | Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [umalloc] Unhide umalloc()ed memory region when there are no allocationsMichael Brown2012-03-271-1/+2
| | | | | | | | At present, we always hide an extra sizeof(struct external_memory), to account for the header on the lowest allocated block. This header ceases to exist when there are no allocated blocks remaining. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [umalloc] Fail allocations when we run out of external memoryMichael Brown2012-03-271-7/+22
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Do not share ANSI escape context between lineconsole usersMichael Brown2012-03-261-0/+8
| | | | | | | | An ANSI escape sequence context cannot be shared between multiple users. Make the ANSI escape sequence context part of the line console definition and provide individual contexts for each user. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Exclude text-based UI output from logfile-based consolesMichael Brown2012-03-261-1/+1
| | | | | | | | The output from text-based user interfaces such as the "config" command is not generally meaningful for logfile-based consoles such as syslog and vmconsole. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [console] Allow usage to be defined independently for each consoleMichael Brown2012-03-261-0/+8
| | | | | | | | | | | | | | | | | | | | | Add the concept of a "console usage", such as "standard output" or "debug messages". Allow usages to be associated with each console independently. For example, to send debugging output via the serial port, while preventing it from appearing on the local console: #define CONSOLE_SERIAL CONSOLE_USAGE_ALL #define CONSOLE_PCBIOS ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_DEBUG ) If no usages are explicitly specified, then a default set of usages will be applied. For example: #define CONSOLE_SERIAL will have the same affect as #define CONSOLE_SERIAL CONSOLE_USAGE_ALL Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Simplify image management commands and internal APIMichael Brown2012-03-251-5/+12
| | | | | | | | | | | | | | | | | | | | | | Remove the name, cmdline, and action parameters from imgdownload() and imgdownload_string(). These functions now simply download and return an image. Add the function imgacquire(), which will interpret a "name or URI string" parameter and return either an existing image or a newly downloaded image. Use imgacquire() to merge similar image-management commands that currently differ only by whether they take the name of an existing image or the URI of a new image to download. For example, "chain" and "imgexec" can now be merged. Extend imgstat and imgfree commands to take an optional list of images. Remove the arbitrary restriction on the length of image names. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Fix compilation under CygwinMichael Brown2012-03-231-1/+1
| | | | | Originally-fixed-by: Steve Goodrich <steve.goodrich@se-eng.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [time] Add RTC-based time sourceMichael Brown2012-03-192-39/+138
| | | | | | Add a time source using the CMOS RTC to obtain the current time. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [rng] Allow entropy_enable() to return an errorMichael Brown2012-03-181-1/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vmware] Fix length returned by guestrpc_command()Michael Brown2012-03-011-0/+1
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vmware] Add VMware logfile console (CONSOLE_VMWARE)Michael Brown2012-02-291-0/+117
| | | | | | | Allow iPXE console output to be sent to the VMware logfile via the GuestRPC mechanism. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [vmware] Add GuestRPC mechanismMichael Brown2012-02-292-0/+383
| | | | | | Use the VMware backdoor I/O port to access the GuestRPC mechanism. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [rng] Add RTC-based entropy sourceMichael Brown2012-02-281-0/+233
| | | | | | | | | | | The RTC-based entropy source uses the nanosecond-scale CPU TSC to measure the time between two 1kHz interrupts generated by the CMOS RTC. In a physical machine these clocks are driven from independent crystals, resulting in some observable clock drift. In a virtual machine, the CMOS RTC is typically emulated using host-OS constructions such as SIGALRM. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Provide PXENV_FILE_EXIT_HOOK only for ipxelinux.0 buildsMichael Brown2011-12-112-47/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PXENV_FILE_EXIT_HOOK is designed to allow ipxelinux.0 to unload both the iPXE and pxelinux components without affecting the underlying PXE stack. Unfortunately, it causes unexpected behaviour in other situations, such as when loading a non-embedded pxelinux.0 via undionly.kpxe. For example: PXE ROM -> undionly.kpxe -> pxelinux.0 -> chain.c32 to boot hd0 would cause control to return to iPXE instead of booting from the hard disk. In some cases, this would result in a harmless but confusing "No more network devices" message; in other cases stranger things would happen, such as being returned to the iPXE shell prompt. The fundamental problem is that when pxelinux detects PXENV_FILE_EXIT_HOOK, it may attempt to specify an exit hook and then exit back to iPXE, assuming that iPXE will in turn exit cleanly via the specified exit hook. This is not a valid assumption in the general case, since the action of exiting back to iPXE does not directly cause iPXE to exit itself. (In the specific case of ipxelinux.0, this will work since the embedded script exits as soon as pxelinux.0 exits.) Fix the unexpected behaviour in the non-ipxelinux.0 cases by including support for PXENV_FILE_EXIT_HOOK only when using a new .kkkpxe format. The ipxelinux.0 build process should therefore now use undionly.kkkpxe instead of undionly.kkpxe. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Modularise PXE API provisionMichael Brown2011-12-116-348/+225Star
| | | | | | | Use the linker table infrastructure to dispatch PXE API calls to the relevant function. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Tidy up debugging outputMichael Brown2011-12-081-13/+16
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Check for a valid PXE network device when applicableMichael Brown2011-12-082-11/+213
| | | | | | | | | Very nasty things can happen if a NULL network device is used. Check that pxe_netdev is non-NULL at the applicable entry points, so that this type of problem gets reported to the caller rather than being allowed to crash the system. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Improve pxe_preboot debugging messagesMichael Brown2011-11-141-23/+48
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [pxe] Improve pxe_undi debugging messagesMichael Brown2011-11-141-76/+84
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>