Enumerated values and constants

QNX SDP8.0SMMUMAN User's GuideAPIConfigurationUtilities

Enumerated values used by the SMMUMAN client API

The following enumerated values and constants are defined in the smmu.h header file for the SMMUMAN client API.

SMMU_ABILITY_* constants

#define SMMU_ABILITY_ATTACH_NAME "smmu/attach"
#define SMMU_ABILITY_TARGET_NAME "smmu/target"

These abilities must be obtained before calling smmu_init().

Constant Value Meaning
SMMU_ABILITY_ATTACH_NAME "smmu/attach" Ability required to connect as a client of the smmuman service (see smmu_init()).
SMMU_ABILITY_TARGET_NAME "smmu/target" Ability required to use the SMF_TARGET flag when calling smmu_mapping_add(). Currently reserved for the QNX hypervisor.

smmu_devid_type

enum smmu_devid_type {
	SDT_PCI,
	SDT_MMIO,
	SDT_NUM_TYPES,
};

The smmu_devid enumerated values specify the DMA device type. You can use these values when calling a smmu_device_add_*() function. The specified types include:

  • SDT_PCI — the device is a PCI device
  • SDT_MMIO — the device is an MMIO device
  • SDT_NUM_TYPES — the number of different types

smmu_mapping_flags

enum smmu_mapping_flags {
	SMF_NONE	= 0x00,
	SMF_READ	= 0x01,
	SMF_WRITE	= 0x02,
	SMF_EXEC	= 0x04,
	SMF_VIRT	= 0x08,
	SMF_TARGET	= 0x10,
};

The smmu_mapping_flags enumerated values specify bitmaps with the permissions a smmuman service client requests the service to assign to a DMA device. These permissions include:

  • SMF_NONE (0x00) — no permissions
  • SMF_READ (0x01) — the DMA device may only read from the region
  • SMF_WRITE (0x02) — the DMA device may write to the region
  • SMF_EXEC (0x04) — the DMA device may execute from the region
  • SMF_VIRT (0x08) — reserved for future use
  • SMF_TARGET (0x10) — respect the value of the smmu_mapping_add() function's target argument

    Do not set. Currently reserved for the QNX hypervisor; the client must have the SMMU_ABILITY_TARGET_NAME custom ability.

Note:
Renesas R-Car IPMMUs don't allow the specification of write-only regions (i.e., write, but not read). With this hardware, if you assign a memory block write permission, read permission is also implicitly specified.

smmu_obj_create_flags

enum smmu_obj_create_flags {
	SOCF_NONE 		= 0x0000,
	SOCF_RESERVED_MANUAL	= 0x0001,
};

The smmu_obj_create_flags enumerated values specify whether it is the smmuman service or the current client that looks after adding and removing any reserved memory regions required by the devices the client adds to a SMMU object:

  • SOCF_NONE (0x0000) — no flags are specified; the smmuman service looks after adding and removing any reserved memory regions required by the devices a client adds to a SMMU object
  • SOCF_RESERVED_MANUAL (0x0001) — the smmuman client is responsible for adding and removing any reserved memory regions required by the devices it adds to a SMMU object

Currently used only by the QNX hypervisor. For more information about reserved memory regions, see the reserved option under Global options.

SMMU_PCI_FIELD_ANY

#define SMMU_PCI_FIELD_ANY	(~0u)

The SMMU_PCI_FIELD_ANY constant can be used to allow any value for a PCI bus, device, or function number (see smmu_device_add_pci()).

SMMU_SAFETY_* constants

For future use.

SSF_DROPPED_FAULTS

#define SSF_DROPPED_FAULTS	0x80000000u

SSF_DROPPED_FAULTS specifies the bit that the smmuman service sets in the smmu_status's flag member to indicate that it had to drop one or more transgression records (see smmu_xfer_status()).

Page updated: