NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release

Detailed Description

This file declares Resource Management (RM) module information and control APIs.

Data Structures

struct  NvRmModuleInfoRec
 Holds the module information. More...
 
struct  NvRmModuleCapabilityRec
 Holds DDK capability encapsualtion. More...
 

Macros

#define NvRmPrivModuleID_Num   NvRmModuleID_Num
 
#define NVRM_MODULE_0   (0x0)
 Module bitfields that are compatible with the NV_DRF macros. More...
 
#define NVRM_MODULE_0_ID_RANGE   15:0
 
#define NVRM_MODULE_0_INSTANCE_RANGE   23:16
 
#define NVRM_MODULE_0_BAR_RANGE   27:24
 
#define NVRM_MODULE_ID(id, instance)
 Creates a module ID with a given instance. More...
 
#define NVRM_MODULE_ID_MODULE(id)   NV_DRF_VAL( NVRM, MODULE, ID, (id) )
 Gets the actual module ID. More...
 
#define NVRM_MODULE_ID_INSTANCE(id)   NV_DRF_VAL( NVRM, MODULE, INSTANCE, (id) )
 Gets the instance number of the module ID. More...
 
#define NVRM_MODULE_ID_BAR(id)   NV_DRF_VAL( NVRM, MODULE, BAR, (id) )
 Gets the bar number for the module. More...
 
#define NV_RM_CAPS_API_MODULE_PLATFORM   (1)
 Module Capability API tracking API changes. More...
 
#define NV_REGR(rm, aperture, offset)   NvRegr((rm),(aperture),(offset))
 Registers read from hardware. More...
 
#define NV_REGW(rm, aperture, offset, data)   NvRegw((rm),(aperture),(offset),(data))
 Register write to hardware. More...
 
#define NV_REGR_MULT(rm, aperture, num, offsets, values)   NvRegrm((rm),(aperture),(num),(offsets),(values))
 Reads multiple registers from hardware. More...
 
#define NV_REGW_MULT(rm, aperture, num, offsets, values)   NvRegwm((rm),(aperture),(num),(offsets),(values))
 Write multiple registers from hardware. More...
 
#define NV_REGW_BLOCK(rm, aperture, num, offset, values)   NvRegwb((rm),(aperture),(num),(offset),(values))
 Writes a block of registers to hardware. More...
 
#define NV_REGR_BLOCK(rm, aperture, num, offset, values)   NvRegrb((rm),(aperture),(num),(offset),(values))
 Reads a block of registers from hardware. More...
 

Typedefs

typedef struct NvRmModuleIdRec * NvRmModuleIdHandle
 
typedef struct NvRmModuleInfoRec NvRmModuleInfo
 Holds the module information. More...
 
typedef struct NvRmModuleCapabilityRec NvRmModuleCapability
 Holds DDK capability encapsualtion. More...
 

Enumerations

