NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Kernel DT Services

Detailed Description

Declares the APIs and data structures required for kernel DT services.

Data Structures

struct  DtUartInfoRec
 

Macros

#define DTB_CMDLINE   0x00000001
 
#define DTB_REVISION   0x00000002
 
#define DTB_INITRD2   0x00000003
 
#define DTB_MEMINFO   0x00000005
 
#define DTB_CVCARVEOUT   0x00000006
 
#define DTB_RESETSTATUS   0x00000007
 
#define DTB_FLOORSWEPT   0x00000008
 
#define DTB_BOARD_INFO   0x00000009
 
#define DTB_KLOGBUF   0x0000000A
 
#define DTB_BOOTDATA   0x0000000B
 
#define DTB_CHIP_VERSION   0x0000000C
 
#define DTB_BL_VERSIONINFO   0x0000000D
 
#define DTB_UPDATEINFO   0x0000000E
 
#define DTB_RATCHETINFO   0x0000000F
 

Typedefs

typedef struct DtUartInfoRec DtUartInfo
 

Functions

NvError QbLoadKernelDtbImageFromRAM (void *pHdr, void **pImage, NvU32 *pDtbSize)
 Wrapper function that copies DT from RCM image in RAM to a new address with additional space allocated for nodes to be added by boot loader. More...
 
NvError QbCreateSpaceinDtb (void)
 Creates space in the DTB for adding nodes and command lines. More...
 
NvError AddDTTag (NvU32 DTtag, NvU32 DataSize, void *pData)
 Adds or modifies new nodes to DT similar to ATAGS . More...
 
NvError QbDelDTNode (const NvS8 *pNodeStr)
 Deletes a node from device tree. More...
 
NvError QbDelProperty (const NvS8 *pNodeStr, const NvS8 *pProperty)
 Deletes the specified property from the given node of the device tree. More...
 
NvError QbModifyFirstSubnodeProperty (const NvS8 *pCompatible, const NvS8 *pSubNode, const NvS8 *pProp, const NvS8 *pValue)
 Modifies the property value in a sub-node in DTB. More...
 
NvError QbGetlogBufSize (NvU64 *)
 Get the klog buffer size in MB. More...
 
NvError QbGetCmdLineFromDtb (NvS8 *pCmdLine, NvU32 Size)
 Get the CmdLine from DTB. More...
 

Macro Definition Documentation

#define DTB_BL_VERSIONINFO   0x0000000D

Definition at line 43 of file kernel_dt_service.h.

#define DTB_BOARD_INFO   0x00000009

Definition at line 39 of file kernel_dt_service.h.

#define DTB_BOOTDATA   0x0000000B

Definition at line 41 of file kernel_dt_service.h.

#define DTB_CHIP_VERSION   0x0000000C

Definition at line 42 of file kernel_dt_service.h.

#define DTB_CMDLINE   0x00000001

Definition at line 32 of file kernel_dt_service.h.

#define DTB_CVCARVEOUT   0x00000006

Definition at line 36 of file kernel_dt_service.h.

#define DTB_FLOORSWEPT   0x00000008

Definition at line 38 of file kernel_dt_service.h.

#define DTB_INITRD2   0x00000003

Definition at line 34 of file kernel_dt_service.h.

#define DTB_KLOGBUF   0x0000000A

Definition at line 40 of file kernel_dt_service.h.

#define DTB_MEMINFO   0x00000005

Definition at line 35 of file kernel_dt_service.h.

#define DTB_RATCHETINFO   0x0000000F

Definition at line 45 of file kernel_dt_service.h.

#define DTB_RESETSTATUS   0x00000007

Definition at line 37 of file kernel_dt_service.h.

#define DTB_REVISION   0x00000002

Definition at line 33 of file kernel_dt_service.h.

#define DTB_UPDATEINFO   0x0000000E

Definition at line 44 of file kernel_dt_service.h.

Typedef Documentation

typedef struct DtUartInfoRec DtUartInfo

Function Documentation

NvError AddDTTag ( NvU32  DTtag,
NvU32  DataSize,
void *  pData 
)

Adds or modifies new nodes to DT similar to ATAGS .

Parameters
DTtagRelevant DT Tag.
DataSizeSize of the data to be added.
pDataA pointer to the data to be added.
Returns
NvSuccess if successful, or the appropriate error code.
NvError QbCreateSpaceinDtb ( void  )

Creates space in the DTB for adding nodes and command lines.

Returns
NvSuccess if successful, or the appropriate error code.
NvError QbDelDTNode ( const NvS8 *  pNodeStr)

Deletes a node from device tree.

Parameters
pNodeStrName of the node to be deleted.
Returns
NvSuccess if successful, or the appropriate error code.
NvError QbDelProperty ( const NvS8 *  pNodeStr,
const NvS8 *  pProperty 
)

Deletes the specified property from the given node of the device tree.

Parameters
pNodeStrNode name string.
pPropertyA pointer to the property to be deleted.
Returns
NvSuccess if successful, or the appropriate error code.
NvError QbGetCmdLineFromDtb ( NvS8 *  pCmdLine,
NvU32  Size 
)

Get the CmdLine from DTB.

Parameters
pCmdLineA pointer to buffer where cmdline is stored.
SizeMax command line size
Returns
NvSuccess if successful, or the appropriate error code.
NvError QbGetlogBufSize ( NvU64 *  )

Get the klog buffer size in MB.

NvError QbLoadKernelDtbImageFromRAM ( void *  pHdr,
void **  pImage,
NvU32 *  pDtbSize 
)

Wrapper function that copies DT from RCM image in RAM to a new address with additional space allocated for nodes to be added by boot loader.

This is used only in case of RCM boot.

Parameters
pHdrA pointer to buffer in RAM.
pImageA pointer to Dtb blob after verification.
pDtbSizeDTB size.
Returns
NvSuccess if successful, or the appropriate error code.
NvError QbModifyFirstSubnodeProperty ( const NvS8 *  pCompatible,
const NvS8 *  pSubNode,
const NvS8 *  pProp,
const NvS8 *  pValue 
)

Modifies the property value in a sub-node in DTB.

This function searches the whole DT and modifies the property of sub-node for the first found node,sub-node combination.

Parameters
pCompatibleA pointer to a compatible string for the node where the sub-node belongs.
pSubNodeA pointer to the name of sub-node whose property to be modified.
pPropA pointer to the name of the sub-node property to be modified.
pValueA pointer to the new value for the property.
Returns
NvSuccess if successful, or the appropriate error code.