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 84 unsigned long port[5];
100 typedef struct DevicesCallBack
103 void (*attach)(
void* data);
104 void (*detach)(
void* data);
151 virtual bool idrqresponse(
unsigned char *buffer,
int maxsize);
159 virtual bool downloadcli(
const char *cli,
const char* usbsn = NULL);
166 virtual bool downloadfw(
char *fwfile);
175 virtual bool hashverify(
char *hashfile,
bool write);
185 virtual void setResponsebuffer(
unsigned char* responseBuffer,
int& maxsize);
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);
281 virtual bool registerstatuscallback(
xfstkstatuspfn statuspfn,
void *clientdata);
289 virtual void settargetretrycount(
int retries);
296 virtual void setloglevel(
unsigned long loglevel);
305 virtual void setsoftfusepath(
bool include,
char * softfuse);
314 virtual void setmiscdnxpath(
bool enable,
char * miscdnx);
322 virtual int getavailabletargets();
330 virtual int getavailabletargets(
unsigned long devicetype);
338 virtual int getavailabletargets(
SoCDevices * socdevices);
350 virtual bool registerdevicecallback(DevicesCallBack* callBackStruct,
unsigned long ProductId=0);
359 virtual void usbdevicemutexlock();
368 virtual void usbdevicemutexunlock();
376 virtual void getversion(
char* version);
384 virtual std::string getfullversion(
void)
const;
392 virtual bool getlasterror(
LastError* er);
400 virtual void setusbreadwritedelay(
unsigned long delayms);
411 virtual void setwipeifwi(
bool enable);
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 int number_devices
Definition: xfstkdldrapi.h:95
void status(char *message, void *clientdata)
Definition: xfstk-dldr-example-parallel.cpp:28
#define MAX_USBSN_LENGTH
Definition: xfstkdldrapi.h:72
unsigned long root_hub
Definition: xfstkdldrapi.h:83
char error_message[128]
Definition: xfstkdldrapi.h:69
unsigned long error_code
Definition: xfstkdldrapi.h:68
data struct for port info for all the devices connected to host
Definition: xfstkdldrapi.h:94
data struct for port mapping API
Definition: xfstkdldrapi.h:81
XFSTKDLDRAPISHARED_EXPORT xfstkdldrapi * xfstkdldrapi_alloc()
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
This interface enables the development of Intel SoC firmware/operating system provisioning applicatio...
Definition: xfstkdldrapi.h:124
The last error happened during download.
Definition: xfstkdldrapi.h:67
XFSTKDLDRAPISHARED_EXPORT void xfstkdldrapi_dealloc(xfstkdldrapi *obj)