enum  NvRmModuleID {
  NvRmModuleID_Invalid = 0,
  NvRmModuleID_Cpu,
  NvRmModuleID_Avp,
  NvRmModuleID_Vcp,
  NvRmModuleID_Display,
  NvRmModuleID_Ide,
  NvRmModuleID_GraphicsHost,
  NvRmModuleID_2D,
  NvRmModuleID_3D,
  NvRmModuleID_VG,
  NvRmModuleID_Epp,
  NvRmModuleID_Isp,
  NvRmModuleID_Vi,
  NvRmModuleID_Usb2Otg,
  NvRmModuleID_I2s,
  NvRmModuleID_Pwm,
  NvRmModuleID_Twc,
  NvRmModuleID_Hsmmc,
  NvRmModuleID_Sdio,
  NvRmModuleID_Nand,
  NvRmModuleID_I2c,
  NvRmModuleID_Spdif,
  NvRmModuleID_Uart,
  NvRmModuleID_Timer,
  NvRmModuleID_TimerUs,
  NvRmModuleID_Rtc,
  NvRmModuleID_Ac97,
  NvRmModuleID_BseA,
  NvRmModuleID_Vde,
  NvRmModuleID_Mpe,
  NvRmModuleID_Csi,
  NvRmModuleID_Hdcp,
  NvRmModuleID_Hdmi,
  NvRmModuleID_Mipi,
  NvRmModuleID_Tvo,
  NvRmModuleID_Dsi,
  NvRmModuleID_Dvc,
  NvRmModuleID_Xio,
  NvRmModuleID_Spi,
  NvRmModuleID_Slink,
  NvRmModuleID_Fuse,
  NvRmModuleID_KFuse,
  NvRmModuleID_Mio,
  NvRmModuleID_Kbc,
  NvRmModuleID_Pmif,
  NvRmModuleID_Ucq,
  NvRmModuleID_EventCtrl,
  NvRmModuleID_FlowCtrl,
  NvRmModuleID_ResourceSema,
  NvRmModuleID_ArbitrationSema,
  NvRmModuleID_ArbPriority,
  NvRmModuleID_CacheMemCtrl,
  NvRmModuleID_Vfir,
  NvRmModuleID_ExceptionVector,
  NvRmModuleID_BootStrap,
  NvRmModuleID_SysStatMonitor,
  NvRmModuleID_Cdev,
  NvRmModuleID_Misc,
  NvRmModuleID_PcieDevice,
  NvRmModuleID_OneWire,
  NvRmModuleID_SyncNor,
  NvRmModuleID_Nor,
  NvRmModuleID_AvpUcq,
  NvRmPrivModuleID_ClockAndReset,
  NvRmPrivModuleID_Interrupt,
  NvRmPrivModuleID_InterruptArbGnt,
  NvRmPrivModuleID_InterruptDrq,
  NvRmPrivModuleID_InterruptSw,
  NvRmPrivModuleID_InterruptCpu,
  NvRmPrivModuleID_ApbDma,
  NvRmPrivModuleID_ApbDmaChannel,
  NvRmPrivModuleID_Gpio,
  NvRmPrivModuleID_PinMux,
  NvRmPrivModuleID_Mselect,
  NvRmPrivModuleID_MemoryController,
  NvRmPrivModuleID_ExternalMemoryController,
  NvRmPrivModuleID_ProcId,
  NvRmPrivModuleID_System,
  NvRmPrivModuleID_CC,
  NvRmPrivModuleID_Ahb_Arb_Ctrl,
  NvRmPrivModuleID_Ahb_Gizmo_Ctrl,
  NvRmPrivModuleID_ExternalMemory,
  NvRmPrivModuleID_InternalMemory,
  NvRmPrivModuleID_Tcram,
  NvRmPrivModuleID_Iram,
  NvRmPrivModuleID_Gart,
  NvRmPrivModuleID_Mio_Exio,
  NvRmPrivModuleID_PmuExt,
  NvRmPrivModuleID_ArmPerif,
  NvRmPrivModuleID_ArmInterruptctrl,
  NvRmPrivModuleID_Afi,
  NvRmPrivModuleID_Pcie,
  NvRmPrivModuleID_PcieXclk,
  NvRmPrivModuleID_Pl310,
  NvRmPrivModuleID_AhbRemap,
  NvRmModuleID_HDA,
  NvRmModuleID_Apbif,
  NvRmModuleID_Audio,
  NvRmModuleID_DAM,
  NvRmModuleID_Sata,
  NvRmModuleID_DTV,
  NvRmModuleID_Tsensor,
  NvRmModuleID_Actmon,
  NvRmModuleID_Atomics,
  NvRmModuleID_Se,
  NvRmModuleID_ExtPeriphClk,
  NvRmModuleID_Vic,
  NvRmModuleID_Gpu,
  NvRmPrivModuleID_ExternalMemory_MMIO,
  NvRmModuleID_MSENC,
  NvRmModuleID_TSEC,
  NvRmModuleID_Vp8,
  NvRmModuleID_XUSB_HOST,
  NvRmModuleID_Mipibif,
  NvRmModuleID_Vgpio,
  NvRmModuleID_ClDvfs,
  NvRmModuleID_Sor,
  NvRmModuleID_NVDEC,
  NvRmModuleID_NVJPG,
  NvRmModuleID_CBUS_Floor,
  NvRmModuleID_EMC_Shared,
  NvRmModuleID_OFA,
  NvRmModuleID_Num,
  NvRmModuleID_Force32 = 0x7FFFFFFF
}
 Defines SOC hardware controller class identifiers. More...
 
enum  NvRmModulePlatform {
  NvRmModulePlatform_Silicon = 0,
  NvRmModulePlatform_Simulation,
  NvRmModulePlatform_Emulation,
  NvRmModulePlatform_Quickturn,
  NvRmModulePlatform_Num,
  NvRmModulePlatform_Force32 = 0x7FFFFFFF
}
 Defines platform of operation. More...
 

Functions

NvError NvRmModuleGetModuleInfo (NvRmDeviceHandle hDevice, NvRmModuleID module, NvU32 *pNum, NvRmModuleInfo *pModuleInfo)
 Returns a list of available module instances and their information. More...
 
void NvRmModuleGetBaseAddress (NvRmDeviceHandle hRmDeviceHandle, NvRmModuleID Module, NvRmPhysAddr *pBaseAddress, NvU32 *pSize) __DEPRECATED__
 Returns a physical address associated with a hardware module. More...
 
