summaryrefslogtreecommitdiffstats
path: root/src/arch/riscv/interface
Commit message (Collapse)AuthorAgeFilesLines
* [riscv] Inhibit SBI console when a serial console is activeMichael Brown2025-06-231-0/+12
| | | | | | | | | | | | | When a native serial driver is enabled for the system console device specified via "/chosen/stdout-path", it is very likely that this will correspond to the same physical serial port used for the SBI debug console. Inhibit input and output via the SBI console whenever a serial console is active, to avoid duplicated output characters and unpredictable input behaviour. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [riscv] Write SBI console output to early UART, if enabledMichael Brown2025-06-121-0/+5
| | | | | | | | | | | | The early UART is an optional feature used to obtain debug output from the prefix before iPXE is able to parse the device tree. Extend this feature to also cover any console output that iPXE attempts to send to the SBI console, on the basis that the purpose of the early UART is to provide an output-only device for situations in which there is no functional SBI console. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [riscv] Support older SBI implementationsMichael Brown2025-05-252-6/+29
| | | | | | | Fall back to attempting the legacy SBI console and shutdown calls if the standard calls fail. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [riscv] Use generic external heap based on the system memory mapMichael Brown2025-05-191-51/+0Star
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [reboot] Generalise warm reboot indicator to a flags bitmaskMichael Brown2025-04-281-2/+4
| | | | | | | Allow for the possibility of additional reboot types by extending the reboot() function to use a flags bitmask rather than a single flag. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [umalloc] Remove userptr_t from user memory allocationsMichael Brown2025-04-231-7/+4Star
| | | | | | | | Use standard void pointers for umalloc(), urealloc(), and ufree(), with the "u" prefix retained to indicate that these allocations are made from external ("user") memory rather than from the internal heap. Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [riscv] Map DEL to backspace on the SBI debug consoleMichael Brown2025-04-191-0/+6
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [sbi] Add support for running as a RISC-V SBI payloadMichael Brown2024-10-281-0/+54
| | | | | | | | | | | | | | | | | 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 reboot and power off via SBIMichael Brown2024-10-221-0/+76
| | | | Signed-off-by: Michael Brown <mcb30@ipxe.org>
* [riscv] Add support for the SBI debug consoleMichael Brown2024-10-221-0/+101
Add the ability to issue Supervisor Binary Interface (SBI) calls via the ECALL instruction, and use the SBI DBCN extension to implement a debug console. Signed-off-by: Michael Brown <mcb30@ipxe.org>