mem_range_attr_set on amd64 returns ENOSPC
Kevin Zheng
kevinz5000 at gmail.com
Mon Dec 24 04:09:43 UTC 2018
Hi,
I'm going down a rabbit hole figuring out why i915 drm (12 snapshot but
also earlier) can't set MTRR's on my computer:
Failed to add WC MTRR for [0xe0000000-0xefffffff]: -28; performance may
suffer
(I haven't checked that this address range is sane yet, but even if it
isn't, it should be returning something else.)
That was a return code from a call to mem_range_attr_set. On amd64, that
means x86_mrset is returning -28 (ENOSPC).
That's sys/x86/x86/x86_mem.c returning ENOSPC. But, I'm not familiar
with MTRR's on x86 and why FreeBSD does this search.
There's an ominous comment at the top:
/*
* Modify/add a variable MTRR to satisfy the request.
*
* XXX needs to be updated to properly support "busy" ranges.
*/
Might this have something to do with that?
My system:
FreeBSD 12.0-RELEASE r341666 GENERIC amd64
CPU: Intel(R) Core(TM) i5-2540M CPU @ 2.60GHz (2591.64-MHz K8-class CPU)
Origin="GenuineIntel" Id=0x206a7 Family=0x6 Model=0x2a Stepping=7
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
Features2=0x1fbae3ff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX>
AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
AMD Features2=0x1<LAHF>
Structured Extended Features3=0x9c000000<IBPB,STIBP,L1DFL,SSBD>
XSAVE Features=0x1<XSAVEOPT>
VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
TSC: P-state invariant, performance statistics
Regards,
Kevin
--
Kevin Zheng
kevinz5000 at gmail.com | kevinz at berkeley.edu | PGP: 0xC22E1090
More information about the freebsd-hackers
mailing list