Page MenuHomeFreeBSD

arm64: Create a KBI for managing CPU ID registers
Needs ReviewPublic

Authored by andrew on Jun 12 2023, 11:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 30, 9:04 AM
Unknown Object (File)
Nov 3 2025, 6:20 AM
Unknown Object (File)
Oct 30 2025, 12:01 AM
Unknown Object (File)
Oct 25 2025, 2:04 AM
Unknown Object (File)
Oct 22 2025, 3:13 PM
Unknown Object (File)
Oct 22 2025, 2:28 AM
Unknown Object (File)
Oct 21 2025, 2:45 PM
Unknown Object (File)
Sep 3 2025, 9:58 PM
Subscribers

Details

Reviewers
markj
manu
Group Reviewers
arm64
Summary

Create a new group of functions to manage a view of the ID registers
that may be different than both userspace and the kernel views.

This will be used by bhyve to provide the sanitized register values.

Sponsored by: Arm Ltd

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 52007
Build 48898: arc lint + arc unit

Event Timeline

sys/arm64/arm64/identcpu.c
1803

This function name doesn't make much sense to me. The function doesn't update anything, it clamps individual fields in a register value (new_val) so that they are no larger than the existing fields (in val).

Maybe this should be mask_fields() or clamp_fields() or something like that? Or am I missing some ARM terminology?

1895

How do the register fields initially get populated?

sys/arm64/include/cpu.h
222

There is no cpu_desc_set().