Page MenuHomeFreeBSD

intelhfi - Intel TD/HFI driver - Part1b: Add IA32_PM_ENABLE bit flag define for specialregs.h.
AcceptedPublic

Authored by koinec_yahoo.co.jp on Sun, May 10, 11:40 AM.
Tags
None
Referenced Files
F156843383: D56919.id177530.diff
Sat, May 16, 8:41 PM
Unknown Object (File)
Fri, May 15, 7:01 AM
Unknown Object (File)
Fri, May 15, 12:46 AM
Unknown Object (File)
Thu, May 14, 8:45 PM
Unknown Object (File)
Thu, May 14, 6:04 PM
Unknown Object (File)
Tue, May 12, 2:51 PM
Unknown Object (File)
Mon, May 11, 3:56 PM
Unknown Object (File)
Mon, May 11, 3:44 PM
Subscribers

Details

Summary

To support hmp(4) (https://reviews.freebsd.org/D56547) in the intelhfi driver being developed at https://reviews.freebsd.org/D44456, it became necessary to process the IA32_PM_ENABLE MSR.
Therefore, I will add the definition of the corresponding bit flag.

The following is supplementary information:

Test Plan

This code utilizes constants defined in intelhfi (https://reviews.freebsd.org/D44456), and I've confirmed that the values ​​can be obtained by this test.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

koinec_yahoo.co.jp created this revision.
minsoochoo0122_proton.me added reviewers: kib, olce.
minsoochoo0122_proton.me set the repository for this revision to rG FreeBSD src repository.
minsoochoo0122_proton.me added subscribers: emaste, imp, kib, olce.
minsoochoo0122_proton.me added inline comments.
sys/x86/include/specialreg.h
908

Like above, you can simply use 0x00000001,

This revision now requires changes to proceed.Sun, May 10, 2:29 PM
sys/x86/include/specialreg.h
908

Values below are of the form (1ULL << x) though and I think it's fine.

From the Intel doc:

HWP_ENABLE (bit 0, R/W1Once) — Software sets this bit to enable HWP with autonomous selection. When set, the processor will disregard input from the legacy performance control interface (IA32_PERF_CTL). Note this bit can only be enabled once from the default value. Once set, writes to the HWP_ENABLE bit are ignored. Only RESET will clear this bit. Default = zero (0).

So if the source doc uses "bit 0" I think (1ULL << 0) is straightforward.

This revision is now accepted and ready to land.Mon, May 11, 3:55 PM

I'm happy to push this bit definition now and get one item out of the stack. Can you confirm Koine Yuusuke <koinec@yahoo.co.jp> for the Git author info?