NVIDIA DRIVE OS Linux API Reference

5.1.3.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
System Partition Update

Detailed Description

Declares APIs that direct the libnvupdate library to update and manage partitions on the target.

The interface performs tasks such as:

For the Boot ROM (BR) Boot Configuration Table (BCT) and Partition Table (PT) partitions, this interface simply updates this partition. It does not configure them.

For more information, see "Using the Update Library" in the "Update Mechanism" chapter of the NVIDIA DRIVE 5.0 Development Guide.

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...
 

Macro Definition Documentation

#define BCH_HEADER_MAGIC   "NVDA"

Definition at line 78 of file update.h.

#define BOOT_CHAIN_TYPE_INTERFACE   "/sys/kernel/debug/PMC/boot-chain-type"

Definition at line 71 of file update.h.

#define MARKER_CHAIN_A   (0)

Definition at line 73 of file update.h.

#define MARKER_CHAIN_B   (1)

Definition at line 74 of file update.h.

#define MAX_COMPONENT_COUNT   4

Definition at line 81 of file update.h.

#define MAX_GUESTS   (16)

Definition at line 86 of file update.h.

#define MAX_PART_STRING   1024

Definition at line 80 of file update.h.

#define MAX_PARTITIONS   100

Definition at line 79 of file update.h.

#define MAX_SYS_PART_LEN   100

Definition at line 69 of file update.h.

#define NV_LIBNVUPDATE_MAJOR_VERSION   2

Definition at line 66 of file update.h.

#define NV_LIBNVUPDATE_MINOR_VERSION   3

Definition at line 67 of file update.h.

#define READ_CHUNK_SIZE   (1 * MB)

Definition at line 76 of file update.h.

Typedef Documentation

typedef float(* PTOTAL_PERCENT_FUNC)(void)

Defines one of two callbacks used to determine progress when updating the partition.

Definition at line 135 of file update.h.

typedef void(* PUPDATE_RUNNING_TOTAL_FUNC)(NvU64)

Defines one of two callbacks used to determine progress when updating the partition.

Definition at line 133 of file update.h.

Enumeration Type Documentation

Enumerator
BootChainType_ChainA 
BootChainType_ChainB 
BootChainType_Invalid 

Definition at line 88 of file update.h.

Function Documentation

NvError NvDisplayBlVersion ( QbDriver  DeviceId,
NvU32  DevInstance 
)

Displays the BL version (Parker only).

This function is deprecated for Xavier and later targets.

Parameters
DeviceIdDevice ID of the device where the BR BCT resides.
DevInstanceDevice Instance of the device where the BR BCT resides.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvErasePartition ( QbDriver  DeviceId,
NvU32  DevInstance,
NvS8 *  pPartitionName,
struct PIPE_DATA pPipeData 
)

Erases a specified partition.

Parameters
DeviceIdDevice ID of the device where the BR BCT resides.
DevInstanceDevice instance of the device where the BR BCT resides.
pPartitionNameA pointer to the name of the partition to be erased.
pPipeDataA pointer to the pipe data.
Returns
NvSuccess if successful, or the appropriate error code otherwise.
NvError NvGetActiveMarker ( QbDriver  DeviceId,
NvU32  DevInstance,
NvU32 *  pActiveChainMarker 
)

Gets the active chain marker value.

Parameters
[in]DeviceIdDevice ID of the device where the BR BCT resides.
[in]DevInstanceDevice Instance of the device where the BR BCT resides.
[out]pActiveChainMarkerA pointer to the location where the function returns the marker value.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvGetBootChainSelectionInfo ( QbDriver  DeviceId,
NvU32  DevInstance,
BootChainSelectionInfo pChainSelectionInfo 
)

Get boot chain selection information.

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT
pChainSelectionInfopointer to buffer containing chain selection info to be updated.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvGetOtaBootModeFlag ( QbDriver  DeviceId,
NvU32  DevInstance,
NvBool *  pOtaBootModeFlag 
)

