3 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>

3 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

3 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>

3 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>

3 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>

3 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>

3 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>

3 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

3 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

3 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>

3 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>

3 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>

3 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>

3 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>

3 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>

3 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>

3 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>

3 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>

3 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>

3 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>

4 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>

4 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>

4 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>

4 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