dsmi_get_device_boot_status
Prototype
int dsmi_get_device_boot_status(int device_id, enum dsmi_boot_status *boot_status)
Description
Obtains the boot status of an the Ascend AI Processor.
For the Ascend 310 AI Processor, this API supports only standard PCIe cards.
Parameters
Parameter |
Input/Output |
Description |
---|---|---|
device_id |
Input |
Device ID For the Ascend 310 AI Processor, the value range is 0–63. Obtain the actual device ID by calling dsmi_list_device. |
boot_status |
Output |
Boot status of the the Ascend AI Processor enum dsmi_boot_status { DSMI_BOOT_STATUS_UNINIT = 0, /*Uninitialized*/ DSMI_BOOT_STATUS_BIOS, /* Loading BIOS*/ DSMI_BOOT_STATUS_OS, /* Loading the OS*/ DSMI_BOOT_STATUS_FINISH /*Boot is finished*/ }; |
Returns
Type |
Description |
---|---|
int |
0 on success; else, failure |
Restrictions
None
Example
int ret = 0; enum dsmi_boot_status boot_status = 0; ret = dsmi_get_device_boot_status (0, &boot_status); if(ret != 0) { //To-do: records logs. return ret; } ...