 |
xFSTK
1.8.1-5.311
Intel SoC Cross Platform Firmware & Software Tool Kit
|
Go to the documentation of this file.
18 #ifndef XFSTKDLDRAPI_H
19 #define XFSTKDLDRAPI_H
20 #include "xfstk-dldr-api_global.h"
28 #define MOORESTOWN 0x1
30 #define CLOVERVIEW 0x3
31 #define CLOVERVIEWPLUS 0x4
32 #define MERRIFIELD 0x5
33 #define MEDFIELD_EMMC_DUMP 0x6
34 #define HASHVERIFY 0x7
35 #define MOOREFIELD 0x8
37 #define CARBONCANYON 0xA
38 #define XFSTK_MAXDEVICE 0xB
39 #define XFSTK_NODEVICE 0x666
45 #define LOG_ACK 0x0001
46 #define LOG_UPDATE 0x0002
47 #define LOG_OPCODE 0x0004
48 #define LOG_FWUPGRADE 0x0008
50 #define LOG_USB 0x0020
51 #define LOG_SOCKET 0x0040
52 #define LOG_SERIAL 0x0080
53 #define LOG_UTIL 0x0100
54 #define LOG_DOWNLOADER 0x0200
55 #define LOG_ENTRY 0x0400
56 #define LOG_STATUS 0x0800
57 #define LOG_PROGRESS 0x1000
58 #define DEBUG_ERROR 0xfffffff1
59 #define LOG_ALL 0xffffffff
72 #define MAX_USBSN_LENGTH 128
100 typedef struct DevicesCallBack
103 void (*attach)(
void* data);
104 void (*detach)(
void* data);
159 virtual bool downloadcli(
const char *cli,
const char* usbsn = NULL);
198 virtual bool downloadcsdb(
char *fwdnx,
char *miscbin,
char *cmdcode,
char *fwimage,
bool direct );
208 virtual bool downloadfw(
char *fwdnx,
char *fwimage,
char *gpflags);
218 virtual bool downloados(
char *osdnx,
char *osimage,
char *gpflags);
230 virtual bool downloadfwos(
char *fwdnx,
char *fwimage,
char *osdnx,
char* osimage,
char* gpflags);
243 virtual bool downloadfwos(
char *fwdnx,
char *fwimage,
char *osdnx,
char* osimage,
char* gpflags,
char* softfuse);
257 virtual bool downloadmtfwosasync(
char *fwdnx,
char *fwimage,
char *osdnx,
char* osimage,
char* gpflags,
char* usbsn);
272 virtual bool downloadmtfwosasync(
char *fwdnx,
char *fwimage,
char *osdnx,
char* osimage,
char* gpflags,
char* usbsn,
char* softfuse);
350 virtual bool registerdevicecallback(DevicesCallBack* callBackStruct,
unsigned long ProductId=0);
415 void *physclientdata;
416 void *xfstkfactoryhandle;
417 bool binterfaceavailable;
418 bool binterfaceclaimed;
419 bool interfaceavailable();
420 bool claiminterface();
421 void releaseinterface();
422 void findusbtargets();
426 bool softfuseinclude;
428 void xfstklogmessage(
char *message,
void *clientdata);
429 void xfstkmultitargetstatuscallback(
char *message,
void *clientdata);
430 void showversion(
void);
440 #endif // XFSTKDLDRAPI_H
XFSTKDLDRAPISHARED_EXPORT void xfstkdldrapi_dealloc(xfstkdldrapi *obj)
virtual bool downloadcli(const char *cli, const char *usbsn=NULL)
API method to simulate CLI.
virtual bool downloadfwos(char *fwdnx, char *fwimage, char *osdnx, char *osimage, char *gpflags, char *softfuse)
Performs single shot firmware and operating system download.
unsigned long root_hub
Definition: xfstkdldrapi.h:83
virtual bool downloadfw(char *fwfile)
Allows downloading a fwimage via spi.
#define MAX_USBSN_LENGTH
Definition: xfstkdldrapi.h:72
void(* xfstkstatuspfn)(char *status, void *)
Represents an optional status callback function that can be provided to xfstk API to obtain status in...
Definition: xfstkdldrapi.h:113
unsigned long port[5]
Definition: xfstkdldrapi.h:84
virtual bool downloadcsdb(char *fwdnx, char *miscbin, char *cmdcode, char *fwimage, bool direct)
download csdb payloads
virtual void usbdevicemutexunlock()
Unlock the usb device mutex, call this after a UBS device is found and before call downloadmtfwosasyn...
virtual ~xfstkdldrapi()
Distructs a xfstkdldrapi instance.
int number_devices
Definition: xfstkdldrapi.h:95
XFSTKDLDRAPISHARED_EXPORT xfstkdldrapi * xfstkdldrapi_alloc()
void status(char *message, void *clientdata)
Definition: xfstk-dldr-example-serial.cpp:22
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,...
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.
virtual void setmiscdnxpath(bool enable, char *miscdnx)
Sets the files path for miscdnx, this one is only for advanced feature in TNG USB 3....
virtual int getavailabletargets(unsigned long devicetype)
Reports the number of available targets connected to the host system for devicetype.
virtual void getversion(char *version)
Get the XFSTK API version string.
virtual void settargetretrycount(int retries)
Sets the number of retries to perform during faulty USB I/O.
data struct for port info for all the devices connected to host
Definition: xfstkdldrapi.h:94
void status(char *message, void *clientdata)
Definition: xfstk-dldr-example-parallel/xfstk-dldr-example-parallel.cpp:28
xfstkdldrapi()
Constructs a new xfstkdldrapi instance.
virtual void setsoftfusepath(bool include, char *softfuse)
Sets the files path for softfuse.
virtual bool getlasterror(LastError *er)
Get the Last error from XFSTK API version string.
SoCDevice soc_device[32]
Definition: xfstkdldrapi.h:96
virtual void setloglevel(unsigned long loglevel)
Sets log level for the API to limit the messages send back to the callback.
virtual void setResponsebuffer(unsigned char *responseBuffer, int &maxsize)
Set the response buffer for downloader operations.
virtual int getavailabletargets(SoCDevices *socdevices)
Reports the number of available targets connected to the host system.
char usbsn[MAX_USBSN_LENGTH]
Definition: xfstkdldrapi.h:82
virtual void setwipeifwi(bool enable)
Not a POR feature, only a testing/debug feature.
virtual int getavailabletargets()
Reports the number of available targets connected to the host system.
unsigned long error_code
Definition: xfstkdldrapi.h:68
virtual bool registerstatuscallback(xfstkstatuspfn statuspfn, void *clientdata)
Registers a callback with the xfstk api in order to obtain download status information.
virtual bool idrqresponse(unsigned char *buffer, int maxsize)
Allows for the retrieval of the IDRQ response from a device.
char error_message[128]
Definition: xfstkdldrapi.h:69
virtual std::string getfullversion(void) const
Get the XFSTK API version string.
data struct for port mapping API
Definition: xfstkdldrapi.h:81
virtual void usbdevicemutexlock()
Lock the usb device mutex, only call this before scanning the device for USBSN.
int main(int argc, char *argv[])
Definition: xfstk-dldr-example-serial.cpp:26
virtual bool downloados(char *osdnx, char *osimage, char *gpflags)
Performs single shot operating system only download.
virtual void setusbreadwritedelay(unsigned long delayms)
Set the delay time for before each USB bulk read/write in miliseconds.
virtual bool downloadfwos(char *fwdnx, char *fwimage, char *osdnx, char *osimage, char *gpflags)
Performs single shot firmware and operating system download.
Definition: xfstkdldrapi.h:124
The last error happened during download.
Definition: xfstkdldrapi.h:67
virtual bool downloadfw(char *fwdnx, char *fwimage, char *gpflags)
Performs single shot firmware only download.
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,...