Commit 1159d586 authored by Peter Stuge's avatar Peter Stuge
Browse files

Add a tested bitmap field to the flash chip table


Two bits indicate OK and BAD for each operation PROBE READ ERASE WRITE.
8 bits out of 32 are in use now. No bits set means nothing has been tested.
For chips with at least one operation that is not tested or not working, the
user is asked to email a report to a special email adress so that the table
can be updated.

All chips are TEST_UNTESTED for now.

Corresponding to flashrom svn r221 and coreboot v2 svn r3277.
Signed-off-by: default avatarPeter Stuge <peter@stuge.se>
Acked-by: default avatarCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
parent 9477c4ec
......@@ -45,6 +45,11 @@ struct flashchip {
int total_size;
int page_size;
/* Indicate if flashrom has been tested with this flash chip and if
* everything worked correctly.
*/
uint32_t tested;
int (*probe) (struct flashchip *flash);
int (*erase) (struct flashchip *flash);
int (*write) (struct flashchip *flash, uint8_t *buf);
......@@ -55,6 +60,20 @@ struct flashchip {
volatile uint8_t *virtual_registers;
};
#define TEST_UNTESTED 0
#define TEST_OK_PROBE (1<<0)
#define TEST_OK_READ (1<<1)
#define TEST_OK_ERASE (1<<2)
#define TEST_OK_WRITE (1<<3)
#define TEST_OK_MASK 0x0f
#define TEST_BAD_PROBE (1<<4)
#define TEST_BAD_READ (1<<5)
#define TEST_BAD_ERASE (1<<6)
#define TEST_BAD_WRITE (1<<7)
#define TEST_BAD_MASK 0xf0
extern struct flashchip flashchips[];
/*
......
This diff is collapsed.
......@@ -412,6 +412,36 @@ int main(int argc, char *argv[])
}
printf("Flash part is %s (%d KB).\n", flash->name, flash->total_size);
if (TEST_OK_MASK != (flash->tested & TEST_OK_MASK)) {
printf("===\n");
if (flash->tested & TEST_BAD_MASK) {
printf("This flash part has status NOT WORKING for operations:");
if (flash->tested & TEST_BAD_PROBE)
printf(" PROBE");
if (flash->tested & TEST_BAD_READ)
printf(" READ");
if (flash->tested & TEST_BAD_ERASE)
printf(" ERASE");
if (flash->tested & TEST_BAD_WRITE)
printf(" WRITE");
printf("\n");
} else {
printf("This flash part has status UNTESTED for operations:");
if (!(flash->tested & TEST_OK_PROBE))
printf(" PROBE");
if (!(flash->tested & TEST_OK_READ))
printf(" READ");
if (!(flash->tested & TEST_OK_ERASE))
printf(" ERASE");
if (!(flash->tested & TEST_OK_WRITE))
printf(" WRITE");
printf("\n");
}
printf("Please email a report to flashrom@coreboot.org if any of the above operations\n");
printf("work correctly for you with this flash part. Please include the full output\n");
printf("from the program, including chipset found. Thank you for your help!\n");
printf("===\n");
}
if (!(read_it | write_it | verify_it | erase_it)) {
printf("No operations were specified.\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment