pvmfw: Parametrise GUEST_PAGE_SIZE
Replace the const with variables trickling down from a centralized
assignment, in preparation for reading it from the verified kernel.
Note: No functional change intended.
Bug: 339779843
Bug: 339782511
Test: m pvmfw_bin
Change-Id: I5f88ff52cb3d8deb220568f789e6569862505e75
diff --git a/guest/pvmfw/avb/tests/utils.rs b/guest/pvmfw/avb/tests/utils.rs
index 61bfbf2..86efbba 100644
--- a/guest/pvmfw/avb/tests/utils.rs
+++ b/guest/pvmfw/avb/tests/utils.rs
@@ -114,6 +114,7 @@
initrd: &[u8],
initrd_salt: &[u8],
expected_debug_level: DebugLevel,
+ page_size: Option<usize>,
) -> Result<()> {
let public_key = load_trusted_public_key()?;
let kernel = load_latest_signed_kernel()?;
@@ -133,6 +134,7 @@
public_key: &public_key,
capabilities,
rollback_index: if cfg!(llpvm_changes) { 1 } else { 0 },
+ page_size,
};
assert_eq!(expected_boot_data, verified_boot_data);
@@ -144,6 +146,7 @@
salt: &[u8],
expected_rollback_index: u64,
capabilities: Vec<Capability>,
+ page_size: Option<usize>,
) -> Result<()> {
let public_key = load_trusted_public_key()?;
let verified_boot_data = verify_payload(
@@ -163,6 +166,7 @@
public_key: &public_key,
capabilities,
rollback_index: expected_rollback_index,
+ page_size,
};
assert_eq!(expected_boot_data, verified_boot_data);