3 years ago[Docs] Added Information about Secure Monitor master
Kathy Stone [Mon, 26 Oct 2015 21:50:45 +0000]
[Docs] Added Information about Secure Monitor

This commit makes the following changes:
- Adds information about secure monitor.
- Explains that most OSs are supported.
  Points reader to README for build instructions.
- Tags Android-centric information as such.

Bug 1510390
Bug 1627133

Change-Id: I356610c72ed64e0d3747105c08330fdfa861867e
Reviewed-on: http://git-master/r/823053
Tested-by: Kathy Stone <kstone@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK] Remove secure_monitor folder
Sharif Inamdar [Wed, 17 Jun 2015 06:16:45 +0000]
[FOSS_TLK] Remove secure_monitor folder

Since secure_monitor is an independent repo, removing it
from tlk.

Change-Id: Ib865d118de3bb4d9eb53e71b27b32a4273d62d73
Reviewed-on: http://git-master/r/758971
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Inamdar Sharif <isharif@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK] Disable Rollback protection for now
Sharif Inamdar [Fri, 5 Jun 2015 05:50:58 +0000]
[FOSS_TLK] Disable Rollback protection for now

Since storage is not available upstream, we can disable
it so that we dont face issues with it.

Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Change-Id: I36d35da96db7cf5a0dbec0ee12167cd5aea32fdf
Reviewed-on: http://git-master/r/758970
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK] Fix Build Script to generate TOS
Sharif Inamdar [Tue, 10 Mar 2015 05:03:01 +0000]
[FOSS_TLK] Fix Build Script to generate TOS

Fix the build script inorder to generate tos.img
at one go.
Just do "./build <chip>" in tlk/ and it will build
the tos.img for that particular chip.

Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Change-Id: Ibd88abccadf657346be1a67edbef28f2b747ded1
Reviewed-on: http://git-master/r/758969
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]tlk: add LOCAL_MODULE_SUFFIX for tlk
Kerwin Wan [Tue, 5 May 2015 10:47:43 +0000]
[FOSS_TLK]tlk: add LOCAL_MODULE_SUFFIX for tlk

Release packaging gets confused when a module has a suffix
in the module name, and splits that out into a module name
plus a suffix. To WAR this we need use LOCAL_MODULE_SUFFIX
to define suffix when the binary is needed for cust build

Change-Id: I7a81622ab52f9c9c5bc84254360282d8fac7779c
Reviewed-on: http://git-master/r/752890
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Inamdar Sharif <isharif@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]arm: start: new policy to get boot params from BL
Varun Wadekar [Tue, 28 Apr 2015 10:24:55 +0000]
[FOSS_TLK]arm: start: new policy to get boot params from BL

The bootloader now uses a new policy to pass input parameters for the
monitor and Trusted OS. According to this policy, we use the following
CPU registers:

r0 = TZ-DRAM aperture size
r1 = NS entry point
r2 = boot args
r3 = magic value to indicate new policy

Change-Id: I2e59ffefaeb81d899c409262b360a68e4dbbc77d
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/752889
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Inamdar Sharif <isharif@nvidia.com>

4 years ago[FOSS_TLK]ote: tlk: Remove support for cmdline
Sharif Inamdar [Fri, 24 Apr 2015 05:50:56 +0000]
[FOSS_TLK]ote: tlk: Remove support for cmdline

Previously we had to pass boot params as cmdline and
hence we had to parse the cmdline to get the params.
Since we have removed support for cmdline from bootloader,
making this change to remove support for cmdline from TLK.

Change-Id: Ie03dd2239678b3d80914ac750dc931b96ff7b4b9
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/752888
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK][tlk][platform]: weak platform_setup_keys() func.
Harvey Hsieh [Sun, 26 Apr 2015 14:38:42 +0000]
[FOSS_TLK][tlk][platform]: weak platform_setup_keys() func.

Change-Id: I773c68fd5692b40460a252091e989e039f7f7802
Signed-off-by: Harvey Hsieh <hhsieh@nvidia.com>
Reviewed-on: http://git-master/r/752887
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Inamdar Sharif <isharif@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]tlk: Fix Makefile
Anand Prasad [Mon, 6 Apr 2015 22:36:29 +0000]
[FOSS_TLK]tlk: Fix Makefile

