The psci crate was renamed to smccc. Use the new version.
Bug: 245889995
Test: m pvmfw
Change-Id: Ib61e46a6613c1fcfcf559d3672584b6e7b85cb7d
diff --git a/vmbase/Android.bp b/vmbase/Android.bp
index 237a377..e55dbb0 100644
--- a/vmbase/Android.bp
+++ b/vmbase/Android.bp
@@ -64,7 +64,7 @@
srcs: ["src/lib.rs"],
rustlibs: [
"liblog_rust_nostd",
- "libpsci",
+ "libsmccc",
"libspin_nostd",
],
whole_static_libs: [
diff --git a/vmbase/src/power.rs b/vmbase/src/power.rs
index 10a5e5d..9240acf 100644
--- a/vmbase/src/power.rs
+++ b/vmbase/src/power.rs
@@ -14,13 +14,16 @@
//! Functions for shutting down the VM.
-use psci::{system_off, system_reset};
+use smccc::{
+ psci::{system_off, system_reset},
+ Hvc,
+};
/// Makes a `PSCI_SYSTEM_OFF` call to shutdown the VM.
///
/// Panics if it returns an error.
pub fn shutdown() -> ! {
- system_off().unwrap();
+ system_off::<Hvc>().unwrap();
#[allow(clippy::empty_loop)]
loop {}
}
@@ -29,7 +32,7 @@
///
/// Panics if it returns an error.
pub fn reboot() -> ! {
- system_reset().unwrap();
+ system_reset::<Hvc>().unwrap();
#[allow(clippy::empty_loop)]
loop {}
}