NvError NvRmFindModule (NvRmDeviceHandle hRmDeviceHandle, NvU32 Address, NvRmModuleIdHandle *phModuleId)
 Find a module given its physical register address. More...
 
NvU32 NvRmModuleGetNumInstances (NvRmDeviceHandle hRmDeviceHandle, NvRmModuleID Module)
 Returns the number of instances of a particular hardware module. More...
 
void NvRmModuleReset (NvRmDeviceHandle hRmDeviceHandle, NvRmModuleID Module)
 Resets the module controller hardware. More...
 
void NvRmModuleResetWithHold (NvRmDeviceHandle hRmDeviceHandle, NvRmModuleID Module, NvBool bHold)
 Resets the controller with an option to hold the controller in the reset. More...
 
NvError NvRmModuleGetCapabilities (NvRmDeviceHandle hDeviceHandle, NvRmModuleID Module, NvRmModuleCapability *pCaps, NvU32 NumCaps, void **Capability) __DEPRECATED__
 Returns a pointer to a class-specific capabilities structure. More...
 
NvError NvRmQueryChipUniqueId (NvRmDeviceHandle hDevHandle, NvU32 IdSize, void *pId)
 Queries for the device unique ID. More...
 
NvError NvRmGetRandomBytes (NvRmDeviceHandle hRmDeviceHandle, NvU32 NumBytes, void *pBytes)
 Returns random bytes using hardware sources of entropy. More...
 
NvError NvRmCheckValidSecureState (NvRmDeviceHandle hRmDeviceHandle)
 Returns whether system is a valid SecureOS state. More...
 
NvError NvRmCheckValidNVSIState (NvRmDeviceHandle hRmDeviceHandle)
 Returns whether system is in a valid NVSI state. More...
 
NvU32 NvRegr (NvRmDeviceHandle hDeviceHandle, NvRmModuleID aperture, NvU32 offset)
 
void NvRegw (NvRmDeviceHandle hDeviceHandle, NvRmModuleID aperture, NvU32 offset, NvU32 data)
 
void NvRegrm (NvRmDeviceHandle hRmDeviceHandle, NvRmModuleID aperture, NvU32 num, const NvU32 *offsets, NvU32 *values)
 
void NvRegwm (NvRmDeviceHandle hRmDeviceHandle, NvRmModuleID aperture, NvU32 num, const NvU32 *offsets, const NvU32 *values)
 
void NvRegwb (NvRmDeviceHandle hRmDeviceHandle, NvRmModuleID aperture, NvU32 num, NvU32 offset, const NvU32 *values)
 
void NvRegrb (NvRmDeviceHandle hRmDeviceHandle, NvRmModuleID aperture, NvU32 num, NvU32 offset, NvU32 *values)
 

Macro Definition Documentation

◆ NV_REGR

#define NV_REGR (   rm,
  aperture,
  offset 
)    NvRegr((rm),(aperture),(offset))

Registers read from hardware.

The aperture comes from the RM's private module ID enumeration, which is a superset of the public enumeration from nvrm_module.h.

Note
Resource Manager (RM) doesn't gaurantee access to all the modules as it only maps a few modules. This is not meant to be a primary mechanism to access the module registers. Clients should map their register address and access the registers.
Parameters
rmThe RM istance.
apertureThe register aperture.
offsetThe offset inside the aperture.

Definition at line 787 of file nvrm_module.h.

◆ NV_REGR_BLOCK

#define NV_REGR_BLOCK (   rm,
  aperture,
  num,
  offset,
  values 
)    NvRegrb((rm),(aperture),(num),(offset),(values))

Reads a block of registers from hardware.

Note
Resource Manager (RM) doesn't gaurantee access to all the modules as it only maps a few modules. This is not meant to be a primary mechanism to access the module registers. Clients should map their register address and access the registers.
Parameters
rmThe resource manager istance.
apertureThe register aperture.
numThe number of registers.
offsetThe beginning register offset.
valuesThe register values.

Definition at line 887 of file nvrm_module.h.

◆ NV_REGR_MULT

#define NV_REGR_MULT (   rm,
  aperture,
  num,
  offsets,
  values 
)    NvRegrm((rm),(aperture),(num),(offsets),(values))

Reads multiple registers from hardware.

Note
Resource Manager (RM) doesn't gaurantee access to all the modules as it only maps a few modules. This is not meant to be a primary mechanism to access the module registers. Clients should map their register address and access the registers.
Parameters
rmThe resource manager istance.
apertureThe register aperture.
numThe number of registers.
offsetsThe register offsets.
valuesThe register values.

Definition at line 836 of file nvrm_module.h.

◆ NV_REGW

