|
xFSTK
1.8.1-17.9
Intel SoC Cross Platform Firmware & Software Tool Kit
|
This interface enables the development of Intel SoC firmware/operating system provisioning applications. This API is not re-entrant. More...
#include <xfstkdldrapi.h>
Public Member Functions | |
| xfstkdldrapi () | |
| Constructs a new xfstkdldrapi instance. More... | |
| virtual | ~xfstkdldrapi () |
| Distructs a xfstkdldrapi instance. More... | |
| virtual bool | idrqresponse (unsigned char *buffer, int maxsize) |
| Allows for the retrieval of the IDRQ response from a device. More... | |
| virtual bool | downloadcli (const char *cli, const char *usbsn=NULL) |
| API method to simulate CLI. More... | |
| virtual bool | downloadfw (char *fwfile) |
| Allows downloading a fwimage via spi. More... | |
| virtual bool | hashverify (char *hashfile, bool write) |
| Allows for the writing of a device hash or comparing of the hash to a golden hash file. More... | |
| virtual void | setResponsebuffer (unsigned char *responseBuffer, int &maxsize) |
| Set the response buffer for downloader operations. More... | |
| virtual bool | downloadcsdb (char *fwdnx, char *miscbin, char *cmdcode, char *fwimage, bool direct) |
| download csdb payloads More... | |
| virtual bool | downloadfw (char *fwdnx, char *fwimage, char *gpflags) |
| Performs single shot firmware only download. More... | |
| virtual bool | downloados (char *osdnx, char *osimage, char *gpflags) |
| Performs single shot operating system only download. More... | |
| virtual bool | downloadfwos (char *fwdnx, char *fwimage, char *osdnx, char *osimage, char *gpflags) |
| Performs single shot firmware and operating system download. More... | |
| virtual bool | downloadfwos (char *fwdnx, char *fwimage, char *osdnx, char *osimage, char *gpflags, char *softfuse) |
| Performs single shot firmware and operating system download. More... | |
| virtual bool | downloadmtfwosasync (char *fwdnx, char *fwimage, char *osdnx, char *osimage, char *gpflags, char *usbsn) |
| Performs parallel multitarget firmware and operating system download in async mode, it will return after the download to the device is done. More... | |
| virtual bool | downloadmtfwosasync (char *fwdnx, char *fwimage, char *osdnx, char *osimage, char *gpflags, char *usbsn, char *softfuse) |
| Performs parallel multitarget firmware and operating system download in async mode, it will return after the download to the device is done. More... | |
| virtual bool | registerstatuscallback (xfstkstatuspfn statuspfn, void *clientdata) |
| Registers a callback with the xfstk api in order to obtain download status information. More... | |
| virtual void | settargetretrycount (int retries) |
| Sets the number of retries to perform during faulty USB I/O. More... | |
| virtual void | setloglevel (unsigned long loglevel) |
| Sets log level for the API to limit the messages send back to the callback. More... | |
| virtual void | setsoftfusepath (bool include, char *softfuse) |
| Sets the files path for softfuse. More... | |
| virtual void | setmiscdnxpath (bool enable, char *miscdnx) |
| Sets the files path for miscdnx, this one is only for advanced feature in TNG USB 3.0 POC. More... | |
| virtual int | getavailabletargets () |
| Reports the number of available targets connected to the host system. More... | |
| virtual int | getavailabletargets (unsigned long devicetype) |
| Reports the number of available targets connected to the host system for devicetype. More... | |
| virtual int | getavailabletargets (SoCDevices *socdevices) |
| Reports the number of available targets connected to the host system. More... | |
| virtual void | usbdevicemutexlock () |
| Lock the usb device mutex, only call this before scanning the device for USBSN. More... | |
| virtual void | usbdevicemutexunlock () |
| Unlock the usb device mutex, call this after a UBS device is found and before call downloadmtfwosasync(). More... | |
| virtual void | getversion (char *version) |
| Get the XFSTK API version string. More... | |
| virtual std::string | getfullversion (void) const |
| Get the XFSTK API version string. More... | |
| virtual bool | getlasterror (LastError *er) |
| Get the Last error from XFSTK API version string. More... | |
| virtual void | setusbreadwritedelay (unsigned long delayms) |
| Set the delay time for before each USB bulk read/write in miliseconds. More... | |
| virtual void | setwipeifwi (bool enable) |
| Not a POR feature, only a testing/debug feature. More... | |
This interface enables the development of Intel SoC firmware/operating system provisioning applications. This API is not re-entrant.
Below is a diagram illustrating the general host/target configurations that the API can be used in.
\image html xfstkcmdclientflow.png
REM
| xfstkdldrapi::xfstkdldrapi | ( | ) |
Constructs a new xfstkdldrapi instance.
| None |
| None |
|
virtual |
Distructs a xfstkdldrapi instance.
| None |
| None |
|
virtual |
Allows for the retrieval of the IDRQ response from a device.
DEPRECATED: Use setResponsebuffer & downloadercli methods
| buffer | is the where the IDRQ response will be stored |
| maxsize | is the maximum space allocated for buffer |
| none |
|
virtual |
API method to simulate CLI.
| CLI | string |
| usbsn | serial number string of device to perform operation on. |
| none |
|
virtual |
Allows downloading a fwimage via spi.
| fwfile | is the file that is downloaded |
| none |
|
virtual |
Allows for the writing of a device hash or comparing of the hash to a golden hash file.
| hashfile | is the file that will be written to, or the golden file that will be compared to |
| write | is the value that determines whether to write to file(TRUE) or read from and compare(FALSE) |
| none |
|
virtual |
Set the response buffer for downloader operations.
| responseBuffer | buffer to be used |
| maxsize | the maximum size of the buffer |
| \note | Call this before running the operations that elicit a response from the device |
|
virtual |
download csdb payloads
DEPRECATED: Use setResponsebuffer & downloadercli methods
| fwdnx | Firmware download and execute (DnX) module. |
| miscbin | CSDB Payload file |
| cmdcode | CSDB command code |
| fwimage | Firmware binary image. |
| direct | command no longer valid |
| None |
|
virtual |
Performs single shot firmware only download.
| fwdnx | Firmware download and execute (DnX) module. |
| fwimage | Firmware binary image. |
| gpflags | General purpose flags to control download process. For firmware only download specify 0x80000000. |
| None |
|
virtual |
Performs single shot operating system only download.
| osdnx | Operating System download and execute (DnX) module. |
| osimage | Operating System binary image. |
| gpflags | General purpose flags to control download process. For os only download specify 0x80000001. |
| None |
|
virtual |
Performs single shot firmware and operating system download.
| fwdnx | Firmware download and execute (DnX) module. |
| fwimage | Firmware binary image. |
| osdnx | Operating System download and execute (DnX) module. |
| osimage | Operating System binary image. |
| gpflags | General purpose flags to control download process. For firmware & os download specify 0x80000001. |
| None |
Referenced by main().

