summaryrefslogtreecommitdiffstats
path: root/src/config
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'master' into openslxopenslxSimon Rettberg2026-01-2850-288/+800
|\
| * [build] Extend default configuration for non-BIOS buildsMichael Brown2026-01-163-17/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current usage model for iPXE is that the default configuration is relatively minimal to reduce code size, with users encouraged to build from source if necessary to enable additional features. This approach is somewhat incompatible with the Secure Boot model, which by design makes it prohibitively difficult for users to use their own compiled binaries. For published Secure Boot signed binaries to be useful, they will have to already include all features that the majority of users will need. Extend the default configuration for EFI (and other non-BIOS platforms) to include HTTPS support, framebuffer support, and a selection of commands and features that are reasonably expected to be used by large numbers of users. The default configuration for BIOS platforms is deliberately left unchanged, since BIOS binaries are typically subject to severe size constraints. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [usb] Drag in USB commands only when USB support is presentMichael Brown2026-01-162-3/+8
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [pci] Drag in PCI commands only when PCI support is presentMichael Brown2026-01-162-3/+4
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise console type configurationMichael Brown2026-01-165-39/+58
| | | | | | | | | | | | | | | | | | Move all console configuration from config/defaults/<platform>.h to the top-level config/console.h, using indented conditional blocks to clarify which console types are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise USB configurationMichael Brown2026-01-163-33/+15Star
| | | | | | | | | | | | | | | | Move all USB configuration from config/defaults/<platform>.h to the top-level config/usb.h, using indented conditional blocks to clarify which options are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise settings sources configurationMichael Brown2026-01-162-9/+21
| | | | | | | | | | | | | | | | Move all settings source selection from config/defaults/<platform>.h to the top-level config/settings.h, using indented conditional blocks to clarify which sources are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Sort general configuration in order of approachabilityMichael Brown2026-01-161-121/+113Star
| | | | | | | | | | | | | | | | | | Reorder sections within config/general.h so that portions that are easier to understand and more likely to be modified are towards the top of the file, with more obscure and less frequently modified options moved lower down. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise remaining portions of general configurationMichael Brown2026-01-163-41/+46
| | | | | | | | | | | | | | | | Move remaining general configuration from config/defaults/<platform>.h to the top-level config/general.h, using indented conditional blocks to clarify which features are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise SAN boot protocol configurationMichael Brown2026-01-164-24/+10Star
| | | | | | | | | | | | | | | | Move all SAN boot protocol selection from config/defaults/<platform>.h to the top-level config/general.h, using indented conditional blocks to clarify which protocols are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise download protocol configurationMichael Brown2026-01-162-10/+14
| | | | | | | | | | | | | | | | Move all download protocol selection from config/defaults/<platform>.h to the top-level config/general.h, using indented conditional blocks to clarify which protocols are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise network protocol configurationMichael Brown2026-01-162-11/+16
| | | | | | | | | | | | | | | | Move all network protocol selection from config/defaults/<platform>.h to the top-level config/general.h, using indented conditional blocks to clarify which protocols are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise command list configurationMichael Brown2026-01-165-50/+56
| | | | | | | | | | | | | | | | Move all command selection from config/defaults/<platform>.h to the top-level config/general.h, using indented conditional blocks to clarify which commands are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Canonicalise image type configurationMichael Brown2026-01-155-39/+50
| | | | | | | | | | | | | | | | Move all image type selection from config/defaults/<platform>.h to the top-level config/general.h, using indented conditional blocks to clarify which image types are supported and enabled on each platform. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Mark known reviewed files as permitted for UEFI Secure BootMichael Brown2026-01-1415-0/+15
| | | | | | | | | | | | | | | | | | Some past security reviews carried out for UEFI Secure Boot signing submissions have covered specific drivers or functional areas of iPXE. Mark all of the files comprising these areas as permitted for UEFI Secure Boot. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [build] Mark core files as permitted for UEFI Secure BootMichael Brown2026-01-1426-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | Mark all files used in a standard build of bin-x86_64-efi/snponly.efi as permitted for UEFI Secure Boot. These files represent the core functionality of iPXE that is guaranteed to have been included in every binary that was previously subject to a security review and signed by Microsoft. It is therefore legitimate to assume that at least these files have already been reviewed to the required standard multiple times. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [neighbour] Add the ability to artificially delay outbound packetsMichael Brown2026-01-061-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a fault-injection mechanism that allows an arbitrary delay (configured via config/fault.h) to be added to any packets transmitted via the neighbour resolution mechanism, as a way of reproducing symptoms that occur only on high-latency connections such as a satellite uplink. The neighbour discovery mechanism is not a natural conceptual fit for this artficial delay, since neighbour discovery has nothing to do with transmit latency. However, the neighbour discovery mechanism happens to already include a deferred transmission queue that can be (ab)used to implement this artifical delay in a minimally intrusive way. In particular, there is zero code size impact on a standard build with no artificial delay configured. Implementing the delay only for packets transmitted via neighbour resolution has the side effect that broadcast packets (such as DHCP and ARP) are unaffected. This is likely in practice to produce a better emulation of a high-latency uplink scenario, where local network traffic such as DHCP and ARP will complete quickly and only the subsequent TCP/UDP traffic will experience delays. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Add ECDSA-based TLS cipher suitesMichael Brown2025-12-191-0/+30
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Add OID-identified algorithms for ECDSA with SHA2 hash familyMichael Brown2025-12-192-0/+23
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [pci] Use runtime selectable PCI I/O API for EFI cloud buildsMichael Brown2025-11-252-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some systems (observed on an AWS m8g.medium instance in eu-west-2), the UEFI firmware omits the PCI host bridge drivers for all but the first PCI bus. The observable result is that any devices on other PCI buses (such as the ENA network device) are not enumerated by the UEFI firmware and are therefore unusable by iPXE. Support these systems by switching to using PCIAPI_CLOUD for EFI cloud builds, trying the EFI PCI I/O API first and falling back to direct access (via ECAM) for devices that the UEFI firmware has failed to enumerate itself. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [pci] Use linker tables for runtime selectable PCI APIsMichael Brown2025-11-242-0/+14
| | | | | | | | | | | | | | Use the linker table mechanism to enumerate the underlying PCI I/O APIs, to allow PCIAPI_CLOUD to become architecture-independent code. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [spcr] Use the serial port defined by the ACPI SPCR by defaultMichael Brown2025-11-053-2/+6
| | | | | | | | | | | | | | | | On platforms where we expect ACPI tables to exist, use the serial port defined by the ACPI Serial Port Console Redirection (SPCR) table by default, falling back to the fixed serial port defined at build time. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [cloud] Display instance type in AWS EC2Michael Brown2025-10-291-1/+1
| | | | | | | | | | | | | | | | Experiments suggest that the instance type is exposed via the SMBIOS product name. Include this information within the default output, since it is often helpful in debugging. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [cloud] Display build architecture in AWS EC2Michael Brown2025-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some newer (7th and 8th generation) instance types, the 32-bit build of iPXE cannot access PCI configuration space since the ECAM is placed outside of the 32-bit address space. The visible symptom is that iPXE fails to detect any network devices. The public AMIs are all now built as 64-bit binaries, but there is nothing that prevents the building and importing of a 32-bit AMI. There are still potentially valid use cases for 32-bit AMIs (e.g. if planning to use the AMI only for older instance types), and so we cannot sensibly prevent this error at build time. Display the build architecture as part of the AWS EC2 embedded script, to at least allow for easy identification of this particular failure mode at run time. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [digest] Add commands for all enabled digest algorithmsMichael Brown2025-08-061-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | Add "sha256sum", "sha512sum", and similar commands. Include these new commands only when DIGEST_CMD is enabled in config/general.h and the corresponding algorithm is enabled in config/crypto.h. Leave "mdsum" and "sha1sum" included whenever only DIGEST_CMD is enabled, to avoid potentially breaking backwards compatibility with builds that disabled MD5 or SHA-1 as a TLS or X.509 digest algorithm, but would still have expected those commands to be present. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [riscv] Allow for poisoning .bss section before early initialisationMichael Brown2025-07-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On startup, we may be running from read-only memory, and therefore cannot zero the .bss section (or write to the .data section) until we have parsed the system memory map and relocated ourselves to somewhere suitable in RAM. The code that runs during this early initialisation stage must be carefully written to avoid writing to the .data section and to avoid reading from or writing to the .bss section. Detecting code that erroneously writes to the .data or .bss sections is relatively easy since running from read-only memory (e.g. via QEMU's -pflash option) will immediately reveal the bug. Detecting code that erroneously reads from the .bss section is harder, since in a freshly powered-on machine (or in a virtual machine) there is a high probability that the contents of the memory will be zero even before we explicitly zero out the section. Add the ability to fill the .bss section with an invalid non-zero value to expose bugs in early initialisation code that erroneously relies upon variables in .bss before the section has been zeroed. We use the value 0xeb55eb55eb55eb55 ("EBSS") since this is immediately recognisable as a value in a crash dump, and will trigger a page fault if dereferenced since the address is in a non-canonical form. Poisoning the .bss can be done only when the image is known to already reside in writable memory. It will overwrite the relocation records, and so can be done only on a system where relocation is known to be unnecessary (e.g. because paging is supported). We therefore do not enable this behaviour by default, but leave it as a configurable option via the config/fault.h header. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [riscv] Provide a DMA API implementation for RISC-V bare-metal systemsMichael Brown2025-07-091-1/+2
| | | | | | | | | | | | | | | | | | Provide an implementation of dma_map() that performs cache clean or invalidation as required, and an implementation of dma_alloc() that returns virtual addresses within the coherent mapping of the 32-bit physical address space. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdtcon] Add basic support for FDT-based system serial consoleMichael Brown2025-06-241-1/+2
| | | | | | | | | | | | | | | | Add support for probing a device based on the path or alias found in the "/chosen/stdout-path" node, and using a consequently instantiated UART as the default serial console. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [serial] Allow platform to specify mechanism for identifying consoleMichael Brown2025-06-235-0/+6
| | | | | | | | | | | | | | | | | | Allow the platform configuration to provide a mechanism for identifying the serial console UART. Provide two globally available mechanisms: "null" (i.e. no serial console), and "fixed" (i.e. use whatever is specified by COMCONSOLE in config/serial.h). Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [uart] Remove ability to use frame formats other than 8n1Michael Brown2025-06-171-4/+1Star
| | | | | | | | | | | | | | | | | | | | In the context of serial consoles, the use of any frame formats other than the standard 8 data bits, no parity, and one stop bit is so rare as to be nonexistent. Remove the almost certainly unused support for custom frame formats. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [riscv] Add support for writing prefix debug messages direct to a UARTMichael Brown2025-05-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some platforms (such as the Sipeed Lichee Pi 4A) do not provide a functional SBI debug console. We can obtain early debug messages on these systems by writing directly to the UART used by the vendor firmware. There is no viable way to parse the UART address from the device tree, since the prefix debug messages occur extremely early, before the C runtime environment is available and therefore before any information has been parsed from the device tree. The early UART model and register addresses must be configured by editing config/serial.h if needed. (This is an acceptable limitation, since prefix debugging is an extremely specialised use case.) Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [riscv] Support mapping I/O devices outside of the identity mapMichael Brown2025-05-261-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With the 64-bit paging schemes (Sv39, Sv48, and Sv57), we identity-map as much of the physical address space as is possible. Experimentation shows that this is not sufficient to provide access to all I/O devices. For example: the Sipeed Lichee Pi 4A includes a CPU that supports only Sv39, but places I/O devices at the top of a 40-bit address space. Add support for creating I/O page table entries on demand to map I/O devices, based on the existing design used for x86_64 BIOS. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [lkrn] Add basic support for the RISC-V Linux kernel image formatMichael Brown2025-05-204-1/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RISC-V and AArch64 bare-metal kernel images share a common header format, and require essentially the same execution environment: loaded close to the start of RAM, entered with paging disabled, and passed a pointer to a flattened device tree that describes the hardware and any boot arguments. Implement basic support for executing bare-metal RISC-V and AArch64 kernel images. The (trivial) AArch64-specific code path is untested since we do not yet have the ability to build for any bare-metal AArch64 platforms. Constructing and passing an initramfs image is not yet supported. Rename the IMAGE_BZIMAGE build configuration option to IMAGE_LKRN, since "bzImage" is specific to x86. To retain backwards compatibility with existing local build configurations, we leave IMAGE_BZIMAGE as the enabled option in config/default/pcbios.h and treat IMAGE_LKRN as a synonym for IMAGE_BZIMAGE when building for x86 BIOS. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [bios] Use generic external heap based on the system memory mapMichael Brown2025-05-191-1/+1
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [riscv] Use generic external heap based on the system memory mapMichael Brown2025-05-191-1/+1
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [bios] Update to use the generic system memory map APIMichael Brown2025-05-161-1/+1
| | | | | | | | | | | | | | | | Provide an implementation of the system memory map API based on the assorted BIOS INT 15 calls, and a temporary implementation of the legacy get_memmap() function using the new API. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdtmem] Update to use the generic system memory map APIMichael Brown2025-05-161-1/+1
| | | | | | | | | | | | | | | | | | Provide an implementation of the system memory map API based on the system device tree, excluding any memory outside the size of the accessible physical address space and defining an in-use region to cover the relocated copy of iPXE and the system device tree. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [memmap] Define an API for managing the system memory mapMichael Brown2025-05-164-0/+4
| | | | | | | | | | | | | | | | | | Define a generic system memory map API, based on the abstraction created for parsing the FDT memory map and adding a concept of hidden in-use memory regions as required to support patching the BIOS INT 15 memory map. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [uaccess] Generalise librm's virt_offset mechanism for RISC-VMichael Brown2025-05-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The virtual offset memory model used for i386-pcbios and x86_64-pcbios can be generalised to also cover riscv32-sbi and riscv64-sbi. In both architectures, the 32-bit builds will use a circular map of the 32-bit address space, and the 64-bit builds will use an identity map for the relevant portion of the physical address space, with iPXE itself placed in the negative (kernel) address space. Generalise and document the virt_offset mechanism, and set it as the default for both PCBIOS and SBI platforms. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [isa] Disable legacy ISA device probing by defaultMichael Brown2025-03-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Legacy ISA device probing involves poking at various I/O addresses to guess whether or not a particular device is present. Actual legacy ISA cards are essentially nonexistent by now, but the probed I/O addresses have a habit of being reused for various OEM-specific functions. This can cause some very undesirable side effects. For example, probing for the "ne2k_isa" driver on an HP Elitebook 840 G10 will cause the system to lock up in a way that requires two cold reboots to recover. Enable ISA_PROBE_ONLY in config/isa.h by default. This limits ISA probing to use only the addresses specified in ISA_PROBE_ADDRS, which is empty by default, and so effectively disables ISA probing. The vanishingly small number of users who require ISA probing can simply adjust this configuration in config/local/isa.h. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Add the "fdt" commandMichael Brown2025-03-274-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow a Flattened Device Tree blob (DTB) to be provided to a booted operating system using a script such as: #!ipxe kernel /images/vmlinuz console=ttyAMA0 initrd /images/initrd.img fdt /images/rk3566-radxa-zero-3e.dtb boot Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Accept and trust CA certificates in the TlsCaCertificates variableMichael Brown2025-03-133-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UEFI's built-in HTTPS boot mechanism requires the trusted CA certificates to be provided via the TlsCaCertificates variable. (There is no equivalent of the iPXE cross-signing mechanism, so it is not possible for UEFI to automatically use public CA certificates.) Users who have configured UEFI HTTPS boot to use a custom root of trust (e.g. a private CA certificate) may find it useful to have iPXE automatically pick up and use this same root of trust, so that iPXE can seamlessly fetch files via HTTPS from the same servers that were trusted by UEFI HTTPS boot, in addition to servers that iPXE can validate through other means such as cross-signed certificates. Parse the TlsCaCertificates variable at startup, add any certificates to the certificate store, and mark these certificates as trusted. There are no access restrictions on modifying the TlsCaCertificates variable: anybody with access to write UEFI variables is permitted to change the root of trust. The UEFI security model assumes that anyone with access to run code prior to ExitBootServices() or with access to modify UEFI variables from within a loaded operating system is supposed to be able to change the system's root of trust for TLS. Any certificates parsed from TlsCaCertificates will show up in the output of "certstat", and may be discarded using "certfree" if unwanted. Support for parsing TlsCaCertificates is enabled by default in EFI builds, but may be disabled in config/general.h if needed. As with the ${trust} setting, the contents of the TlsCaCertificates variable will be ignored if iPXE has been compiled with an explicit root of trust by specifying TRUST=... on the build command line. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Support extracting certificates from EFI signature list imagesMichael Brown2025-03-113-0/+5
| | | | | | | | | | | | | | | | | | | | | | Add support for the EFI signature list image format (as produced by tools such as efisecdb). The parsing code does not require any EFI boot services functions and so may be enabled even in non-EFI builds. We default to enabling it only for EFI builds. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Add definitions and tests for the NIST P-384 elliptic curveMichael Brown2025-01-302-0/+8
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Add definitions and tests for the NIST P-256 elliptic curveMichael Brown2025-01-282-0/+8
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [sbi] Add support for running as a RISC-V SBI payloadMichael Brown2024-10-282-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add basic support for running directly on top of SBI, with no UEFI firmware present. Build as e.g.: make CROSS=riscv64-linux-gnu- bin-riscv64/ipxe.sbi The resulting binary can be tested in QEMU using e.g.: qemu-system-riscv64 -M virt -cpu max -serial stdio \ -kernel bin-riscv64/ipxe.sbi No drivers or executable binary formats are supported yet, but the unit test suite may be run successfully. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [riscv] Add support for the seed CSR as an entropy sourceMichael Brown2024-10-281-0/+3
| | | | | | | | | | | | | | | | | | The Zkr entropy source extension defines a potentially unprivileged seed CSR that can be read to obtain 16 bits of entropy input, with a mandated requirement that 256 entropy input bits read from the seed CSR will contain at least 128 bits of min-entropy. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [riscv] Add support for RDTIME as a timer sourceMichael Brown2024-10-281-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | The Zicntr extension defines an unprivileged wall-clock time CSR that roughly matches the behaviour of an invariant TSC on x86. The nominal frequency of this timer may be read from the "timebase-frequency" property of the CPU node in the device tree. Add a timer source using RDTIME to provide implementations of udelay() and currticks(), modelled on the existing RDTSC-based timer for x86. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [pci] Drag in PCI settings mechanism only when PCI support is presentMichael Brown2024-10-252-3/+36
| | | | | | | | | | | | | | Allow for the existence of platforms with no PCI bus by including the PCI settings mechanism only if PCI bus support is included. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [uaccess] Rename UACCESS_EFI to UACCESS_FLATMichael Brown2024-10-251-1/+1
| | | | | | | | | | | | | | | | | | Running with flat physical addressing is a fairly common early boot environment. Rename UACCESS_EFI to UACCESS_FLAT so that this code may be reused in non-UEFI boot environments that also use flat physical addressing. Signed-off-by: Michael Brown <mcb30@ipxe.org>