summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/virt_offset.h
Commit message (Collapse)AuthorAgeFilesLines
* [build] Mark core files as permitted for UEFI Secure BootMichael Brown2026-01-141-0/+1
| | | | | | | | | | | | 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>
* [uaccess] Allow for coherent DMA mapping of the 32-bit address spaceMichael Brown2025-07-041-7/+27
| | | | | | | | | | | | | | | | | | On platforms where DMA devices are not in the same coherency domain as the CPU cache, it is necessary to create page table entries where the translations are marked as uncacheable. We choose to place iPXE within the low 4GB of memory (since 32-bit DMA devices are still reasonably common even on systems with 64-bit CPUs). We therefore need to cover only the low 4GB of memory with these page table entries. Update virt_to_phys() to allow for the existence of such a mapping, assuming that iPXE itself will always reside within the top 4GB of the 64-bit virtual address space (and therefore that the DMA mapping must lie somewhere below this in the negative virtual address space). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [riscv] Hold virtual address offset in the thread pointer registerMichael Brown2025-05-111-36/+7Star
| | | | | | | | | | | | iPXE does not make use of any thread-local storage. Use the otherwise unused thread pointer register ("tp") to hold the current value of the virtual address offset, rather than using a global variable. This ensures that virt_offset can be made valid even during very early initialisation (when iPXE may be executing directly from read-only memory and so cannot update a global variable). Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [uaccess] Generalise librm's virt_offset mechanism for RISC-VMichael Brown2025-05-081-0/+140
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>