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)
Sun, Dec 15, 11:27 PM
Unknown Object (File)
Mon, Dec 9, 4:14 AM
Unknown Object (File)
Mon, Nov 25, 9:29 AM
Unknown Object (File)
Nov 11 2024, 8:26 PM
Unknown Object (File)
Nov 11 2024, 8:08 AM
Unknown Object (File)
Nov 6 2024, 9:59 PM
Unknown Object (File)
Nov 6 2024, 4:09 PM
Unknown Object (File)
Nov 4 2024, 1:06 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 41525
Build 38414: arc lint + arc unit

Event Timeline

stand/powerpc/ofw/cas.c
239

Defaulting off for radix_mmu, even on power9?

stand/powerpc/ofw/cas.c
239

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
239

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.