I noted that the display of family wasn't displaying correctly for AMD cpus
Details
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
LGTM modulo my first comment.
usr.sbin/cpucontrol/amd10h.c | ||
---|---|---|
142 ↗ | (On Diff #43000) | IIRC, extfamily bits are valid IFF family == 0xF. Which is handled by the macro in sys/. Would it be possible to just include the <machine/specialreg.h> and use the CPUID_TO_FAMILY() macro? If we're merging the family and extfamily fields, we probably don't need to print extfamily too. |
151 ↗ | (On Diff #43000) | Thanks! |
usr.sbin/cpucontrol/amd10h.c | ||
---|---|---|
142 ↗ | (On Diff #43000) | We already include <machine/specialreg.h> So this should be converted! let me take a stab at it. I don't think we're merging the family/extfamily fields here. Are we? I'm not looking at the AMD SDM btw, just noted that the family was being displayed "wrong". |
usr.sbin/cpucontrol/amd10h.c | ||
---|---|---|
142 ↗ | (On Diff #43000) | Yep, this change is merging the family and extfamily fields — which is good, it’s closer to what users expect. Eg 17h is encoded as family=F + extfamily=something. Check CPUID_TO_FAMILY() for similarity with the shifts and masks printed here. |