Change-Id: I017909acff10532889c91f1a7cfb97b843750400
Reviewed-on: http://git-master/r/752886
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Inamdar Sharif <isharif@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]tlk: coverity fixes
Jukka Virtanen [Fri, 10 Apr 2015 12:36:11 +0000]
[FOSS_TLK]tlk: coverity fixes

Coverity ID : 29406

Change-Id: Ib9ba74ba3452bc76b4fe2fc9f23994abe8b2eb2b
Signed-off-by: Jukka Virtanen <jvirtanen@nvidia.com>
Reviewed-on: http://git-master/r/752885
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Inamdar Sharif <isharif@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: create a "true" monitor for ARM v7
Varun Wadekar [Thu, 5 Mar 2015 07:35:29 +0000]
[FOSS_TLK]platform: tegra: create a "true" monitor for ARM v7

The monitor code has been moved over the the secure monitor now. This
converts TLK into a Trusted OS while keeping the monitor code separate.

Change-Id: I8aaa5685e30ffb53c2cfc9e152b946a348cdb566
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/752884
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Inamdar Sharif <isharif@nvidia.com>

4 years ago[FOSS_TLK]lib: fs: remove unused ext{2|3}_fs.h
Varun Wadekar [Mon, 1 Jun 2015 10:01:04 +0000]
[FOSS_TLK]lib: fs: remove unused ext{2|3}_fs.h

In order to clear the Palamida IP scans, we need to remove these headers
from our tree.

Change-Id: I9974a02c7c9dcfc91219bb721ea3b26f5a62dba4
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/752891
Reviewed-by: Automatic_Commit_Validation_User

4 years ago[FOSS_TLK]arm: monitor: pass SMC arguments using CPU regs (r0-r7)
Varun Wadekar [Wed, 1 Apr 2015 12:37:41 +0000]
[FOSS_TLK]arm: monitor: pass SMC arguments using CPU regs (r0-r7)

This patch removes the need for a shared buffer between the EL3 and S-EL1
to pass SMC args/results. We use r0-r7 registers to pass data between the
64-bit EL3 binary and the 32-bit S-EL1 binary.

Change-Id: I54c45f33259a88f5285efdabea97b79720e47267
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/752883
Reviewed-by: Automatic_Commit_Validation_User

4 years ago[FOSS_TLK]kernel: re-org boot_params_t for better alignment
Varun Wadekar [Tue, 7 Apr 2015 07:45:37 +0000]
[FOSS_TLK]kernel: re-org boot_params_t for better alignment

Re-jig the boot_params_t structure for better alignment. The current
arrangement allows all the variables to be aligned at 8-bytes with
no need for padding.

Change-Id: If0c12843205a42ef0217203aaae1ff5c7714ec29
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/752882
Reviewed-by: Automatic_Commit_Validation_User

4 years ago[FOSS_TLK]platform: tegra: check ss callback status
Scott Long [Thu, 26 Mar 2015 00:15:05 +0000]
[FOSS_TLK]platform: tegra: check ss callback status

Modify platform_ss_request_handler() to check
r1 for return status code from secure storage
callback handler and to fail accordingly.

Change-Id: Ibfc6992b8d504bffea31a617e7350d8ebccb4df5
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/752881
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]license: Add README file to indicate 3rd-party library used
Dennis Huang [Tue, 31 Mar 2015 00:46:44 +0000]
[FOSS_TLK]license: Add README file to indicate 3rd-party library used

- Add libfdt license (BSD) into LICENSE

Change-Id: I9a35d5dee030c7bab1656f870d8c0cf6fc00e066
Reviewed-on: http://git-master/r/752880
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-by: Dennis Huang <denhuang@nvidia.com>

4 years ago[FOSS_TLK]tools: remove unused tf_gen_include.py
Varun Wadekar [Fri, 27 Mar 2015 12:34:42 +0000]
[FOSS_TLK]tools: remove unused tf_gen_include.py

To generate the final tos.img, we use gen_tos_part_img.py while
tf_gen_include.py remains unused.

Change-Id: I59f9e49529bc353cf5e2dd4c138cfc372c43a8b1
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/752879
Reviewed-by: Automatic_Commit_Validation_User

4 years ago[FOSS_TLK]kernel: dynamically decide to use cmdline/boot_args
Varun Wadekar [Tue, 24 Mar 2015 05:15:14 +0000]
[FOSS_TLK]kernel: dynamically decide to use cmdline/boot_args

