mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-27 13:58:20 +00:00
fix(mm): export phys
This commit is contained in:
+2
-1
@@ -7,6 +7,7 @@ pub const page_size = 4096;
|
|||||||
|
|
||||||
pub const init = private.init.init;
|
pub const init = private.init.init;
|
||||||
pub const vmem = private.vmem;
|
pub const vmem = private.vmem;
|
||||||
|
pub const phys = private.phys;
|
||||||
|
|
||||||
// 16 TB of maximum physical memory.
|
// 16 TB of maximum physical memory.
|
||||||
// This should be fine on consumer hardware for at least a decade :^)
|
// This should be fine on consumer hardware for at least a decade :^)
|
||||||
@@ -29,7 +30,7 @@ pub const MapFlags = packed struct {
|
|||||||
cache_disable: bool = false,
|
cache_disable: bool = false,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Error = error{OutOfMemory, InvalidAddress, InvalidSize};
|
pub const Error = error{ OutOfMemory, InvalidAddress, InvalidSize };
|
||||||
|
|
||||||
pub inline fn page_to_pfn(addr: usize) Pfn {
|
pub inline fn page_to_pfn(addr: usize) Pfn {
|
||||||
return @intCast(addr >> 12);
|
return @intCast(addr >> 12);
|
||||||
|
|||||||
Reference in New Issue
Block a user