#define NV_REGW (   rm,
  aperture,
  offset,
  data 
)    NvRegw((rm),(aperture),(offset),(data))

Register write to hardware.

The aperture comes from the RM's private module ID enumeration, which is a superset of the public enumeration from nvrm_module.h.

Note
Resource Manager (RM) doesn't gaurantee access to all the modules as it only maps a few modules. This is not meant to be a primary mechanism to access the module registers. Clients should map their register address and access the registers.
Parameters
rmThe resource manager istance.
apertureThe register aperture.
offsetThe offset inside the aperture.
dataThe data to write.

Definition at line 806 of file nvrm_module.h.

◆ NV_REGW_BLOCK

#define NV_REGW_BLOCK (   rm,
  aperture,
  num,
  offset,
  values 
)    NvRegwb((rm),(aperture),(num),(offset),(values))

Writes a block of registers to hardware.

Note
Resource Manager (RM) doesn't gaurantee access to all the modules as it only maps a few modules. This is not meant to be a primary mechanism to access the module registers. Clients should map their register address and access the registers.
Parameters
rmThe resource manager istance.
apertureThe register aperture.
numThe number of registers.
offsetThe beginning register offset.
valuesThe register values.

Definition at line 870 of file nvrm_module.h.

◆ NV_REGW_MULT

#define NV_REGW_MULT (   rm,
  aperture,
  num,
  offsets,
  values 
)    NvRegwm((rm),(aperture),(num),(offsets),(values))

Write multiple registers from hardware.

Note
Resource Manager (RM) doesn't gaurantee access to all the modules as it only maps a few modules. This is not meant to be a primary mechanism to access the module registers. Clients should map their register address and access the registers.
Parameters
rmThe resource manager istance.
apertureThe register aperture.
numThe number of registers.
offsetsThe register offsets.
valuesThe register values.

Definition at line 853 of file nvrm_module.h.

◆ NV_RM_CAPS_API_MODULE_PLATFORM

#define NV_RM_CAPS_API_MODULE_PLATFORM   (1)

Module Capability API tracking API changes.

0 : original API 1 : API changes: NvRmModulePlatform was added to NvRmModuleCapability.

Definition at line 637 of file nvrm_module.h.

◆ NVRM_MODULE_0

#define NVRM_MODULE_0   (0x0)

Module bitfields that are compatible with the NV_DRF macros.

Multiple module instances are handled by packing the instance number into the high bits of the module ID. This avoids ponderous APIs with both module IDs and instance numbers.

Definition at line 484 of file nvrm_module.h.

◆ NVRM_MODULE_0_BAR_RANGE

#define NVRM_MODULE_0_BAR_RANGE   27:24

Definition at line 487 of file nvrm_module.h.

◆ NVRM_MODULE_0_ID_RANGE

#define NVRM_MODULE_0_ID_RANGE   15:0

Definition at line 485 of file nvrm_module.h.

◆ NVRM_MODULE_0_INSTANCE_RANGE

#define NVRM_MODULE_0_INSTANCE_RANGE   23:16

Definition at line 486 of file nvrm_module.h.

◆ NVRM_MODULE_ID

#define NVRM_MODULE_ID (   id,
  instance 
)
Value:
NV_DRF_NUM( NVRM, MODULE, ID, (id) ) \
| NV_DRF_NUM( NVRM, MODULE, INSTANCE, (instance) ) )

Creates a module ID with a given instance.

Definition at line 492 of file nvrm_module.h.

◆ NVRM_MODULE_ID_BAR

#define NVRM_MODULE_ID_BAR (   id)    NV_DRF_VAL( NVRM, MODULE, BAR, (id) )

Gets the bar number for the module.

Definition at line 512 of file nvrm_module.h.

◆ NVRM_MODULE_ID_INSTANCE

#define NVRM_MODULE_ID_INSTANCE (   id)    NV_DRF_VAL( NVRM, MODULE, INSTANCE, (id) )

Gets the instance number of the module ID.

Definition at line 506 of file nvrm_module.h.

◆ NVRM_MODULE_ID_MODULE

#define NVRM_MODULE_ID_MODULE (   id)    NV_DRF_VAL( NVRM, MODULE, ID, (id) )

Gets the actual module ID.

Definition at line 500 of file nvrm_module.h.

◆ NvRmPrivModuleID_Num

#define NvRmPrivModuleID_Num   NvRmModuleID_Num

Definition at line 474 of file nvrm_module.h.

Typedef Documentation

◆ NvRmModuleCapability

Holds DDK capability encapsualtion.

See NvRmModuleGetCapabilities().

◆ NvRmModuleIdHandle

typedef struct NvRmModuleIdRec* NvRmModuleIdHandle

Definition at line 446 of file nvrm_module.h.

