From f347cd224db0b2fb29cea3b29e26446601c346c5 Mon Sep 17 00:00:00 2001 From: David Brazdil Date: Mon, 23 Jan 2023 12:00:17 +0000 Subject: [PATCH] Set pKVM to enabled in /misc on A0 chips pKVM provides a workaround for A0 hardware issue. Signal to tests that an A0 device should not be run without it by enabling it in /misc on first boot. We only do this on debug builds. Bug: 266183966 Test: flash, boot, reboot to bootloader, check 'fastboot oem pkvm' Change-Id: I9465cf816c65943cba6e04b1d939b0bb5af4395d --- conf/init.debug.rc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/conf/init.debug.rc b/conf/init.debug.rc index 77fd49bd..0fed4ffe 100644 --- a/conf/init.debug.rc +++ b/conf/init.debug.rc @@ -40,3 +40,16 @@ on property:ro.revision=PROTO1.1 setprop debug.hypervisor.metrics_tag "hwrev_a0" on property:ro.revision=EVT1.0 setprop debug.hypervisor.metrics_tag "hwrev_a0" + +# A0 chips require pKVM for a hardware issue workaround. Set pKVM to 'enabled' +# in /misc partition on first boot to signal to tests that this device should +# not be booted with pKVM disabled. +service vendor.force_pkvm /vendor/bin/misc_writer --set-enable-pkvm + disabled + oneshot +on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.0 + start vendor.force_pkvm +on property:persist.sys.device_provisioned=1 && property:ro.revision=PROTO1.1 + start vendor.force_pkvm +on property:persist.sys.device_provisioned=1 && property:ro.revision=EVT1.0 + start vendor.force_pkvm