//****************************************************************************
//                   INTEL CORPORATION PROPRIETARY INFORMATION
//       This software is supplied under the terms of a license agreement or
//       nondisclosure agreement with Intel Corporation and may not be copied
//       or disclosed except in accordance with the terms of that agreement.
//         Copyright (c) 2010 - 2017 Intel Corporation. All Rights Reserved.
//****************************************************************************
//
//  TITLE: Master.CFG             DATE CREATED:  04/13/2017
//****************************************************************************
//  Revision History:
//
//****************************************************************************

CONFIGURATION   "Master.cfg, Rev 1.14"
DISPLAY         "S2600CW platform FRU & SDR package version 1.14"

// Detect Product ID***********************************************************
PROBE           "BASEBOARD_PRODID" "71"
FOUND           "CWP"  ""

IFSET "CWP"
	// Determine if this is a S2600CW or a S2600CWR board
	FRUNAME     "SYSTEM"
	FRUADDRESS  0
	FRUAREA "BOARD" VALIDATE "BB_FRU_IPMI"
	IFSET "BB_FRU_IPMI"
		PROBE FRUFIELD "PN" "S2600CWR"
		FOUND "CWR_FRU_PN" ""
		IFSET "CWR_FRU_PN"
			SET "S2600CWR"
			DISPLAY "S2600CWR"
		ENDIF	
		PROBE FRUFIELD "PN" "S2600CW"
		FOUND "CW_FRU_PN" ""
		IFSET "CW_FRU_PN"
			SET "S2600CW"
			DISPLAY "S2600CW"
		ENDIF		
	ELSE
		DISPLAY "No Valid Baseboard FRU detected!"
		SET "NO_CW_FRU"		
	ENDIF
	
	DISPLAY		""
	IFSET "S2600CWR"
		DISPLAY "Intel(R) Server Board S2600CWR platform"
	ELSE
		IFSET "S2600CW"
			DISPLAY "Intel(R) Server Board S2600CW platform"
		ENDIF
	ENDIF
ELSE
    DISPLAY ""
    DISPLAY "This is either the incorrect FRU/SDR package for this baseboard"
    DISPLAY "or your platform ID is incorrectly programmed."
    ERRORLEVEL 01
ENDIF

DISPLAY         "Copyright (c) 2010 - 2017 Intel Corporation"
DISPLAY         " "

//If it's for factory use, please un-comment FACTORY_MODE tag
//SET "FACTORY_MODE"

IFSET "FACTORY_MODE"
    SET "SDR"
ELSE
    //Set auto-detection tag, now comment it before auto-detection implemented
    SET "AUTO_DETECTION"

    //Set user selection
    //SET "USER_SELECT"

    MENUTITLE   "Select the function you desire to perform:"
    MENU        "SDR"   "Update only the SDR repository"
    MENU        "FRU"   "Update only the FRU repository"
    MENU        "BOTH"  "Update both the FRU and the SDR repository"
    MENU        "ASSET" "Modify the Product Asset Tag"
    MENU        "EXIT1" "Exit"
    MENUPROMPT
    DISPLAY " "
ENDIF
IFSET "EXIT1"
    DISPLAY "Exit without making any changes"
