More Config refactoring
This is extracted from aosp/2874014 - these changes seem useful in
their own right.
The main aim is to make adding new entries easier.
Changes:
- Remove mut from entries we never need to change.
- Stop using deprecated zerocopy LayoutVerified.
- Extract ALL_ENTRIES constant so it's easy to spot.
- Simplify get_entries.
- Remove an unsafe block and use safe code instead.
- get_entries now consumes self (it can't now be called twice,
but we don't need to).
Bug: 291232226
Test: TH
Change-Id: Ia2997cef94d3c506885ec7b35b9a4270a3e8542a
diff --git a/pvmfw/src/main.rs b/pvmfw/src/main.rs
index 1d55a84..09bb899 100644
--- a/pvmfw/src/main.rs
+++ b/pvmfw/src/main.rs
@@ -63,7 +63,7 @@
signed_kernel: &[u8],
ramdisk: Option<&[u8]>,
current_bcc_handover: &[u8],
- mut debug_policy: Option<&mut [u8]>,
+ mut debug_policy: Option<&[u8]>,
) -> Result<Range<usize>, RebootReason> {
info!("pVM firmware");
debug!("FDT: {:?}", fdt.as_ptr());