NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
update.h File Reference

Detailed Description

NVIDIA System Partition Update

Description: This file declares APIs for directing the libnvupdate library to update system partitions that are already flashed on the target.

Definition in file update.h.

Go to the source code of this file.

Data Structures

struct  UpdateParts
 
struct  UpdateGroup
 
struct  GuestContainerInfo
 
struct  BootChainSelectionInfoRec
 
struct  PIPE_DATA
 Holds data for a progress bar implementation that shows the level of completion of a partition update. More...
 

Macros

#define NV_LIBNVUPDATE_MAJOR_VERSION   2
 
#define NV_LIBNVUPDATE_MINOR_VERSION   3
 
#define MAX_SYS_PART_LEN   100
 
#define BOOT_CHAIN_TYPE_INTERFACE   "/sys/kernel/debug/PMC/boot-chain-type"
 
#define MARKER_CHAIN_A   (0)
 
#define MARKER_CHAIN_B   (1)
 
#define READ_CHUNK_SIZE   (1 * MB)
 
#define BCH_HEADER_MAGIC   "NVDA"
 
#define MAX_PARTITIONS   100
 
#define MAX_PART_STRING   1024
 
#define MAX_COMPONENT_COUNT   4
 
#define MAX_GUESTS   (16)
 

Typedefs

typedef struct
BootChainSelectionInfoRec 
BootChainSelectionInfo
 
typedef void(* PUPDATE_RUNNING_TOTAL_FUNC )(NvU64)
 Defines one of two callbacks used to determine progress when updating the partition. More...
 
typedef float(* PTOTAL_PERCENT_FUNC )(void)
 Defines one of two callbacks used to determine progress when updating the partition. More...
 

Enumerations

enum  BootChainType {
  BootChainType_ChainA = 0,
  BootChainType_ChainB,
  BootChainType_Invalid = 0x7fffffff
}
 

Functions

NvError NvQueryTegraChipId (NvU32 *pChipId)
 Queries the NVIDIA® Tegra® chip ID. More...
 
NvError NvSetSuppliedTegraChipId (NvU32 ChipId)
 Sets the Tegra chip ID. More...
 
NvError NvSetSystemPart (QbDriver DeviceId, NvU32 DevInstance, NvS8 *SysPart)
 Sets the device-file-based boot device. More...
 
NvError NvGetPartitionUpdateProgress (QbDriver DeviceId, NvS32 *Percent)
 Gets the progress of the partition update. More...
 
NvError NvPartitionUpdate (QbDriver DeviceId, NvU32 DevInstance, NvS8 *PartName, NvS8 *PartPath, struct PIPE_DATA *pPipeData)
 Updates the specified partition with the specified image. More...
 
NvError NvMb1PartitionUpdate (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pMb1ImagePath, NvS8 *pBrBctImagePath, struct PIPE_DATA *pPipeData)
 Updates the primary and recovery MB1 partition, along with the BR BCT (Parker only). More...
 
NvError NvUpdatePartitionLayout (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pPtImagePath, NvS8 *pBrBctImagePath, struct PIPE_DATA *pPipeData)
 Updates the BR BCT and PT to facilitate changing the whole partition layout. More...
 
NvError NvShowPT (QbDriver DeviceId, NvU32 DevInstance)
 Displays the partition table stored on the boot device. More...
 
NvError NvReadPartition (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pPartName, NvU8 *pBuffer, NvU64 BufferSize, NvU64 Offset)
 Gets data from the specified partition. More...
 
NvError NvErasePartition (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pPartitionName, struct PIPE_DATA *pPipeData)
 Erases a specified partition. More...
 
NvError NvTriggerBootChain (BootChainType BootChainType)
 Updates the scratch register SCRATCH_99, based on desired boot-chain type. More...
 
NvError NvQueryBootChainType (BootChainType *pBootType)
 Queries the current boot-chain type that the system booted. More...
 
NvError NvIsPartitionPresent (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pPartName, NvBool *pIsPartPresent)
 Checks for the presence of a partition in the partition table. More...
 
NvError NvIsPartitionErased (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pPartitionName, NvBool *pIsPartErased)
 Determines whether the partition is erased. More...
 
NvError NvReadBackVerify (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pPartName, NvS8 *pImagePath, struct PIPE_DATA *pPipeData, NvBool LogError)
 Ensures the partition was correctly written on the device. More...
 
NvError NvSetActiveMarker (QbDriver DeviceId, NvU32 DevInstance, NvU32 ActiveChainMarker, NvS8 *pBrBctImagePath)
 Sets the active chain marker value, which specifies which chain to boot. More...
 
NvError NvSetBootChainSelectionInfo (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pBrBctImagePath)
 Set boot chain selection information. More...
 
NvError NvGetBootChainSelectionInfo (QbDriver DeviceId, NvU32 DevInstance, BootChainSelectionInfo *pChainSelectionInfo)
 Get boot chain selection information. More...
 
NvError NvGetActiveMarker (QbDriver DeviceId, NvU32 DevInstance, NvU32 *pActiveChainMarker)
 Gets the active chain marker value. More...
 
NvError NvDisplayBlVersion (QbDriver DeviceId, NvU32 DevInstance)
 Displays the BL version (Parker only). More...
 
NvError NvPostUpdateBrBctSanityCheck (QbDriver DeviceId, NvU32 DevInstance, NvS8 *pImagePath)
 Performs a post-update BR BCT sanity check. More...
 
NvError NvGroupPartitionUpdate (QbDriver DeviceId, NvU32 DevInstance, struct UpdateGroup *pUpdateGrp, NvU32 NumParts, struct PIPE_DATA *pPipeData)
 Updates a group of partitions. More...
 
NvError NvGuestPtGphUpdate (QbDriver DeviceId, NvU32 DevInstance, NvU32 GuestId, NvS8 *pGphPath, NvS8 *pGuestPtPath)
 Updates the GPH and GPT partitions. More...
 
NvError NvGuestPtUpdate (QbDriver DeviceId, NvU32 DevInstance, NvU32 GuestId, NvS8 *pGuestPtPath)
 Updates the guest partition table for the specified guest. More...
 
NvError NvSetBootChain (BootChainType BootChainType)
 Updates the scratch register SCRATCH_99 based on desired boot chain type. More...
 
NvError NvTriggerReboot (void)
 Triggers system reboot. More...
 
NvError NvGetPartSize (QbDriver DeviceId, NvU32 DevInstance, const char *pPartName, NvU64 *pPartSize)
 Gets the partition size of the input partition. More...
 
NvError NvOverrideLogLevel (NvU32 LogLevel)
 Overrides the default log level of messages printed to console. More...
 
NvError NvIsFirstLevelPtChanged (QbDriver DeviceId, NvU32 DevInstance, const NvS8 *pPtImage, NvBool *pIsFirstLevelPtChanged)
 Check if first level partition table on storage is different from input partition table. More...
 
NvError NvGetOtaBootModeFlag (QbDriver DeviceId, NvU32 DevInstance, NvBool *pOtaBootModeFlag)
 Query special OTA boot mode flag set in the BR BCT. More...
 
NvError NvSetOtaBootModeFlag (QbDriver DeviceId, NvU32 DevInstance, NvBool OtaBootModeFlag)
 Enable/disable special OTA boot mode flag in the BR BCT as per input value. More...