Bootloader passes the boot arguments as cmdline. But since we are adding
support to pass the boot parameters as a structure rather then as cmdline,
we are adding support for both in TLK. Such that TLK can adapt to the
cmdline or structure passed for the boot parameters.

Change-Id: Ib28016b35decd77ebf04b6fdb72a8a264cf27d61
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/752878
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]ote: tlk: makefile change for upstream TLK
Sharif Inamdar [Wed, 11 Mar 2015 05:28:06 +0000]
[FOSS_TLK]ote: tlk: makefile change for upstream TLK

Add "TASK_MODULES" and "TASKS" variables for upstream TLK to compile tasks
and add them to the final tos.img

Change-Id: Ia472fdbdd589567cc0bea80733c0354bd235b02e
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/752877
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]tlk: Use boardconfig to enable rollback protection
Mahesh Lagadapati [Fri, 13 Mar 2015 22:59:47 +0000]
[FOSS_TLK]tlk: Use boardconfig to enable rollback protection

Currently rollback protection is enabled based on the platform. This
will not work if only some models of a particular platform require
rollback protection. Hence, this change makes changes to use the
field defined in BoardConfig to enable rollback protection.

Change-Id: I565b22bcc7902ad2cd9492092da52a4cd277c073
Reviewed-on: http://git-master/r/752876
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: use TARGET to check for rollback enable
Scott Long [Tue, 3 Mar 2015 08:26:01 +0000]
[FOSS_TLK]platform: tegra: use TARGET to check for rollback enable

TARGET_TEGRA_VERSION is not passed thru the LK makefile flow
so use TARGET instead when looking for rollback enable.

Change-Id: I79fb63e1b791c92d98f8012ec0400a74794dec49
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/715786
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: fix WITH_ROLLBACK_PROTECTION botch
Scott Long [Wed, 25 Feb 2015 08:01:55 +0000]
[FOSS_TLK]platform: tegra: fix WITH_ROLLBACK_PROTECTION botch

Need to use #if not #if defined() to correctly pick up
WITH_ROLLBACK_PROTECTION value from makefile.

Change-Id: I69a4e7268a0aa197d53fe0bc2eefefbd805af48d
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/715785
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: add XN bits to identity mappings
Chris Johnson [Tue, 3 Feb 2015 03:05:27 +0000]
[FOSS_TLK]platform: tegra: add XN bits to identity mappings

The identity mappings need to be careful to avoid speculative
instruction fetch, which can trigger MC errors in carved out
regions and in certain regions mapped to AHB accesses.

Adding XN bits to these Device-nGnRnE mappings prevent these
speculative reads.

Bug 200039988

Change-Id: I9869bb7cffba05a6b155eeeb7548c43cf690c4a6
Reviewed-on: http://git-master/r/715784
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]tegra: common: Add checks for ns_vfp_hw_context
Sharif Inamdar [Wed, 18 Feb 2015 10:44:52 +0000]
[FOSS_TLK]tegra: common: Add checks for ns_vfp_hw_context

If any task is not loaded then this will be NULL.
Hence adding checks before accessing.

Change-Id: I41fdaebb3124581823f8a064d38621b503be0c7c
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/715783
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]kernel: task: Remove dependencies on task loading
Sharif Inamdar [Wed, 18 Feb 2015 10:39:13 +0000]
[FOSS_TLK]kernel: task: Remove dependencies on task loading

Previously, atleast one TA has to be present in order
for android to boot properly with TLK.

Now, if there is no TA that is loaded, we will then
skip the task initialization phase.

Change-Id: I68144f49e02d9162cd245b88fc87e474cd69936a
Signed-off-by: Sharif Inamdar <isharif@nvidia.com>
Reviewed-on: http://git-master/r/715782
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: modify DT rollback handling
Scott Long [Tue, 10 Feb 2015 18:26:56 +0000]
[FOSS_TLK]platform: tegra: modify DT rollback handling

Remove use of the DTB rollback status property as
it can be used to disable rollback when it should
not be.

Check rollback configuration on all T210-based projects
and ensure it must be on if the ODM_PRODUCTION fuse is
blown.

