rm_pm_hal: Being able to build RM and PM HAL from PDK
Testing with PM and RM build. Part of re-architecture
Fixes: SYSFW-3494
Signed-off-by: Piyali Goswami <piyali_g@ti.com>
sciclient: Clean up and split sciclient indirect into multiple files
Split into multiple files to make sure the sciclient direct and indirect
work without function repitition
Signed-off-by: Piyali Goswami <piyali_g@ti.com>
Sciserver: Skeleton code
Skeleton code for Sciserver. But just created a framework for the sciserver
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
Signed-off-by: Piyali Goswami <piyali_g@ti.com>
sbl: build with sciclient_direct
Signed-off-by: Piyali Goswami <piyali_g@ti.com>
sciserver: Support RM partial message handling
Categorize RM messages to be local DM only, forward to TIFS only, and
partial processing on both DM and TIFS.
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
sbl: R5F booting itself
R5F booting itself
Fixes: SYSFW-3516, SYSFW-3517
Signed-off-by: Piyali Goswami <piyali_g@ti.com>
sbl: j721e: Update memory map in linker command file
ROM allows loading of SBL image size up to 0xC0000.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
Migrating to SYSFW version int_pdk_rearch
Build: Wed Sep 2 17:46:06 UTC 2020
**Depends on rm_pm_hal branch int_pdk_rearch**:
Commit: 0a3faf4061593dae25442ed6310a93198f7fede3
rm: ia: Improve separation between standard and secure RM
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
build: j72*: Add sciclient_direct and rm_pm_hal components
Add sciclient_direct and rm_pm_hal components to the default components
list for j721e and j7200.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
tmp: make rtos_app use GET_FREQ
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
tmp: sciserver: remove hwi for DMSC2DM [verbose]
The DMSC2DM should be received on the same thread and IRQ as other hosts
that run on the MCU NAVSS.
J721E_MCU_NAVSS0_SEC_PROXY0_RX_DM_NONSEC_HIGH_PRIORITY_RX_THR080_CONF051
The DMSC2DM response IRQ is not ready for use. Autogen needs to create the
correct IRQ, which should be handled by the TIFS.
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
sciserver: update response host id for DMSC2DM
When the response host id is DMSC2DM, it needs to be replaced with DM.
This would ensure the receiving service provider (TIFS) would verify
host successfully.
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
sciserver: No message forwarding for message from DMSC2DM
To avoid message looping between TIFS and DM, add a check on the message
host. If the message is a partial processing type and the host is
DMSC2DM, then do not forward the message.
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
Make udma_memcpy_testapp secure only
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
example: rtos_app: mimic udma_memcpy_testapp
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
fixes to get udma test working
Signed-off-by: Justin Sobota <jsobota@ti.com>
Fix build error after rebasing message router changes
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
udma: test: remove override to force secure queue
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciserver test: fix build error
Update component list after making sciclient_direct part of the common
PDK components.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: use hardware host id for message forwarding
Use the host id from the queue to pass along to DMSC if the message
needs to be forwarded.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: Add element to request struct for forwarding status
Update the sciclient request parameters to add a field for forward
status to indicate whether that the message should be forwarded.
This is only intended to be set indirectly by sciserver, and also
sciclient_direct depending on the message type. For sciclient_indirect,
this will be forced to no-forward status to prevent any application from
erroneously setting. The status is always cleared after message
processing to prevent accidental reuse of the status upon next message
send.
This includes a hack to update sciclient request parameters which are
given the const qualifier. This is due to an API limitation, and is
considered acceptable based on convention elsewhere in sciclient to work
around the const through indirect dereferencing.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: Force secure queue for mcu1_0 on j7*
On j721e and j7200, mcu1_0 will always use secure queues when forwarding
requests to DMSC. Force secure mode of operation for this build.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
boardcfg: Update rm board cfg resource ranges
Updated RM ranges based on new reserved resources required for DM
integration on MCU R5F0
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
boardcfg: Add resource for secure mcu1_0
MCU1_0 sends messages to DMSC on secure queue only. Sciclient is forced
as secure as a result. Make overlapping IR resources to cover both
secure and non-secure host for mcu1_0.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
boardcfg: Update RM binary data
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
build: j721e: add sciserver as a default component
Build sciserver for all j721e mcu1_0 applications. Include call to
initialize sciserver as part of the board init routine. Update linker
command to include relevant output sections.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: enable mismatched host id for dmsc2dm forwarded message
Enable mismatch of host id between message header and queue id when
messages are sent via the dmsc2dm queue. This is an intentional design
aspect to enable preservation of the original host requesting the
service. We are not concerned with message spoofing in this case.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: Update binaries
Update sysfw binary and sciclient/sciserver apps to latest working
baseline.
This enables mcu2_0 udma_memcpy_testapp to run with sciserver_testapp
running on mcu1_0.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: Remove prints from sciserver library
Printouts are suppressed via macro but left in place for now until full
integration testing has completed.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
udma: Do not use resources reserved for DMSC2DM communication
Increase the start number for MCU1_0 IrIntr in
the UDMA rm to avoid conflicting with the IrIntr
used for DMSC2DM communication.
Signed-off-by: Justin Sobota <jsobota@ti.com>
SCI Client Server : Includind server for all cores other than mcu 10
Signed-off-by: sujith <sujith.s@ti.com>
sci client server : signed sysfw no rm pm
Works fine with ccs
Signed-off-by: sujith <sujith.s@ti.com>
WIP : sysfw rearch : SBL booting udma mem cpy app on MCU 20
Signed-off-by: sujith <sujith.s@ti.com>
SCI Server With IPC : Functional with CCS
Tested ipc between MCU 10 and MCU 20
Signed-off-by: sujith <sujith.s@ti.com>
Compiled on MPU now, moved server init param to .c file
Signed-off-by: sujith <sujith.s@ti.com>
sciserver: fix for picking up boardcfg addresses
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciserver: Disable interrupts until task ready
Disable interrupts triggered by secure proxy message events. This is to
catch the case where messages are already available in the queue before
the server starts up. We see an issue where the interrupt state cannot
be cleanly recovered but can be worked around by enabling the interrupts
once the first task has been scheduled.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
udma: Add sciserver init to test app
For integrated device manager on mcu1_0 for j721e, add call to intialize the server.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
ipc: add sciserver and rm_pm_hal sections to linker
Enable sciserver to be built into the ipc test app
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
Update sysfw to latest master
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: limit forward queue to j721e only
Limit reference to forwarding queue to j721e only, as no other device
has this thread id defined.
This needs to be extended to j7200 when the forwarding and server is
enabled.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: HSM arch build and migrate fixes
Cleanup for sysfw_migrate and sciclient
component compilation during integration
of SYSFW HSM re-arch.
Signed-off-by: Justin Sobota <jsobota@ti.com>
Migrating to SYSFW version v2020.08-RC1
v2020.08-RC1: migration artifacts
Adds the migration artifacts generated with the
v2020.08-RC1 tag
Signed-off-by: Justin Sobota <jsobota@ti.com>
sciserver: Add config option to select boardcfg source
Board configuration may be built locally into the server-integrated
application within the PDK build environment. However, in the case that
the server is integrated standalone into a separate boot environment
(e.g. Linux SPL), board configurations are expected to be queued prior
to booting the server firmware.
A config option is provided to enable integrating applications to select
the boardcfg local structure or to bypass the local processing to enable
externally provided configurations over the sec proxy queue.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
ipc: Bypass sciserver local boardcfg init for Linux integration
ipc_echo_testb is used as the foundation for integration for Linux SDK
for IPC testing. This application hosts the sciserver for TISCI message
forwarding between DM and DMSC. In this scenario, SPL will need to send
board configurations instead of relying on the local structured defined
within PDK
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciserver: Update interrupt handling to clear pending interrupt
VIM servicing requires that pending level interrupts are cleared at the
source and then cleared in the interrupt status register. The VIM status
clear is added to comply with the sequence and prevent spurious
interrupts triggering due to improper care.
Fixes PDK-8075
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: register contextID for response ISR
Response ISR attempts to look up the context ID by the interrupt number.
This fails when multiple CPUs use the same local interrupt number for
different signals routed to their interrupt controllers, causing lookup
of the wrong context.
Instead, register the context ID directly with the ISR so that there is
no need to look up the context.
Fixes PDK-8086
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: Revert portion of "Sciserver: Skeleton code"
Do not unconditionally set the secure mode to false or register
interrupts. Not all CPUs are able to handle interrupt mode in sciclient
in current design.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
Resolve linker errors due to increased size of sciclient
Increases the size of regions in some failing
linker command files after the HSM rearch caused
an ~110kB increased in the size of the sciclient
library.
Signed-off-by: Justin Sobota <jsobota@ti.com>
Fix the SBL R5F-0 cluster reset sequence
SBL has been illegally resetting the R5F-0 cluster.
Core 1 must never be in a higher functional state than core 0, and it is a bad idea to power-down (and power back on) the cores once TCMs have been loaded (as the data will not necessarily be valid when the RAM comes back on-line).
Shorter SBL Boot Test
Add a shorter SBL boot test that does not rely on delays in the start. The delays previously hid the fact that MCU1_1 was running its application twice
PDK-7036: SBL: Update POKE MEM addresses for SBL test
Changes the SBL test POKE MEM addresses in order to not
overlap with possible SBL bootloader memory usage, going
forward.
Signed-off-by: Jonathan Bergsagel <jbergsagel@ti.com>
PDK-7036: SBL: AM65xx: Remove support for TCM pre-loading
Avoids loss of TCM data when power-cycling MCU R5 cores
(for reset into the next app) by removing support for TCM
pre-loading, for AM65xx SoC.
This will require loaded MCU applications to avoid using
"load" sections for ATCM/BTCM memory, and instead enable &
load their own data into the TCM memories once they have
started to run.
Signed-off-by: Jonathan Bergsagel <jbergsagel@ti.com>
Rearch: Sciclient/SBL: Updates for R5_RESET flag usage
Updates in sciclient_direct for usage of R5_RESET flags
in SBL.
Also allows testing the reset sequence for all R5 and A72
cores on the device.
Signed-off-by: Jonathan Bergsagel <jbergsagel@ti.com>
sciclient: Do not force message forwarding for DMSC-only functions
RM PSIL, baseport, and secure are entirely processed on DMSC. mcu1_0
requests for these messages should not be treated as forwarded and
rather as native calls. This has an effect on which queue is used to
send the message, and the mcu1_0 queue has extended depth to enable SBL
sequencing for self-reset.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciclient: pass request flags for PM set proxy
When PM set device is called, a proxy is used specifically for MCU
reboot due to inability to self-reset in proper sequence. However, it is
valid to set the power state without queueing commands in sequence,
which in that case, request flags must be honored. Otherwise, race
conditions may lead to unpredictable behavior.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciserver: tirtos: convert semaphore to counting
Semaphore for scheduling the tasks needs to be counting. This is because
it is possible for both MAIN and MCU domain messages to arrive within a
small enough window of time where both ISRs trigger before the first
message is fully processed. A binary semaphore has the effect of
dropping the first interrupt in this series.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciserver: Add check for softerror in isr
Soft error indicates that host ID does in the message header does not
match the host associated with the queue that the message was received.
This is not a fatal error, just results in the message being dropped. In
that case, re-enable the interrupt and proceed with the next message
when received.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
sciserver: Use offset to global interrupt table to reenable interrupt
Global interrupt table is used to track interrupt numbers and associated
context data. Low priority messages are offset in this table from the
hight priority messages. Use the task ID to determine the offset so that
the proper interrupt can be re-enabled when low-priority messages are
sent.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
Revert "sciserver: Add config option to select boardcfg source"
This reverts commit a228b992f86948583ccf64226185d86803230b8a.
The board configuration is now migrated from sciserver to sciclient
init. Sciserver no longer needs the flag to bypass board config.
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
Revert "ipc: Bypass sciserver local boardcfg init for Linux integration"
This reverts commit fcbba4ac3e80001372fe00d42701bae473b7e101.
The bypass flag for board config is moved to sciclient_init().
Revert "udma: Add sciserver init to test app"
This reverts commit 26be7c473a9ba948456282532a4b0ca8a2d6abbf.
sciclient: add RM and PM boardcfg param to Sciclient_init
On mcu1_0, Sciclient_init() runs a default RM/PM board configuration.
For the Linux SPL use case, Sciclient_init()'s input parameter can be
updated to accordingly.
The mcu1_0 applications also don't need to start the Sciserver in order
to pass the RM/PM board configuration.
Sciserver_init() no longer does Sciclient_init(), so user must
explicitly call Sciclient_init() prior to running Sciserver_init()
Use case 1: app on mcu1_0 only
mcu1_0: app calls Sciclient_init() with default RM/PM boardcfg. (No need
to initialize sciserver.)
Use case 2: app on non-mcu1_0 cores
mcu1_0: Default sciserver_testapp with default RM/PM boardcfg.
other cores: Sciclient_init()
Use case 3: Linux SPL
mcu1_0: app calls Sciclient_configPrmsInit(), updates RM/PM boardcfg
location, runs Sciclient_init()
Use case 4: app on both mcu1_0 and other cores:
mcu1_0: app calls Sciclient_init and Sciserver_init()
other cores: Sciclient_init()
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
build: remove sciserver_tirtos from PDK_COMMON_COMP on mcu1_0
sciserver_tirtos is not needed on all mcu1_0 applications, so it's
removed from the common list. This library can be linked in makefile
based on need.
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
sciclient.c: Fixes to the init function to ensure that the Sciclient Init on MCU1_0 will show secure config
Sciclient_init on MCU1_0 when called with NULL will make the Sciclient on MCU1_0 be non secure when the expectation is that it is secure for DMSC2DM forwarding.
Fixes: PDK-8141
Signed-off-by: Piyali Goswami <piyali_g@ti.com>
build: j721e: Update linker for rm_pm_hal
Add sections to the linker file to support rm_pm_hal
Signed-off-by: Sheng Zhao <shengzhao@ti.com>
sciclient: add flag to bypass local boardcfg processing during init
In the case of device manager integration with rm_pm_hal, add option to
selectively bypass local board configuration processing in call to
Sciclient_init.
This is particularly essential for device boot, where Sciclient_init
must be called in order to send baseport and secure board configurations
to DMSC. Only after this may RM/PM board configurations be processed.
Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com>
Fixes for firmwareHeaderGen.sh to not break AM65xx and AM64
Fixes for firmwareHeaderGen.sh for AM65xx and AM64x
Signed-off-by: Piyali Goswami <piyali_g@ti.com>
SBL: Boot fix for J721e
Boot fix for J721e
Signed-off-by: Piyali Goswami <piyali_g@ti.com>
sciclient: j7200: Modifications to get j7200 HSM artifacts compiling
Changes to the build infrastructure and sciclient in
order to get j7200 compiling for HSM rearchitecture.
Signed-off-by: Justin Sobota <jsobota@ti.com>
sciclient: j7200: Fixes to get HSM arch operational
Collection of fixes to allow PDK to function
under the new HSM architecture for J7200 devices.
Signed-off-by: Justin Sobota <jsobota@ti.com>
sciserver j7200 : included the sci server as part of mcu 10 image
Not validated on j7200 yet
Signed-off-by: sujith <sujith.s@ti.com>
SBL: rearch-j7200: Update J7200 linker.cmd sections
Updated the sections in the SBL J7200 linker.cmd file
to work with the new HSM rearch changes required.
Signed-off-by: Jonathan Bergsagel <jbergsagel@ti.com>
J7200/J721E Rearch: Update linker cmd files for baremetal apps
Updated R5 linker cmd files for baremetal apps to work with
the newly required sections for HSM rearch.
Signed-off-by: Jonathan Bergsagel <jbergsagel@ti.com>
PDK-8155: IPC: Updates to include Sciserver in all RTOS mcu1_0 images
Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
j7200: Linker fixes for new sciclient HSM arch sections
Update relevant j7200 linker files to place the new
sections added by the sciclient HSM arch support.
Signed-off-by: Justin Sobota <jsobota@ti.com>
sciclient: Fixes for j7200 migration from sysfw release tag
Add the commands to make and copy the
sciserver_testapp_mcu1_0 for j7200.
Also, update the j7200 RM default
boardcfg to not use resources used by
TIFS for secure proxy.
Signed-off-by: Justin Sobota <jsobota@ti.com>
Migrating to SYSFW version v2020.08-RC2
Check in artifacts for v2020.08-RC2
Signed-off-by: Justin Sobota <jsobota@ti.com>
j7200: sciclient: launch.js: Point to gp binary
The j7200 launch.js was pointing to the
deprecated no-pm-rm binary. Point the
launch.js to the standard gp binary now
that HSM architecture has been fully
adopted for j7200.
PDK-8044 : MMCSD do not work on mcu 11/j721e
The destination interrupt on mcu 11 was wrong, fixed the
same
Signed-off-by: sujith <sujith.s@ti.com>
J7200 : Enabling sciserver on mcu 10 for j7200/mcu11 apps
Signed-off-by: sujith <sujith.s@ti.com>
- [D] packages/ti/drv/sciclient/soc/V3/sciclient_defaultBoardcfg_security_hexhs.h