Page MenuHomeFreeBSD

powerpc64: change CAS to support Radix MMU
ClosedPublic

Authored by luporl on Sep 13 2021, 6:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Mar 8, 10:53 PM
Unknown Object (File)
Fri, Mar 8, 10:53 PM
Unknown Object (File)
Fri, Mar 8, 10:53 PM
Unknown Object (File)
Fri, Mar 8, 10:53 PM
Unknown Object (File)
Fri, Mar 8, 10:45 PM
Unknown Object (File)
Fri, Mar 8, 10:45 PM
Unknown Object (File)
Thu, Mar 7, 10:51 PM
Unknown Object (File)
Feb 8 2024, 11:17 PM
Subscribers

Details

Summary

Use radix_mmu environment variable to select between Hash or Radix MMU, when performing the CAS method call.

This matches kernel's behavior, by selecting Hash MMU by default and Radix if radix_mmu is not zero, to make sure that both loader and kernel always select the same MMU.

If the detected CPU is not a POWER9, then Hash MMU is selected, regardless of radix_mmu value, as in kernel.

Test Plan

Tested on QEMU pseries with KVM, selecting both Hash and Radix MMUs.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 41531
Build 38420: arc lint + arc unit

Event Timeline

stand/powerpc/ofw/cas.c
240

Defaulting off for radix_mmu, even on power9?

stand/powerpc/ofw/cas.c
240

Yes, we are holding making radix default because of D31232. BTW, do you think it is ok to commit it already?

When it lands, there is already D30797 to make radix default. Then we can just get back here and make it default in loader too.

jhibbits added inline comments.
stand/powerpc/ofw/cas.c
240

That's all I wanted to know, thanks!

This revision is now accepted and ready to land.Sep 14 2021, 2:00 PM

Query device tree for Radix/GTSE support, instead of using CPU version and HV bit checks, as this is a better approach, as discussed in IRC.

This revision now requires review to proceed.Sep 15 2021, 2:43 PM
stand/powerpc/ofw/cas.c
32–33

Why not make this a #ifdef instead?

Address reviewer's comments

luporl added inline comments.
stand/powerpc/ofw/cas.c
32–33

Ok, I've used #if just because it's a bit less typing to enable/disable it.

luporl marked an inline comment as done.
This revision is now accepted and ready to land.Sep 15 2021, 5:48 PM

Don't forget to update the commit message, with the latest changes you made.

This revision was automatically updated to reflect the committed changes.