Query special OTA boot mode flag set in the BR BCT.

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
pOtaBootModeFlagpointer to the special OTA mode flag.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvGetPartitionUpdateProgress ( QbDriver  DeviceId,
NvS32 *  Percent 
)

Gets the progress of the partition update.

Warning
This API is not multi thread safe. It should be used with caution.
Parameters
[in]DeviceIdDevice ID of the device where the BR BCT resides.
[out]PercentA pointer to the location where the function returns the percentage complete (0 to 100) of partition updates or -1 if the partition update is not running.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvGetPartSize ( QbDriver  DeviceId,
NvU32  DevInstance,
const char *  pPartName,
NvU64 *  pPartSize 
)

Gets the partition size of the input partition.

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
pPartNameA pointer to the name of the partition.
pPartSizeA pointer to store the partition size
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvGroupPartitionUpdate ( QbDriver  DeviceId,
NvU32  DevInstance,
struct UpdateGroup pUpdateGrp,
NvU32  NumParts,
struct PIPE_DATA pPipeData 
)

Updates a group of partitions.

The partitions in a group contain a single header per group. This header is attached to one of the partitions in the group. A maximum of 4 partitions are supported in a group.

Parameters
DeviceIdDevice ID of the device where the BR BCT resides.
DevInstanceDevice Instance of the device where the BR BCT resides.
pUpdateGrpA pointer to the group of partitions
NumPartsNumber of partitions that are group together in pUpdateGrp
pPipeDataA pointer to the pipe data.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvGuestPtGphUpdate ( QbDriver  DeviceId,
NvU32  DevInstance,
NvU32  GuestId,
NvS8 *  pGphPath,
NvS8 *  pGuestPtPath 
)

Updates the GPH and GPT partitions.

This API writes the GPH and Guest PT partitions for a given Guest ID at the start of the Guest Container partition for that Guest ID. This API will force the reload of all partitions tables from the storage.

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
GuestIdThe Guest ID of Guest OS
pGphPathA pointer to the GPH partition image
pGuestPtPathA pointer to the Guest PT partition image
Returns
NvSuccess if successful, or the appropriate error code.
Deprecated:
from 5.1.3 release. Use NvGuestPtUpdate() API for Guest PT update.
NvError NvGuestPtUpdate ( QbDriver  DeviceId,
NvU32  DevInstance,
NvU32  GuestId,
NvS8 *  pGuestPtPath 
)

Updates the guest partition table for the specified guest.

This API writes the Guest partition table for a given Guest ID at the start of the Guest Container partition for that Guest ID. This API will force the reload of all partitions tables from the storage.

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
GuestIdThe Guest ID of Guest OS
pGuestPtPathA pointer to the Guest PT partition image
Returns
NvSuccess if successful, or the appropriate error code.
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.

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
pPtImagepointer to the PT image.
pIsFirstLevelPtChangedSet to NV_TRUE if the PT has not changed. Set to NV_FALSE if PT has changed.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvIsPartitionErased ( QbDriver  DeviceId,
NvU32  DevInstance,
NvS8 *  pPartitionName,
NvBool *  pIsPartErased 
)

Determines whether the partition is erased.

Parameters
[in]DeviceIdDevice ID of the device where the BR BCT resides.
[in]DevInstanceDevice Instance of the device where the BR BCT resides.
[in]pPartitionNameA pointer to the partition name for which to read partition data.
[out]pIsPartErasedA pointer to a Boolean variable where the function returns the result:
  • Set to NV_TRUE when partition is either erased or erase of partition is not allowed (or skipped).
  • Set to NV_FALSE otherwise.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvIsPartitionPresent ( QbDriver  DeviceId,
NvU32  DevInstance,
NvS8 *  pPartName,
NvBool *  pIsPartPresent 
)

