mirror of
https://github.com/ipxe/ipxe
synced 2026-01-23 04:29:01 +03:00
88cffd75a9c2cc15780d465fe4e9ccf45719d6c9
The RISC-V specification states that "if SATP is written with an unsupported mode, the entire write has no effect; no fields in SATP are modified". We currently rely on this specified behaviour when calculating the early UART base address: if SATP has a non-zero value then we assume that paging must be enabled. The XuanTie C910 CPU (as used in the Lichee Pi 4A) does not conform to this specified behaviour. Writing SATP with an unsupported mode will leave SATP.MODE as zero (i.e. bare physical addressing) but the write to SATP.PPN will still take effect, leaving SATP with an illegal non-zero value. Work around this misbehaviour by explicitly writing zero to SATP if we detect that the mode change has not taken effect (e.g. because the CPU does not support the requested paging mode). Signed-off-by: Michael Brown <mcb30@ipxe.org>
iPXE README File Quick start guide: cd src make For any more detailed instructions, see http://ipxe.org
Languages
C
97.3%
Assembly
1.5%
Perl
0.6%
Makefile
0.3%
Python
0.2%