Disable ramdump with debug policy
This CL disables ramdump if debug policy doesn't explicitly
enables ramdump via ramdump prop in the /avf/guest/common node.
The virtualization service always provides crashkernel=17M via
kernel command, so this CL removes crashkernel=17MB in the
microdroid's bootargs in the /chosen node.
Here's the test result on my machine with MicrodroidTestApp.
- Before the CL (or this CL + ramdump is enabled)
$ adb shell /proc/meminfo
MemTotal: 212968 kB
MemFree: 138336 kB
MemAvailable: 171980 kB
- With this CL + ramdump is disabled
$ adb shell /proc/meminfo
MemTotal: 230372 kB
MemFree: 165240 kB
MemAvailable: 192648 kB
Bug: 243630590
Test: Boot microdroid with following AVF debug policies \
- AVF debug policy exists, and ramdump=<1> \
- AVF debug policy exists, and ramdump=<0> \
- No AVF debug policy
Change-Id: Ia486448b5513c2d5662a4f16ddb3334b20913329
diff --git a/pvmfw/src/main.rs b/pvmfw/src/main.rs
index 24c36b3..faadd37 100644
--- a/pvmfw/src/main.rs
+++ b/pvmfw/src/main.rs
@@ -22,6 +22,7 @@
mod avb;
mod config;
+mod debug_policy;
mod dice;
mod entry;
mod exceptions;