|
int | main (void) |
| This is main() of kick , the firmware. More...
|
|
void | connected (void) |
|
void | mirror (char *keymsg) |
|
void | option_readblock (const enum tag_blocksize blocksize) |
|
int | do__WIP_polling (void) |
| Invoking WIP_polling() usually is accompanied by some checks and messages. More...
|
|
void | range_error (void) |
| Reports an Out-of-Range user input error and resets xcog1.inlevel. More...
|
|
void | option_batchblockerase (const enum tag_blocksize blocksize, const unsigned char blockcmd) |
| Versatile block erase function, which allows erasing of multiple blocks of different sizes, i.e. 4K (sectors), 32K and 64K. More...
|
|
void | SR_intro (unsigned char regno) |
| Provide each bit listing of an status register with a short header. More...
|
|
void | global_sector_protect (unsigned char pswitch) |
| Method to globally protect/unprotect all sectors. More...
|
|
void | key_polling (unsigned char *key_is_valid, unsigned char *quit) |
| Essential function. Scans stdin for configured keys and issues the apropriate actions. Typing 'q' quits this routine. More...
|
|
void | check_dryrun (void) |
| Checks wether a write fail should be expected. A function with very basic and poor functionality. More...
|
|
int | plug_detect (void) |
| Check if an SPI-Plug is detected and put a message on screen. More...
|
|
void | menu (unsigned char mode) |
| Put the chipflasher menu on screen and invoke key_polling(). More...
|
|
void | hr (char c, int n, char nl) |
| Put a horizontal line on screen. More...
|
|
unsigned char | get_addrlen (enum tag_type_of_addrlen type_of_addrlen, unsigned int addr) |
| Auxiliary function that returns the length of an address for different situations. More...
|
|
void | key_config (void) |
| Enable menu keys according to chip specs. More...
|
|
void | menu_line (unsigned int k1, char *k1msg, unsigned int k2, char *k2msg, unsigned int k3, char *k3msg) |
| Put a menu line with selected menu options on terminal screen. More...
|
|
void | menu_options (void) |
| Put menu options on terminal screen. More...
|
|
unsigned char | verify_0xff (unsigned int firstloc, unsigned int memsize) |
| This function scans the specified chip memory for values different than 0xff. If a value different to 0xff is found, an error status is returned. More...
|
|
void | MOT_mkline (struct tag_linedat *linedat, union tag_typeS *typeS, char *linebuf) |
| This function wraps a binary payload into a Motorola S-record frame. More...
|
|
int | strpos (char *str, char c) |
| Report the position of a character in a string. More...
|
|
void | MOT_header (char *header, char *linebuf) |
| This function invokes MOT_mkline(), but initializes parameters first with apropriate header data. More...
|
|
void | MOT_data (struct tag_linedat *linedat, char *linebuf) |
|
void | MOT_summary (unsigned int lines, char *linebuf) |
|
unsigned char | yes_no (char *question, unsigned char level_rst) |
| This function allows to put a question which expects true or false. More...
|
|
void | chip_ini (unsigned char new_index) |
|
signed char | chip_read (struct tag_filespec *filespec, unsigned int firstloc, unsigned int memsize, unsigned int *lines, char *linebuf) |
|
void | chip_txfile (struct tag_filespec *filespec, unsigned char addrlen_in_bits, unsigned int firstloc, unsigned int memsize, unsigned char screenmode) |
|
signed char | linebuf_out (char *linebuf) |
| Put a formatted data line onto tty. More...
|
|
char | outfifo (char c) |
|
int | outstr (char *s) |
|
void | HEXDUMP_mkline (struct tag_linedat *linedat, char *linebuf_orig) |
| This function transforms a binary payload into a row of ascii chars including line ending characters and stores it in a buffer. More...
|
|
void | greeting () |
| Put a small headline on terminal screen that helps to identify the program. More...
|
|
void | cmd_WREN (void) |
| Set Write Enable Latch bit. More...
|
|
void | cmd_WRSR (const unsigned char regno, const unsigned char byte) |
| Write to Status Registers. More...
|
|
void | page_write (const unsigned int addr, unsigned char *buffer) |
| Write a page buffer to chip. More...
|
|
void | exit_sequence (const char status) |
| Tell terminal to exit listening mode. More...
|
|
int | WIP_polling (void) |
| Determine end of write cycle by polling the WIP bit. More...
|
|
unsigned int | CPM_polling (void) |
| Poll CPM bit. More...
|
|
unsigned char | SR_report (unsigned char regno) |
| Put status register's content on screen. More...
|
|
unsigned char | inb (void) |
|
unsigned int | inbits (unsigned int msbit) |
|
void | outbits (const unsigned int value, unsigned int msbit) |
|
void | cmd (const unsigned char cmd, const unsigned int value, unsigned char bits) |
|
int | cmd_RDID_JEDEC (void) |
|
void | cmd_DP (void) |
|
unsigned char | cmd_RDSR (unsigned char regno) |
| Read the status register. More...
|
|
void | cmd_WRDI (void) |
|
void | SPI_ini (void) |
| Initialize SPI bus; activate hardware write protection. More...
|
|
void | SPI_off (int mode) |
| Switch SPI bus off. More...
|
|
int | hex2bin (unsigned char a, unsigned char b) |
| Converts a pair of hexadecimal chars into binary value. More...
|
|
void | PGM_cycle (enum tag_cmdstat *cmdstat, unsigned char odd_tracker) |
|
void | ledstat () |
| This function controls board LEDs. To be used with extra cog, to be stopped externally. More...
|
|
void | burn () |
| Wite data to chip. More...
|
|
void | MOT_typeS_fillup (union tag_typeS *typeS) |
| Generating and parsing a Motorola S-record line needs to have some specs available about the line in question. This function fills a struct, based on some data that can be provided during runtime, to have all specs available when needed. More...
|
|
char | HEXDUMP_rxline (struct tag_xcog0 *px, unsigned int *lines) |
| Parse a Hexdump line. More...
|
|
char | MOT_rxline (struct tag_xcog0 *px, unsigned int *lines, int hexmode) |
| Receive and parse a line in Motorola S-Record format. This func finishes successfully after having parsed the line's checksum data, thus not evaluating any line ending characters. More...
|
|
char | queue (struct tag_xcog0 *px, unsigned char vbin, unsigned int *pwr) |
|
void | report_err (char reported_err) |
|
void | chip_rxfile (struct tag_xcog0 *px, char screen_output) |
|
void | chip_erase (void) |
| This function calls the global chip erase command. More...
|
|
Zerocat Chipflasher — Flash free firmware to BIOS chips, kick the Manageability Engine.
Copyright (C) 2015, 2016, 2017, 2018 Kai Mertens kmx@p.nosp@m.oste.nosp@m.o.net
The Zerocat Chipflasher is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
The Zerocat Chipflasher is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
This file is part of the Zerocat Chipflasher.
- Todo:
- Implement a better initial handshake with
connect
.
- Todo:
- Update schematic according to AN 'interfacing higher voltages'.
Notes
Broken Chips
- MX25L1605D (our single test chip without mobo) This chip is partly broken? I cannot modify the Status Register, which is zero. Erase and Flashing works fine.
Definition in file kick.c.