11.12. Alternate TISCI Host ID & User-Mode Privilege UDMA RM¶
11.12.1. Introduction¶
Prior to the PSDK QNX 11.02.00 release, the UDMA resource manager utilized elevated privileges for IO access. PSDK QNX 11.02.00 introduces an opt-in feature that enables user-mode privilege access for UDMA IO operations, eliminating the need for elevated privileges.
This feature is implemented through a new host_id configuration that allows UDMA operations to run with user-mode privileges instead of elevated privileges. This change enhances the security picture of the system while maintaining full UDMA functionality.
The new user-mode privilege access for UDMA relies on three key changes:
Modifying the compiler option
PSDK_QNX_USE_LEGACY_HOST_CONFIGto opt out of the legacy host configuration.New Host ID Configuration: The new host_id is used in the resource manager configuration that has user-mode IO access rights. Refer to the TISCI Documentation for more details on host ID descriptions.
Reduced IO Privilege Level: The BSP
.buildfile is updated to use IO privilege level 1 (user-mode) instead of level 2 (elevated privileges) for io-sock (if applicable).
Important
This feature is opt-in and requires a few steps to enable. Applications using the legacy host configuration will continue to function as before by default.
Note
This feature is only available for SBL boot flow and is not supported with SPL/U-Boot boot flow.
Vision Apps User Guide build steps have not been verified with the new host ID
11.12.2. Prerequisites¶
This feature is available on the following SoCs with their respective new host IDs:
J721E using new host ID A72_5
J721S2 using new host ID A72_5
J784S4 using new host ID A72_8
Additionally, the following conditions must be met:
Processor SDK QNX version supporting this feature (11.02.00 or later)
Processor SDK RTOS version supporting this feature (11.02.00 or later)
SBL bootloader is the only supported bootflow (not SPL/U-Boot)
Refer to step 2b of the Build Steps documentation for building SBL bootloader.
Access to sysconfig tool (version >= 1.25.0) for generating board configuration files
This tool is optional and only required if building custom board configuration files. PSDK QNX reference configuration files for TI J784S4 EVMs are provided with this release and do not require this tool
11.12.3. Enabling User-Mode UDMA Privilege Access¶
To enable this feature, please follow these steps. Keep in mind there are two methods to build PSDK QNX with the new host ID configuration: using the provided reference RM configuration files or generating custom files using the sysconfig tool.
11.12.3.1. Build PSDK QNX Reference RM Cfg for New Host ID¶
The compiler option PSDK_QNX_USE_LEGACY_HOST_CONFIG must be set to 0 in your build configuration.
In ${PSDK_QNX_PATH}/qnx:
Locate your build configuration file (e.g., psdk_qnx_build.mk) and ensure PSDK_QNX_USE_LEGACY_HOST_CONFIG is set to 0 or export the new value in your terminal.
# Set the following flag to 0 to disable legacy host configuration:
export PSDK_QNX_USE_LEGACY_HOST_CONFIG=0
11.12.3.2. Build and Test¶
Rebuild the bootloader, BSP, and resource managers.
You can verify the status of tisci-mgr and udma-mgr by checking the slog2info output:
slog2info -d | grep -E 'tisci-mgr|udma-mgr'
For both host ID configurations, you will see messages indicating the current implementation for each resource managers startup sequence.
Jan 01 00:00:03.830 tisci_mgr.241679 slog 130 Using legacy host id with priv IO access configuration
Jan 01 00:00:03.936 tiudma_mgr.262162 slog 131 Using legacy host id with priv IO access configuration
# OR
Jan 01 00:00:03.830 tisci_mgr.241679 slog 130 Using new host id with non-priv IO access configuration
Jan 01 00:00:03.936 tiudma_mgr.262162 slog 131 Using new host id with non-priv IO access configuration
11.12.3.3. Reverting to Legacy Configuration¶
To revert to the legacy configuration with elevated privileges:
Re-enable
PSDK_QNX_USE_LEGACY_HOST_CONFIGcompiler optionRebuild all components
11.12.4. (Optional): Build with User Generated RM Cfg for New Host ID¶
Important
The sysconfig-generated files must be configured to use the new A72_8 host_id on J784S4. Ensure your sysconfig configuration includes the appropriate host_id for your target SoC.
Generate compatible board configuration files using the sysconfig tool, and then update the ${USER_MODE_RM_CFG_PATH} to point to where the sysconfig generated files are saved. Inside this directory there should be the following files:
sciclient_defaultBoardcfg_tifs_rm.csciclient_defaultBoardcfg_rm.c
Update the following variables to point to the appropriate directory and filenames (these values are assigned default values in soc_configs.mk for building with reference rm cfg):
# example
export USER_MODE_RM_CFG_PATH=<path_to_sysconfig_generated_files_directory>
export USER_MODE_RM_C=sciclient_defaultBoardcfg_rm.c
export USER_MODE_TIFS_RM_C=sciclient_defaultBoardcfg_tifs_rm.c
The build process will automatically overwrite the default rm cfg with the user generated files that are pointed to by the above assigned variables. When PSDK_QNX_USE_LEGACY_HOST_CONFIG is set back to 1, the files will be reverted back to the original defaults.
Files that will be replaced ${PDK_PATH}:
pdk_<version>/packages/ti/drv/sciclient/soc/V6/sciclient_defaultBoardcfg_tifs_rm.c
pdk_<version>/packages/ti/drv/sciclient/soc/V6/sciclient_defaultBoardcfg_rm.c
11.12.4.1. Update io-sock startup in BSP .build File¶
If not using the J784S4-evm-ti.build file, your custom .build file must be updated to change the “iolevel” parameter from 2 (elevated) to 1 (user-mode) for io-sock (if applicable).
For example, In ${PSDK_QNX_PATH}/qnx/bsp/images:
In the .build file, locate the io-sock startup line and change iolevel=2 to iolevel=1:
# Before (with elevated privileges):
/etc/iosock-cpsw.conf={
qnx.iolevel="2"
# After (with user-mode privileges):
/etc/iosock-cpsw.conf={
qnx.iolevel="1"
11.12.4.2. Build and Test¶
After making all changes, rebuild the bootloader, BSP, and resource managers.
11.12.5. FAQ and Additional Notes¶
Note
There has been no change to the BSP startup to use the new host IDs by default. As there are no privilege level concerns with the TISCI calls the BSP makes, it will continue to use the legacy host IDs. There is no difference in functionality for the BSP startup when using either new or legacy host IDs. If user modified BSPs require user mode privileges for TISCI calls, the BSP must be modified to use the new host IDs accordingly.
Note
A living FAQ for this feature is maintained on the TI E2E forums at: [FAQ] Support for user-mode host-id. Please vist the link for the latest updates and common questions regarding this feature.