summaryrefslogtreecommitdiff
path: root/include/bl32
diff options
context:
space:
mode:
authorVarun Wadekar <vwadekar@nvidia.com>2015-08-26 12:49:03 +0530
committerVarun Wadekar <vwadekar@nvidia.com>2015-09-30 10:38:28 +0530
commitcb790c5e486cba4fbc4a4d0cdb89b5c65c886355 (patch)
treea1d199b96bd8f7d5d5f8b8cbd85e0bc6ed44b223 /include/bl32
parenta6ef882c0e29f9459a927106fab36ea31587bf9a (diff)
Send power management events to the Trusted OS (TLK)
This patch adds PM handlers to TLKD for the system suspend/resume and system poweroff/reset cases. TLK expects all SMCs through a single handler, which then fork out into multiple handlers depending on the SMC. We tap into the same single entrypoint by restoring the S-EL1 context before passing the PM event via register 'x0'. On completion of the PM event, TLK sends a completion SMC and TLKD then moves on with the PM process. Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Diffstat (limited to 'include/bl32')
-rw-r--r--include/bl32/payloads/tlk.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/bl32/payloads/tlk.h b/include/bl32/payloads/tlk.h
index bdfcc9a3..6ce1eb69 100644
--- a/include/bl32/payloads/tlk.h
+++ b/include/bl32/payloads/tlk.h
@@ -43,6 +43,9 @@
#define TLK_REGISTER_LOGBUF TLK_TOS_STD_FID(0x1)
#define TLK_REGISTER_REQBUF TLK_TOS_STD_FID(0x2)
#define TLK_RESUME_FID TLK_TOS_STD_FID(0x100)
+#define TLK_SYSTEM_SUSPEND TLK_TOS_STD_FID(0xE001)
+#define TLK_SYSTEM_RESUME TLK_TOS_STD_FID(0xE002)
+#define TLK_SYSTEM_OFF TLK_TOS_STD_FID(0xE003)
/*
* SMC function IDs that TLK uses to signal various forms of completions
@@ -52,6 +55,9 @@
#define TLK_PREEMPTED (0x32000002 | (1 << 31))
#define TLK_ENTRY_DONE (0x32000003 | (1 << 31))
#define TLK_VA_TRANSLATE (0x32000004 | (1 << 31))
+#define TLK_SUSPEND_DONE (0x32000005 | (1 << 31))
+#define TLK_RESUME_DONE (0x32000006 | (1 << 31))
+#define TLK_SYSTEM_OFF_DONE (0x32000007 | (1 << 31))
/*
* Trusted Application specific function IDs