Zerocat Chipflasher  v0.4.3 (board-edition-1)
Flash free firmware to BIOS chips, kick the Manageability Engine.
filespec.h
Go to the documentation of this file.
1 /******************************************************************/
27 #ifndef __FILESPEC_H__
28 #define __FILESPEC_H__
29 
30 #define SIZE_LINEBUF (1 << 8)
31 #define HEADER "Zerocat Chipflasher (http://www.zerocat.org) | %s"
32 #define FRAME_HEADER 15 //arbitrary for all formats
33 #define SIZE_HEADER (SIZE_LINEBUF - FRAME_HEADER)
34 #define ARRAY_FILESPEC 2
35 #define PAYLOAD_BASE (1 << 4) //if different, srec_cat won't understand our hexdump file
36 #define FRAME_MOTBIN 17
37 #define SHIFT_MOTBIN 0
38 #define FRAME_HEXDUMP 15
39 #define SHIFT_HEXDUMP 2
40 
41 //modes for mode_0xff, used by chip_read()
42 #define MODE_INLINE 0x1F
43 #define MODE_SPLIT 0x20
44 #define MODE_STRIP 0x40
45 #define MODE_SCREEN_OUTPUT 0x80
46 #define MODE_HEXDUMP (MODE_INLINE & 0x00)
47 #define MODE_MOTBIN ((MODE_INLINE & 0x10) | MODE_SPLIT | MODE_STRIP)
48 
49 //HEXDUMP
50 #define HEXDUMP_LINELEN (10 + PAYLOAD_BASE * 4 + 2 + 2)
51 
52 enum tag_format {
53  MOTBIN = 0,
55 };
56 
57 struct tag_filespec {
58  unsigned char payload_default;
60  unsigned char mode_0xff;
61  char *format_name;
62 };
63 
64 void filespec_ini(
65  int chipsize
66  );
67 
68 inline int payload(
69  enum tag_format format,
70  int chipsize
71  );
72 
73 #endif
74 /* __FILESPEC_H__ */
75 
tag_filespec::payload_default
unsigned char payload_default
Pure data bytes per line.
Definition: filespec.h:58
payload
int payload(enum tag_format format, int chipsize)
Definition: filespec.c:50
HEXDUMP
@ HEXDUMP
Definition: filespec.h:54
tag_filespec::format
enum tag_format format
Definition: filespec.h:59
MOTBIN
@ MOTBIN
Definition: filespec.h:53
tag_filespec
Definition: filespec.h:57
tag_filespec::mode_0xff
unsigned char mode_0xff
Definition: filespec.h:60
tag_filespec::format_name
char * format_name
Definition: filespec.h:61
filespec_ini
void filespec_ini(int chipsize)
Definition: filespec.c:66
tag_format
tag_format
Definition: filespec.h:52