All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 17 posts ] 
Author Message
 Post subject: HITACHI DK23FA-40 microcode
PostPosted: March 2nd, 2024, 9:33 
Offline

Joined: December 6th, 2012, 8:49
Posts: 290
Location: españa
Would anyone have a hitachi DK23FA-40 microcode file to share?

Thanks.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 5th, 2024, 13:01 
Offline

Joined: December 6th, 2012, 8:49
Posts: 290
Location: españa
This would be the disk model, if someone has it and can extract the firmware resources (mainly microcode), I would reward by paypal.


Attachments:
1709657458684.jpg
1709657458684.jpg [ 1.81 MiB | Viewed 3568 times ]
Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 6th, 2024, 3:11 
Offline
User avatar

Joined: January 28th, 2009, 10:54
Posts: 3456
Location: Greece
I've got some similar, but not this exact one.

_________________
http://www.northwind.gr
SandForce SSD Recovery
Ransomware Reverse Engineering - NoMoreRansom! partners


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 6th, 2024, 18:39 
Offline

Joined: December 6th, 2012, 8:49
Posts: 290
Location: españa
Thanks Dimitri. I also have the same model (family) in 30GB and 60GB but in native Hitachi for it to be compatible the microcode has to be of the same family and capacity (as far as I know). Or repair it, but I have no idea if this is possible.

Anyway thank you very much for bothering to check if you had it.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 6th, 2024, 18:58 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
I have one resource for this model, but the microcode folder is empty ...

When you say "repair it", are you referring to the microcode or the PCB?

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 6th, 2024, 20:46 
Offline

Joined: December 6th, 2012, 8:49
Posts: 290
Location: españa
Hi Frank, thanks also for taking the trouble to look.

I would need to repair/replace the microcode which is damaged, the pcb is fine. The microcode in Hitachi Native is the "Grandfather/Father" of the NV-RAM in Hitchi-IBM. NV-RAM there are methods to repair it but I don't know for this "family member".

I also found something but also without the microcode, the reason is that dumping it takes about 20/30Mtos.

I'll keep looking....... They are very old units and it is difficult for someone to have it in a database. The most feasible is that someone who has that model and bothers to do the dump (would be rewarded).

Many thanks, Frank


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 6th, 2024, 21:02 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
Can you upload some examples? Maybe we could identify those parameters which apply to the model and those which apply to each drive. It would be an interesting exercise for me in any case.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 7th, 2024, 12:42 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
I have started to analyse the NVRAM for the HTS421280H9AT0 model. I think I might be able to repair your NVRAM if the corruption is not too severe.

For a start, there is a 16-bit XOR checksum which is computed over the range from 0 to 0x1CF. It should be 0x0000.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 7th, 2024, 15:54 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
I notice that this model has two completely different PCBs.

https://dsmcz.com/prestashop/16356/chip-2p00f6m4b62394za21005-hts428040f9at00-40gb-25-ide.jpg (older version)

https://cdn11.bigcommerce.com/s-6bkt1ygjlf/images/stencil/1280x1280/products/552061/633675/PCB-HTS428040F9AT00-lg__44021.1635488182.jpg (newer version)

Does this make a difference?

(I also notice that most suppliers incorrectly identify the major ICs on the older PCB.)


Edit:

The newer PCB is a Seagate. It seems that the suppliers may have this wrong, too?

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 7th, 2024, 16:49 
Offline

Joined: December 6th, 2012, 8:49
Posts: 290
Location: españa
Thanks for your trouble on this matter Frank.

I will attach shortly two microcode files, the original (corrupted) and one of a model I have operational of the same family but 60GB. I have checked them and except for the module structure, the data is nothing alike.........

I haven't seen the seagate PCB on this model, the one on the disk we are talking about would be the first.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 7th, 2024, 21:22 
Offline

Joined: December 6th, 2012, 8:49
Posts: 290
Location: españa
Hi Frank,

Please find attached two microcodes from the HITACHI DKFA family, the one corresponding to the patient (Bad) and another one from a 30GB disk of the same family.


Attachments:
HITACHI_DK23FA.rar [489.18 KiB]
Downloaded 158 times
Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 8th, 2024, 1:45 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
Microcode.bin is comprised of 0x200-byte sectors, each with the following structure:

Code:
offset           description
-------------    -------------------------------------------
0x000            always 0x3A
0x001 - 0x002    sector number (big-endian)
0x003            always 0x00
0x004 - 0x103    0x100 data block
0x104 - 0x107    32-bit sum of preceding bytes (big-endian)
0x108 - 0x1FF    all 0xFF

