[Discussion] Firmware Update of the Marvell 91xx SATA Controller



Actually it’s not that much. The chip is removeable as it has a socket on the PCB

@hanson

I think I got how spi_info.txt works. Could you download this spi_info, replace in any of the package you have (inside bin folder) and run "go -r" from DOS? This is just to read the binary, nothing more.

spi_info.rar (265 Bytes)

No problem, give me a couple of minutes

Thank you, I’m glad I got such a quick support!
The problem with computer shops here is, that they are good for selling new stuff, but not so good for reparing. They do, but for the price I would have to pay for such an upgrade, I would be able to buy a new mainboard with the latest SATA6 sockets on it…

Regards
THZ

@lordkag

No change with the new SPI_info.txt. Just the well known "no supported flash found"

It seems I read the datasheet too quickly. Here is the right (I hope) spi_info for your EN25F40 chip.

Hope you don’t mind the testing.

spi_info2.rar (275 Bytes)



Not at all but sorry to say: It dows not work either.

@hanson

This is the last one. I have already added all the bytes as per specs, but the ID is the real trouble. Tomorrow I look into the flasher, maybe the ID is hardcoded somewhere.

Download test3 instead. It is the whole package with latest flasher.

@THZ

It would help if you can look at the ID of the chip. In this image it is the one from top-right with a smudge, the one that can be extracted. It doesn’t have to be in the same area, but it is usually the detachable one. Maybe yours can be identified from the flasher with the right ID, since the error is different.

test3.rar (210 KB)

@lordkag

No, same result unfortunately :frowning:

@hanson

I had a look at mvf_mag.exe and it seems they indeed hardcoded the ID check. Don’t know why they added spi_info.txt if they are going to ignore it. Another shot in the foot for Marvell, I guess.

Even though I patched with extreme care and there shouldn’t be any problems when running “go -r”, I still warn you about the safety of running patched tools. Just remember the last attempt and choose if you really want to test this, not because you think you owe me something.

This is the patch, if you care. The ID to be added.

Spec.png



The rest of the bytes, which can be found inside the datasheet of your chip.

Patch1.png



Just watch that 512K = 512 x 1024 = 524288 = 0x00080000, 4K = 0x00001000, 64K = 0x00010000. And the final patch, which overrides two IDs with yours, because I don’t know how the tool will treat the 2 bytes Device ID.

Patch2.png

mvf_mag-mod.rar (91.2 KB)

@lordkag

Good news finally: the modded version provided by you worked for me. mvf_mag.exe was able to detect and read my Marvell chip.



LordKag - are you saying that Marvell hardcoded the ID check for the SPI chip that holds the bios or for the SATA controller adapter?

I still haven’t gotten around to trying my buspirate to flash the onboard 9120 controller SPI EEPROM chip (Macronix MX25L4005) on my motherboard. When I try to flash the onboard controller from DOS using mvg_mag.exe I still get a "No Adapter Found" message.

My problems started when I mistakenly flashed my 9120 with a 9123 bios and immediately afterward saw a message reading something like "Adapter ID mismatch". Seems like the computer bios thinks I have a 9120 and the 9120 EEPROM thinks it is a 9123 hence the ID mismatch? Is it possible to flash the onboard controller from DOS and workaround the ID mismatch through a modded mvg_mag.exe file? At this point I have nothing to lose flashing the 9120 because it is bricked so I appreciate any help you may offer.

@hanson

This is good news indeed. Thanks for supporting the endless torture of testing. But one question though, have you compared the returned binary with latest image2.bin (this was your selection) I provided here, are they the same?

@Stress

Your chip is supported by the flasher, maybe it is broken? What have you tried with flashrom? From my readings it should be something like this, see if you get any readings:
flashrom -p buspirate_spi:dev=COMxx -r marv.bin (to read the chip, where COMxx is the port where the BusPirate is connected, like COM8, COM13…)
flashrom -p buspirate_spi:dev=COMxx
flashrom


Flashrom for Win is here, just rename libusb0_x86.dll to libusb0.dll if it says is missing.

@lordkag

Yes I can confirm that. I compared IMAG_RB.BIN (from mvf_mag.exe) with Image2.bin by using a HEX editor and from what I could see they are same. But I’ll attach them for you so you can have a deeper look by yourself.

Best regards hanson

Images.zip (250 KB)

Yes, they have the same CRC32. I think you can now also write to the chip using the flasher. But leave this for another time, when you will really need to do this. You have done enough testing. Others should put their hardware in the line of fire, if they want something to be done.

Great job mate, thanks a lot. So I could use this mvf_mag. exe for any update that is or is not released in the future? That’s great!!

Best regards hanson

@Stress

I think your mainboard BIOS has the components of Marvell firmware, so maybe it is possible to by-pass the broken firmware by updating main BIOS. If your BusPirate can reflash the original BIOS in case something goes wrong, we could give this a try.

@Lordkag

I agree that the mainboard bios contains the components of the Marvell 9120 SATA controller firmware. However I don’t think it is possible to by-pass the Marvell 9120 SATA controller firmware by flashing the mainboard with a BIOS with new Marvell 9120 SATA controller components because of the controller ID mismatch which was the result of my bad flash, but I’m certainly willing to try. I believe that for the mainboard BIOS to restore the controller bios, the ID mismatch problem has to be resolved. It could be that just erasing the Macronix MX25L4005 SPI EEPROM would accomplish this. I did not back up the firmware in the Macronix MX25L4005 SPI EEPROM when I performed the bad flash, so I don’t have the original bios.

My problem in using the buspirate with flashrom is that I am having problems communicating with the buspirate using either dos or windows. Under windows I can identify the COM port, but I can’t under DOS. I don’t have any experience with Linux and I don’t have a Linux installation. In addition, the last time I checked, the downloads for flashrom running under dos or windows was not updated to the lastest flashrom release version which seems a lot more buspirate friendly and the instructions for compiling were very difficult for me to follow and execute. So I given this up until I have a lot more time and patience to try it. In the meantime I’m quite content with disabling the Marvell 9120 SATA controller and just using the onboard Intel SATA controller.

In my previous post I had hoped that mvg_mag.exe could be modded to directly address the Macronix MX25L4005 SPI EEPROM chip that has the Marvell 9120 SATA controller firmware without an adapter ID check, or modded to workaround the adapter ID check, so I wouldn’t have to use the buspirate. At this point I would even be willing to use a modded mvg_mag.exe to simply erase the Macronix MX25L4005 SPI EEPROM if that was possible.

In any event, I’m pretty much willing to try almost anything that doesn’t involve opening the case.

I pushed the guys at flashrom a couple of days ago. They updated their Windows section finally (told me the server had a raid failure). So here’s the latest 0.9.7 build I recieved. It works nice with my buspirate 4 (new firmwares 6.1, 6.2 and 6.3 is also attached) under windows 8.1 x64.

Best regards hanson

Flash_pack.zip (3.66 MB)

@stress

I think you have the mainboard Asus P7P55D-E-LX, right? The last time I looked at your BIOS, it had all the components of the full firmware, meaning autoload, ROM/BIOS, inner firmware. So I think that the BIOS would most likely load them in memory from here, rather than using the separate chip. Maybe it will even reflash them back to chip, if you are lucky.

It was easy to add the missing ID for a chip, but to force the flash on an already supported chip is a different chip. Maybe if you will try all the commands from the readme_engineer.txt or go.bat and post screenshot(s) of the error(s), I could do something, but I wouldn’t hold my breath.