66 #ifndef INCLUDED_QBPARTMGR_H
67 #define INCLUDED_QBPARTMGR_H
70 #include <partition.h>
74 #define MAX_PARTITIONS_INDEX 41
75 #define MAX_NUM_PARTITIONS (MAX_PARTITIONS_INDEX - 1)
76 #define GPT_SIZE_IN_SECTORS 33
77 #define GUEST_BOOT_PARTITION_FLAG 0x80000000
79 #define PT_LEVEL_1 (1)
80 #define PT_LEVEL_2 (2)
160 NvU32 DeviceInstance,
161 NvU64 StartLogicalByte,
162 NvU64 NumLogicalBytes,
179 NvBool IsActiveChain);
194 QbPartitionType PartType,
195 NvBool IsActiveChain,
197 NvS32 PartNameBufferSize);
223 NvU32 DeviceInstance);
253 NvU32 DeviceInstance);
269 #ifdef CONFIG_OS_LOADER
275 NvError QbUpdateGuestPartInfo(
void);
280 NvError QbUpdateGuestPartTableWithSysInfo(
void);
330 char *pGuestPartName,
371 const char *PartitionName,
385 QbPartitionType PartitionType,
401 char *PartitionName);
417 QbPartitionTable QbPartTable);
438 NvU32 *BootCompHdrPartId);
454 QbPartInfo *pPartInfo);
471 QbPartInfo *pPartInfo,
472 QbPartitionTable QbPartTable);
517 NvU32 PartitionId, QbPartitionTable QbPartTable);
545 NvU32 DeviceInstance,
567 NvU32 DeviceInstance,
569 NvU32 *NextDeviceInstance);
581 #ifdef CONFIG_HYPERVISOR_SUPPORT
596 NvError QbQueryAssignedPartitions(
599 QbPartitionChainType ChainType,
600 QbPartitionTableEntry *pPtEntries,
602 NvU32 *pNumFilledEntries);
610 void QbInitGuestAssignmentTable(
void);
618 NvU32 QbGetStorageServerId(
void);
626 NvU32 QbGetUpdateServerId(
void);
634 NvU32 QbGetMaxGuestId(
void);
642 NvU32 QbGetNumAssignedPartitions(NvU32 GuestId);
693 NvBool IsSigned, QbPartitionTable **ppQbPartTable);
704 NvError QbPartMgrQueryUpdateInfo(
DtUpdateInfo *pDtUpdateInfo);
NvError NvLoadPtFromFile(NvS8 *pPtImagePath)
Loads partition table from specified file.
NvError QbPartMgrAddTableEntry(NvU32 PartId, char *pPartName, char *pGuestPartName, QbPartInfo PartInfo, QbAllocPartArgs PartArgs)
Adds an entry to the Partition Table.
QbDriver
Defines Quickboot device driver types.
NvError QbPartMgrCreateTableStart(NvU32 NumPartitions)
Allocates memory for partition table and fills the default PT header.
NvError QbPartMgrGetIdByName(const char *PartitionName, NvU32 *PartitionId)
Returns the partition ID for the named partition.
void QbPartMgrDeinit(void)
Shuts down the partition manager.
NvU32 QbPartMgrGetNextIdForDeviceInstance(NvU32 DeviceId, NvU32 DeviceInstance, NvU32 PartitionId)
Iterates over partition IDs in the Partition Table, where only certain IDs are considered.
NvError QbPartMgrLoadAllPt(QbDriver DeviceId, NvU32 DeviceInstance)
This API is used by update library to load partition table.
NvU64 StartLogicalAddress
NVIDIA Quickboot Interface: Kernel Device Tree Service
NvError QbPartMgrGetNameByIdFromBuffer(NvU32 PartitionId, char *PartitionName, QbPartitionTable QbPartTable)
Returns the name of the specified partition ID for the input PT buffer.
NvError QbPartMgrSaveTable(QbDriver DeviceId, NvU32 DevInstance, NvBool SignTable, NvBool EncryptTable, NvS8 *FileName)
Writes the Partition Table to the storage device.
NvError QbPrependBootChainPrefix(NvS8 *pPartName, NvU32 Size, NvBool IsActiveChain)
NvError QbPartMgrLoadTable(QbDriver DeviceId, NvU32 DeviceInstance, NvU64 StartLogicalByte, NvU64 NumLogicalBytes, NvBool IsSigned, NvBool IsEncrypted)
Reads the Partition Table from specified storage device.
NvU32 AllocationAttribute
NvError NvLoadPtFromFileToBuffer(NvS8 *pPtImagePath, NvBool IsSigned, QbPartitionTable **ppQbPartTable)
Loads partition table from specified file to a PT buffer provided back to caller. ...
NvU32 QbPartMgrGetNextId(NvU32 PartitionId)
Iterates over the partition IDs in the Partition Table.
NvError QbLoadAndInitPartMgr(void)
Loads and initializes partitions.
NvError QbPartMgrInit(void)
Initializes the partition manager.
NvError QbPartMgrCreateTableFinish(void)
Returns with a success indication if a Partition Table has been created.
NvError QbPartMgrGetNameById(NvU32 PartitionId, char *PartitionName)
Returns the name of the specified partition ID.
NvError QbGetPartNameFromType(QbPartitionType PartType, NvBool IsActiveChain, NvS8 *pPartName, NvS32 PartNameBufferSize)
NvError QbPartMgrShowPT(void)
Prints the partition table.
NvError QbPartMgrGetPartInfoFromBuffer(NvU32 PartitionId, QbPartInfo *pPartInfo, QbPartitionTable QbPartTable)
Gets information about the location, size, and other attributes for the specified partition for the i...
NvBool QbQueryThreeLevelPtInfo(void)
Query information about 3-level PT.
NvU64 StartPhysicalAddress
NvU32 QbPartMgrGetNextIdFromBuffer(NvU32 PartitionId, QbPartitionTable QbPartTable)
Iterates over the partition IDs in the input PT buffer.
NvError QbPartMgrGetIdByType(QbPartitionType PartitionType, NvU32 *PartitionId)
Returns the partition ID for the partition type.
NvError QbPartMgrLoadSecondLevelPt(QbDriver DeviceId, NvU32 DeviceInstance)
This API is used by the update library for loading second level PT.
NvU32 QbPartMgrGetNumPartition(void)
Gets the number of the partition.
void QbPartMgrLoadAllGuestPt(void)
Iterates over the global PT for guest blobs found.
NvError QbPartMgrQueryIvcChannelInfo(NvU32 PartId, NvU32 *pIvc)
This API is used by update library to query IVC channel info for a partition specified by partition i...
QbPartitionType PartitionType
struct QbAllocPartArgsRec QbAllocPartArgs
NVIDIA Quickboot Interface: Device Driver Types
NvError QbPartMgrGetNextDeviceInstance(NvU32 DeviceId, NvU32 DeviceInstance, NvU32 *NextDeviceId, NvU32 *NextDeviceInstance)
Finds the next device ID and device Instance in the PT relative to the given device ID and device Ins...
NvError QbDeviceGetPartitionIdByOffset(QbDriver DriverType, NvU32 Instance, NvU64 Offset, NvU32 *PartitionId)
Finds the partition in which the given offset lies.
NvError QbPartMgrGetPartInfo(NvU32 PartitionId, QbPartInfo *pPartInfo)
Gets information about the location, size, and other attributes for the specified partition...
NvPartMgrAllocPolicyType AllocationType
NvError QbPartMgrGetBootCompHdrPartId(NvU32 PartitionId, NvU32 *BootCompHdrPartId)
Returns the Partition ID of the partition that has the BCH for the given partition.