Change-Id: Icd8d3aeea3763659fb4762702182be66aa97cb8c
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/715781
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]tlk: debug: add TA panic API support
Scott Long [Tue, 10 Feb 2015 08:59:36 +0000]
[FOSS_TLK]tlk: debug: add TA panic API support

Add TA panic handler support to platform
ioctl handler.

Change-Id: I149b01ec54274064e37f7fc15a892f0416e6b77d
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/715780
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]kernel: boot: Fix coverity hits
Aaron Gamble [Tue, 3 Feb 2015 19:17:43 +0000]
[FOSS_TLK]kernel: boot: Fix coverity hits

Prevent strlen(NULL)
Coverity id : 28173

Correct boot_params_ptr->param_string check
Coverity id : 28121

Change-Id: Ie99a5cbb030fcab560e88b4fadb1f6cf7a81f1b6
Reviewed-on: http://git-master/r/715779
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]kernel: ote: Coverity fixes
Aaron Gamble [Tue, 3 Feb 2015 19:09:39 +0000]
[FOSS_TLK]kernel: ote: Coverity fixes

Fix NULL dereference when out of memory
Coverity id : 28174

Fix NULL dereference when passed bad parameters to te_copyin_ta_params
Coverity id : 28087

Change-Id: I1cef0039828715b7df256def704261d0b974a5b1
Reviewed-on: http://git-master/r/715778
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]arm: arm: monitor_vectors: 64-bit TOS_RESTART SMC
Varun Wadekar [Mon, 12 Jan 2015 11:39:26 +0000]
[FOSS_TLK]arm: arm: monitor_vectors: 64-bit TOS_RESTART SMC

Convert SMC_TOS_RESTART to 64-bit so as to support 64-bit kernels. We plan
to keep the 32-bit SMC_TOS_RESTART_LEGACY alive until the kernel and TLK
are in sync. Once they are, the _LEGACY SMC would be removed.

Change-Id: I8b684ac5d299b115c7c5261c0b948d16c1f5c1dd
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/715777
Reviewed-by: Automatic_Commit_Validation_User

4 years ago[FOSS_TLK][platform][tegra] Handle TA_EVENT smc
Aaron Gamble [Fri, 19 Dec 2014 00:00:21 +0000]
[FOSS_TLK][platform][tegra] Handle TA_EVENT smc

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>

4 years ago[FOSS_TLK][ote] Add ta event smc handler
Aaron Gamble [Thu, 18 Dec 2014 23:57:51 +0000]
[FOSS_TLK][ote] Add ta event smc handler

This code is used to handle incoming ta events and schedule tasks
which have requested events.

Change-Id: If054b989457fec43616cc66acff3797c1232e478
Reviewed-on: http://git-master/r/715775
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK][task] Add support for event callbacks
Aaron Gamble [Tue, 16 Dec 2014 21:32:14 +0000]
[FOSS_TLK][task] Add support for event callbacks

Add OTE_IOCTL_REGISTER_TA_EVENT enabling tasks to request event
callbacks.

Change-Id: Ib654764cb11de234676ce5e66e95f44d23ad786e
Reviewed-on: http://git-master/r/715774
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: add CPC rollback support
Scott Long [Sat, 10 Jan 2015 01:09:11 +0000]
[FOSS_TLK]platform: tegra: add CPC rollback support

Modified the DT rollback protection processing to handle
a device_name="cpc" (enable Content Protection Chip-based
rollback support).

Change-Id: Ib40696861e9adc2c8aa40e81b8bfed70387cba64
Reviewed-on: http://git-master/r/715773
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Scott Long <scottl@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: fix incorrect usage of CPU_IER regs
Matt Craighead [Wed, 14 Jan 2015 20:58:40 +0000]
[FOSS_TLK]platform: tegra: fix incorrect usage of CPU_IER regs

Change-Id: I8a6705d61c10f5f28b787c949d6d04245fc4c4a6
Reviewed-on: http://git-master/r/715772
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: merge the preempted_by_irq/fs SMCs
Varun Wadekar [Mon, 5 Jan 2015 06:12:42 +0000]
[FOSS_TLK]platform: tegra: merge the preempted_by_irq/fs SMCs

Instead of maintaining two different SMCs for the "preempted" scenario,
we can make use of a common SMC_TOS_PREEMPTED. The error code in the
frame pointer is all that the NS world needs to differentiate between
scenarios. We store this error code before restoring the NS world
context and pass it as the error code in r0. This way the entire
mechanism becomes scalable.