◆ NvRmModuleInfo

Holds the module information.

Enumeration Type Documentation

◆ NvRmModuleID

Defines SOC hardware controller class identifiers.

There is module-ID mapping between userspace and kernelspace. So while adding new entry in this enum, please check if you need it in kernelspace also then add it with same value in enum nvhost_module_id defined in kernel @ $TOP/kernel/include/linux/nvhost.h

Enumerator
NvRmModuleID_Invalid 

Specifies an invalid module ID.

NvRmModuleID_Cpu 

Specifies the application processor.

NvRmModuleID_Avp 

Specifies the audio/video processor.

NvRmModuleID_Vcp 

Specifies the vector co-processor.

NvRmModuleID_Display 

Specifies the display controller.

NvRmModuleID_Ide 

Specifies the IDE controller.

NvRmModuleID_GraphicsHost 

Specifies the graphics host.

NvRmModuleID_2D 

Specifies 2D graphics controller.

NvRmModuleID_3D 

Specifies 3D graphics controller.

NvRmModuleID_VG 

Specifies VG graphics controller.

NvRmModuleID_Epp 

Specifies NVIDIA encoder pre-processor (EPP).

NvRmModuleID_Isp 

Specifies NVIDIA image signal processor (ISP).

NvRmModuleID_Vi 

Specifies NVIDIA video input.

NvRmModuleID_Usb2Otg 

Specifies the USB2 OTG controller.

NvRmModuleID_I2s 

Specifies the I2S controller.

NvRmModuleID_Pwm 

Specifies the Pulse Width Modulator controller.

NvRmModuleID_Twc 

Specifies the Three Wire controller.

NvRmModuleID_Hsmmc 

Specifies the HSMMC controller.

NvRmModuleID_Sdio 

Specifies the SDIO controller.

NvRmModuleID_Nand 

Specifies the NAND controller.

NvRmModuleID_I2c 

Specifies the I2C controller.

NvRmModuleID_Spdif 

Specifies the Sony Phillips Digital Interface Format controller.

NvRmModuleID_Uart 

Specifies the UART controller.

NvRmModuleID_Timer 

Specifies the timer controller.

NvRmModuleID_TimerUs 

Specifies the timer controller microsecond counter.

NvRmModuleID_Rtc 

Specifies the realtime clock controller.

NvRmModuleID_Ac97 

Specifies the Audio Codec 97 controller.

NvRmModuleID_BseA 

Specifies the Audio Bit Stream Engine.

NvRmModuleID_Vde 

Specifies video decoder.

NvRmModuleID_Mpe 

Specifies video encoder (Motion Picture Encoder).

NvRmModuleID_Csi 

Specifies the Camera Serial Interface.

NvRmModuleID_Hdcp 

Specifies High-Bandwidth Digital Content Protection interface.

NvRmModuleID_Hdmi 

Specifies High definition Multimedia Interface.

NvRmModuleID_Mipi 

Specifies MIPI baseband controller.

NvRmModuleID_Tvo 

Specifies TV out controller.

NvRmModuleID_Dsi 

Specifies serial display.

NvRmModuleID_Dvc 

Specifies Dynamic Voltage Controller.

NvRmModuleID_Xio 

Specifies the eXtended I/O controller.

NvRmModuleID_Spi 

Specifies the SPI controller.

NvRmModuleID_Slink 

Specifies SLink controller.

NvRmModuleID_Fuse 

Specifies FUSE controller.

NvRmModuleID_KFuse 

Specifies KFUSE controller.

NvRmModuleID_Mio 

Specifies EthernetMIO controller.

NvRmModuleID_Kbc 

Specifies keyboard controller.

NvRmModuleID_Pmif 

Specifies PMIF controller.

NvRmModuleID_Ucq 

Specifies Unified Command Queue.

NvRmModuleID_EventCtrl 

Specifies event controller.

NvRmModuleID_FlowCtrl 

Specifies flow controller.

NvRmModuleID_ResourceSema 

Specifies resource semaphore.

NvRmModuleID_ArbitrationSema 

Specifies arbitration semaphore.

NvRmModuleID_ArbPriority 

Specifies arbitration priority.

NvRmModuleID_CacheMemCtrl 

Specifies cache memory controller.

NvRmModuleID_Vfir 

Specifies very fast infra-red controller.

NvRmModuleID_ExceptionVector 

Specifies exception vector.

NvRmModuleID_BootStrap 

Specifies boot strap controller.

NvRmModuleID_SysStatMonitor 

Specifies system statistics monitor controllerl.

NvRmModuleID_Cdev 

Specifies system.

NvRmModuleID_Misc 

Specifies a miscellaneous module ID that contains registers for pinmux/DAP control, etc.

