summaryrefslogtreecommitdiffstats
path: root/src/arch/i386
Commit message (Collapse)AuthorAgeFilesLines
* [undi] Scan for UNDI ROMs on 512-byte boundaries rather than 2kB boundariesMichael Brown2008-09-121-2/+2
| | | | | | | | | Apparently some BIOSes will place option ROMs on 512-byte boundaries. While this is against specification, it doesn't actually hurt anything, so we may as well increase our scan granularity to 512 bytes. Contributed by Luca <lucarx76@gmail.com>
* [pcbios] Add extra debugging messages relating to the system memory mapMichael Brown2008-09-072-4/+17
|
* [pxe] Add a dummy PXENV+ entry point at UNDI_CS:0000Michael Brown2008-09-062-1/+13
| | | | | | | | | Wyse Streaming Manager server (WLDRM13.BIN) assumes that the PXENV+ entry point is at UNDI_CS:0000; apparently, somebody at Wyse has difficulty distinguishing between the words "may" and "must"... Add a dummy entry point at UNDI_CS:0000, which just jumps to the correct entry point.
* [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".
* [libprefix] Add addr32 prefix required by older assemblersEygene Ryabinkin2008-09-041-1/+1
| | | | | | | | | | Explicitly state that we are using 32-bit addressing in 16-bit code. GNU as 2.15 (FreeBSD/amd64 7-STABLE) got confused that 32-bit registers are used in the code that was declared as 16-bit. Add explicit modifier 'addr32' to make assembler happy. Signed-off-by: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
* [comboot] Add COMBOOT and COM32 supportDaniel Verkamp2008-08-2910-0/+1630
|
* [librm] Add rm stack copying functionsDaniel Verkamp2008-08-292-0/+48
|
* [librm] Make rm_sp and rm_ss globals againDaniel Verkamp2008-08-282-0/+4
|
* [libc] Mark setjmp and longjmp as __cdeclDaniel Verkamp2008-08-281-2/+2
|
* [pxe] Fill in UNDIROMID pointer in !PXE structureMichael Brown2008-08-284-6/+30
| | | | | | IBM's iSCSI Firmware Initiator checks the UNDIROMID pointer in the !PXE structure that gets created by the UNDI loader. We didn't previously fill this value in.
* [romprefix] Add UNDI ROMID structure bus type fieldMichael Brown2008-08-271-0/+1
| | | | | The IBM iSCSI Firmware Initiator complains that we don't have a bus type field in the UNDI ROMID structure, so include one.
* [romprefix] Preserve %edi when issuing INT 1A,B101Michael Brown2008-08-261-1/+3
| | | | INT 1A,B101 (get PCI BIOS version) will overwrite %edi.
* [romprefix] Add more diagnostic messages to ROM prefixMichael Brown2008-08-261-27/+28
| | | | | | | | | Include PMM allocation result in POST banner. Include full product string in "starting execution" message. Also mark ourselves as supporting DDIM in PnP header, for completeness.
* [romprefix] Fix regression in UNDI loaderMichael Brown2008-08-231-2/+2
| | | | | Commit 12f203c introduced a bug that caused the UNDI loader to attempt to load the UNDI code and data segments to incorrect addresses.
* [romprefix] On a PCI3.0, non-BBS system, use the correct %cs for INT19Michael Brown2008-08-221-26/+45
| | | | | | | | On a system that doesn't support BBS, we end up hooking INT19 to gain control of the boot process. If the system is PCI3.0, we must take care to use the runtime value for %cs, rather than the POST-time value, otherwise we end up pointing INT19 to the temporary option ROM POST scratch area.
* [elf] Add execution entry point debug messages for elf/multiboot imagesMichael Brown2008-08-222-0/+3
|
* [smbios] Print SMBIOS version number in debugging messagesMichael Brown2008-08-191-2/+2
|
* [pcbios] Support arbitrary splits of the e820 memory mapMichael Brown2008-08-184-350/+121Star
| | | | | | | | | | | | | | | | | | | | | | Allow for an arbitrary number of splits of the system memory map via INT 15,e820. Features of the new map-mangling algorithm include: Supports random access to e820 map entries. Requires only sequential access support from the underlying e820 map, even if our caller uses random access. Empty regions will always be stripped. Always terminates with %ebx=0, even if the underlying map terminates with CF=1. Allows for an arbitrary number of hidden regions, with underlying regions split into as many subregions as necessary. Total size increase to achieve this is 193 bytes.
* [pcbios] Prepare for multiple splits of hidden e820 memory regionsMichael Brown2008-08-182-2/+328
| | | | | | | | | | | | | | | | | | | Define a list of N allowed memory regions, and split each underlying e820 region into up to N subregions. Strip resulting empty regions out of the map, avoiding using the "return with CF set to strip last empty region" trick, because it seems that bootmgr.exe in Win2k8 gets upset if the memory map is terminated with CF set. This is an intermediate checkin that defines a single allowed memory region covering the entire 64-bit address space, and uses the existing map-mangling code on top of the new region-splitting code. This sanitises the memory map to the point that Win2k8 is able to boot even on a system that defines a final zero-length region at the 4GB mark. I'm checking this in because it may be useful for future debugging efforts to be able to run with the existing and known-working map mangling code together with the map sanitisation capabilities of the new map mangling code.
* [romprefix] Fix ROM image copy on PCI 3.0 BIOSesMichael Brown2008-08-061-1/+3
| | | | | | | Add the missing instructions to the code path that I never tested due to not having a PCI 3.0 system available. (D'oh)
* [romprefix] Update PCI ROM structure to PCI 3.0Michael Brown2008-07-301-20/+84
|
* [prefix] Reasonable value for lkrn initrd_addr_maxStefan Hajnoczi2008-07-301-2/+8
| | | | | | | | | | | H. Peter Anvin <hpa@zytor.com> sent word that Sergey Vlasov <vsu@altlinux.ru> discovered gPXE lkrn images fail to load in SYSLINUX 3.70 because we have initrd_addr_max zeroed. This patch sets the same value as the Linux kernel. Also change the header jmp instruction to use a hardcoded opcode value like Linux does. Just in case the assembler decides to use a three-byte instruction instead of the desired two-byte jmp.
* [smbios] Add named settings for manufacturer, product name, and serial no.Michael Brown2008-07-271-0/+28
|
* [iSCSI] Support Windows Server 2008 direct iSCSI installationMichael Brown2008-07-175-5/+5
| | | | | | | | | | | | | 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.
* [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.
* [bzimage] Kill off the initrd image typeMichael Brown2008-07-081-3/+2Star
| | | | | | | 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".
* [i386] Change semantics of __from_data16 and __from_text16Michael Brown2008-07-016-22/+19Star
| | | | | | | | | __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.)
* [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] Remove unused DR6 debug register variableStefan Hajnoczi2008-06-301-4/+3Star
|
* [GDB] Zero-extend 16-bit segment registersStefan Hajnoczi2008-06-301-6/+12
| | | | | | | 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-303-1/+140
|
* [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>.
* [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.
* [script] Remove arbitrary limit on script line lengthsMichael Brown2008-06-181-0/+17
|
* [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>
* [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.
* [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>
* [undi] Ask for promiscuous packet reception when using UNDI driverMichael Brown2008-06-101-2/+6
| | | | | | We never set up specific multicast filters; native drivers will ask the card to receive all multicast packets. The only way to achieve this via the UNDI API is to enable promiscuous mode.
* [ELF] Add ability to boot ELF images generated by wraplinux and mkelfImageMichael Brown2008-06-092-0/+111
| | | | | | | | | | | | | | | | | | | 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-053-11/+292
| | | | See http://etherboot.org/wiki/dev/gdbstub for documentation.
* [GDBSYM] Remove unused gdbsym.cStefan Hajnoczi2008-06-051-33/+0Star
| | | | | | The GDBSYM config.h option was an attempt at QEMU GDB debugging. I have removed the code since it is unused and may confuse people wanting to use the GDB stub.
* [Makefile] Remove obsolete SRCDIRSMichael Brown2008-05-231-2/+0Star
|
* [prefix] Prompt for entering gPXE shell during POSTMichael Brown2008-05-221-10/+61
| | | | | | | | | The ROM prefix now prompts the user to enter the gPXE shell during POST; this allows for configuring gPXE without needing to attempt to boot from it. (It also slows down system boot by three seconds per gPXE ROM, but hey.) This is apparently a certain OEM's requirement for option ROMs.
* [prefix] Add PCI bus:dev.fn to ROM product stringMichael Brown2008-05-213-95/+131
| | | | | This allows multiple gPXE ROMs in a system to be disambiguated at boot time; the PCI ID will show up in the boot menu for a BBS-compliant BIOS.
* [NETDEV] Add notion of link stateMichael Brown2008-04-221-0/+3
| | | | | | | | | | | Add ability for network devices to flag link up/down state to the networking core. Autobooting code will now wait for link-up before attempting DHCP. IPoIB reflects the Infiniband link state as the network device link state (which is not strictly correct; we also need a succesful IPoIB IPv4 broadcast group join), but is probably more informative.
* [HCI] Display "Not an executable image" when appropriateMichael Brown2008-04-081-0/+8
| | | | | | | | | | | | | PXE is a catch-all image format with no signature checks. If an unsupported image file is loaded, it will be treated as a PXE image. In most cases, the image will be too large to be loaded as a PXE image (which has to fit in base memory), so the error returned to the user will be that the segment could not fit within the memory region. Add an explicit check to pxe_image.c to reject images larger than base memory with ENOEXEC. Add ENOEXEC to the error string table.
* [Settings] Expose SMBIOS via settings APIMichael Brown2008-03-285-129/+256
| | | | In particular, expose the system UUID as a setting ("smbios/uuid").