ELSE
    // Set both FRU and SDR
    IFSET "BOTH"
        SET "SDR"
        SET "FRU"
    ENDIF
    IFSET   "ASSET"
        FRUNAME     "SYSTEM"
        FRUADDRESS  "IMBDEVICE" FF 20
        FRUAREA     "PRODUCT"
        FRUFIELD    "AT" "@STDIN:ASCII"
    ELSE//ASSET
        IFSET "SDR"
        //Detect Module{{{-----------------------------------------------------------------------------------------
        // HSBP Check----------------------------------------------------------------------------------------------
        // Detect HSBP1
		DISPLAY ""
		DISPLAY "Detecting HSBP, please wait a moment."
            // HSBP Check----------------------------------------------------------------------------------------------
            // Detect HSBP1
            PROBE "PING"    "08"    "D0"
            FOUND "HSBP1_PR"     ""
            IFSET   "HSBP1_PR"
                FRUNAME "SYSTEM"
                FRUADDRESS 05
                FRUAREA "BOARD" VALIDATE HSBP_CK11
                IFSET HSBP_CK11
                    FRUAREA "BOARD"
                    PROBE FRUFIELD "PN" "FUP4X35S3HSBP"
                    FOUND "HSBP_35_BP4_1" ""
                    PROBE FRUFIELD "PN" "FXX8X25PCIHSBP"
                    FOUND "HSBP_25E_BP8_Combo1" ""				
                    PROBE FRUFIELD "PN" "FXX8X25S3HSBP"
                    FOUND "HSBP_25E_BP8_SAS1" ""
                ENDIF
                // Detect HSBP2
                PROBE "PING"    "08"    "D2"
                FOUND "HSBP2_PR"     ""
                IFSET   "HSBP2_PR"
                    FRUNAME "SYSTEM"
                    FRUADDRESS 06
                    FRUAREA "BOARD" VALIDATE HSBP_CK21
                    IFSET HSBP_CK21
                        FRUAREA "BOARD"
                        PROBE FRUFIELD "PN" "FUP4X35S3HSBP"
                        FOUND "HSBP_35_BP4_2" ""
                        PROBE FRUFIELD "PN" "FXX8X25PCIHSBP"
                        FOUND "HSBP_25E_BP8_Combo2" ""
                        PROBE FRUFIELD "PN" "FXX8X25S3HSBP"
                        FOUND "HSBP_25E_BP8_SAS2" ""
                    ENDIF
                ENDIF //ENDIF "HSBP2_PR"
            ENDIF //ENDIF "HSBP1_PR"
			
			
		IFSET   "HSBP1_PR"
			//HSBP1 is detected.
			IFSET   "HSBP2_PR"
				//HSBP2 is detected.
				SET "BOTH_HSBP_FRU"
			ENDIF
		ELSE
			IFSET   "HSBP2_PR"
				//HSBP2 is detected.
			ELSE
				SET "NO_HSBP_FRU"
				DISPLAY ""
				DISPLAY "Hot Swap Backplane is not detected."
			ENDIF
		ENDIF				
			
			
			IFSET   "HSBP1_PR"
                IFSET "HSBP_35_BP4_1"
					SET "HSBP_1_BP4"
                    DISPLAY ""
                    DISPLAY "4 X 3.5 Hot Swap Backplane 1 is detected."
                ELSE
                    IFSET "HSBP_25E_BP8_Combo1"
						//SET "HSBP_1_BP8Combo"
						//SET "HSBP_1_BP8"
                        DISPLAY ""
                        DISPLAY "8 X 2.5 Combo Hot Swap Backplane 1 is detected."
                    ELSE
                        IFSET "HSBP_25E_BP8_SAS1"
                            SET "HSBP_1_BP8"
                            DISPLAY ""
                            DISPLAY "8 X 2.5 SAS/SATA Hot Swap Backplane 1 is detected."
                        ELSE
							DISPLAY ""
                            DISPLAY "Hot Swap Backplane 1 FRU is invalid."
                        ENDIF
                    ENDIF
                ENDIF
            ENDIF
                
			IFSET   "HSBP2_PR"
                IFSET "HSBP_35_BP4_2"
					SET "HSBP_2_BP4"
                    DISPLAY ""
                    DISPLAY "4 X 3.5 Hot Swap Backplane 2 is detected."
                ELSE
                    IFSET "HSBP_25E_BP8_Combo2"
						//SET "HSBP_2_BP8Combo"
						//SET "HSBP_2_BP8"
                        DISPLAY ""
                        DISPLAY "8 X 2.5 Combo Hot Swap Backplane 2 is detected."
                    ELSE
                        IFSET "HSBP_25E_BP8_SAS2"
                            SET "HSBP_2_BP8"
                            DISPLAY ""
                            DISPLAY "8 X 2.5 SAS Only Hot Swap Backplane 2 is detected."
                        ELSE
							DISPLAY ""
                            DISPLAY "Hot Swap Backplane 2 FRU is invalid."
                        ENDIF
                    ENDIF
                ENDIF
            ENDIF
	
	        
    // SAS_IOC_Down_TEMP Check----------------------------------------------------------------------------------------------
    // Detect SAS_IOC_Down_TEMP
    PROBE "PING" "0D" "90"
        FOUND "SAS_IOC_Down_TEMP"
	
	// Check for MIC card(s) installed -------------------------------------------------------------------------------------
	
			// Is riser 1 installed with a FRU device?                
			PROBE "IMBDEVICE" "14"
			FOUND "MIC_1_FRU" ""

			IFSET "MIC_1_FRU"
				SET "MIC1_PRESCENT"
			ENDIF
                    
			// Is riser 2 installed with a FRU device?                
			PROBE "IMBDEVICE" "15"
			FOUND "MIC_2_FRU" ""

			IFSET "MIC_2_FRU"
				SET "MIC2_PRESCENT"
			ENDIF
			
			// Is riser 3 installed with a FRU device?                
			PROBE "IMBDEVICE" "16"
			FOUND "MIC_3_FRU" ""

			IFSET "MIC_3_FRU"
				SET "MIC3_PRESCENT"
			ENDIF

			// Is riser 4 installed with a FRU device?                
			PROBE "IMBDEVICE" "17"
			FOUND "MIC_4_FRU" ""

			IFSET "MIC_4_FRU"
				SET "MIC4_PRESCENT"
			ENDIF

        // Power Supply Check -------------------------------------------------------------------------------------
        // Detect PS1
        PROBE "PING"          "0F"      "B0"
        FOUND "PS1"           ""
        IFSET   "PS1"
            PROBE "IMBDEVICE" "02"
            FOUND "PS1_FRU" "PS1_NO_FRU"
            IFSET "PS1_FRU"
                FRUNAME "SYSTEM"
                FRUADDRESS 02
                FRUAREA "PRODUCT" VALIDATE PS1_FRU_IPMI
                IFSET PS1_FRU_IPMI
                    FRUAREA "PRODUCT"
                    PROBE FRUFIELD "PN" "DPS-750XB A"
                    FOUND "750_PS1" ""
					IFSET 750_PS1
						SET "STICKY_750_PS1"
						CLEAR "STICKY_1600_PS1"
					ENDIF
                
                    PROBE FRUFIELD "PN" "IS162F22"
                    FOUND "1600_PS1" ""
					IFSET 1600_PS1
						SET "STICKY_1600_PS1"
						CLEAR "STICKY_750_PS1"
					ENDIF
                ENDIF//PS1_FRU_IPMI
            ENDIF//PS1_FRU
        ENDIF//PS1
        
        // Power Supply Check -------------------------------------------------------------------------------------
        // Detect PS2
        PROBE "PING"          "0F"      "B2"
        FOUND "PS2"           ""
        IFSET   "PS2"
            PROBE "IMBDEVICE" "03"
            FOUND "PS2_FRU" "PS2_NO_FRU"
            IFSET "PS2_FRU"
                FRUNAME "SYSTEM"
                FRUADDRESS 03
                FRUAREA "PRODUCT" VALIDATE PS2_FRU_IPMI
                IFSET PS2_FRU_IPMI
                    FRUAREA "PRODUCT"
                
                    PROBE FRUFIELD "PN" "DPS-750XB A"
                    FOUND "750_PS2" ""
					IFSET 750_PS2
						SET "STICKY_750_PS2"
						CLEAR "STICKY_1600_PS2"
					ENDIF
                
                    PROBE FRUFIELD "PN" "IS162F22"
                    FOUND "1600_PS2" ""
					IFSET 1600_PS2
						SET "STICKY_1600_PS2"
						CLEAR "STICKY_750_PS2"
					ENDIF
                ENDIF//PS2_FRU_IPMI
            ENDIF//PS2_FRU
        ENDIF//PS2
        
        // Power Supply Check -------------------------------------------------------------------------------------
        IFSET   "PS1" "PS2"
           SET "STICKY_PS_REDUNDANCY"
        ENDIF //"PS1" "PS2"
        
        IFSET   "PS1"
            IFSET "STICKY_750_PS1"
                SET "EATEMP"
                DISPLAY ""
                DISPLAY "750W Power Supply 1 is detected."
            ELSE//STICKY_750_PS1
                IFSET "STICKY_1600_PS1"
                    SET "EATEMP"
                    DISPLAY ""
                    DISPLAY "1600W Power Supply 1 is detected."
                ENDIF//STICKY_1600_PS1
            ENDIF//STICKY_750_PS1
        ENDIF//PS1
        
        IFSET   "PS2"
            IFSET "STICKY_750_PS2"
                SET "EATEMP"
                DISPLAY ""
                DISPLAY "750W Power Supply 2 is detected."
            ELSE//STICKY_750_PS2
                IFSET "STICKY_1600_PS2"
                    SET "EATEMP"
                    DISPLAY ""
                    DISPLAY "1600W Power Supply 2 is detected."
                ENDIF//STICKY_1600_PS2
            ENDIF//STICKY_750_PS2
        ENDIF//PS2
        

        // Detect NON PSU
        IFSET "PS1"
        //PS1
        ELSE //PS1
            IFSET "PS2"
            //PS2
            ELSE //PS2
                SET "NON_PSU"
            ENDIF //PS2
        ENDIF//PS1
        
		// System Fan Check----------------------------------------------------------------------------------------------
		PROBE "FAN_SIGNAL" 00 01
		FOUND "SYS_FAN_P1" ""
		PROBE "FAN_SIGNAL" 01 01
		FOUND "SYS_FAN_P2" ""
		PROBE "FAN_SIGNAL" 02 01
		FOUND "SYS_FAN_P3" ""
		PROBE "FAN_SIGNAL" 03 01
		FOUND "SYS_FAN_P4" ""
		PROBE "FAN_SIGNAL" 04 01
		FOUND "SYS_FAN_P5" ""				
		
		IFSET "SYS_FAN_P1" "SYS_FAN_P2" "SYS_FAN_P3" "SYS_FAN_P4" "SYS_FAN_P5"
				SET "UPM_Red_Fan"
		ELSE
		
        PROBE "FAN_SIGNAL" 00 00
        FOUND "FAN_P1_120" ""
        PROBE "FAN_SIGNAL" 01 00
        FOUND "FAN_P2_120" ""										
								
        IFSET "FAN_P1_120" "FAN_P2_120"
            SET "UPM_No_Red_Fan"
        ENDIF
			
		ENDIF
        //Detect Module}}}----------------------------------------------------------------------------------------
         
            // Set auto-detection
            IFSET "AUTO_DETECTION"
         
                // Check SKUS
                // Check Front Panel FRU
                PROBE "IMBDEVICE" "04"
                FOUND "FP_CK2" ""
                IFSET "FP_CK2"
                    FRUNAME "SYSTEM"
                    FRUADDRESS 04
                    FRUAREA "BOARD" VALIDATE FP_CK3
                    IFSET FP_CK3
                        FRUAREA "BOARD"
                        PROBE FRUFIELD "PN" "FFPANEL"
                        FOUND   "SKUS_Temp" ""
						
						IFSET "SKUS_Temp" "UPM_No_Red_Fan"
							SET "SKUS"
						ELSE
							IFSET "SKUS_Temp" "UPM_Red_Fan"
								SET "SKUS"
							ELSE
								DISPLAY ""
								DISPLAY "Fan configuration is not valid"
								SET "OTHER"
							ENDIF// "SKUS_Temp" "UPM_Red_Fan"
						ENDIF// "SKUS_Temp" "UPM_No_Red_Fan"
                    ENDIF // FP_CK3
                ELSE//FP_CK2
                    DISPLAY ""
                    DISPLAY "Front Panel FRU is not detected"
                    SET "OTHER"
                ENDIF//FP_CK2
            
                // Check all fans 
                IFSET "SKUS"
					
					IFSET "NON_PSU" "UPM_No_Red_Fan"
						SET "UPM_No_Red"
						DISPLAY ""
						DISPLAY "Intel(R) Server Chassis P4000 Non Redundant Fan SKU"
					ELSE//NON_PSU
						IFSET "UPM_Red_Fan"
							SET "UPM_Red"
							DISPLAY ""
							DISPLAY "Intel(R) Server Chassis P4000 Redundant Fan SKU"
						ENDIF
					ENDIF//NON_PSU
                    

                        IFSET "UPM_Red"
							IFSET "BOTH_HSBP_FRU"
								SET "UPM_Red_P4016"
							ELSE
								SET "UPM_Red_P4008"
							ENDIF
                        ELSE//UPM_Red
                            IFSET "UPM_No_Red"
								IFSET "BOTH_HSBP_FRU"
									SET "UPM_No_Red_P4016"
								ELSE
									SET "UPM_No_Red_P4008"										
								ENDIF
                            ELSE//UPM_No_Red
                                DISPLAY ""
                                DISPLAY "Power Supply Unit or Fan configuration is not valid, falling back to user selection as auto-detection is not possible."
                                SET "USER_SELECT"
                                CLEAR "OTHER_SKU"
                                CLEAR "UPM_No_Red"
                                CLEAR "UPM_Red"
                            ENDIF//UPM_No_Red
                        ENDIF //UPM_Red
                ELSE//SKUS
                    SET "OTHER_SKU"
                ENDIF //"SKUS"
                
                IFSET "OTHER_SKU"
                    DISPLAY ""
                    DISPLAY "SDR auto-update failed due to chassis type could not be detected."
                    DISPLAY ""      
                    DISPLAY "Falling back to Other Chassis. Please update SDR by legacy process."
                ENDIF//OTHER_SKU

            ENDIF // "AUTO_DETECTION"

            // Set User select
            IFSET "USER_SELECT"
			    SET "AUTO_CFG_ERR_CHASSIS_DETECT"
                DISPLAY ""
                MENUTITLE   "Select the SKUs:"
				MENU    "UPM_Red"              "Intel(R) Server Chassis P4000 Redundant Fan SKU"
                MENU    "UPM_No_Red"           "Intel(R) Server Chassis P4000 Non Redundant Fan SKU"
				//MENU    "TEST_PLATE"           "Open Test Plate"
                MENU    "OTHER"                "Other Chassis"
                MENUPROMPT
                DISPLAY ""
            ENDIF //"USER_SELECT"
            
            IFSET "FACTORY_MODE"
                DISPLAY     ""
                MENUTITLE   "Select the Chassis:"
                MENU        "SHIP"      "Only Shipping use"
                MENU        "FCT"       "Only for FCT use"
                MENU        "FCT2"      "Only for FCT2 use"
                MENUPROMPT
                DISPLAY     ""
            ENDIF //"FACTORY_MODE"

            IFSET "OTHER"
			    SET "AUTO_CFG_ERR_CHASSIS_DETECT"
                DISPLAY     ""
                DISPLAY     "The options provided are intended for OEMs and system integrators to allow the"
                DISPLAY     "thermal control of fans in a third-party chassis. OEMs and system integrators"
                DISPLAY     "must perform their own thermal testing for any changes made using these"
                DISPLAY     "options. Intel cannot provide support for any changes made to fan settings to"
                DISPLAY     "support third-party chassis. Third-party chassis vendors may have recommended"
                DISPLAY     "settings for these configuration options for specific chassis."
                DISPLAY     " "
                DISPLAY     "INTEL ASSUMES NO RESPONSIBILITY FOR UNDESIRED RESULTS WHEN USING ANY CUSTOM FAN CONTROL CONFIGURATION ON INTEL(R) SERVER PRODUCTS"
                DISPLAY     " "
            ENDIF //"OTHER"
            
           
            //Set SDR tags for items that are standard on specific SKU *******************************

			SET "DISABLE_NVME_FUNCTIONS"
			CLEAR "ENABLE_NVME_FUNCTIONS"
            
            //Intel(R) Server Chassis UPM_Red Fan SKU ----------------------------------------------------
            IFSET "UPM_Red"
                //System Fans
                SET "STICKY_FAN_1"
                SET "STICKY_FAN_2"
                SET "STICKY_FAN_3"
                SET "STICKY_FAN_4"
                SET "STICKY_FAN_5"
                SET "STICKY_UPM_Red_HS_FAN"
				
                
                //Processor
                SET "PROC_1"
                PROBE "PROCESSOR" 2
                FOUND "PROC_2"         ""
                
                //Front Panel Temp
                SET "FP_TEMP"

                //Chassis intrusion
                SET "CHASSIS_INTRU"

                //Front panel NMI
                SET "FP_NMI"
                
                
            ENDIF //IFSET "UPM_Red"
            

            //UPM_No_Red SKU             
            IFSET "UPM_No_Red"
                
                //System Fans
                SET "FAN_120_1"
                SET "FAN_120_2" 
                
                //Processor
                SET "PROC_1"
                PROBE "PROCESSOR" 2
                FOUND "PROC_2"         ""
                
                //Front Panel Temp
                SET "FP_TEMP"
                
                //Chassis intrusion
                SET "CHASSIS_INTRU"
                
                //Front panel NMI
                SET "FP_NMI"
                               
            ENDIF//END UPM_No_Red

			//OTHER chassis ----------------------------------------------------------------------------
            IFSET "OTHER"
                //System Fans
                DISPLAY ""
                PROMPT "Is System Fan 1 installed?"
                YES "OTHER_FAN_1"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 2 installed?"
                YES "OTHER_FAN_2"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 3 installed?"
                YES "OTHER_FAN_3"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 4 installed?"
                YES "OTHER_FAN_4"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 5 installed?"
                YES "OTHER_FAN_5"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 6 installed?"
                YES "OTHER_FAN_6"
                NO ""
                DISPLAY ""
                PROMPT "Is CPU Fan 1 installed?"
                YES "PROC1_FAN"
                NO ""
                DISPLAY ""
                PROMPT "Is CPU Fan 2 installed?"
                YES "PROC2_FAN"
                NO ""
                DISPLAY ""
                PROMPT "Is Rear Fan installed?"
                YES "OTHER_REAR_FAN"
                NO ""

                //Power Supply Module 1 & 2
                CLEAR "STICKY_PS_REDUNDANCY"
                CLEAR "EATEMP"
                CLEAR "STICKY_750_PS1"
                CLEAR "STICKY_750_PS2"
                CLEAR "STICKY_1600_PS1"
                CLEAR "STICKY_1600_PS2"
                
                //Processor
                SET "PROC_1"
                PROBE "PROCESSOR" 2
                FOUND "PROC_2"         ""
                
                //Chassis intrusion
                DISPLAY ""
                PROMPT "Does the system have chassis intrusion?"
                YES "CHASSIS_INTRU"
                NO "NO_CHASSIS_INTRU"
                
                //Front panel NMI
                DISPLAY ""
                PROMPT "Does the front panel support a NMI button?"
                YES "FP_NMI"
                NO  ""

            ENDIF //IFSET "OTHER"
			
            //Shipping ---------------------------------------------------------------------------------
            IFSET "SHIP"
                //Power Supply Module 1 & 2
                CLEAR "STICKY_PS_REDUNDANCY"
                CLEAR "EATEMP"
                CLEAR "STICKY_750_PS1"
                CLEAR "STICKY_750_PS2"
                CLEAR "STICKY_1600_PS1"
                CLEAR "STICKY_1600_PS2"
                 
                //HSBP 1/2/3 
                CLEAR "HSBP_1_BP4"
                CLEAR "HSBP_1_BP8"
                CLEAR "HSBP_2_BP4"
                CLEAR "HSBP_2_BP8"

                //Chassis intrusion
                SET "NO_CHASSIS_INTRU"

            ENDIF //IFSET "SHIP"

			//TEST_PLATE --------------------------------------------------------------------------------------
			IFSET   "TEST_PLATE"
				CLEAR "CHASSIS_INTRU"
				SET "NO_CHASSIS_INTRU"
				SET "FP_NMI"
			ENDIF
			
            //FCT --------------------------------------------------------------------------------------
            IFSET "FCT"
                //System Fans
                SET "FCT_FAN_6"
                SET "PROC1_FAN"
                SET "PROC2_FAN"
                SET "OTHER_REAR_FAN"
                SET "STICKY_FAN_1"
                SET "STICKY_FAN_2"
                SET "STICKY_FAN_3"
                SET "STICKY_FAN_4"
                SET "STICKY_FAN_5"
                
                //Power Supply Module 1 & 2
                SET "STICKY_PS_REDUNDANCY"
                CLEAR "EATEMP"
                SET "STICKY_750_PS1"
                SET "STICKY_750_PS2"
                CLEAR "STICKY_1600_PS1"
                CLEAR "1200_PS2"

                //HSBP 1/2/3 
                CLEAR "HSBP_1_BP4"
                CLEAR "HSBP_1_BP8"
                CLEAR "HSBP_2_BP4"
                CLEAR "HSBP_2_BP8"
                
                //Processor
                SET "PROC_1"
                SET "PROC_2"
                
                //Chassis intrusion
                SET "CHASSIS_INTRU"
                
            ENDIF //IFSET "FCT"

            //FCT2 -------------------------------------------------------------------------------------
                IFSET "FCT2"
                //System Fans
                SET "FCT_FAN_6"
                SET "PROC1_FAN"
                SET "OTHER_REAR_FAN"
                SET "STICKY_FAN_1"
                SET "STICKY_FAN_2"
                SET "STICKY_FAN_3"
                SET "STICKY_FAN_4"
                SET "STICKY_FAN_5"
                
                //Power Supply Module 1 & 2
                CLEAR "STICKY_PS_REDUNDANCY"
                CLEAR "EATEMP"
                SET "STICKY_750_PS1"
                CLEAR "STICKY_750_PS2"
                CLEAR "STICKY_1600_PS1"
                CLEAR "STICKY_1600_PS2"
                
                //HSBP 1/2/3 
                CLEAR "HSBP_1_BP4"
                CLEAR "HSBP_1_BP8"
                CLEAR "HSBP_2_BP4"
                CLEAR "HSBP_2_BP8"
                
                //Processor
                SET "PROC_1"

                //Chassis intrusion
                SET "CHASSIS_INTRU"

            ENDIF //IFSET "FCT2"

		// Clear temp tags used for setting STICKY tags (i.e. Power Supply tags).
		// This prevents Auto-Config from updating SDRs unnecessarily when a PS is removed.
		// NOTE: This feature only works on BMC FW 0.23 or later
		CLEAR "PS1_FRU"
		CLEAR "PS1_NO_FRU"
		CLEAR "PS2_FRU"
		CLEAR "PS2_NO_FRU"		
		CLEAR "PS1_FRU_IPMI"
		CLEAR "PS2_FRU_IPMI"
		CLEAR "PS1"
		CLEAR "PS2"
		CLEAR "750_PS1"
		CLEAR "1600_PS1"
		CLEAR "750_PS2"
		CLEAR "1600_PS2"

            SDRNAME "S2600CW.sdr"        // Update SDR Repository
			//BMC_REFRESH
			RUN_INIT_AGENT
        ENDIF     // IFSET "SDR"

        IFSET "FRU"
			
            // ******************************
            //   Update Base Board FRU areas
            // ******************************
			IFSET "CWP"
                DISPLAY     ""
                DISPLAY     "Updating FRU areas"		
				
                //Update Baseboard FRU data
                IFSET "S2600CW"
                    FRUNAME     "S2600CW.fru"
                ELSE
                    FRUNAME     "S2600CWR.fru"
                ENDIF
                FRUAREA     "HEADER"
                FRUAREA     "INTERNALUSE"
                FRUAREA     "CHASSIS"
                FRUFIELD    "CT"
                
                PROMPT      "Do you want to update the chassis info area of the FRU?"
                YES         "UPD_CHS"
                NO          ""
                IFSET   "UPD_CHS"
                
