pvmfw: entry: Introduce start() & main_wrapper()
As the environment needs to be fully configured before Rust code can run
without taking particular care about the memory or MMIO it accesses and
as we want to take advantage of Rust error-handling (Result<>, ?, ...)
and borrow checker, introduce a 3-stage wrapping of the main() function
where resources are progressively configured (then dropped) before
main() gets run.
Test: atest MicrodroidTestApp
Change-Id: I3faaba0f481225ae90f07e1f7f1e0b1855a26bae
diff --git a/pvmfw/src/helpers.rs b/pvmfw/src/helpers.rs
index ac3a48e..d8fb3ed 100644
--- a/pvmfw/src/helpers.rs
+++ b/pvmfw/src/helpers.rs
@@ -14,6 +14,7 @@
//! Miscellaneous helper functions.
+pub const FDT_MAX_SIZE: usize = 2 << 20;
pub const SIZE_4KB: usize = 4 << 10;
/// Computes the address of the page containing a given address.