mem_range_attr_set on amd64 returns ENOSPC

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

mem_range_attr_set on amd64 returns ENOSPC

Kevin Zheng

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

(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


  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x1<LAHF>
  Structured Extended Features3=0x9c000000<IBPB,STIBP,L1DFL,SSBD>
  XSAVE Features=0x1<XSAVEOPT>
  TSC: P-state invariant, performance statistics


Kevin Zheng
[hidden email] | [hidden email] | PGP: 0xC22E1090
[hidden email] mailing list
To unsubscribe, send any mail to "[hidden email]"