Comment 55 for bug 314928

Revision history for this message
Norman Yarvin (yarvin-yarchive) wrote :

That error message "write error: invalid argument" doesn't mean that there was a syntax error. Instead the kernel is rejecting the command. In my case it added a line to dmesg explaining the rejection:

mtrr: type mismatch for d0000000,1000000 old: write-back new: write-combining

That was because there was already an overlapping MTRR entry, covering the first 4GB of address space, describing it as "write-back". The kernel rejects the write-combining MTRR since it overlaps that write-back range. (There are already a bunch of MTRR entries listing uncacheable memory ranges in the first 4GB; but that's permissible, whereas overlap of write-combining and write-back isn't permissible.) This is on an AMD64 machine with 4GB of memory. I did manage to add a write-combining MTRR entry, but only by deleting the entry covering the first 4GB, and replacing it with one 2GB entry and one 1GB entry. This wouldn't be possible on all motherboards; it just happens that on this motherboard, there's no usable memory in the fourth GB of address space; it's all mapped either above or below that.