[pvmfw][vmbase] Add constant PAGE_SIZE to vmbase
This cl adds a constant PAGE_SIZE of 4 KiB to vmbase and uses it
in pvmfw and rialto. Later it will be used as the page size in
the MemoryTracker for both pvmfw and rialto.
Bug: 284462758
Test: m pvmfw_img
Change-Id: I5b23f2571a3df81aa824f6f60e94b326fb1e225f
diff --git a/vmbase/src/memory/mod.rs b/vmbase/src/memory/mod.rs
index e5e0305..13f1af5 100644
--- a/vmbase/src/memory/mod.rs
+++ b/vmbase/src/memory/mod.rs
@@ -24,5 +24,5 @@
pub use shared::MemorySharer;
pub use util::{
flush, flushed_zeroize, min_dcache_line_size, page_4kb_of, phys_to_virt, virt_to_phys,
- SIZE_2MB, SIZE_4KB, SIZE_4MB,
+ PAGE_SIZE, SIZE_2MB, SIZE_4KB, SIZE_4MB,
};
diff --git a/vmbase/src/memory/util.rs b/vmbase/src/memory/util.rs
index 3739d28..04d42cd 100644
--- a/vmbase/src/memory/util.rs
+++ b/vmbase/src/memory/util.rs
@@ -27,6 +27,9 @@
/// The size of a 4MB memory in bytes.
pub const SIZE_4MB: usize = 4 << 20;
+/// The page size in bytes assumed by vmbase - 4 KiB.
+pub const PAGE_SIZE: usize = SIZE_4KB;
+
/// Reads the number of words in the smallest cache line of all the data caches and unified caches.
#[inline]
pub fn min_dcache_line_size() -> usize {