NvRmModuleID_PcieDevice 

Specifies a PCIE Device attached to AP20.

NvRmModuleID_OneWire 

Specifies one-wire interface controller.

NvRmModuleID_SyncNor 

Specifies sync NOR controller.

NvRmModuleID_Nor 

Specifies NOR memory aperture.

NvRmModuleID_AvpUcq 

Specifies AVP UCQ module.

NvRmPrivModuleID_ClockAndReset 

Specifies clock and reset controller.

NvRmPrivModuleID_Interrupt 

Specifies interrupt controller.

NvRmPrivModuleID_InterruptArbGnt 

Specifies interrupt controller arbitration semaphore grant registers.

NvRmPrivModuleID_InterruptDrq 

Specifies interrupt controller DMA Tx/Rx DRQ registers.

NvRmPrivModuleID_InterruptSw 

Specifies interrupt controller special SW interrupt.

NvRmPrivModuleID_InterruptCpu 

Specifies interrupt controller special CPU interrupt.

NvRmPrivModuleID_ApbDma 

Specifies APB DMA controller.

NvRmPrivModuleID_ApbDmaChannel 

Specifies APB DMA channel.

NvRmPrivModuleID_Gpio 

Specifies GPIO controller.

NvRmPrivModuleID_PinMux 

Specifies pin-mux controller.

NvRmPrivModuleID_Mselect 

Specifies memory configuation.

NvRmPrivModuleID_MemoryController 

Specifies memory controller (internal memory and memory arbitration).

NvRmPrivModuleID_ExternalMemoryController 

Specifies external memory (DDR RAM, etc.).

NvRmPrivModuleID_ProcId 

Specifies processor ID.

NvRmPrivModuleID_System 

Specifies entire system (used for system reset).

NvRmPrivModuleID_CC 
NvRmPrivModuleID_Ahb_Arb_Ctrl 

Specifies AHB arbitration control.

NvRmPrivModuleID_Ahb_Gizmo_Ctrl 

Specifies AHB gizmo control.

NvRmPrivModuleID_ExternalMemory 

Specifies external memory.

NvRmPrivModuleID_InternalMemory 

Specifies internal memory.

NvRmPrivModuleID_Tcram 

Specifies TCRAM.

NvRmPrivModuleID_Iram 

Specifies IRAM.

NvRmPrivModuleID_Gart 

Specifies GART.

NvRmPrivModuleID_Mio_Exio 

MIO/EXIO.

NvRmPrivModuleID_PmuExt 
NvRmPrivModuleID_ArmPerif 

Specifies one module ID for all peripherals, which includes cache controller, SCU, and interrupt controller.

NvRmPrivModuleID_ArmInterruptctrl 
NvRmPrivModuleID_Afi 

Specifies the PCIE Root Port internally is made up of 3 major blocks.

These 3 blocks have separate reset and clock domains. So, the driver treats these:

  • AFI is the wrapper on the top of the PCI core.
  • PCIe refers to the core PCIe state machine module.
  • PcieXclk refers to the transmit/receive logic, which runs at different clock and has different reset.
NvRmPrivModuleID_Pcie 
NvRmPrivModuleID_PcieXclk 
NvRmPrivModuleID_Pl310 

Specifies PL310.

NvRmPrivModuleID_AhbRemap 

Specifies AHB re-map aperture seen from AVP.

Use this aperture for AVP to have uncached access to SDRAM.

NvRmModuleID_HDA 

Specifies HD-Audio blocks.

NvRmModuleID_Apbif 
NvRmModuleID_Audio 
NvRmModuleID_DAM 
NvRmModuleID_Sata 
NvRmModuleID_DTV 
NvRmModuleID_Tsensor 
NvRmModuleID_Actmon 
NvRmModuleID_Atomics 
NvRmModuleID_Se 
NvRmModuleID_ExtPeriphClk 
NvRmModuleID_Vic 
NvRmModuleID_Gpu 
NvRmPrivModuleID_ExternalMemory_MMIO 
NvRmModuleID_MSENC 

Specifies video encoder (MSENC)

NvRmModuleID_TSEC 

Specifies security module (TSEC)

NvRmModuleID_Vp8 
NvRmModuleID_XUSB_HOST 
NvRmModuleID_Mipibif 
NvRmModuleID_Vgpio 
NvRmModuleID_ClDvfs 

Specifies CL DVFS.

NvRmModuleID_Sor 

Specifies SOR.

NvRmModuleID_NVDEC 
NvRmModuleID_NVJPG 
NvRmModuleID_CBUS_Floor 
NvRmModuleID_EMC_Shared 
NvRmModuleID_OFA 
NvRmModuleID_Num 
NvRmModuleID_Force32 

