aboutsummaryrefslogtreecommitdiff
path: root/src/paging.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/paging.zig')
-rw-r--r--src/paging.zig4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/paging.zig b/src/paging.zig
index 1c7b49f..e2860cc 100644
--- a/src/paging.zig
+++ b/src/paging.zig
@@ -440,6 +440,10 @@ pub const Table = struct {
const fdt_blob = @intFromPtr(dt_header.raw_hdr);
try root.identityMapRange(fdt_blob, fdt_blob + dt_header.total_size, EntryFlags.readOnly);
}
+
+ pub fn mapDevice(root: *Table, reg: fdt.Reg) !void {
+ try root.identityMapRange(reg.start, reg.start + reg.len, EntryFlags.readWrite);
+ }
};
pub fn init() void {