Change-Id: I7eba10e14effca774fa37e2c26a3e1753032035c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/715771
Reviewed-by: Automatic_Commit_Validation_User

4 years ago[FOSS_TLK]platform: tegra: 64-bit Trusted OS/App SMCs
Varun Wadekar [Fri, 2 Jan 2015 10:24:08 +0000]
[FOSS_TLK]platform: tegra: 64-bit Trusted OS/App SMCs

Switch the Function IDs to 64-bit versions as the SMC calling entity (linux
kernel) is 64-bit. Keep legacy SMCs alive till the linux driver is in sync
with the Trusted OS. We re-use the same SMCs for a 32-bit calling entity in
order to avoid code bloat.

Also remove some unused/legacy cruft while we are at it.

Change-Id: I28f41efb471796f3b7fe61222c63ed441bf75c2c
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/715770
Reviewed-by: Automatic_Commit_Validation_User

4 years ago[FOSS_TLK]tlk: task: fix task map ID handling
Chris Johnson [Tue, 30 Dec 2014 20:19:15 +0000]
[FOSS_TLK]tlk: task: fix task map ID handling

The task bootloader during init builds task_map_t structs
for the various sections of the TA binary and also based
on the manifest adds MMIO mappings.

These MMIO mappings specify an ID, which is later used by
the TA to retrieve the virtual address for this mapping.
To work properly these IDs need to be unique.

Previously, callers of task_add_mapping didn't init all
the fields of the malloc-ed task_map_t. This meant a later
request by ID for the virtual addr could match the wrong
mapping leading to data aborts (e.g. protection fault).

This change now callocs the task_map_t, so the ID of the
mapping is initialized and adds asserts/checks on the ID
coming from the manifest and during the IOCTL to retrieve
the mapping.

Change-Id: Ic68307fd9ca933437d23f77e6ffaba203394dd8b
Signed-off-by: Chris Johnson <cwj@nvidia.com>
Reviewed-on: http://git-master/r/715769
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]tlk: arm: improve output during data abort handling
Chris Johnson [Tue, 23 Dec 2014 20:57:19 +0000]
[FOSS_TLK]tlk: arm: improve output during data abort handling

Change-Id: I93642ee0ef21271f54d3bf421c168b32c9914222
Signed-off-by: Chris Johnson <cwj@nvidia.com>
Reviewed-on: http://git-master/r/715768
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: fix usleep/nanosleep
Chris Johnson [Thu, 11 Dec 2014 23:20:34 +0000]
[FOSS_TLK]platform: tegra: fix usleep/nanosleep

The TLK syscall was expecting a struct timespec pointer to
be passed in (like nanosleep), but TAs were passing a usec
value (like usleep) failing the pointer address check.

This renames the syscall (in TLK) and adds support in libc
to make the usleep still called from the TAs work as a
nanosleep syscall as the kernel expected.

Change-Id: Ic4887e3746d71f69d8ba2ec6412b8143595bc868
Reviewed-on: http://git-master/r/715767
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: use arfuse registers
Scott Long [Fri, 12 Dec 2014 19:22:48 +0000]
[FOSS_TLK]platform: tegra: use arfuse registers

Switch fuse init to use arfuse registers (e.g. FUSE_SECURITY_MODE_0)
to extract fuse values.

This avoids losing bypassed fuse values during init because the fuse
sense is left alone.

Change-Id: I2425d9b206a7d2c20ea6d28f3b9990d28724bf79
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/715766
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: libfdt license tweaks
Scott Long [Wed, 10 Dec 2014 18:06:22 +0000]
[FOSS_TLK]platform: tegra: libfdt license tweaks

Modify libfdt license to make it explicit that it is released
under BSD.

Change-Id: If520f17528a181207727540e6026bb934910f1e5
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/715765
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: use DT to enable rollback
Scott Long [Thu, 4 Dec 2014 18:21:16 +0000]
[FOSS_TLK]platform: tegra: use DT to enable rollback

Bootloader will pass address of the DT to TLK which can
then use it to search for the "rollback-protection"
node to determine if rollback should be enabled or not.