Checks for the presence of a partition in the partition table.

Parameters
[in]DeviceIdDevice ID of the device where the BR BCT resides.
[in]DevInstanceDevice instance of the device where the BR BCT resides.
[in]pPartNameA pointer to the name of the partition.
[out]pIsPartPresentA pointer to a Boolean where the function returns the result:
  • Set to NV_TRUE if the partition is present.
  • Set to NV_FALSE if the partition is not found.
Returns
NvSuccess if successful, or the appropriate error code.
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).

The MB1 and BR BCT partitions must be updated together.

This API is supported for Parker only. To update MB1 on Xavier, use NvPartitionUpdate().

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
pMb1ImagePathA pointer to the new MB1 image.
pBrBctImagePathA pointer to the new BR BCT image.
pPipeDataA pointer to the pipe data.
Returns
NvSuccess if successful, or the appropriate error code otherwise.
NvError NvOverrideLogLevel ( NvU32  LogLevel)

Overrides the default log level of messages printed to console.

There are five log levels supported (ERR, ALRT, WARN, INFO, DBG).

Parameters
LogLevelThe value of log level
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvPartitionUpdate ( QbDriver  DeviceId,
NvU32  DevInstance,
NvS8 *  PartName,
NvS8 *  PartPath,
struct PIPE_DATA pPipeData 
)

Updates the specified partition with the specified image.

On Parker targets:

On Xavier targets:

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
PartNameA pointer to the name of the partition to be updated.
PartPathA pointer to the new image.
pPipeDataA pointer to the pipe data.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvPostUpdateBrBctSanityCheck ( QbDriver  DeviceId,
NvU32  DevInstance,
NvS8 *  pImagePath 
)

Performs a post-update BR BCT sanity check.

Parameters
DeviceIdDevice ID of the device where the BR BCT resides.
DevInstanceDevice Instance of the device where the BR BCT resides.
pImagePathA pointer to the partition image.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvQueryBootChainType ( BootChainType pBootType)

Queries the current boot-chain type that the system booted.

For more information about boot-chains, see "Update Library" in NVIDIA DRIVE 5.0 Development Guide.

Parameters
[out]pBootTypeA pointer to a client-allocated buffer where the function stores current boot-chain type.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvQueryTegraChipId ( NvU32 *  pChipId)

Queries the NVIDIA® Tegra® chip ID.

Parameters
[out]pChipIdA pointer to a variable where the function stores the chip ID. Possible return values are:
  • 0x19 for Xavier
  • 0x18 for Parker
Returns
NvSuccess if successful, or the appropriate error code.
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.

This function reads back the image from partition and then compares it with the input image.

Parameters
[in]DeviceIdDevice ID of the device where the BR BCT resides.
[in]DevInstanceDevice Instance of the device where the BR BCT resides.
[in]pPartNameA pointer to the partition name for which to read partition data.
[in]pImagePathA pointer to the input image's pathname.
[in]pPipeDataA pointer to the pipe data.
[in]LogErrorSpecify whether to log an error to the output or not.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvReadPartition ( QbDriver  DeviceId,
NvU32  DevInstance,
NvS8 *  pPartName,
NvU8 *  pBuffer,
NvU64  BufferSize,
NvU64  Offset 
)

Gets data from the specified partition.

Parameters
[in]DeviceIdDevice ID of the device where the BR BCT resides.
[in]DevInstanceDevice Instance of the device where the BR BCT resides.
[in]pPartNameA pointer to the partition name for which to read partition data.
[in,out]pBufferA pointer to the client-allocated buffer where the function stores the data read from the partition.
[in]BufferSizeThe size of buffer that pBuffer references.
[in]OffsetThe offset from the start of partition.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvSetActiveMarker ( QbDriver  DeviceId,
NvU32  DevInstance,
NvU32  ActiveChainMarker,
NvS8 *  pBrBctImagePath 
)