Definition at line 68 of file nvrm_module.h.

◆ NvRmModulePlatform

Defines platform of operation.

Enumerator
NvRmModulePlatform_Silicon 
NvRmModulePlatform_Simulation 
NvRmModulePlatform_Emulation 
NvRmModulePlatform_Quickturn 
NvRmModulePlatform_Num 
NvRmModulePlatform_Force32 

Definition at line 452 of file nvrm_module.h.

Function Documentation

◆ NvRegr()

NvU32 NvRegr ( NvRmDeviceHandle  hDeviceHandle,
NvRmModuleID  aperture,
NvU32  offset 
)

◆ NvRegrb()

void NvRegrb ( NvRmDeviceHandle  hRmDeviceHandle,
NvRmModuleID  aperture,
NvU32  num,
NvU32  offset,
NvU32 *  values 
)

◆ NvRegrm()

void NvRegrm ( NvRmDeviceHandle  hRmDeviceHandle,
NvRmModuleID  aperture,
NvU32  num,
const NvU32 *  offsets,
NvU32 *  values 
)

◆ NvRegw()

void NvRegw ( NvRmDeviceHandle  hDeviceHandle,
NvRmModuleID  aperture,
NvU32  offset,
NvU32  data 
)

◆ NvRegwb()

void NvRegwb ( NvRmDeviceHandle  hRmDeviceHandle,
NvRmModuleID  aperture,
NvU32  num,
NvU32  offset,
const NvU32 *  values 
)

◆ NvRegwm()

void NvRegwm ( NvRmDeviceHandle  hRmDeviceHandle,
NvRmModuleID  aperture,
NvU32  num,
const NvU32 *  offsets,
const NvU32 *  values 
)

◆ NvRmCheckValidNVSIState()

NvError NvRmCheckValidNVSIState ( NvRmDeviceHandle  hRmDeviceHandle)

Returns whether system is in a valid NVSI state.

Parameters
hRmDeviceHandleThe RM device handle.
Return values
::NvError_Successrunning in a valid configuration
::NvError_NotSupportedrunning in an invalid configuraton

◆ NvRmCheckValidSecureState()

NvError NvRmCheckValidSecureState ( NvRmDeviceHandle  hRmDeviceHandle)

Returns whether system is a valid SecureOS state.

Parameters
hRmDeviceHandleThe RM device handle.
Return values
::NvError_Successrunning in a valid configuration
::NvError_NotSupportedrunning in an invalid configuraton
::NvError_AccessDeniedunable to check configuration

◆ NvRmFindModule()

NvError NvRmFindModule ( NvRmDeviceHandle  hRmDeviceHandle,
NvU32  Address,
NvRmModuleIdHandle *  phModuleId 
)

Find a module given its physical register address.

Parameters
hRmDeviceHandleThe RM device handle.
AddressPhysical base address of the module's registers
phModuleIdHandle to output parameter to hold the Id of the module which also includes the module instance.
Return values
::NvError_SuccessThe module id was successfully identified and phModuleId points to the combined module id and instance. points to the actual size of the ID. .
::NvError_ModuleNotPresentNo module exists at the specified physical base address.
::NvError_BadParameter

◆ NvRmGetRandomBytes()

NvError NvRmGetRandomBytes ( NvRmDeviceHandle  hRmDeviceHandle,
NvU32  NumBytes,
void *  pBytes 
)

Returns random bytes using hardware sources of entropy.

Parameters
hRmDeviceHandleThe RM device handle.
NumBytesNumber of random bytes to return in pBytes.
pBytesArray where the random bytes should be stored.
Return values
::NvError_Success
::NvError_BadParameter
::NvError_NotSupportedIf no hardware entropy source is available

◆ NvRmModuleGetBaseAddress()

void NvRmModuleGetBaseAddress ( NvRmDeviceHandle  hRmDeviceHandle,
NvRmModuleID  Module,
NvRmPhysAddr *  pBaseAddress,
NvU32 *  pSize 
)

Returns a physical address associated with a hardware module.

(To be depcreated and replaced by NvRmModuleGetModuleInfo.)

Parameters
hRmDeviceHandleThe RM device handle.
ModuleThe module for which to get addresses.
pBaseAddressA pointer to the beginning of the hardware register bank.
pSizeA pointer to the length of the aperture in bytes.

◆ NvRmModuleGetCapabilities()

NvError NvRmModuleGetCapabilities ( NvRmDeviceHandle  hDeviceHandle,
NvRmModuleID  Module,
NvRmModuleCapability *  pCaps,
NvU32  NumCaps,
void **  Capability 
)

Returns a pointer to a class-specific capabilities structure.

