mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 10:18:15 +09:00
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. :^)
This commit is contained in:
parent
4644217094
commit
f614f0e2cb
Notes:
sideshowbarker
2024-07-19 07:46:44 +09:00
Author: https://github.com/awesomekling
Commit: f614f0e2cb
5 changed files with 140 additions and 98 deletions
|
@ -53,7 +53,7 @@ void initialize()
|
|||
if (feature_level == FeatureLevel::Disabled)
|
||||
return;
|
||||
|
||||
auto rsdp = StaticParsing::search_rsdp();
|
||||
auto rsdp = StaticParsing::find_rsdp();
|
||||
if (rsdp.is_null())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue