[FOSS_TLK][platform][tegra] Handle TA_EVENT smc
Aaron Gamble [Fri, 19 Dec 2014 00:00:21 +0000 (16:00 -0800)]
Change-Id: Id0d1e9c3edd2edaea14f41f6fb3165da2672bf22
Reviewed-on: http://git-master/r/715776
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

platform/tegra/common/tz.c
platform/tegra/include/platform/platform_ta.h

index 5ed8e7f..98c1392 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014, NVIDIA CORPORATION. All rights reserved
+ * Copyright (c) 2012-2015, NVIDIA CORPORATION. All rights reserved
  *
  * Permission is hereby granted, free of charge, to any person obtaining
  * a copy of this software and associated documentation files
@@ -486,6 +486,11 @@ static void tz_handle_trusted_app_smc(struct tz_monitor_frame *frame)
        frame->r[0] = result;
 }
 
+static void tz_handle_ta_event(struct tz_monitor_frame *frame)
+{
+       frame->r[0] = te_handle_ta_event(frame->r[1]);
+}
+
 void tz_stdcall_handler(struct tz_monitor_frame *frame)
 {
        dprintf(SPEW, "%s: 0x%llx, 0x%llx, 0x%llx, 0x%llx\n", __func__,
@@ -509,6 +514,9 @@ void tz_stdcall_handler(struct tz_monitor_frame *frame)
        case SMC_TA_LAUNCH_OPERATION_LEGACY:
                tz_handle_trusted_app_smc(frame);
                break;
+       case SMC_TA_EVENT:
+               tz_handle_ta_event(frame);
+               break;
 
        default:
                dprintf(CRITICAL, "%s: unhandled function 0x%x\n",
index 0726c74..b830ef0 100644 (file)
 #define SMC_TA_OPEN_SESSION                    0x70000001
 #define SMC_TA_CLOSE_SESSION                   0x70000002
 #define SMC_TA_LAUNCH_OPERATION                        0x70000003
+#define SMC_TA_EVENT                           0x70000004
 
 /* Trusted Application Calls (legacy) */
 #define SMC_TA_OPEN_SESSION_LEGACY             0x30000001
 #define SMC_TA_CLOSE_SESSION_LEGACY            0x30000002
 #define SMC_TA_LAUNCH_OPERATION_LEGACY         0x30000003
+#define SMC_TA_EVENT_LEGACY                    0x30000004