|
virtual |
Performs single shot firmware and operating system download.
| fwdnx | Firmware download and execute (DnX) module. |
| fwimage | Firmware binary image. |
| osdnx | Operating System download and execute (DnX) module. |
| osimage | Operating System binary image. |
| gpflags | General purpose flags to control download process. For firmware & os download specify 0x80000001. |
| softfuse | Softfuse binary image. |
| None |
|
virtual |
Performs parallel multitarget firmware and operating system download in async mode, it will return after the download to the device is done.
| fwdnx | Firmware download and execute (DnX) module. |
| fwimage | Firmware binary image. |
| osdnx | Operating System download and execute (DnX) module. |
| osimage | Operating System binary image. |
| gpflags | General purpose flags to control download process. For firmware & os download specify 0x80000001. |
| usbsn | the usb serial number of the device, client need to detect the USB serial number first and provide it to the API. |
| None |
Referenced by DlThreadObj::DldrRun().

|
virtual |
Performs parallel multitarget firmware and operating system download in async mode, it will return after the download to the device is done.
| fwdnx | Firmware download and execute (DnX) module. |
| fwimage | Firmware binary image. |
| osdnx | Operating System download and execute (DnX) module. |
| osimage | Operating System binary image. |
| gpflags | General purpose flags to control download process. For firmware & os download specify 0x80000001. |
| usbsn | the usb serial number of the device, client need to detect the USB serial number first and provide it to the API. |
| softfuse | Softfuse binary image. |
| None |
|
virtual |
Registers a callback with the xfstk api in order to obtain download status information.
| statuspfn | Pointer to a callback function which has the same signature as xfstkstatuspfn. |
| clientdata | Optional pointer to a client data object. Can be NULL. |
| None |
Referenced by DlThreadObj::DldrRun(), and main().

|
virtual |
Sets the number of retries to perform during faulty USB I/O.
| retries | Integer value corresponding to the number of times to retry faulty USB I/O transfers. Default is 40. |
| None |
Referenced by DlThreadObj::DldrRun(), and main().

|
virtual |
Sets log level for the API to limit the messages send back to the callback.
| unsigned | long, loglevel |
| None |
|
virtual |
Sets the files path for softfuse.
| type | - bool - include/exclude softfuse. |
| type | - char * - string path for softfuse file. |
| None |
|
virtual |
Sets the files path for miscdnx, this one is only for advanced feature in TNG USB 3.0 POC.
| type | - bool - enable/disable miscdnx. |
| type | - char * - string path for miscdnx file. |
| None |
|
virtual |
Reports the number of available targets connected to the host system.
| None |
| None |
Referenced by main().

|
virtual |
Reports the number of available targets connected to the host system for devicetype.
| None |
| None |
|
virtual |
Reports the number of available targets connected to the host system.
| socdevices | An array of the socdevice port mapping data for detected devices |
| None |
|
virtual |
Lock the usb device mutex, only call this before scanning the device for USBSN.
| None |
| None |
|
virtual |
Unlock the usb device mutex, call this after a UBS device is found and before call downloadmtfwosasync().
| None |
| None |
|
virtual |
Get the XFSTK API version string.
| char*,client | should allocate memory for this version string, should be at least 8 byte long. |
| None |
|
virtual |
Get the XFSTK API version string.
| \return | std::string |
| None |
|
virtual |
Get the Last error from XFSTK API version string.
| LastError*,client | should allocate memory for the LastError. |
| None |
Referenced by DlThreadObj::DldrRun().

|
virtual |
Set the delay time for before each USB bulk read/write in miliseconds.
| unsigned | long delayms. |
| None |
Referenced by DlThreadObj::DldrRun().

|
virtual |
Not a POR feature, only a testing/debug feature.
Set enable or disable to wipe out ifwi image content before flash the new ifwi, If set gpflags = 0x80000000 and set to enable, then it will only wipe out ifwi wout flashing a new one, to make the device like a virgin part, but it won't erase OS and user data though.
| bool | - true - enable, false - disable. |
| None |
Referenced by DlThreadObj::DldrRun().

1.8.5