NVIDIA DRIVE OS Linux API Reference

5.1.0.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
kernel_dt_service.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2013-2018, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA CORPORATION and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA CORPORATION is strictly prohibited.
9  */
10 #ifndef INCLUDED_KERNEL_DT_SERVICE_H
11 #define INCLUDED_KERNEL_DT_SERVICE_H
12 
30 #include <nvcommon.h>
31 
32 #define DTB_CMDLINE 0x00000001
33 #define DTB_REVISION 0x00000002
34 #define DTB_INITRD2 0x00000003
35 #define DTB_MEMINFO 0x00000005
36 #define DTB_CVCARVEOUT 0x00000006
37 #define DTB_RESETSTATUS 0x00000007
38 #define DTB_FLOORSWEPT 0x00000008
39 #define DTB_BOARD_INFO 0x00000009
40 #define DTB_KLOGBUF 0x0000000A
41 #define DTB_BOOTDATA 0x0000000B
42 #define DTB_CHIP_VERSION 0x0000000C
43 #define DTB_BL_VERSIONINFO 0x0000000D
44 #define DTB_UPDATEINFO 0x0000000E
45 #define DTB_RATCHETINFO 0x0000000F
46 
47 #define DT_STRING_LENGTH 20
48 
49 typedef struct DtUartInfoRec
50 {
51  NvS8 **pUartNodes;
53 } DtUartInfo;
54 
55 typedef struct DtUpdateInfoRec
56 {
57  /* Hypervisor vs native */
59 
60  /* T18x or T19x */
62 
63  /* Device id of first level PT partition */
65 
66  /* Device instance of first level PT partition */
68 
69  /* IVC channel info of PT partition */
71 
72  /* Partition size of first level PT partition */
74 
75  /* Partition id of first level PT partition */
77 
78  /* Device id of BR BCT partition */
80 
81  /* Device instance of BR BCT partition */
83 
84  /* IVC channel info of BR BCT partition */
86 
87 } DtUpdateInfo;
88 
100 NvError QbLoadKernelDtbImageFromRAM(void *pHdr, void **pImage, NvU32 *pDtbSize);
101 
108 NvError QbCreateSpaceinDtb(void);
109 
119 NvError AddDTTag(NvU32 DTtag, NvU32 DataSize, void *pData);
120 
127 NvError QbDelDTNode(const NvS8 *pNodeStr);
128 
136 NvError QbDelProperty(const NvS8 *pNodeStr, const NvS8 *pProperty);
137 
152 NvError
154  const NvS8 *pCompatible,
155  const NvS8 *pSubNode,
156  const NvS8 *pProp,
157  const NvS8 *pValue);
158 
162 NvError QbGetlogBufSize(NvU64 *);
163 
171 NvError QbGetCmdLineFromDtb(NvS8 *pCmdLine, NvU32 Size);
173 #endif // INCLUDED_KERNEL_DT_SERVICE_H
NvS8 BctIvcChannelInfo[DT_STRING_LENGTH]
NvError QbGetlogBufSize(NvU64 *)
Get the klog buffer size in MB.
NvS8 TegraChipId[DT_STRING_LENGTH]
NvError QbDelDTNode(const NvS8 *pNodeStr)
Deletes a node from device tree.
NvError QbModifyFirstSubnodeProperty(const NvS8 *pCompatible, const NvS8 *pSubNode, const NvS8 *pProp, const NvS8 *pValue)
Modifies the property value in a sub-node in DTB.
NvS8 BctDeviceId[DT_STRING_LENGTH]
NvS8 PtPartitionSize[DT_STRING_LENGTH]
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 allocate...
NvS8 BootEnvType[DT_STRING_LENGTH]
NvError QbGetCmdLineFromDtb(NvS8 *pCmdLine, NvU32 Size)
Get the CmdLine from DTB.
NvS8 PtDeviceInstance[DT_STRING_LENGTH]
#define DT_STRING_LENGTH
NvS8 PtDeviceId[DT_STRING_LENGTH]
NvS8 BctDeviceInstance[DT_STRING_LENGTH]
NvS8 PtPartitionId[DT_STRING_LENGTH]
struct DtUartInfoRec DtUartInfo
struct DtUpdateInfoRec DtUpdateInfo
NvError QbDelProperty(const NvS8 *pNodeStr, const NvS8 *pProperty)
Deletes the specified property from the given node of the device tree.
NvError QbCreateSpaceinDtb(void)
Creates space in the DTB for adding nodes and command lines.
NvS8 PtIvcChannelInfo[DT_STRING_LENGTH]
NvError AddDTTag(NvU32 DTtag, NvU32 DataSize, void *pData)
Adds or modifies new nodes to DT similar to ATAGS .