SAMSUNG HM321HI 固件
此固件是从一块有问题的盘上来的。此盘从32000000处开始就出现很多坏道,大概有10M左右,以后就是好的。然后,盘的最后面一点点又出现一些坏道,但不多。用mhdd erase不起作用,有时刚修好的部分,过几天相同的位置又出现坏道了。以下是我读固件的工具。固件中有两个文件一个是BI_SCRPT.08,这是burn-in脚本,一个是BINEWSCR.99(new burn-in脚本)。前一个在winhex中看,全是0。是一个空文件。我把后一个改名为BI_SCRPT.08,然后回写进去。给硬盘断电后,重新通电,结果是什么也没发生。只是BI_SCRPT.08的后面可以看得懂的内容全不见了。这说明硬盘自检没有被激活。BINEWSCR.99用记事本是可以打开的。后面是用C语言写的程序,看不太懂,请高手指教。部份内容如下(全部内容附件中自己打开看):
*****************************************************************************
//
//Project: SHOS2
//
//Copyright (C) 2007/2008 Samsung Electronics
//
//All Rights Reserved.
//
// *****************************************************************************
//=============================================================================
//! \shos\Selftest\BiParam\m7\24\BiScript.c
//! @brief <brief module description>
//!
//! <detail module description>
//!
//! @author <email address>
//!
//=============================================================================
//=============================================================================
//
// This software is the confidential and proprietary information
// of Samsung Electronics, Inc. ("Confidential Information").You
// shall not disclose such Confidential Information and shall use
// it only in accordance with the terms of the license agreement
// you entered into with Samsung.
//
//=============================================================================
//-----------------------------------------------------------------------------
//#includes
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
//#defineconstants
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// MacroInlines functions
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Type defines-- or class
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Data definition
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// Public function definitions (extern)
//-----------------------------------------------------------------------------
#define BI_SCRIPT_MAJOR_REV 1
#define BI_SCRIPT_MINOR_REV 06
//============================================================================================================================
//= Module: BiScript.c
//=
//= M7 platform 24 BI Script
//=
//============================================================================================================================
//= HISTORY
//=
//= Rev. Date By Reason
//= ======== ========== =========== ==========================================================================================
//1.04 2/17 Qlin Set up for tone scan, enable gapfill & tone scan.
//1.03 12/02 Qlin Correct last rev: enable servo head_gap. Leave the init_head_gap on.
//1.02 12/01 Qlin Disable head_gap in function for now.
//1.01 11/10 crhawks Initial paste - M7_25 sript modified with F3_84 changes?
////*********** brought over from platform 25 ***************
//1.06 10/21 Jonathan NEW AZL Revision 2 added (variable FDT)
//1.05 10/14 Qlin Added IAD: gete_osa_osd, linear, rco16,
//1.04 10/14 Qlin Added WPC and linear all wpc regs.
////*********** brought over from platform 20 ***************
//1.03 09/24 Qlin geo104x go back to default_acq as 28.
//1.02 09/17 Qlin default_acq not used; hard code now as 22 due to zone layout. M7S1 pf78 does same thing.
// We will consolidate later as zone layout is more stable and define as constant.
//1.01 09/04 CRHawks Updates from current Suwon DB - M7p75. Clean up commented out tests by commenting whole test.
//1.00 08/27 CRHawks Began clean up. Fix erase test to do 4 heads properly.
//============================================================================================================================
//============================================================================================================================
//= HISTORY - this is where I started 8/27/08 crh platform 20 - never updated on N3M7
//0.40 07/24 S Kang Add one more FOD TD1 to fix 0x2105 error and moved FOD screen test to right after the TD1 test
//0.39 01/29 CRHawks Add tests to improve RCO of MC (per Hung)
// Hung VO 1) MC RCO:
//
//0.38 01/29 CRHawks Move tBI_SINGLE_HEAD_SKEW_INPUT to main part after servo cal
//
//============================================================================================================================
#define X32 int
#define ZONE_MC (1<<0)
#define ZONE_0 (1<<0)
#define ZONE_1 (1<<1)
#define ZONE_2 (1<<2)
#define ZONE_3 (1<<3)
#define ZONE_4 (1<<4)
#define ZONE_5 (1<<5)
#define ZONE_6 (1<<6)
#define ZONE_7 (1<<7)
#define ZONE_8 (1<<8)
#define ZONE_9 (1<<9)
#define ZONE_10 (1<<10)
#define ZONE_11 (1<<11)
#define ZONE_12 (1<<12)
#define ZONE_13 (1<<13)
#define ZONE_14 (1<<14)
#define ZONE_15 (1<<15)
#define ZONE_16 (1<<16)
#define ZONE_17 (1<<17)
#define ZONE_18 (1<<18)
#define ZONE_19 (1<<19)
#define ZONE_20 (1<<20)
#define ZONE_21 (1<<21)
#define ZONE_22 (1<<22)
#define ZONE_23 (1<<23)
#define ZONE_24 (1<<24)
#define HEAD_0 (1<<0)
#define HEAD_1 (1<<1)
#define HEAD_2 (1<<2)
#define HEAD_3 (1<<3)
#define HEAD_4 (1<<4)
#define HEAD_5 (1<<5)
#define HEAD_6 (1<<6)
#define HEAD_7 (1<<7)
#define HEAD_8 (1<<8)
#define EVEN_HEADS 0x55 // even heads
#define ODD_HEADS 0xAA // odd heads
#define ALL_REAL_HEADS 0xFF // real for this drive
#define ALL_ZONES 0xFFFFFFFF
#define ALL_USER_ZONES 0xFFFFFFFE
#define ALL_HEADS 0xFF
#define HEAD_SELECT_MASK 0xFF // all heads
//#define HEAD_SELECT_MASK 0x55 // even heads
//#define HEAD_SELECT_MASK 0xAA // odd heads
//--- Number of user data zones to test
#define DATA_ZONE_TEST_MASK ALL_USER_ZONES// 24 zone process
#define AZL_RCO_ZONE_MASK ZONE_1 | ZONE_16 | ZONE_24
#define ARCO_ZONE_MASK ZONE_1 | ZONE_16 | ZONE_24 //ZONE_1 | ZONE_7 | ZONE_19 | ZONE_24
#define WPC_ZONE_MASK ZONE_1 | ZONE_5 | ZONE_9 | ZONE_17 | ZONE_24;
#define OSAD_ZONE_MASK ZONE_1 | ZONE_5 | ZONE_9 | ZONE_13 | ZONE_17 | ZONE_21 | ZONE_24
#define HTG_ZONE_MASK ZONE_1 | ZONE_3 | ZONE_7 | ZONE_11 | ZONE_16 | ZONE_20 | ZONE_23 | ZONE_24
#define WATE_OSAD_ZONE_MASK ZONE_1 | ZONE_13 | ZONE_24
#define PRE_SGRY_ZONE_TEST_MASK ZONE_17 | ZONE_18 | ZONE_19 | ZONE_20 | ZONE_21 | ZONE_22 | ZONE_23 | ZONE_24
#define MEAS_PES_ZONE_MASK ZONE_1 | ZONE_3 | ZONE_5 | ZONE_7 | ZONE_9 | ZONE_11 | ZONE_13 | ZONE_15 | ZONE_17 | ZONE_19 | ZONE_21 | ZONE_23
#define BPI_TEST_ZONE_MASK ZONE_1 | ZONE_6 | ZONE_11 | ZONE_16 | ZONE_22 | ZONE_24
#define FORCED_RCC_ZONE_MASK ALL_USER_ZONES
//#define FORCED_RCC_ZONE_MASK ZONE_1 | ZONE_2 | ZONE_3 | ZONE_4 | ZONE_14 | ZONE_15 | ZONE_16 | ZONE_17
//--- Number of user data heads to test
#define DATA_HEAD_TEST_MASK ALL_HEADS // all headed process
//#define DATA_HEAD_TEST_MASK HEAD_0 | HEAD_1 | HEAD_2
//--- MC Area Usage
#define MC_HEAD_TEST_MASK HEAD_0 | HEAD_1 | HEAD_2 // mc uses three heads
#define MC_START_CYL 0 //start of area used by MC
#define MC_END_CYL 63 //end of area used by MCBROKE - why?
#define ZONE_OR_CYL 0 //0 for zone mask, else use cylinder ranges
#define START_CYL 10 //start cylinder range
#define END_CYL 10 //end cylinder range
#define SINGLE_HEAD 0 //test head for tests that take single head
#define SINGLE_ZONE 3 //test zone for test that single zone
#define TEST_ZONE 0 //test zones
#define TEST_CYLINDER 1 //test cylinders
//--- OTE Test
//#define OTE_TEST_ZONE_MASK ZONE_1 | ZONE_24
#define OTE_TEST_ZONE_MASK ZONE_17 //merge2
//--- RAM TEST mode
//#define EN_RAMTEST_BUFFER_RAM 0x0001 // Buffer RAM
//#define EN_RAMTEST_CPU_ISRAM 0x0002 // CPU ISRAM
//#define EN_RAMTEST_CPU_DSRAM 0x0004 // CPU DSRAM
//#define EN_RAMTEST_ECC_BUFFER 0x0008 // ECC buffer
//#define EN_RAMTEST_SEQ_RAM 0x0010 // sequencer RAM
//#define EN_RAMTEST_LL_REG 0x0020 // Linked List Registers
//#define EN_RAMTEST_SERVO_WCS 0x0040 // Servo WCS
//#define EN_RAMTEST_SPIRAL_RAM 0x0080 // spiral RAM
//#define EN_RAMTEST_NLS 0x0100 // NLS
//#define EN_RAMTEST_PRAM 0x0200 // PRAM
//#define EN_RAMTEST_DT_RAM 0x0400 // DT RAM
//#define EN_RAMTEST_HOST_FIFO 0x0800 // SATA Host FIFO
//#define EN_RAMTEST_DF_FIFO 0x1000 // DF FIFO
#define EN_RAMTEST_MODES 0x1
#define NO_TOLERANCE_RESTORE 0x4 // Channel chip //merge2
#define RAMDOM_WRITE_OPERATION1
#define RANDOM_READ_OPERATION 2
//#define NUM_SVO_COPY_PASSES 5
//#define NUM_SVO_COPY_PASSES 4
//#define NUM_SVO_COPY_PASSES 2
//#define NUM_SVO_COPY_PASSES 30 // flag to do 3 heads, all individually
//#define NUM_SVO_COPY_PASSES 40 // flag to do 4 heads, all individually
#define NUM_SVO_COPY_PASSES 1
#define USER_PATTERN_ENABLE 1
#define RANDOM_PATTERN_ENABLE 0
#define RCO_PATTERN RANDOM_PATTERN_ENABLE
#define USER_PATTERN 0x00000000 //32bit pattern
#define CSS_INLINE_NONE 0
#define CSS_INLINE_ON 1
#define CSS_EMERGENCY 2
#include "biscript.h"
void main()
{
//enable serial output
tGLOBAL_SETTINGS_INPUT.globalFlags = GLOBAL_SETTINGS_SERIAL_OUTPUT;
tGLOBAL_SETTINGS_INPUT.alarmParkLimit = 800; // merge2 chg
tGLOBAL_SETTINGS_INPUT.alarmParkLimitByStep = 800; // 0 means no limit
tGLOBAL_SETTINGS_INPUT.resumeTime = 3600; // 0 = no automatic resume, n = wait seconds before resuming/continuing
BiCmd(tGLOBAL_SETTINGS_INPUT);
//::TEST::
tBI_SAVE_HEADSELECT_INPUT.headMask =HEAD_SELECT_MASK;
tBI_SAVE_HEADSELECT_INPUT.inlineKillFlag = EN_INLINE_KILL;
BiCmd(tBI_SAVE_HEADSELECT_INPUT);
//::TEST:: initialize the burnin
tBI_INIT_INPUT.majorScriptRevision = BI_SCRIPT_MAJOR_REV;
tBI_INIT_INPUT.minorScriptRevision = BI_SCRIPT_MINOR_REV;
tBI_INIT_INPUT.option = 0;// 0 = Fresh burnin run,1 = Burnin Rerun (preserve lists)
BiCmd(tBI_INIT_INPUT);
//::TEST:: perform memory diagnostics on SDRAM
tDIAGNOSE_COMMAND_INPUT.testloop = 1;
tDIAGNOSE_COMMAND_INPUT.testcnt = 1;
tDIAGNOSE_COMMAND_INPUT.testmode = EN_RAMTEST_BUFFER_DMA;
BiCmd(tDIAGNOSE_COMMAND_INPUT);
//-----------------------------------------------------------------------------
// Functional Begin
//-----------------------------------------------------------------------------
//::TEST:: initialize functional - start functional, save critical files outside MC, begin writing files to RAM while preparing MC
BiCmd(tFUNCTIONAL_SETUP_INPUT);
//::TEST:: shock sensor - noise
tSERVO_MEASUREMENT_INPUT.servoTest = SS_CHECK; // Latch Force Test
tSERVO_MEASUREMENT_INPUT.headMask = 0;// head mask for PES test
tSERVO_MEASUREMENT_INPUT.zoneMask = 0;// zone mask for PES test
tSERVO_MEASUREMENT_INPUT.mode = 0;
tSERVO_MEASUREMENT_INPUT.passCount = 0;
tSERVO_MEASUREMENT_INPUT.trackIterations = 0;
tSERVO_MEASUREMENT_INPUT.fileId = 0;
BiCmd(tSERVO_MEASUREMENT_INPUT); //
//::TEST:: shock sensor - presence
tSERVO_MEASUREMENT_INPUT.servoTest = SS_MEAS; // Latch Force Test
tSERVO_MEASUREMENT_INPUT.headMask = 0;// head mask for PES test
tSERVO_MEASUREMENT_INPUT.zoneMask = 0;// zone mask for PES test
tSERVO_MEASUREMENT_INPUT.mode = 0;
tSERVO_MEASUREMENT_INPUT.passCount = 0;
tSERVO_MEASUREMENT_INPUT.trackIterations = 0;
tSERVO_MEASUREMENT_INPUT.fileId = 0;
BiCmd(tSERVO_MEASUREMENT_INPUT); //
//::TEST:: reload read channel - initialize read channel
tRELOAD_READ_CHANNEL.option = RELOAD_CHANNEL_DEFAULT;
BiCmd(tRELOAD_READ_CHANNEL);
//::TEST:: adaptive preamp gain for MC
tBI_PAGAIN_OPTIMIZE_INPUT.headMask = ALL_HEADS;
tBI_PAGAIN_OPTIMIZE_INPUT.zoneMask = AZL_RCO_ZONE_MASK; //== needs to be changed once we move out of two zone mode
tBI_PAGAIN_OPTIMIZE_INPUT.refZone = 16;
BiCmd(tBI_PAGAIN_OPTIMIZE_INPUT);
//-----------------------------------------------------------------------------
// (Functional test) Servo calibrations
//-----------------------------------------------------------------------------
//::TEST:: servo calibration - clpd
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_CLPD_LIN;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - resonance ID
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_RESO;
tSERVO_DIAG_INPUT.headMask= MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask= ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - bias
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_BIAS;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - kt
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_KT;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - np offset
// tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_NP_OFFSET;
// tSERVO_DIAG_INPUT.headMask= MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
// tSERVO_DIAG_INPUT.zoneMask= ALL_ZONES;
// tSERVO_DIAG_INPUT.testMode = 0;
// BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - ab slope
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_AB_SLOPE;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - clpd
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_CLPD_LIN;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - loop gain
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_LOOP_GAIN;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - RRO1x
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_RRO1X;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.thresHold = 570;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - resonance ID
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_RESO;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - slpd bump slope
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_SLPDBUMP;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 0;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - head skew
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_HEAD_SKEW;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 1;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - head gap
tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_HEAD_GAP;
tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
tSERVO_DIAG_INPUT.testMode = 1;
BiCmd(tSERVO_DIAG_INPUT);
//::TEST:: servo calibration - slpd bump slope
// tSERVO_DIAG_INPUT.calibTest = SERVO_CALIB_SLPDBUMP;
// tSERVO_DIAG_INPUT.headMask = MC_HEAD_TEST_MASK | DATA_HEAD_TEST_MASK;
// tSERVO_DIAG_INPUT.zoneMask = ALL_ZONES;
// tSERVO_DIAG_INPUT.testMode = 0;
// BiCmd(tSERVO_DIAG_INPUT);
tDC_ERASE2_INPUT.dataOrServo = ERASE2_DATA_TRACKS;
tDC_ERASE2_INPUT.eraseOption = ERASE2_0_PERCENT | ERASE2_50_PERCENT; // | ERASE_RCC;
tDC_ERASE2_INPUT.errorCount = 0; // 0 means don't fail // merge2
tDC_ERASE2_INPUT.zoneOrCylinder = TEST_ZONE;
tDC_ERASE2_INPUT.zoneMask = ZONE_MC;
tDC_ERASE2_INPUT.startCylinder = MC_START_CYL;
tDC_ERASE2_INPUT.endCylinder = MC_END_CYL;
tDC_ERASE2_INPUT.extraErasePositiveCyls = 0;
tDC_ERASE2_INPUT.extraEraseNegativeCyls = 0;
tDC_ERASE2_INPUT.thirdPassHds = 0;// clear out settings that may not be used
tDC_ERASE2_INPUT.fourthPassHds = 0;
tDC_ERASE2_INPUT.fifthPassHds = 0;
tDC_ERASE2_INPUT.thirdPassServoingHd = 0;
tDC_ERASE2_INPUT.fourthPassServoingHd = 0;
tDC_ERASE2_INPUT.fifthPassServoingHd = 0;
thanks for sharing 感谢楼主分享 感谢分享,慢慢学习中..... 看看!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! спачибо THANKS FRIEND
页:
[1]