DT Configuration for VSE Driver#
On Linux, the VSE driver reads the engine nodes such as vse@xxxx and
vtsec@xxxx and follows the nvidia,ivccfg phandles attached to each
engine. Each phandle points to a child node under nvvse-ivccfgdb that
describes one VSE IVC channel.
The DT configuration must stay aligned with the PCT configuration. Buffer limits, SMMU SID values, engine routing, and enabled IVC channels are expected to match.
Linux DT layout#
The Linux DT is split into two layers:
Per-engine nodes such as
vse@xxxxandvtsec@xxxxdefine the engine-level configuration and list the IVC entries used by that engine.A top-level
nvvse-ivccfgdbnode contains one child node per IVC channel.
Example:
<engine-node>@<controller-address> {
compatible = "nvvse-plug-arch";
se_port = <...>;
se_engine_domain = <...>;
se_engine_domain_instanceId = <...>;
iommus = <&smmu... ...>;
status = "okay";
nvidia,ivccfg_cnt = <1>;
nvidia,ivccfg = <&nvvse_ivccfg_301_alias>;
};
Properties in Linux engine nodes#
compatible: Identifies the Linux VSE engine node. Current DTs use"nvvse-plug-arch".se_port: Identifies the engine type. The child entries referenced bynvidia,ivccfgmust match this value.se_engine_domain: Identifies the engine security domain. The child entries referenced bynvidia,ivccfgmust match this value.se_engine_domain_instanceId: Identifies the physical engine instance within the selectedse_portandse_engine_domain. The child entries referenced bynvidia,ivccfgmust match this value.#zero-copy: Marks the engine as zero-copy capable. For every referenced IVC entry,zero_copy_supportedmust match this flag.iommus: Provides the SMMU phandle and SID used by the engine. The SID must match the SID encoded in each referenced IVC entry’sse_sid.status: Enables or disables the engine node.dma-coherent: Indicates to the Linux DMA API that the SE uses coherent DMA and does not require manual cache maintenance operations.hwrng_ivc_id: Optional IVC channel ID used to register the hardware RNG interface when supported by the platform.nvidia,ivccfg_cnt: Number of phandles listed innvidia,ivccfg. Supported range is1to75.nvidia,ivccfg: Array of phandles to child nodes undernvvse-ivccfgdb.
If #zero-copy is present, the channel is restricted to the zero-copy
feature set supported by the driver. Zero-copy support is intended only for
internal use cases.
Properties in each nvvse-ivccfgdb child#
Property |
Description |
Supported values / constraints |
|---|---|---|
|
Unique VSE communication channel ID. |
|
|
Descriptive label for the channel. |
String up to |
|
Security domain of the SE engine. |
|
|
Engine type. |
|
|
Selects the engine instance within the port. |
For
se_port = 0:0 GPSE-AES0, 1 GPSE-AES1, 2 GCSE1-AES0,3 GCSE1-AES1, 4 GCSE2-AES0, 5 GCSE2-AES1For
se_port = 1:0 GPSE-SHA, 1 GCSE1-SHA, 2 GCSE2-SHA |
|
Virtualized instance number used while enumerating device nodes for the engine. |
Must be unique within a given engine instance space.
AES port:
se_domain_instance_id = 0 or 1: 0 to 10se_domain_instance_id = 2 or 4: 0 to 18se_domain_instance_id = 3 or 5: 0 to 11SHA port:
se_domain_instance_id = 0: 0 to 6se_domain_instance_id = 1 or 2: 0 to 10 |
|
Channel priority. The Linux driver validates the value but does not otherwise use it. |
|
|
Maximum mapped buffer size. |
Less than |
|
Indicates whether zero-copy is supported for the channel. |
|
|
Group ID assigned to the VSE device node. |
Numeric group ID. |
|
Per-entry SMMU phandle plus SID. |
Must encode the same SID as the parent engine node’s |
|
Indicates whether GCM decrypt is supported for the channel. |
AES port: |
|
Thread attribute value. |
Unused on Linux. |
Linux validation rules#
The Linux driver validates the following before enumerating a device node:
nvidia,ivccfg_cntmust match the number of phandles innvidia,ivccfg.se_comm_idmust be unique across all VSE channels.se_port,se_domain, andse_domain_instance_idin the child node must match the parent engine node’sse_port,se_engine_domain, andse_engine_domain_instanceId.zero_copy_supportedmust match the presence of#zero-copy.se_sidmust encode the same SID as the parent engine’siommusproperty.gcm_decrypt_supportedmust be1for AES channels and0for SHA channels.
How to Add Entries#
Add a new child node under
nvvse-ivccfgdbwith the required named properties.Add a phandle to that child node from the owning Linux engine node.
Update
nvidia,ivccfg_cntso the count matches the number of phandles.
Entry planning rules#
se_comm_idmust match the IVC channel enabled in PCT.se_domain,se_port, andse_domain_instance_idmust match the PCT engine routing.prioritymust match PCT when that field is used by the client stack.max_buffer_sizemust not exceed the PCT limit.se_sidmust match the SMMU SID required for that engine instance.channel_group_idis the group ID assigned to the VSE device node.virtual_instance_idis the virtualized instance number used by the driver while enumerating device nodes. It must stay unique within the engine instance space exposed by the driver.gcm_decrypt_supportedmust match the SoC contract:On Thor, set
gcm_decrypt_supportedto1for AES channels and to0for SHA channels.
Examples#
Example Linux child entry:
nvvse_ivccfg_301_alias: nvvse_ivccfg_301 { se_comm_id = <301>; label = "Default_GPSE_AES0"; se_domain = <0>; se_port = <0>; se_domain_instance_id = <0>; virtual_instance_id = <0>; priority = <0>; max_buffer_size = <(1 * 1024 * 1024)>; zero_copy_supported = <0>; channel_group_id = <2281>; se_sid = <&smmu1_mmu TEGRA_SID_SE_AES0_VM0>; gcm_decrypt_supported = <1>; thread_attr = <0xFF>; };
How to Remove an Entry#
Remove the relevant phandle reference from the OS-specific parent node.
Delete the now-unused child node from
nvvse-ivccfgdbif no other consumer references it.Update
nvidia,ivccfg_cntso the count still matches.