New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FDT incorrectly claims JH7110 hart 0 is a U74 #33
Comments
Are you certain that CPU0 is the E24 and not the S7 (which is part of the u74-mc but without the Sv39 Virtual Memory support) ? |
Uh yes you’re right, S7 not E24, not sure where I got that one. Point is it’s not a U74. EDIT: Ah right, the JH7110 has both a U74-MC and an E24, and when I skimmed the TRM I didn't appreciate they were separate (despite knowing the U74-MC is U74s with an S7), assuming it was just documenting the U74 and non-U74 cores of the U74-MC. SiFive did themselves no favours with that naming though... |
@X547, this might also be the reason why Haiku OS EFI crashes in my tests without any proper trace, so I will keep an eye on this. Might be useful to patch the FDT & rebuild U-Boot when I'll return to it. |
@LekKit, Which U-Boot image/branch are you using? Default Debian U-Boot EFI seems not working at all.
UPDATE: was corrupted EFI executable. |
https://github.com/starfive-tech/u-boot If you mean the EFI payload, I tried to run GRUB (worked? but didn't try to progress further) and Haiku EFI bootloader which got stuck in random places and debugging was a nightmare |
https://github.com/starfive-tech/u-boot/blob/1539c1fb5a498fd7d20c2cffc84c187d703c8b66/arch/riscv/dts/jh7110.dtsi#L22-L47
This says it's a U74 with a modified ISA string, but that is not correct, it is an S7, which in particular means it does not have an MMU (it doesn't even have supervisor mode). Moreover, since U-Boot is providing the jh7110-u-boot.dtsi-based FDT via EFI, the
status = "disabled";
gets overridden tostatus = "okay";
. Combined, these two mean FreeBSD believes that it should be attempting to start the S7 hart 0 as an AP, which is clearly nonsense. Attempting to make an SBI HSM call to do so eventually leads to firmware dying with a fatal load access fault on hart 0, and I have to runfdt prop /cpus/cpu@0/status disabled
at the FreeBSD loader prompt to correct this in order to boot.Please fix all three of these issues; the FDT should have the correct properties for the S7 core (including no MMU), the FDT provided to the EFI application should not indicate that the S7 core has an okay status, and any attempt to make an SBI HSM call to start hart 0 should gracefully return an error code.
The text was updated successfully, but these errors were encountered: