Declares the APIs and data structures required for kernel DT services.
|
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...
|
|
#define DT_STRING_LENGTH 20 |
#define DTB_BL_VERSIONINFO 0x0000000D |
#define DTB_BOARD_INFO 0x00000009 |
#define DTB_BOOTDATA 0x0000000B |
#define DTB_CHIP_VERSION 0x0000000C |
#define DTB_CMDLINE 0x00000001 |
#define DTB_CVCARVEOUT 0x00000006 |
#define DTB_FLOORSWEPT 0x00000008 |
#define DTB_INITRD2 0x00000003 |
#define DTB_KLOGBUF 0x0000000A |
#define DTB_MEMINFO 0x00000005 |
#define DTB_RATCHETINFO 0x0000000F |
#define DTB_RESETSTATUS 0x00000007 |
#define DTB_REVISION 0x00000002 |
#define DTB_UPDATEINFO 0x0000000E |
NvError AddDTTag |
( |
NvU32 |
DTtag, |
|
|
NvU32 |
DataSize, |
|
|
void * |
pData |
|
) |
| |
Adds or modifies new nodes to DT similar to ATAGS .
- Parameters
-
DTtag | Relevant DT Tag. |
DataSize | Size of the data to be added. |
pData | A 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
-
pNodeStr | Name 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
-
pNodeStr | Node name string. |
pProperty | A 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
-
pCmdLine | A pointer to buffer where cmdline is stored. |
Size | Max 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
-
pHdr | A pointer to buffer in RAM. |
pImage | A pointer to Dtb blob after verification. |
pDtbSize | DTB 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
-
pCompatible | A pointer to a compatible string for the node where the sub-node belongs. |
pSubNode | A pointer to the name of sub-node whose property to be modified. |
pProp | A pointer to the name of the sub-node property to be modified. |
pValue | A pointer to the new value for the property. |
- Returns
- NvSuccess if successful, or the appropriate error code.