Each DDK will supply a list of ::NvRmCapability structures sorted by module Minor and Eco levels (assuming that no DDK supports two Major versions simulatenously). The last cap in the list that matches the hardware's version and eco level will be returned. If the current hardware's eco level is higher than the given module capability list, the last module capability with the highest eco level (the last in the list) will be returned.

Example usage:
typedef struct FakeDdkCapRec
{
NvU32 FeatureBits;
} FakeDdkCap;
FakeDdkCap cap1;
FakeDdkCap cap2;
FakeDdkCap *cap;
{ { 1, 0, 0, &fcap1 },
{ 1, 1, 0, &fcap2 },
};
cap1.bits = ...;
cap2.bits = ...;
err = NvRmModuleGetCapabilities( hDevice, NvRmModuleID_FakeDDK, caps, 2,
(void *)&cap );
...
if( cap->FeatureBits & FAKEDKK_SOME_FEATURE )
{
...
}
Parameters
hRmDeviceHandleThe RM device handle.
ModuleThe target module.
pCapsA pointer to the capability list.
NumCapsThe number of capabilities in the list.
[out]CapabilityThe capability that maches the current hardware.

◆ NvRmModuleGetModuleInfo()

NvError NvRmModuleGetModuleInfo ( NvRmDeviceHandle  hDevice,
NvRmModuleID  module,
NvU32 *  pNum,
NvRmModuleInfo *  pModuleInfo 
)

Returns a list of available module instances and their information.

Parameters
hDeviceThe RM device handle.
moduleThe module for which to get the number of instances.
pNumUnsigned integer indicating the number of module information structures in the array pModuleInfo.
pModuleInfoA pointer to an array of module information structures, where the size of array is determined by the value in pNum.
Return values
NvSuccessIf successful, or the appropriate error.

◆ NvRmModuleGetNumInstances()

NvU32 NvRmModuleGetNumInstances ( NvRmDeviceHandle  hRmDeviceHandle,
NvRmModuleID  Module 
)

Returns the number of instances of a particular hardware module.

(To be depcreated and replaced by NvRmModuleGetModuleInfo.)

Parameters
hRmDeviceHandleThe RM device handle.
ModuleThe module for which to get the number of instances.
Returns
Number of instances.

◆ NvRmModuleReset()

void NvRmModuleReset ( NvRmDeviceHandle  hRmDeviceHandle,
NvRmModuleID  Module 
)

Resets the module controller hardware.

Parameters
hRmDeviceHandleThe RM device handle.
ModuleThe module to reset.

◆ NvRmModuleResetWithHold()

void NvRmModuleResetWithHold ( NvRmDeviceHandle  hRmDeviceHandle,
NvRmModuleID  Module,
NvBool  bHold 
)

Resets the controller with an option to hold the controller in the reset.

Parameters
hRmDeviceHandleRM device handle.
ModuleThe module to be reset
bHoldIf NV_TRUE hold the module in reset; if NV_TRUE pulse the reset. So, to keep the module in reset and do something:
 NvRmModuleResetWithHold(hRm, ModId, NV_TRUE)
To update some registers:
 NvRmModuleResetWithHold(hRm, ModId, NV_FALSE)

◆ NvRmQueryChipUniqueId()

NvError NvRmQueryChipUniqueId ( NvRmDeviceHandle  hDevHandle,
NvU32  IdSize,
void *  pId 
)

Queries for the device unique ID.

Precondition
Not callable from early boot.
Parameters
hDevHandleThe RM device handle
IdSizeAn input, a pointer to a variable containing the size of the caller-allocated memory to hold the unique ID pointed to by pId. Upon successful return, this value is updated to reflect the actual size of the unique ID returned in pId.
pIdA pointer to an area of caller-allocated memory to hold the unique ID.
Return values
::NvError_SuccesspId points to the unique ID and pIdSize points to the actual size of the ID.
::NvError_BadParameter
::NvError_NotSupported
::NvError_InsufficientMemory
NV_DRF_NUM
#define NV_DRF_NUM(d, r, f, n)
NV_DRF_NUM - define a new register value.
Definition: nvrm_drf.h:182
NvRmModuleID
NvRmModuleID
Defines SOC hardware controller class identifiers.
Definition: nvrm_module.h:68
NvRmModuleCapabilityRec
Holds DDK capability encapsualtion.
Definition: nvrm_module.h:643
NvRmModuleGetCapabilities
NvError NvRmModuleGetCapabilities(NvRmDeviceHandle hDeviceHandle, NvRmModuleID Module, NvRmModuleCapability *pCaps, NvU32 NumCaps, void **Capability) __DEPRECATED__
Returns a pointer to a class-specific capabilities structure.