Change-Id: I9b97fbd96168dc46f84778807b00ffae537eb330
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/707298
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: more fuse handling changes
Scott Long [Wed, 3 Dec 2014 00:32:33 +0000]
[FOSS_TLK]platform: tegra: more fuse handling changes

The new rollback protection scheme no longer requires
TLK to be involved in detecting whether the rollback
key should be programmed so that support can be removed.

Also modified the SS_GET_CONFIG call handling accordingly.

Change-Id: I96891de0c71654fb5812081f25331f7b1d58ff79
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/707297
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: add libfdt
Scott Long [Wed, 3 Dec 2014 09:11:57 +0000]
[FOSS_TLK]platform: tegra: add libfdt

TLK needs device table access to determine if rollback
protection should be enabled.

This patch brings over the libfdt implementation from
cboot for use in accessing the device tree from within
TLK.

Change-Id: Iba6a4707a72e9302b70ee5b3112b21c33032d7f0
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/707296
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: cleanup fuse handling
Scott Long [Wed, 19 Nov 2014 23:31:46 +0000]
[FOSS_TLK]platform: tegra: cleanup fuse handling

Move chip-specific details on fuse handling into arch-specific
file (e.g. platform/tegra4/fuse.c).

This code exports interfaces (fuse_read, fuse_make_visible,
fuse_make_invisible) to the common tegra fuse code that hides
details like register offsets/layouts, etc.

Change-Id: I6472861f89a50bee7541395bd1ea048a27c181e3
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/707295
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK]platform: tegra: common: add ss get config syscall
Scott Long [Tue, 18 Nov 2014 21:11:28 +0000]
[FOSS_TLK]platform: tegra: common: add ss get config syscall

This change adds a new syscall (OTE_IOCTL_SS_GET_CONFIG) that will
be used by the secure storage TA to retrieve a mask of configuration
options (e.g. rollback protection-related values).

These configuration options are determined by reading various fuse
values using new fuse I/O support.

Change-Id: I4716d2a4472f05b53fb799c5d1c7b6680d752a72
Signed-off-by: Scott Long <scottl@nvidia.com>
Reviewed-on: http://git-master/r/707294
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

4 years ago[FOSS_TLK] lib: debug: display buffer overflow prints for release builds
Varun Wadekar [Wed, 12 Nov 2014 09:51:28 +0000]
[FOSS_TLK] lib: debug: display buffer overflow prints for release builds

The buffer overflow prints are a debugging mechanism and hence can
be disabled for RELEASE builds.

Change-Id: If91042a581712a24821ae821ccf1675352f73c73
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/707293
Reviewed-by: Automatic_Commit_Validation_User

4 years agotlk: 10/24 update
Dennis Huang [Fri, 10 Oct 2014 23:37:10 +0000]
tlk: 10/24 update

- Improve resource releasing when unloading tasks.
- Support task update
- pass tsec carveout base/size via argc/argv to hdcp_service
- PSCI support for CPU suspend/on/off
- stage T132 AARCH64 trampoline code
- Fix dependencies
- handle T132 trampoline to AARCH64
- add support for public vs. TA login type
- improve VPR region checking
- enable non-priv access to CNTVCT
- add version support
- Check GPU reset before resizing VPR
- add persistent membuf param support
- align syscalls and TA setup to new libc
- support for new secure storage protocol
- Remove lib/monitor, old arch code, and p/t/monitor
- Build tos.img from external monitor bin/lib
- Split up platform_p.h into extra headers
- fix 64-bit address usage during memmap
- cleanup mem map handling
- Flush the task mem region from cache before starting it.
- Deal with the 8 bit range of context_id value.
- use SMC_TOS_PREEMPT_BY_IRQ for interrupt handling
- use SMC_TOS_PREEMPT_BY_FS for SS
- add tsec service.
- platform: tegra: common: fix timer name

Change-Id: I4791508e1e8b25b5781880acd5cb3e60c0dea2d0
Reviewed-on: http://git-master/r/563017
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Dennis Huang <denhuang@nvidia.com>
Tested-by: Dennis Huang <denhuang@nvidia.com>

4 years ago[Docs] Updates TLK FOSS documentation daily-2014.07.14.1_release-tlk daily-2014.07.17.0_release-tlk
Kathy Stone [Mon, 23 Jun 2014 23:32:56 +0000]
[Docs] Updates TLK FOSS documentation

