summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/image/multiboot.c
Commit message (Collapse)AuthorAgeFilesLines
* [bios] Add bin-x86_64-pcbios build platformMichael Brown2016-02-161-492/+0Star
| | | | | | | | | | | | | | Move most arch/i386 files to arch/x86, and adjust the contents of the Makefiles and the include/bits/*.h headers to reflect the new locations. This patch makes no substantive code changes, as can be seen using a rename-aware diff (e.g. "git show -M5"). This patch does not make the pcbios platform functional for x86_64; it merely allows it to compile without errors. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Relicense files under GPL2_OR_LATER_OR_UBDLMichael Brown2015-03-021-1/+5
| | | | | | | | | | These files cannot be automatically relicensed by util/relicense.pl since they either contain unusual but trivial contributions (such as the addition of __nonnull function attributes), or contain lines dating back to the initial git revision (and so require manual knowledge of the code's origin). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uri] Refactor URI parsing and formattingMichael Brown2014-02-271-2/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | Add support for parsing of URIs containing literal IPv6 addresses (e.g. "http://[fe80::69ff:fe50:5845%25net0]/boot.ipxe"). Duplicate URIs by directly copying the relevant fields, rather than by formatting and reparsing a URI string. This relaxes the requirements on the URI formatting code and allows it to focus on generating human-readable URIs (e.g. by not escaping ':' characters within literal IPv6 addresses). As a side-effect, this allows relative URIs containing parameter lists (e.g. "../boot.php##params") to function as expected. Add validity check for FTP paths to ensure that only printable characters are accepted (since FTP is a human-readable line-based protocol with no support for character escaping). Construct TFTP next-server+filename URIs directly, rather than parsing a constructed "tftp://..." string, Add self-tests for URI functions. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Include version number within only a single object fileMichael Brown2012-11-021-1/+4
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [legal] Update FSF mailing address in GPL licence textsMichael Brown2012-07-201-1/+2
| | | | | Suggested-by: Daniel P. Berrange <berrange@redhat.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [multiboot] Place multiboot modules low in memoryMichael Brown2012-04-191-47/+51
| | | | | | | | | | | | | | | Solaris assumes that there is enough space above the Multiboot modules to use as a decompression and scratch area. This assumption is invalid when using iPXE, which places the Multiboot modules near the top of (32-bit) memory. Fix by copying the modules to an area of memory immediately following the loaded kernel. Debugged-by: Michael Brown <mcb30@ipxe.org> Debugged-by: Scott McWhirter <scottm@joyent.com> Tested-by: Robin Smidsrød <robin@smidsrod.no> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [multiboot] Include full image URI in command lineMichael Brown2012-04-151-21/+30
| | | | | | | | | | | | Solaris kernels seem to rely on having the full kernel path present in the multiboot command line; if only the kernel name is present then the boot fails with the error message krtld: failed to open 'unix' Debugged-by: Michael Brown <mcb30@ipxe.org> Debugged-by: Scott McWhirter <scottm@joyent.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [image] Simplify image managementMichael Brown2011-03-071-70/+76
| | | | | | | | | | | Refactor the {load,exec} image operations as {probe,exec}. This makes the probe mechanism cleaner, eliminates some forward declarations, avoids holding magic state in image->priv, eliminates the possibility of screwing up between the "load" and "exec" stages, and makes the documentation simpler since the concept of "loading" (as distinct from "executing") no longer needs to be explained. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [init] Remove concept of "shutdown exit flags"Michael Brown2011-01-271-1/+1
| | | | | | | | Remove the concept of shutdown exit flags, and replace it with a counter used to keep track of exposed interfaces that require devices to remain active. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [multiboot] Reduce length of "Features" startup bannerMichael Brown2010-09-121-1/+1
| | | | | | | Minimise the chances of an unwanted line wrap on the iPXE feature list printed at startup. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [ioapi] Move get_memmap() to the I/O API groupPiotr Jaroszyński2010-08-161-1/+1
| | | | | | | | | pcbios specific get_memmap() is used by the b44 driver making all-drivers builds fail on other platforms. Move it to the I/O API group and provide a dummy implementation on EFI. Signed-off-by: Piotr Jaroszyński <p.jaroszynski@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [build] Rename gPXE to iPXEMichael Brown2010-04-201-8/+8
| | | | | | | | | | | Access to the gpxe.org and etherboot.org domains and associated resources has been revoked by the registrant of the domain. Work around this problem by renaming project from gPXE to iPXE, and updating URLs to match. Also update README, LOG and COPYRIGHTS to remove obsolete information. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [multiboot] Build memory map after shutting down and unhiding gPXEStefan Hajnoczi2009-12-141-2/+6
| | | | | | | | | | | The Multiboot memory map needs to be built after unhiding gPXE and downloaded images from memory. Solaris faults during boot when trying to access the ramdisk, which is hidden from the memory map while gPXE is executing. This issue is fixed by using the memory map from after gPXE unhides itself. Reported-by: Moinak Ghosh <moinakg@belenix.org> Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
* [multiboot] Include argv[0] as part of "command line"Michael Brown2009-05-261-5/+6
| | | | | Grub will include the module name as part of the command line, and some multiboot kernels expect this to be done.
* [legal] Add a selection of FILE_LICENCE declarationsMichael Brown2009-05-181-0/+2
| | | | | Add FILE_LICENCE declarations to almost all files that make up the various standard builds of gPXE.
* [multiboot] Work around raw-flag bug in Solaris kernelsMichael Brown2009-04-241-8/+15
| | | | | | | | | | | Solaris kernels are multiboot images with the "raw" flag set, indicating that the loader should use the raw address fields within the multiboot header rather than looking for an ELF header. However, the Solaris kernel contains garbage data in the raw address fields, and requires us to use the ELF header instead. Work around this by always using the ELF header if present. This renders the "raw" flag somewhat redundant.
* [i386] Change [u]int32_t to [unsigned] int, rather than [unsigned] longMichael Brown2008-11-191-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.
* [build] Keep gcc 4.4 happyMichael Brown2008-11-181-2/+4
| | | | | gcc 4.4 adds another few warnings, and also seems to complain if we place %ebp in the clobber list for any inline asm.
* [multiboot] Allow for unspecified {load,bss}_end_addr for raw imagesMichael Brown2008-09-061-2/+5
| | | | | | | The multiboot specification states that, for raw images, if load_end_addr is zero then it should be interpreted as meaning "use the entire file", and if bss_end_addr is zero it should be interpreted as meaning "no bss".
* [elf] Add execution entry point debug messages for elf/multiboot imagesMichael Brown2008-08-221-0/+2
|
* [iSCSI] Support Windows Server 2008 direct iSCSI installationMichael Brown2008-07-171-1/+1
| | | | | | | | | | | | | 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.
* Place multiboot command lines in base memory; Xen won't pick them upMichael Brown2007-08-031-36/+69
| | | | otherwise. :(
* Allow images to hold references to the originating URI.Michael Brown2007-08-021-2/+7
| | | | Some shuffling around of the image management code; this needs tidying up.
* Allowed zero-cost enforced ordering of features in startup bannerMichael Brown2007-08-021-0/+3
| | | | | | list. Added FEATURE() macros to most relevant (non-driver) files.
* make multiboot_load staticHolger Lubitz2007-07-271-1/+1
|
* Move uninitialised .data16 variables to .bss16; saves around 2000Michael Brown2007-07-161-3/+3
| | | | bytes of useless zeroes in the final image.
* Separated out initialisation functions from startup/shutdown functions.Michael Brown2007-07-041-1/+1
|
* Place the actual version string in .data16, rather than just theMichael Brown2007-06-301-1/+1
| | | | pointer to it.
* Replace image->entry with image->priv.Michael Brown2007-01-141-3/+4
|
* Use debug autocolourisation.Michael Brown2007-01-141-18/+34
| | | | Shut down before jumping to the multiboot image.
* Place multiboot tables in base memory; at least some OSes won't see itMichael Brown2007-01-121-34/+64
| | | | if we don't.
* Ensure multiboot modules are in ascending order of memory startMichael Brown2007-01-121-15/+40
| | | | address, to work around OS bugs.
* Fix the memory map.Michael Brown2007-01-121-6/+11
|
* Force probing of multiboot before ELF.Michael Brown2007-01-121-2/+2
|
* Place command-line inline, to save on memory allocation hassles.Michael Brown2007-01-121-7/+4Star
|
* Rename copy_user() to memcpy_user(). Add memmove_user() andMichael Brown2007-01-121-1/+1
| | | | userptr_add().
* We may be required to page-align modules, so let's make sure we catchMichael Brown2007-01-121-1/+7
| | | | it if we don't.
* Provide registration mechanism for loaded images, so that we can e.g.Michael Brown2007-01-121-38/+92
| | | | | | | | refer to them by name from the command line, or build them into a multiboot module list. Use setting image->type to disambiguate between "not my image" and "bad image"; this avoids relying on specific values of the error code.
* Populate multiboot information structure before calling OS.Michael Brown2007-01-111-17/+39
|
* Capable of starting a multiboot kernel (albeit without the multibootMichael Brown2007-01-111-2/+15
| | | | information table yet).
* Capable of loading a multiboot image into memoryMichael Brown2007-01-111-0/+235