vmbase: Initialize logger before calling main()

By setting up the console (MMIO_GUARD_MAP-ing it if necessary) and
initializing the logger before entering main, we can centralize the
early error handling instead of expecting clients to deal with it,
provide a standard interface for configuring the log level (relying on
the log crate) which can't fail, and simplify client code.

This will enable vmbase itself to log errors in future changes.

Test: atest DebugPolicyHostTests#testNoAdbInDebugPolicy_withDebugLevelNone_boots
Test: atest rialto_test vmbase_example.integration_test
Change-Id: Id8c7256555d7940174c9f9375435d71851302020
diff --git a/pvmfw/src/entry.rs b/pvmfw/src/entry.rs
index 7727970..c81b57c 100644
--- a/pvmfw/src/entry.rs
+++ b/pvmfw/src/entry.rs
@@ -33,7 +33,7 @@
 use vmbase::{
     configure_heap, console,
     layout::{self, crosvm},
-    logger, main,
+    main,
     memory::{min_dcache_line_size, MemoryTracker, MEMORY, SIZE_128KB, SIZE_4KB},
     power::reboot,
     rand,
@@ -192,23 +192,7 @@
     // - only perform logging once the logger has been initialized
     // - only access non-pvmfw memory once (and while) it has been mapped
 
-    logger::init(LevelFilter::Info).map_err(|_| RebootReason::InternalError)?;
-
-    // Use debug!() to avoid printing to the UART if we failed to configure it as only local
-    // builds that have tweaked the logger::init() call will actually attempt to log the message.
-
-    if let Some(mmio_guard) = get_mmio_guard() {
-        mmio_guard.init().map_err(|e| {
-            debug!("{e}");
-            RebootReason::InternalError
-        })?;
-
-        mmio_guard.map(console::BASE_ADDRESS).map_err(|e| {
-            debug!("Failed to configure the UART: {e}");
-            RebootReason::InternalError
-        })?;
-    }
-
+    log::set_max_level(LevelFilter::Info);
     crypto::init();
 
     let page_table = memory::init_page_table().map_err(|e| {