Adds ote_task_load.h to the api reference.

Change-Id: Ib7324abeb826b307fc0a15d78b975d0b850e4943
Reviewed-on: http://git-master/r/427405
Tested-by: Kathy Stone <kstone@nvidia.com>
Reviewed-by: Gail Mead <gmead@nvidia.com>
Reviewed-by: Hadi Nahari <hnahari@nvidia.com>
Tested-by: Hadi Nahari <hnahari@nvidia.com>

5 years agotlk: 6/19 update daily-2014.06.20.0_release-tlk
Dennis Huang [Fri, 20 Jun 2014 00:36:33 +0000]
tlk: 6/19 update

- import clean copy of NetBSD elf.h
- add brk syscall failure debug print
- remove unused makefile variable
- fix return code in get_property ioctl routines
- add task unloading
- enable perf counter access during init
- use dcache flush routine from LK

Change-Id: Iad16fbe37d18200534e0cdc8eb2e73a055a4b3eb
Reviewed-on: http://git-master/r/426320
Reviewed-by: Dennis Huang <denhuang@nvidia.com>
Tested-by: Dennis Huang <denhuang@nvidia.com>

5 years agoTLK: Clean up obsolete files
Dennis Huang [Sat, 14 Jun 2014 01:30:49 +0000]
TLK: Clean up obsolete files

Change-Id: Ife77dcfce4f40d352132ef6c8bbfc8cb37edcb5d
Reviewed-on: http://git-master/r/423455
Reviewed-by: Dennis Huang <denhuang@nvidia.com>
Tested-by: Dennis Huang <denhuang@nvidia.com>

5 years ago[Docs] Adds TLK FOSS documentation
Kathy Stone [Fri, 6 Jun 2014 00:51:28 +0000]
[Docs] Adds TLK FOSS documentation

This documentation is for inclusion in the TLK FOSS release.

Change-Id: Ieb8e88377d874ccfa40fb9dc841ac270abddc409
Reviewed-on: http://git-master/r/419797
Tested-by: Kathy Stone <kstone@nvidia.com>
Reviewed-by: Chris Johnson <cwj@nvidia.com>

5 years agotlk: 5/22 update
Dennis Huang [Thu, 22 May 2014 23:51:17 +0000]
tlk: 5/22 update

- fix race during BSS clear
- storage callback for T132
- add WITH_ARM_PSCI_SUPPORT
- fix reset vector programming during lp0
- support new T132 boot flow
- add basic RPMB support
- add dynamic task loading
- make program VPR a true fastcall

Change-Id: I5249fe2ca6a85d878800100a7cbc1f3d80b09766
Reviewed-on: http://git-master/r/413484
Reviewed-by: Dennis Huang <denhuang@nvidia.com>
Tested-by: Dennis Huang <denhuang@nvidia.com>

5 years agoAdd README file
Dennis Huang [Wed, 23 Apr 2014 21:41:43 +0000]
Add README file

Change-Id: Ia9dde92f9f53d8380b79dfa29b9a3b29c5e3b171
Reviewed-on: http://git-master/r/400529
Reviewed-by: Dennis Huang <denhuang@nvidia.com>
Tested-by: Dennis Huang <denhuang@nvidia.com>

5 years agomakefile change to build standalone binary
Dennis Huang [Wed, 23 Apr 2014 18:19:44 +0000]
makefile change to build standalone binary

- To make the image, e.g.
  TARGET=t124 make -e

Change-Id: Id0feba4bd8b9a6e9f685d4278210872d5cc7baa1
Reviewed-on: http://git-master/r/400526
Reviewed-by: Dennis Huang <denhuang@nvidia.com>
Tested-by: Dennis Huang <denhuang@nvidia.com>

5 years agoFirst version
Dennis Huang [Wed, 23 Apr 2014 02:20:59 +0000]
First version

- from: d6307262d90da371b345c23f2b69c5c40fbc79b4

Change-Id: I276b23eef2e64716eb6c8e2e53e39b6f0ffed2c5
Reviewed-on: http://git-master/r/400525
Reviewed-by: Dennis Huang <denhuang@nvidia.com>
Tested-by: Dennis Huang <denhuang@nvidia.com>

5 years agoInitial empty repository
Varun Colbert [Fri, 18 Apr 2014 05:55:43 +0000]
Initial empty repository