Hello,
The flash part in my MSI ms-7021 (KT6V) mainboard wasn't recognized. After peeling the label off, the markings on the chip showed: MX 29F040QC-90 This is a Macronix MX29F040C (Q=PLCC; C=0C..70C; 90=90ns)
The software commands in the datasheet seem to match those of the AMD Am29F040B and ST M29F040B. I copied the configuration and performed some tests. Probe, read, erase and write all work (see below for code and results).
Since the software commands for a different Macronix part (MX29LV040C) also appear to be the same, I copied the configuration for that part and performed some more tests. Probe, read, erase and write all work and writing is about twice as fast. I'm not sure why the code writes to address 0x5555 and 0x2AAA instead of 0x555 and 0x2AA as specified in the datasheet, but it seems to work.
Maybe someone with more knowledge about these flash parts knows what's the best way to support this MX29F040C part? Please let me know if you need more information (i.e. -V debug output).
MX29F040C with *_29f040b probe, erase and write functions:
Index: flashchips.c =================================================================== --- flashchips.c (revision 602) +++ flashchips.c (working copy) @@ -1403,6 +1403,22 @@
{ .vendor = "Macronix", + .name = "MX29F040C", + .bustype = CHIP_BUSTYPE_NONSPI, + .manufacture_id = MX_ID, + .model_id = MX_29F040C, + .total_size = 512, + .page_size = 64 * 1024, + .tested = TEST_OK_PREW, + .probe = probe_29f040b, + .probe_timing = TIMING_IGNORED, /* routine don't use probe_timing (am29f040b.c) */ + .erase = erase_29f040b, + .write = write_29f040b, + .read = read_memmapped, + }, + + { + .vendor = "Macronix", .name = "MX29LV040C", .bustype = CHIP_BUSTYPE_NONSPI, .manufacture_id = MX_ID,
# dd if=/dev/urandom of=random.bin bs=1024 count=512 ; time ./flashrom -w random.bin ; time ./flashrom -v random.bin 512+0 records in 512+0 records out 524288 bytes (524 kB) copied, 0.182563 s, 2.9 MB/s flashrom v0.9.0-r602 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... OK. Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. Flash image seems to be a legacy BIOS. Disabling checks. Writing flash chip... Programming page 0007 at address: 0x0007ffff COMPLETE.
real 0m27.706s user 0m11.657s sys 0m0.020s flashrom v0.9.0-r602 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... OK. Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. Flash image seems to be a legacy BIOS. Disabling checks. Verifying flash... VERIFIED.
real 0m2.757s user 0m2.740s sys 0m0.016s
# time ./flashrom -E ; time ./flashrom -r empty.bin ; hexdump -C empty.bin flashrom v0.9.0-r602 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... OK. Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. Erasing flash chip... SUCCESS.
real 0m7.647s user 0m7.640s sys 0m0.008s flashrom v0.9.0-r602 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... OK. Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. Reading flash... done.
real 0m2.761s user 0m2.748s sys 0m0.016s 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00080000
MX29F040C with *_29f002 probe, erase and write functions:
Index: flashchips.c =================================================================== --- flashchips.c (revision 602) +++ flashchips.c (working copy) @@ -1403,6 +1403,22 @@
{ .vendor = "Macronix", + .name = "MX29F040C", + .bustype = CHIP_BUSTYPE_NONSPI, + .manufacture_id = MX_ID, + .model_id = MX_29F040C, + .total_size = 512, + .page_size = 64 * 1024, + .tested = TEST_OK_PREW, + .probe = probe_29f002, + .probe_timing = TIMING_IGNORED, /* routine don't use probe_timing (mx29f002.c) */ + .erase = erase_29f002, + .write = write_29f002, + .read = read_memmapped, + }, + + { + .vendor = "Macronix", .name = "MX29LV040C", .bustype = CHIP_BUSTYPE_NONSPI, .manufacture_id = MX_ID,
# dd if=/dev/urandom of=random.bin bs=1024 count=512 ; time ./flashrom -w random.bin ; time ./flashrom -v random.bin 512+0 records in 512+0 records out 524288 bytes (524 kB) copied, 0.180451 s, 2.9 MB/s flashrom v0.9.0-r602 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... OK. Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. Flash image seems to be a legacy BIOS. Disabling checks. Writing flash chip... Programming page: address: 0x0007f000 COMPLETE.
real 0m14.711s user 0m14.669s sys 0m0.004s flashrom v0.9.0-r602 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... OK. Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. Flash image seems to be a legacy BIOS. Disabling checks. Verifying flash... VERIFIED.
real 0m2.766s user 0m2.748s sys 0m0.016s
# time ./flashrom -E ; time ./flashrom -r empty.bin ; hexdump -C empty.bin flashrom v0.9.0-r602 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... OK. Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. Erasing flash chip... SUCCESS.
real 0m7.636s user 0m7.628s sys 0m0.008s flashrom v0.9.0-r602 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... OK. Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. Reading flash... done.
real 0m2.756s user 0m2.732s sys 0m0.016s 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| * 00080000