aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2022-10-06 15:36:14 +0000
committerAndrew Walbran <qwandor@google.com>2022-10-06 15:56:28 +0000
commit22f4f779262e59c6af82f3398f16e8ad72fa8fc2 (patch)
tree76832451701d31ab2eed2f4acbbc0eb90c5ec279
parentef98d36b51f21f841a5c0af523b2e4a4902ba556 (diff)
downloadpsci-22f4f779262e59c6af82f3398f16e8ad72fa8fc2.tar.gz
Update to version 0.1.1.
Bug: 245889995 Test: m vmbase_example_bin pvmfw_bin Change-Id: Ib73ce18eeeaeb23141a32227cc7e6844dfa2b3e2
-rw-r--r--.cargo_vcs_info.json2
-rw-r--r--Android.bp8
-rw-r--r--Cargo.toml16
-rw-r--r--Cargo.toml.orig2
-rw-r--r--METADATA9
-rw-r--r--src/lib.rs2
-rw-r--r--src/smccc.rs22
7 files changed, 34 insertions, 27 deletions
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index 1110add..5dc8b81 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,6 +1,6 @@
{
"git": {
- "sha1": "6880b28480cbff8ea0cd9ecd24c4d05a3aed4ac7"
+ "sha1": "12b9e3dc136b77b51b2a727408c7b894c0a10199"
},
"path_in_vcs": ""
} \ No newline at end of file
diff --git a/Android.bp b/Android.bp
index 48c8afd..3545d62 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,8 +1,6 @@
// This file is generated by cargo2android.py --run --device --tests --features=hvc --force-rlib.
// Do not modify this file as changes will be overridden on upgrade.
-
-
package {
default_applicable_licenses: ["external_rust_crates_psci_license"],
}
@@ -46,8 +44,12 @@ rust_library_rlib {
host_supported: true,
crate_name: "psci",
cargo_env_compat: true,
- cargo_pkg_version: "0.1.0",
+ cargo_pkg_version: "0.1.1",
srcs: ["src/lib.rs"],
edition: "2021",
features: ["hvc"],
+ apex_available: [
+ "//apex_available:platform",
+ "//apex_available:anyapex",
+ ],
}
diff --git a/Cargo.toml b/Cargo.toml
index af8a56a..2cf5f25 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,11 +12,21 @@
[package]
edition = "2021"
name = "psci"
-version = "0.1.0"
+version = "0.1.1"
authors = ["Andrew Walbran <qwandor@google.com>"]
description = "Functions and constants for the Arm Power State Coordination Interface (PSCI) 1.1 on aarch64."
-keywords = ["arm", "aarch64", "cortex-a", "psci"]
-categories = ["embedded", "no-std", "hardware-support"]
+readme = "README.md"
+keywords = [
+ "arm",
+ "aarch64",
+ "cortex-a",
+ "psci",
+]
+categories = [
+ "embedded",
+ "no-std",
+ "hardware-support",
+]
license = "MIT OR Apache-2.0"
repository = "https://github.com/google/psci"
resolver = "2"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index bd1db8a..e329535 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -1,6 +1,6 @@
[package]
name = "psci"
-version = "0.1.0"
+version = "0.1.1"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Functions and constants for the Arm Power State Coordination Interface (PSCI) 1.1 on aarch64."
diff --git a/METADATA b/METADATA
index 4c987ef..f317da4 100644
--- a/METADATA
+++ b/METADATA
@@ -7,14 +7,13 @@ third_party {
}
url {
type: ARCHIVE
- value: "https://static.crates.io/crates/psci/psci-0.1.0.crate"
+ value: "https://static.crates.io/crates/psci/psci-0.1.1.crate"
}
- version: "0.1.0"
- # Dual-licensed, using the least restrictive per go/thirdpartylicenses#same.
+ version: "0.1.1"
license_type: NOTICE
last_upgrade_date {
year: 2022
- month: 4
- day: 7
+ month: 10
+ day: 6
}
}
diff --git a/src/lib.rs b/src/lib.rs
index 3b4b7dd..be52908 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -21,7 +21,7 @@ compile_error!("Only one of `hvc` or `smc` features may be enabled.");
#[cfg(any(feature = "hvc", feature = "smc"))]
mod calls;
pub mod error;
-mod smccc;
+pub mod smccc;
#[cfg(any(feature = "hvc", feature = "smc"))]
pub use calls::{
diff --git a/src/smccc.rs b/src/smccc.rs
index 03f9d44..4b1b4a4 100644
--- a/src/smccc.rs
+++ b/src/smccc.rs
@@ -2,11 +2,11 @@
// This project is dual-licensed under Apache 2.0 and MIT terms.
// See LICENSE-APACHE and LICENSE-MIT for details.
-//! SMCCC calls.
+//! Functions for making SMCCC calls.
#[cfg(any(feature = "hvc", feature = "smc"))]
#[inline(always)]
-pub fn call32(function: u32, args: [u32; 7]) -> [u32; 8] {
+pub(crate) fn call32(function: u32, args: [u32; 7]) -> [u32; 8] {
#[cfg(feature = "hvc")]
{
hvc32(function, args)
@@ -19,7 +19,7 @@ pub fn call32(function: u32, args: [u32; 7]) -> [u32; 8] {
#[cfg(any(feature = "hvc", feature = "smc"))]
#[inline(always)]
-pub fn call64(function: u32, args: [u64; 17]) -> [u64; 18] {
+pub(crate) fn call64(function: u32, args: [u64; 17]) -> [u64; 18] {
#[cfg(feature = "hvc")]
{
hvc64(function, args)
@@ -30,10 +30,9 @@ pub fn call64(function: u32, args: [u64; 17]) -> [u64; 18] {
}
}
-/// Make an HVC32 call to the hypervisor, following the SMC Calling Convention version 1.3.
-#[cfg(feature = "hvc")]
+/// Makes an HVC32 call to the hypervisor, following the SMC Calling Convention version 1.3.
#[inline(always)]
-fn hvc32(function: u32, args: [u32; 7]) -> [u32; 8] {
+pub fn hvc32(function: u32, args: [u32; 7]) -> [u32; 8] {
#[cfg(target_arch = "aarch64")]
unsafe {
let mut ret = [0; 8];
@@ -58,10 +57,9 @@ fn hvc32(function: u32, args: [u32; 7]) -> [u32; 8] {
unimplemented!();
}
-/// Make an SMC32 call to the firmware, following the SMC Calling Convention version 1.3.
-#[cfg(feature = "smc")]
+/// Makes an SMC32 call to the firmware, following the SMC Calling Convention version 1.3.
#[inline(always)]
-fn smc32(function: u32, args: [u32; 7]) -> [u32; 8] {
+pub fn smc32(function: u32, args: [u32; 7]) -> [u32; 8] {
#[cfg(target_arch = "aarch64")]
unsafe {
let mut ret = [0; 8];
@@ -86,8 +84,7 @@ fn smc32(function: u32, args: [u32; 7]) -> [u32; 8] {
unimplemented!();
}
-/// Make an HVC64 call to the hypervisor, following the SMC Calling Convention version 1.3.
-#[cfg(feature = "hvc")]
+/// Makes an HVC64 call to the hypervisor, following the SMC Calling Convention version 1.3.
#[inline(always)]
pub fn hvc64(function: u32, args: [u64; 17]) -> [u64; 18] {
#[cfg(target_arch = "aarch64")]
@@ -124,8 +121,7 @@ pub fn hvc64(function: u32, args: [u64; 17]) -> [u64; 18] {
unimplemented!();
}
-/// Make an SMC64 call to the firmware, following the SMC Calling Convention version 1.3.
-#[cfg(feature = "smc")]
+/// Makes an SMC64 call to the firmware, following the SMC Calling Convention version 1.3.
#[inline(always)]
pub fn smc64(function: u32, args: [u64; 17]) -> [u64; 18] {
#[cfg(target_arch = "aarch64")]