Page MenuHomeFreeBSD

Add a soft-float riscv kernel config
ClosedPublic

Authored by imp on Feb 23 2020, 11:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Nov 19, 5:43 AM
Unknown Object (File)
Sep 24 2024, 8:13 AM
Unknown Object (File)
Sep 24 2024, 5:23 AM
Unknown Object (File)
Sep 24 2024, 4:37 AM
Unknown Object (File)
Sep 23 2024, 7:35 PM
Unknown Object (File)
Sep 22 2024, 7:20 AM
Unknown Object (File)
Sep 17 2024, 5:57 AM
Unknown Object (File)
Sep 14 2024, 6:00 AM
Subscribers

Details

Summary

This is just like generic, only creates a soft-float kernel. Omit it from the
universe build for now.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This looks good to me.

Any reason not to hook this up to universe? The more testing RISC-V gets, the better. Does it significantly increase the build-time?

This revision is now accepted and ready to land.Feb 24 2020, 4:47 AM

This looks good to me.

Any reason not to hook this up to universe? The more testing RISC-V gets, the better. Does it significantly increase the build-time?

Paranoia on my part. If it's ready, no reason...

In D23812#523274, @imp wrote:

This looks good to me.

Any reason not to hook this up to universe? The more testing RISC-V gets, the better. Does it significantly increase the build-time?

Paranoia on my part. If it's ready, no reason...

I'm just running a 'make universe' with and without this to compare... I'll report results here. If it 1) works and 2) doesn't double the time, we should just remove the #NO_UNIVERSE tag and force this on everyone. ;-)

In D23812#523274, @imp wrote:

This looks good to me.

Any reason not to hook this up to universe? The more testing RISC-V gets, the better. Does it significantly increase the build-time?

Paranoia on my part. If it's ready, no reason...

I'm just running a 'make universe' with and without this to compare... I'll report results here. If it 1) works and 2) doesn't double the time, we should just remove the #NO_UNIVERSE tag and force this on everyone. ;-)

Works for me. The time is actually relatively small at the moment (on the order of a minute or two on my boxes). I was worried because up until recently riscv64sf was believed to not be good. If that's not the case, I'll remove it.

This revision now requires review to proceed.Feb 24 2020, 6:43 AM

Yeah. The diff is tiny.

Unless anyone else under riscv objects strongly, we should just build both targets.

This revision is now accepted and ready to land.Feb 24 2020, 6:50 AM

Yeah. The diff is tiny.

Unless anyone else under riscv objects strongly, we should just build both targets.

I have the commit all queued up (along with a hack to config to mkdir ../compile when it doesn't exist because git automatically deletes empty directories). I'll push it in about 8 hours from now (~8am MST Denver Co time). that should give people in EU time enough to wake up and read their mail.

In D23812#523285, @imp wrote:

Yeah. The diff is tiny.

Unless anyone else under riscv objects strongly, we should just build both targets.

I have the commit all queued up (along with a hack to config to mkdir ../compile when it doesn't exist because git automatically deletes empty directories). I'll push it in about 8 hours from now (~8am MST Denver Co time). that should give people in EU time enough to wake up and read their mail.

Sounds good! Thank you! 🙏

Note: these changes don't fix, btw, the need to have the -DMACHINE_ARCH stuff in Makefile.riscv. That's due to confusion about CFLAGS, I think, since the kernel is always built such that it thinks the ABI is soft-float.

See D23813 for a fix for the MACHINE_ARCH issue. Note, it changes the flags used to build the kernel...

I've also had to apply this patch, but that's an issue that was already present:

diff --git a/sys/riscv/riscv/swtch.S b/sys/riscv/riscv/swtch.S
index 39213d3d31b..c31f23c73b9 100644
--- a/sys/riscv/riscv/swtch.S
+++ b/sys/riscv/riscv/swtch.S
@@ -151,7 +151,6 @@ ENTRY(fpe_state_save)
        __fpe_state_save a0
        ret
 END(fpe_state_save)
-#endif /* FPE */

 /*
  * void
@@ -205,7 +204,8 @@ ENTRY(fpe_state_clear)

        ret
 END(fpe_state_clear)
-
+#endif /* FPE */
+
 /*
  * void cpu_throw(struct thread *old __unused, struct thread *new)
  */
sys/riscv/conf/GENERICSF
8 ↗(On Diff #68733)

I think this also wants nooption FPE.

Am I correct in thinking that before this change, universe would skip building a GENERIC kernel for riscv64sf?

In D23812#523377, @kp wrote:

I've also had to apply this patch, but that's an issue that was already present:

I'll add this.

sys/riscv/conf/GENERICSF
8 ↗(On Diff #68733)

Good point. Applied.

Am I correct in thinking that before this change, universe would skip building a GENERIC kernel for riscv64sf?

Yes. You are correct. We build only the kernels that match MACHINE and MACHINE_ARCH.

This revision was automatically updated to reflect the committed changes.

Doh! forgot the UPDATING entry. Just added it.