This is the second sector (0x033E):

Code:
Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F

00000200  3A 03 3E 00 43 18 78 00 31 01 60 11 47 70 00 00   <--- sector 0x033E
00000210  00 80 0E 00 01 FF 09 8C 00 80 0F 00 00 C0 08 00
00000220  0A 41 02 49 4A 04 68 93 42 99 D0 00 60 91 05 C0
00000230  4B 02 0D C0 43 18 47 70 00 80 0F 00 00 C0 08 00
00000240  B5 80 4F 0A 7D 38 08 80 D2 0D 48 09 49 09 60 01
00000250  20 00 60 78 48 08 F7 FF FE 81 28 31 D1 03 7D 38
00000260  23 02 43 18 75 38 BC 80 BC 08 47 18 01 FF 09 8C
00000270  01 FF 09 B0 EA 00 CC BE 01 FF 09 90 47 00 47 08
00000280  47 10 47 18 47 20 47 28 47 30 47 38 43 50 4D 20
00000290  52 65 76 20 5A 38 42 30 30 31 30 30 00 00 00 00
000002A0  E5 9F C0 00 E1 2F FF 1C 01 FF 00 01 00 00 00 00
000002B0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000002C0  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000002D0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000002E0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000002F0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000300  FF FF FF 13 00 00 64 93 FF FF FF FF FF FF FF FF   <--- checksum = 0x00006493
00000310  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000320  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000330  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000340  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000350  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000360  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000370  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000380  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
00000390  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000003A0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000003B0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000003C0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000003D0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000003E0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
000003F0  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF

The sector count starts at max sector and decrements to 0 at the final sector.

There is a 32-bit checksum at the end of each 0x100-byte block of data. This checksum is computed by adding the preceding 0x104 bytes (0x100-byte data + 4-byte header).

It should be possible to verify the integrity of microcode.bin by validating the checksum of each sector and confirming that the padding is 0xFF. I'll write a simple tool to do this.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 8th, 2024, 1:57 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
I don't understand where microcode.bin is located on the drive.

If this is the PCB ...

https://dsmcz.com/prestashop/16356/chip-2p00f6m4b62394za21005-hts428040f9at00-40gb-25-ide.jpg

... then the controller (IC5) has only 256KB of flash memory. This can accommodate original.bin (208KB) but not microcode.bin (416KB).

S3F443FX, Samsung, 16/32-Bit RISC Microcontroller, 1.8V core, 3.3V I/O, 256KB Flash (64K x 32-bit) , 8KB SRAM (2K x 32-bit) , 64-LQFP:
https://pdf1.alldatasheet.com/datasheet-pdf/download/111459/SAMSUNG/S3F443FX.html


Edit:

I notice that a file of the same size and structure as original.bin can be created by stripping out the 0x100-byte data blocks from microcode.bin in reverse order. I'll do this, too.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 8th, 2024, 2:23 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
AFAICT, original.bin is a raw dump of the 256KB embedded flash. I'm wondering whether microcode.bin is a loader created by PC3K from the raw flash dump, in which case there would be no point in examining it.

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 8th, 2024, 6:06 
Offline

Joined: December 6th, 2012, 8:49
Posts: 290
Location: españa
fzabkar wrote:
AFAICT, original.bin is a raw dump of the 256KB embedded flash. I'm wondering whether microcode.bin is a loader created by PC3K from the raw flash dump, in which case there would be no point in examining it.

That is correct, Frank

"Upon completion of the reading procedure the utility generates two files: «Original.bin» and «Microcode.bin». The first file contains a binary ROM image. The second is used to store compiled microcode required for the «Write HDD microcode» command".


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 8th, 2024, 12:29 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
I found a Lenovo firmware update, version A75A for HTS4240xxM9AT00. It updates several SA modules, but not the ROM. :-(

Perhaps you could look for other firmware updates?

BTW, I thought you wanted to check the NVRAM?

_________________
A backup a day keeps DR away.


Top
 Profile  
 
 Post subject: Re: HITACHI DK23FA-40 microcode
PostPosted: March 9th, 2024, 16:47 
Offline
User avatar

Joined: September 8th, 2009, 18:21
Posts: 15538
Location: Australia
Is 50 EUR too much for a complete drive? It appears to be a different firmware version, though.

https://drive-for-parts.com/HTS428040F9AT00-PN-HTS428040F9AT00-HITACHI-IDE-HARD-DRIVE-D1122

_________________
A backup a day keeps DR away.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 121 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group