Page 1 of 1
UEFI memory map strange attributes
Posted: Sat Jul 19, 2025 2:28 pm
by mariuszp
When I get the memory map from UEFI, it returns valid ranges, but the memory marked as EfiConventionalMemory (7) has the attribute 0xF - this means uncacheable, write combining, write-through and write-back. Conventional memory should obviously be write-back. I've heard (but don't know how to confirm) that the memory attributes might be wrong for conventional memory - and these are clearly garbage.
Has anyone else seen this? Am i supposed to just ignore the attributes for conventional memory?
Re: UEFI memory map strange attributes
Posted: Sat Jul 19, 2025 8:41 pm
by Octocontrabass
Those attributes look correct to me. The attributes indicate capabilities, and ordinary RAM is capable of using any of those four caching modes. Yes, you usually want write-back, but the other three choices are still valid and occasionally necessary (e.g. buffers for HD Audio devices).
Re: UEFI memory map strange attributes
Posted: Sun Jul 20, 2025 6:05 am
by mariuszp
I was under the impression that these were telling me how to map them. I guess i should be using the Memory Type instead?
Re: UEFI memory map strange attributes
Posted: Sun Jul 20, 2025 4:12 pm
by Octocontrabass
You're supposed to use both. The memory type tells you what you're mapping, and the attributes tell you how you're allowed to map it.
I can't think of any situation where ordinary RAM wouldn't have the write-back attribute, though, so it might be okay to ignore the attributes in this case.