feat: power management field manifest addition
Add the power-management-messages field to SP's manifests [1].
The intent is for a MP S-EL1 SP to register power management events such
as cpu on or off events relayed by the SPMD to the SPMC.
UP partitions are forced to not handle power management messages in the
current state of the implementation.
[1] https://trustedfirmware-a.readthedocs.io/en/latest/components/ffa-manifest-binding.html#partition-properties
Signed-off-by: Olivier Deprez <olivier.deprez@arm.com>
Change-Id: I2a70afd9b7fa6736215dc4d489bf33cadfb8ac57
diff --git a/inc/hf/manifest.h b/inc/hf/manifest.h
index fb8bfc0..c7a6869 100644
--- a/inc/hf/manifest.h
+++ b/inc/hf/manifest.h
@@ -30,6 +30,13 @@
(MANIFEST_REGION_ATTR_READ | MANIFEST_REGION_ATTR_WRITE | \
MANIFEST_REGION_ATTR_EXEC | MANIFEST_REGION_ATTR_SECURITY)
+#define MANIFEST_POWER_MANAGEMENT_CPU_OFF_SUPPORTED (UINT32_C(1) << 0)
+#define MANIFEST_POWER_MANAGEMENT_CPU_ON_SUPPORTED (UINT32_C(1) << 3)
+#define MANIFEST_POWER_MANAGEMENT_NONE_MASK (UINT32_C(0))
+#define MANIFEST_POWER_MANAGEMENT_ALL_MASK \
+ (MANIFEST_POWER_MANAGEMENT_CPU_OFF_SUPPORTED | \
+ MANIFEST_POWER_MANAGEMENT_CPU_ON_SUPPORTED)
+
/* Highest possible value for the boot-order field. */
#define DEFAULT_BOOT_ORDER 0xFFFF
#define DEFAULT_BOOT_GP_REGISTER UINT32_C(-1)
@@ -157,6 +164,19 @@
bool me_signal_virq;
/** optional - receipt of notifications. */
bool notification_support;
+ /**
+ * optional - power management messages bitfield.
+ *
+ * See [1] power-management-messages manifest field.
+ *
+ * The Hafnium supported combinations for a MP SP are:
+ * Bit 0 - relay PSCI cpu off message to the SP.
+ * Bit 3 - relay PSCI cpu on to the SP.
+ *
+ * [1]
+ * https://trustedfirmware-a.readthedocs.io/en/latest/components/ffa-manifest-binding.html#partition-properties
+ */
+ uint32_t power_management;
/** optional */
bool has_primary_scheduler;
/** optional - tuples SEPID/SMMUID/streamId */
diff --git a/inc/hf/vm.h b/inc/hf/vm.h
index 56458c0..bb3a016 100644
--- a/inc/hf/vm.h
+++ b/inc/hf/vm.h
@@ -237,6 +237,12 @@
bool me_signal_virq;
/**
+ * Bitmask reporting the power management events that a partition
+ * requests to the signaled about.
+ */
+ uint32_t power_management;
+
+ /**
* Secondary entry point supplied by FFA_SECONDARY_EP_REGISTER used
* for cold and warm boot of SP execution contexts.
*/