diff options
author | Andreas Kling <kling@serenityos.org> | 2020-04-09 17:12:58 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-04-09 17:19:11 +0200 |
commit | f614f0e2cb6dc9035fec2b90529500813022cf1c (patch) | |
tree | 3d78a3e1e82bb8fcc140f7f7699b8c980fb36daa /AK/Assertions.h | |
parent | 46442170942caf2e4e31cf3a6a1499c8af2b3ec6 (diff) | |
download | serenity-f614f0e2cb6dc9035fec2b90529500813022cf1c.zip |
Kernel: Add typed_map<T>(PhysicalAddress) and use it in ACPI parsing
There was a frequently occurring pattern of "map this physical address
into kernel VM, then read from it, then unmap it again".
This new typed_map() encapsulates that logic by giving you back a
typed pointer to the kind of structure you're interested in accessing.
It returns a TypedMapping<T> that can be used mostly like a pointer.
When destroyed, the TypedMapping object will unmap the memory. :^)
Diffstat (limited to 'AK/Assertions.h')
0 files changed, 0 insertions, 0 deletions