Sets the active chain marker value, which specifies which chain to boot.

Parameters
DeviceIdDevice ID of the device where the BR BCT resides.
DevInstanceDevice Instance of the device where the BR BCT resides.
ActiveChainMarkerNew marker value to be set.
pBrBctImagePathA pointer to the BR BCT image with active chain marker set to ActiveChainMarker. This will be used only in case of Xavier. It will be a place holder in case of Parker
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvSetBootChain ( BootChainType  BootChainType)

Updates the scratch register SCRATCH_99 based on desired boot chain type.

This API does not trigger system reboot into specified boot chain type.

This API should be used with caution. When this API is called, it sets the scratch register to a boot chain that is going to be booted on next boot. However, this same scratch is also used to tell the current booted chain. Hence, if you want to use this API, make sure that no other application is using that scratch register to interpret wrong boot chain value. Also, for the same reason, once the boot chain value is altered using this API, update in the same boot session is not possible.

Parameters
BootChainTypeDesired boot chain type
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvSetBootChainSelectionInfo ( QbDriver  DeviceId,
NvU32  DevInstance,
NvS8 *  pBrBctImagePath 
)

Set boot chain selection information.

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT
pBrBctImagePathpointer to the BR BCT image.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvSetOtaBootModeFlag ( QbDriver  DeviceId,
NvU32  DevInstance,
NvBool  OtaBootModeFlag 
)

Enable/disable special OTA boot mode flag in the BR BCT as per input value.

Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
OtaBootModeFlagSpecial OTA boot mode flag value. It can be NV_TRUE or NV_FALSE. Set to NV_TRUE to enable special OTA boot mode. Set to NV_FALSE to disable special OTA boot mode.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvSetSuppliedTegraChipId ( NvU32  ChipId)

Sets the Tegra chip ID.

The update library tries to auto-detect the chip ID at run time, provided this information is available in the kernel DT. However, if this information is not available in kernel DT, the user must supply the chip ID.

Parameters
ChipIdThe chip ID.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvSetSystemPart ( QbDriver  DeviceId,
NvU32  DevInstance,
NvS8 *  SysPart 
)

Sets the device-file-based boot device.

This file is used for actual I/O operations.

Parameters
DeviceIdDevice ID of the device where the BR BCT resides.
DevInstanceDevice Instance of the device where the BR BCT resides.
SysPartA pointer to the device file specified by user.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvShowPT ( QbDriver  DeviceId,
NvU32  DevInstance 
)

Displays the partition table stored on the boot device.

Parameters
DeviceIdDevice ID of the device where the BR BCT resides.
DevInstanceDevice Instance of the device where the BR BCT resides.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvTriggerBootChain ( BootChainType  BootChainType)

Updates the scratch register SCRATCH_99, based on desired boot-chain type.

After the function completes the update, it issues a system reset after which the system boots images of the specified boot-chain type.

Parameters
BootChainTypeDesired boot-chain type.
Returns
NvSuccess if successful, or the appropriate error code.
NvError NvTriggerReboot ( void  )

Triggers system reboot.

This function should be used with caution. When this function is called, the system boots into the boot chain which was set in the scratch register before the reboot was triggered.

Returns
NvSuccess if successful, or the appropriate error code.
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.

Before returning, this function writes the new BR BCT and PT to the boot device.

Warning
After this function is executed, all partitions must be updated; otherwise, the system will be unable to find partitions in the new partition table on reboot. For more information, see Update Mechanism chapter of the NVIDIA DRIVE 5.0 Development Guide..
Parameters
DeviceIdDevice ID of the device on which the BR BCT resides.
DevInstanceDevice instance of the device on which the BR BCT resides.
pPtImagePathA pointer to the new PT image.
pBrBctImagePathA pointer to the new BR BCT image.
pPipeDataA pointer to the pipe data.
Returns
NvSuccess if successful, or the appropriate error code otherwise.