//                    IFSET "OTHER"
//                        DISPLAY     ""
//                        PROMPT      "Do you want to enter chassis type (HEX byte)? 03h: Desktop; 11h Main Server Chassis; 17h: Rackmount chassis"
//                            YES     "CHASS_T"
//                            NO      ""
//                            
//                        IFSET "CHASS_T"
//                            FRUFIELD    "CT" "@STDIN:ASCII"
//                        ENDIF
//                    ENDIF
              
                    PROMPT      "Do you want to enter the chassis serial number?"
                    YES         "CHASSN"
                    NO          ""
                    DISPLAY     ""
                    IFSET       "CHASSN"
                        FRUFIELD    "S#" "@STDIN:ASCII"
                    ENDIF
                
                    PROMPT      "Do you want to enter the chassis part number?"
                    YES         "CHASPN"
                    NO          ""
                    DISPLAY     " "
                    IFSET       "CHASPN"
                        FRUFIELD    "P#" "@STDIN:ASCII"
                    ENDIF
                ENDIF //END IFSET "UPD_CHS"
                
                PROMPT      "Do you want to enter the chassis manufacturer name (Additional Field 1)?"
                YES         "CHASMN"
                NO          ""
                DISPLAY     ""
                IFSET       "CHASMN"
                    FRUFIELD     "AM1" "@STDIN:ASCII"
                ENDIF
                
                FRUAREA     "BOARD"
                FRUFIELD    "MN"
                FRUFIELD    "PN"
                FRUFIELD    "ID"
                DISPLAY     ""
                
                FRUAREA     "PRODUCT"
                PROMPT      "Do you want to update the product info area of the FRU?"
                YES         "UPD_PRD"
                NO          ""
                IFSET       "UPD_PRD"
                     FRUFIELD    "MN"
                     FRUFIELD    "PN"
                     FRUFIELD    "PV"
                     PROMPT     "Do you want to enter product part number?"
                     YES        "PROD_PN"
                     NO         ""
                     IFSET      "PROD_PN"
                        FRUFIELD    "P#" "@STDIN:ASCII"
                     ENDIF
                
                     PROMPT     "Do you want to enter the product serial number?"
                     YES        "PROD_SN"
                     NO         ""
                     IFSET      "PROD_SN"
                        FRUFIELD    "S#" "@STDIN:ASCII"
                     ENDIF
                
                     PROMPT      "Do you want to enter the product asset tag?"
                     YES         "ASSET"
                     NO          ""
                     DISPLAY     ""
                     IFSET   "ASSET"
                         FRUFIELD    "AT" "@STDIN:ASCII"
                     ENDIF
               ENDIF // END IFSET "UPD_PRD"
            ENDIF //END IFSET "CWP"

        ENDIF   //END IFSET "FRU"
    ENDIF // ASSET TAG
ENDIF // IFSET "EXIT1"
