summaryrefslogtreecommitdiffstats
path: root/src/include
Commit message (Collapse)AuthorAgeFilesLines
...
| * [uaccess] Remove redundant userptr_add() and userptr_diff()Michael Brown2025-04-202-64/+0Star
| | | | | | | | | | | | | | | | | | The userptr_add() and userptr_diff() functions are now just straightforward wrappers around addition and subtraction. Remove these redundant wrappers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [uaccess] Change userptr_t to be a pointer typeMichael Brown2025-04-201-12/+1Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original motivation for the userptr_t type was to be able to support a pure 16-bit real-mode memory model in which a segment:offset value could be encoded as an unsigned long, with corresponding copy_from_user() and copy_to_user() functions used to perform real-mode segmented memory accesses. Since this memory model was first created almost twenty years ago, no serious effort has been made to support a pure 16-bit mode of operation for iPXE. The constraints imposed by the memory model are becoming increasingly cumbersome to work within: for example, the parsing of devicetree structures is hugely simplified by being able to use and return direct pointers to the names and property values. The devicetree code therefore relies upon virt_to_user(), which is nominally illegal under the userptr_t memory model. Drop support for the concept of a memory location that cannot be reached through a straightforward pointer dereference, by redefining userptr_t to be a simple pointer type. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [uaccess] Add explicit casts to and from userptr_t where neededMichael Brown2025-04-202-4/+4
| | | | | | | | | | | | | | Allow for the possibility of userptr_t becoming a pointer type by adding explicit casts where necessary. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [uaccess] Rename userptr_sub() to userptr_diff()Michael Brown2025-04-202-8/+8
| | | | | | | | | | | | | | | | | | Clarify the intended usage of userptr_sub() by renaming it to userptr_diff() (to avoid confusion with userptr_add()), and fix the existing call sites that erroneously use userptr_sub() to subtract an offset from a userptr_t value. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [time] Use currticks() to provide the null system timeMichael Brown2025-04-191-5/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | For platforms with no real-time clock (such as RISC-V SBI) we use the null time source, which currently just returns a constant zero. Switch to using currticks() to provide a clock that does not represent the real current time, but does at least advance at approximately the correct rate. In conjunction with the "ntp" command, this allows these platforms to use time-dependent features such as X.509 certificate verification for HTTPS connections. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [riscv] Map DEL to backspace on the SBI debug consoleMichael Brown2025-04-191-0/+1
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [cgem] Add a driver for the Cadence GEM NICMichael Brown2025-04-192-0/+4
| | | | | | | | | | | | | | Add a basic driver for the Cadence GEM network interface as emulated by QEMU when using the RISC-V "sifive_u" machine type. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [netdevice] Add the concept of an insomniac network deviceMichael Brown2025-04-171-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some network devices (observed with the SNP interface to the wireless network card on an HP Elitebook 840 G10) will stop working if they are left for too long without being polled. Add the concept of an insomniac network device, that must continue to be polled even when closed. Note that drivers are already permitted to call netdev_rx() et al even when closed: this will already be happening for USB devices since polling operates at the level of the whole USB bus, rather than at the level of individual USB devices. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Allow for custom methods for disconnecting existing driversMichael Brown2025-04-171-2/+8
| | | | | | | | | | | | | | | | Allow for greater control over the process used to disconnect existing drivers from a device handle, by converting the "exclude" field from a simple protocol GUID to a per-driver method. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [dt] Provide dt_ioremap() to map device registersMichael Brown2025-04-151-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Devicetree devices encode register address ranges within the "reg" property, with the number of cells used for addresses and for sizes determined by the #address-cells and #size-cells properties of the immediate parent device. Record the number of address and size cells for each device, and provide a dt_ioremap() function to allow drivers to map a specified range without having to directly handle the "reg" property. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Add fdt_cells() to read cell-based properties such as "reg"Michael Brown2025-04-151-0/+5
| | | | | | | | | | | | | | | | Add fdt_cells() to read scalar values encoded within a cell array, reimplement fdt_u64() as a wrapper around this, and add fdt_u32() for completeness. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [dt] Add basic concept of a devicetree busMichael Brown2025-04-143-0/+80
| | | | | | | | | | | | | | | | Add a basic model for devices instantiated by parsing the system flattened device tree, with drivers matched via the "compatible" property for any non-root node. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Remove concept of a device tree cursorMichael Brown2025-04-141-0/+18
| | | | | | | | | | | | | | | | Refactor device tree traversal to operate on the basis of describing the token at a given offset, with no separate notion of a device tree cursor. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Provide fdt_strings() to read string list propertiesMichael Brown2025-04-141-0/+2
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Populate boot arguments in constructed device treeMichael Brown2025-04-012-2/+12
| | | | | | | | | | | | | | | | When creating a device tree to pass to a booted operating system, ensure that the "chosen" node exists, and populate the "bootargs" property with the image command line. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Identify free space (if any) at end of parsed treeMichael Brown2025-04-011-0/+4
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [tls] Support fragmentation of transmitted recordsMichael Brown2025-03-311-0/+11
| | | | | | | | | | | | | | | | | | Large transmitted records may arise if we have long client certificate chains or if a client sends a large block of data (such as a large HTTP POST payload). Fragment records as needed to comply with the value that we advertise via the max_fragment_length extension. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Disconnect existing drivers on a per-protocol basisMichael Brown2025-03-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UEFI does not provide a direct method to disconnect the existing driver of a specific protocol from a handle. We currently use DisconnectController() to remove all drivers from a handle that we want to drive ourselves, and then rely on recursion in the call to ConnectController() to reconnect any drivers that did not need to be disconnected in the first place. Experience shows that OEMs tend not to ever test the disconnection code paths in their UEFI drivers, and it is common to find drivers that refuse to disconnect, fail to close opened handles, fail to function correctly after reconnection, or lock up the entire system. Implement a more selective form of disconnection, in which we use OpenProtocolInformation() to identify the driver associated with a specific protocol, and then disconnect only that driver. Perform disconnections in reverse order of attachment priority, since this is the order likely to minimise the number of cascaded implicit disconnections. This allows our MNP driver to avoid performing any disconnections at all, since it does not require exclusive access to the MNP protocol. It also avoids performing unnecessary disconnections and reconnections of unrelated drivers such as the "UEFI WiFi Connection Manager" that attaches to wireless network interfaces in order to manage wireless network associations. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Define an attachment priority order for EFI driversMichael Brown2025-03-291-2/+4
| | | | | | | | | | | | | | | | Define an ordering for internal EFI drivers on the basis of how close the driver is to the hardware, and attempt to start drivers in this order. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Add various well-known GUIDs encountered in WiFi bootMichael Brown2025-03-285-0/+1285
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Install a device tree for the booted OS, if availableMichael Brown2025-03-281-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | If we have a device tree available (e.g. because the user has explicitly downloaded a device tree using the "fdt" command), then provide it to the booted operating system as an EFI configuration table. Since x86 does not typically use device trees, we create weak symbols for efi_fdt_install() and efi_fdt_uninstall() to avoid dragging FDT support into all x86 UEFI binaries. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Provide the ability to create a device tree for a booted OSMichael Brown2025-03-281-0/+2
| | | | | | | | | | | | | | | | Provide fdt_create() to create a device tree to be passed to a booted operating system. The device tree will be created from the FDT image (if present), falling back to the system device tree (if present). Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Create a copy of the system flattened device tree, if presentMichael Brown2025-03-281-3/+3
| | | | | | | | | | | | | | | | | | EFI configuration tables may be freed at any time, and there is no way to be notified when the table becomes invalidated. Create a copy of the system flattened device tree (if present), so that we do not risk being left with an invalid pointer. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Allow for parsing device trees where the length is known in advanceMichael Brown2025-03-281-1/+2
| | | | | | | | | | | | | | | | Allow for parsing device trees where an external factor (such as a downloaded image length) determines the maximum length, which must be validated against the length within the device tree header. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Allow for the existence of multiple device treesMichael Brown2025-03-281-7/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | When running on a platform that uses FDT as its hardware description mechanism, we are likely to have multiple device tree structures. At a minimum, there will be the device tree passed to us from the previous boot stage (e.g. OpenSBI), and the device tree that we construct to be passed to the booted operating system. Update the internal FDT API to include an FDT pointer in all function parameter lists. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [fdt] Add the concept of an FDT imageMichael Brown2025-03-272-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | Define the concept of an "FDT" image, representing a Flattened Device Tree blob that has been downloaded in order to be provided to a kernel or other executable image. FDT images are represented using an image tag (as with other special-purpose images such as the UEFI shim), and are similarly marked as hidden so that they will not be included in a generated magic initrd or show up in a virtual filesystem directory listing. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Add support for installing EFI configuration tablesMichael Brown2025-03-272-0/+38
| | | | | | | | | | | | | | Add the ability to install and uninstall arbitrary EFI configuration tables. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Add flattened device tree header and GUID definitionsMichael Brown2025-03-273-2/+27
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Add ACPI and SMBIOS tables as well-known GUIDsMichael Brown2025-03-271-0/+5
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Allow use of typed pointers for efi_open() et alMichael Brown2025-03-241-8/+79
| | | | | | | | | | | | | | | | | | Provide wrapper macros to allow efi_open() and related functions to accept a pointer to any pointer type as the "interface" argument, in order to allow a substantial amount of type adjustment boilerplate to be removed. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Create safe wrappers for OpenProtocol() and CloseProtocol()Michael Brown2025-03-242-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UEFI model for opening and closing protocols is broken by design and cannot be repaired. Calling OpenProtocol() to obtain a protocol interface pointer does not, in general, provide any guarantees about the lifetime of that pointer. It is theoretically possible that the pointer has already become invalid by the time that OpenProtocol() returns the pointer to its caller. (This can happen when a USB device is physically removed, for example.) Various UEFI design flaws make it occasionally necessary to hold on to a protocol interface pointer despite the total lack of guarantees that the pointer will remain valid. The UEFI driver model overloads the semantics of OpenProtocol() to accommodate the use cases of recording a driver attachment (which is modelled as opening a protocol with EFI_OPEN_PROTOCOL_BY_DRIVER attributes) and recording the existence of a related child controller (which is modelled as opening a protocol with EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER attributes). The parameters defined for CloseProtocol() are not sufficient to allow the implementation to precisely identify the matching call to OpenProtocol(). While the UEFI model appears to allow for matched open and close pairs, this is merely an illusion. Calling CloseProtocol() will delete *all* matching records in the protocol open information tables. Since the parameters defined for CloseProtocol() do not include the attributes passed to OpenProtocol(), this means that a matched open/close pair using EFI_OPEN_PROTOCOL_GET_PROTOCOL can inadvertently end up deleting the record that defines a driver attachment or the existence of a child controller. This in turn can cause some very unexpected side effects, such as allowing other UEFI drivers to start controlling hardware to which iPXE believes it has exclusive access. This rarely ends well. To prevent this kind of inadvertent deletion, we establish a convention for four different types of protocol opening: - ephemeral opens: always opened with ControllerHandle = NULL - unsafe opens: always opened with ControllerHandle = AgentHandle - by-driver opens: always opened with ControllerHandle = Handle - by-child opens: always opened with ControllerHandle != Handle This convention ensures that the four types of open never overlap within the set of parameters defined for CloseProtocol(), and so a close of one type cannot inadvertently delete the record corresponding to a different type. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Remove the efipci_open() and efipci_close() wrappersMichael Brown2025-03-241-3/+0Star
| | | | | | | | | | | | | | In preparation for formalising the way that EFI protocols are opened across the codebase, remove the efipci_open() wrapper. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Allow wrapping the global boot services table in situMichael Brown2025-03-201-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When DEBUG=efi_wrap is enabled, we construct a patched copy of the boot services table and patch the global system table to point to this copy. This ensures that any subsequently loaded EFI binaries will call our wrappers. Previously loaded EFI binaries will typically have cached the boot services table pointer (in the gBS variable used by EDK2 code), and therefore will not pick up the updated pointer and so will not call our wrappers. In most cases, this is what we want to happen: we are interested in tracing the calls issued by the newly loaded binary and we do not want to be distracted by the high volume of boot services calls issued by existing UEFI drivers. In some circumstances (such as when a badly behaved OEM driver is causing the system to lock up during the ExitBootServices() call), it can be very useful to be able to patch the global boot services table in situ, so that we can trace calls issued by existing drivers. Restructure the wrapping code to allow wrapping to be enabled or disabled at any time, and to allow for patching the global boot services table in situ. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Add EFI_RNG_PROTOCOL_GUID as a well-known GUIDMichael Brown2025-03-181-0/+1
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Accept and trust CA certificates in the TlsCaCertificates variableMichael Brown2025-03-133-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * [efi] Add TLS authentication header and GUID definitionsMichael Brown2025-03-133-1/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the TlsAuthentication.h header from EDK2's NetworkPkg, along with a GUID definition for EFI_TLS_CA_CERTIFICATE_GUID. It is unclear whether or not the TlsCaCertificate variable is intended to be a UEFI standard. Its presence in NetworkPkg (rather than MdePkg) suggests not, but the choice of EFI_TLS_CA_CERTIFICATE_GUID (rather than e.g. EDKII_TLS_CA_CERTIFICATE_GUID) suggests that it is intended to be included in future versions of the standard. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Add EFI_GLOBAL_VARIABLE as a well-known GUIDMichael Brown2025-03-131-0/+1
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Support extracting certificates from EFI signature list imagesMichael Brown2025-03-112-0/+23
| | | | | | | | | | | | | | | | | | | | | | 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] Allow for parsing of DER data separate from DER imagesMichael Brown2025-03-111-0/+5
| | | | | | | | | | | | | | | | We currently provide pem_asn1() to allow for parsing of PEM data that is not necessarily contained in an image. Provide an equivalent function der_asn1() to allow for similar parsing of DER data. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Add EFI_SIGNATURE_LIST header and GUID definitionsMichael Brown2025-03-104-0/+753
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Update to current EDK2 headersMichael Brown2025-03-1012-159/+265
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [efi] Mark UsbHostController.h as a non-imported headerMichael Brown2025-03-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | The UsbHostController.h header has been removed from the EDK2 codebase since it was never defined in a released UEFI specification. However, we may still encounter it in the wild and so it is useful to retain the GUID and the corresponding protocol name for debug messages. Add an iPXE include guard to this file so that the EDK2 header import script will no longer attempt to import it from the EDK2 tree. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [cpio] Allow for construction of parent directories as neededMichael Brown2025-02-241-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | iPXE allows individual raw files to be automatically wrapped with suitable CPIO headers and injected into the magic initrd image as exposed to a booted Linux kernel. This feature is currently limited to placing files within directories that already exist in the initrd filesystem. Remove this limitation by adding the ability for iPXE to construct CPIO headers for parent directories as needed, under control of the "mkdir=<n>" command-line argument. For example: initrd config.ign /usr/share/oem/config.ign mkdir=1 will create CPIO headers for the "/usr/share/oem" directory as well as for the "/usr/share/oem/config.ign" file itself. This simplifies the process of booting operating systems such as Flatcar Linux, which otherwise require the single "config.ign" file to be manually wrapped up as a CPIO archive solely in order to create the relevant parent directory entries. The value <n> may be used to control the number of parent directory entries that are created. For example, "mkdir=2" would cause up to two parent directories to be created (i.e. "/usr/share" and "/usr/share/oem" in the above example). A negative value such as "mkdir=-1" may be used to create all parent directories up to the root of the tree. Do not create any parent directory entries by default, since doing so would potentially cause the modes and ownership information for existing directories to be overwritten. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [menu] Allow a post-activity timeout to be definedMichael Brown2025-02-191-1/+2
| | | | | | | | | | | | | | | | | | Allow the "--retimeout" option to be used to specify a timeout value that will be (re)applied after each keypress activity. This allows script authors to ensure that a single (potentially accidental) keypress will not pause the boot process indefinitely. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Start up RBG on demand if neededMichael Brown2025-02-181-19/+4Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ANS X9.82 specification implicitly assumes that the RBG_Startup function will be called before it is needed, and includes checks to make sure that Generate_function fails if this has not happened. However, there is no well-defined point at which the RBG_Startup function is to be called: it's just assumed that this happens as part of system startup. We currently call RBG_Startup to instantiate the DRBG as an iPXE startup function, with the corresponding shutdown function uninstantiating the DRBG. This works for most use cases, and avoids an otherwise unexpected user-visible delay when a caller first attempts to use the DRBG (e.g. by attempting an HTTPS download). The download of autoexec.ipxe for UEFI is triggered by the EFI root bus probe in efi_probe(). Both the root bus probe and the RBG startup function run at STARTUP_NORMAL, so there is no defined ordering between them. If the base URI for autoexec.ipxe uses HTTPS, then this may cause random bits to be requested before the RBG has been started. Extend the logic in rbg_generate() to automatically start up the RBG if startup has not already been attempted. If startup fails (e.g. because the entropy source is broken), then do not automatically retry since this could result in extremely long delays waiting for entropy that will never arrive. Reported-by: Michael Niehaus <niehaus@live.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Support direct reduction only for Montgomery constant R^2 mod NMichael Brown2025-02-141-21/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The only remaining use case for direct reduction (outside of the unit tests) is in calculating the constant R^2 mod N used during Montgomery multiplication. The current implementation of direct reduction requires a writable copy of the modulus (to allow for shifting), and both the modulus and the result buffer must be padded to be large enough to hold (R^2 - N), which is twice the size of the actual values involved. For the special case of reducing R^2 mod N (or any power of two mod N), we can run the same algorithm without needing either a writable copy of the modulus or a padded result buffer. The working state required is only two bits larger than the result buffer, and these additional bits may be held in local variables instead. Rewrite bigint_reduce() to handle only this use case, and remove the no longer necessary uses of double-sized big integers. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Expose shifted out bit from big integer shiftsMichael Brown2025-02-131-6/+8
| | | | | | | | | | | | | | Expose the bit shifted out as a result of shifting a big integer left or right. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [malloc] Ensure free memory blocks remain alignedMichael Brown2025-02-031-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When allocating memory with a non-zero alignment offset, the free memory block structure following the allocation may end up improperly aligned. Ensure that free memory blocks always remain aligned to the size of the free memory block structure. Ensure that the initial heap is also correctly aligned, thereby allowing the logic for leaking undersized free memory blocks to be omitted. Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Add definitions and tests for the NIST P-384 elliptic curveMichael Brown2025-01-303-0/+25
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
| * [crypto] Add definitions and tests for the NIST P-256 elliptic curveMichael Brown2025-01-283-0/+26
| | | | | | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>