summaryrefslogtreecommitdiffstats
path: root/src/arch/i386/include
Commit message (Collapse)AuthorAgeFilesLines
* [bzimage] Support old (pre-2.00 bootloader) Linux kernel formatsMichael Brown2009-03-301-0/+3
| | | | | | | | | | This allows gPXE to load memtest86, which is packaged as an old kernel. Split all code that directly touches the kernel headers out into bzimage_parse_header() and bzimage_update_header(), to reduce code size and offset the cost of supporting older kernels. Total cost of this feature: 11 bytes (uncompressed).
* [pxeprefix] Add .kkpxe image type and ability to return via PXE stackMichael Brown2009-02-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Certain combinations of PXE stack and BIOS result in a broken INT 18 call, which will leave the system displaying a "PRESS ANY KEY TO REBOOT" message instead of proceeding to the next boot device. On these systems, returning via the PXE stack is the only way to continue to the next boot device. Returning via the PXE stack works only if we haven't already blown away the PXE base code in pxeprefix.S. In most circumstances, we do want to blow away the PXE base code. Base memory is a limited resource, and it is desirable to reclaim as much as possible. When we perform an iSCSI boot, we need to place the iBFT above the 512kB mark, because otherwise it may not be detected by the loaded OS; this may not be possible if the PXE base code is still occupying that memory. Introduce a new prefix type .kkpxe which will preserve both the PXE base code and the UNDI driver (as compared to .kpxe, which preserves the UNDI driver but uninstalls the PXE base code). This prefix type can be used on systems that are known to experience the specific problem of INT 18 being broken, or in builds (such as gpxelinux.0) for which it is particularly important to know that returning to the BIOS will work. Written by H. Peter Anvin <hpa@zytor.com> and Stefan Hajnoczi <stefanha@gmail.com>, minor structural alterations by Michael Brown <mcb30@etherboot.org>.
* [comboot] Implement INT 22h AX=001Bh (Cleanup, shuffle, and boot to real mode)Daniel Verkamp2009-02-171-0/+34
|
* [comboot] Restore the real-mode stack pointer on exit from a COMBOOT imageMichael Brown2009-02-172-6/+32
| | | | | | | | | | | | | COMBOOT images use INTs to issue API calls; these end up making calls into gPXE from real mode, and so temporarily change the real-mode stack pointer. When our COMBOOT code uses a longjmp() to implement the various "exit COMBOOT image" API calls, this leaves the real-mode stack pointer stuck with its temporary value, which causes problems if we eventually try to exit out of gPXE back to the BIOS. Fix by adding rmsetjmp() and rmlongjmp() calls (analogous to sigsetjmp()/siglongjmp()); these save and restore the additional state needed for real-mode calls to function correctly.
* [comboot] Unhook interrupt vectors after returning from a COMBOOT imageMichael Brown2009-02-171-0/+1
|
* [comboot] Allow for tail recursion of COMBOOT imagesMichael Brown2009-02-172-9/+6Star
| | | | | | | | | | | | 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.
* [x86_64] Add support for compilation as an x86_64 binaryMichael Brown2008-12-057-595/+7Star
| | | | | | | | | | | | Currently the only supported platform for x86_64 is EFI. Building an EFI64 gPXE requires a version of gcc that supports __attribute__((ms_abi)). This currently means a development build of gcc; the feature should be present when gcc 4.4 is released. In the meantime; you can grab a suitable gcc tree from git://git.etherboot.org/scm/people/mcb30/gcc/.git
* [efi] Use EFI-native mechanism for accessing SMBIOS tableMichael Brown2008-12-054-62/+29Star
| | | | | | EFI provides a copy of the SMBIOS table accessible via the EFI system table, which we should use instead of manually scanning through the F000:0000 segment.
* [i386] Move iSCSI and AoE boot code to arch/i386/interface/pcbiosMichael Brown2008-11-192-0/+335
|
* [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.
* [libgcc] Make __libgcc architecture-specificMichael Brown2008-11-191-0/+14
|
* [i386] Rename __cdecl to __asmcallMichael Brown2008-11-193-3/+14
| | | | | __cdecl is a misleading name, since it currently encapsulates both cdecl and regparm(0) attributes. Rename to __asmcall.
* [pxe] Move all PXE files to arch/i386Michael Brown2008-11-183-0/+2117
| | | | | The initial PXE implementation in Etherboot had the goal of being architecture-agnostic, but this goal has not been realised.
* [elf] Kill off unused <bits/elf.h> and <bits/elf_x.h> header filesMichael Brown2008-11-182-96/+0Star
|
* [i386] Free allocated base memory on exit, if possibleMichael Brown2008-11-181-1/+14
| | | | | | | | | | | Code paths that automatically allocate memory from the FBMS at 40:13 should also free it, if possible. Freeing this memory will not be possible if either 1. The FBMS has been modified since our allocation, or 2. We have not been able to unhook one or more BIOS interrupt vectors.
* [ioapi] Fix broken implementation of insX() in the x86 I/O APIMichael Brown2008-10-271-2/+2
|
* [efi] Add EFI image format and basic runtime environmentMichael Brown2008-10-132-0/+17
| | | | | | | | | 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.
* [umalloc] Formalise the user memory allocation APIMichael Brown2008-10-133-1/+29
|
* [uaccess] Formalise the uaccess APIMichael Brown2008-10-138-363/+171Star
| | | | | | The userptr_t is now the fundamental type that gets used for conversions. For example, virt_to_phys() is implemented in terms of virt_to_user() and user_to_phys().
* [nap] Formalise the CPU sleeping APIMichael Brown2008-10-133-2/+28
|
* [timer] Formalise the timer APIMichael Brown2008-10-126-9/+104
| | | | | | 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().
* [pci] Formalise the PCI I/O APIMichael Brown2008-10-124-76/+78
|
* [ioapi] Absorb virt_to_phys() and phys_to_virt() into the I/O APIMichael Brown2008-10-122-22/+20Star
|
* [i386] Remove obsolete functions from virtaddr.hMichael Brown2008-10-121-21/+2Star
| | | | | | | The copy_{to,from}_phys() functions were obsoleted long ago by copy_{to,from}_user(). relocate_to() also disappeared some time ago.
* [ioapi] Remove old io.h file and switch all users over to <gpxe/io.h>Michael Brown2008-10-123-267/+2Star
|
* [ioapi] Formalise the I/O API as used in i386-pcbiosMichael Brown2008-10-122-0/+160
|
* [pcbios] Add facility for testing arbitrary E820 memory mapsMichael Brown2008-09-251-0/+7
| | | | | | | | | | We seem to be having issues with various E820 memory maps. These problems are often difficult to reproduce, requiring access to the specific system exhibiting the problem. Add a facility for hooking in a fake E820 map generator, using an arbitrary map defined in a C array, solely in order to be able to test the map-mangling code against arbitrary E820 maps.
* [comboot] Add COMBOOT and COM32 supportDaniel Verkamp2008-08-293-0/+106
|
* [librm] Add rm stack copying functionsDaniel Verkamp2008-08-291-0/+3
|
* [librm] Make rm_sp and rm_ss globals againDaniel Verkamp2008-08-281-0/+2
|
* [libc] Mark setjmp and longjmp as __cdeclDaniel Verkamp2008-08-281-2/+2
|
* [int13] Pairwise swap drive numbers, instead of shifting all drive numbersMichael Brown2008-07-161-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* [i386] Change semantics of __from_data16 and __from_text16Michael Brown2008-07-012-8/+8
| | | | | | | | | __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.)
* [GDB] Add watch and rwatch hardware watchpointsStefan Hajnoczi2008-06-301-0/+13
|
* [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.
* [script] Remove arbitrary limit on script line lengthsMichael Brown2008-06-181-0/+17
|
* [bzimage] Support kernel command lines of greater than 256 charactersMichael Brown2008-06-121-0/+8
| | | | | | 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.
* [ELF] Add ability to boot ELF images generated by wraplinux and mkelfImageMichael Brown2008-06-091-0/+1
| | | | | | | | | | | | | | | | | | | Delete ELF as a generic image type. The method for invoking an ELF-based image (as well as any tables that must be set up to allow it to boot) will always depend on the specific architecture. core/elf.c now only provides the elf_load() function, to avoid duplicating functionality between ELF-based image types. Add arch/i386/image/elfboot.c, to handle the generic case of 32-bit x86 ELF images. We don't currently set up any multiboot tables, ELF notes, etc. This seems to be sufficient for loading kernels generated using both wraplinux and coreboot's mkelfImage. Note that while Etherboot 5.4 allowed ELF images to return, we don't. There is no callback mechanism for the loaded image to shut down gPXE, which means that we have to shut down before invoking the image. This means that we lose device state, protection against being trampled on, etc. It is not safe to continue afterwards.
* [GDB] Add GDB stub for remote debuggingStefan Hajnoczi2008-06-051-0/+51
| | | | See http://etherboot.org/wiki/dev/gdbstub for documentation.
* [Settings] Expose SMBIOS via settings APIMichael Brown2008-03-283-17/+17
| | | | In particular, expose the system UUID as a setting ("smbios/uuid").
* [libc] Use __builtin_va_list et al in stdarg.hMichael Brown2008-03-241-22/+0Star
| | | | | The home-grown versions don't work properly for static variadic functions, when gcc can choose to use a non-standard calling convention.
* fix the rdtsc namimgAlexey Zaytsev2008-03-021-1/+1
|
* CleanupsAlexey Zaytsev2008-03-021-0/+3
| | | | | | | | Replace a printf with a DBG in timer_rtdsc.c Replace a printf in timer.c with assert Return proper error codes from timer drivers Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Modify gPXE core and drivers to work with the new timer subsystemAlexey Zaytsev2008-03-021-12/+0Star
| | | | Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Introduce the new timer subsystem.Alexey Zaytsev2008-03-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Timer subsystem initialization code in core/timer.c Split the BIOS and RTDSC timer drivers from i386_timer.c Split arch/i386/firmware/pcbios/bios.c into the RTSDC timer driver and arch/i386/core/nap.c Split the headers properly: include/unistd.h - delay functions to be used by the gPXE core and drivers. include/gpxe/timer.h - the fimer subsystem interface to be used by the timer drivers and currticks() to be used by the code gPXE subsystems. include/latch.h - removed include/timer.h - scheduled for removal. Some driver are using currticks, which is only for core subsystems. Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
* Add DBGLVL_IO to trace all memory-mapped I/O.Michael Brown2008-02-211-7/+40
|
* Add UUID to DHCP request as option 97 (if available).Michael Brown2007-11-212-0/+11
|
* Added definition of a UUID and uuid_ntoa() (for debugging), andMichael Brown2007-11-211-0/+2
| | | | implemented smbios_get_uuid().
* Update SMBIOS internal API to be easier to use, and not to requireMichael Brown2007-11-211-1/+38
| | | | potentially exorbitant amounts of stack space.
* Allow space for the kernel's real-mode .bss. Previously we weren'tMichael Brown2007-11-041-0/+2
| | | | | allowing any space for this, which makes it surprising that bzImage loading ever worked.