//****************************************************************************
//                   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) 2011 Intel Corporation. All Rights Reserved.
//****************************************************************************

CONFIGURATION   "Revision S2600GZ_112"
DISPLAY         "FRU & SDR Update Package for Intel(R) Server Board S2600GZ/GL"
DISPLAY         "Copyright (c) 2013 Intel Corporation"
DISPLAY         ""


// Detect baseboard by looking at the BMC product ID
PROBE           "BASEBOARD_PRODID" "49"
FOUND           "S2600GZ"  "WRONG_PKG"

IFSET "WRONG_PKG"
// {
    DISPLAY ""
    DISPLAY "This is the incorrect FRU/SDR pacakge for this baseboard."
    DISPLAY ""
// }
ENDIF


IFSET "S2600GZ"
// {
	// Uncomment to force manual Chassis selection
	//SET "FORCE_MANUAL"

	DISPLAY ""
	DISPLAY "Intel(R) Server Board S2600GZ/GL detected"
	DISPLAY ""
	MENUTITLE   "Select the function you want to perform:"
	MENU        "SDR"       "Update only the SDR"
	MENU        "FRU"       "Update only the FRU"
	MENU        "BOTH"      "Update both the SDR and the FRU"
	MENU        "ASSET"     "Modify the Asset Tag"  
	//  MENU        "FCT"		"Functional Test"
	//  MENU        "FOQM"		"Functional Outgoing Manufacturing Test"
	//  MENU        "SHIPPING"	"Default shipping configuration"
	MENU        "EXIT1"     "Exit FRU/SDR update"
	MENUPROMPT
	DISPLAY     " "

	IFSET "BOTH"
		SET "SDR"
		SET "FRU"
	ENDIF

	// Skip HW probing if one of the manufacturing specific configurations is selected
	IFSET   "FCT"
		SET "MFG_CONFIG"
	ENDIF

	IFSET   "FOQM"
		SET "MFG_CONFIG"
	ENDIF

	IFSET   "SHIPPING"
		SET "MFG_CONFIG"
	ENDIF

	IFSET "EXIT1"
	// {
		DISPLAY "Exiting without performing any updates"
	ELSE
	// Skip all hardware probing and program the selected manufacturing configuration
	IFSET "MFG_CONFIG"
		SDRNAME   "S2600GZ.sdr"  	// Update SDR Repository
		BMC_REFRESH			// Run the init agent to force the BMC to use the newly flashed in SDR data
	ENDIF

	IFSET "SDR"
	// {
		IFSET "FORCE_MANUAL"
		ELSE
			DISPLAY "Auto-detecting chassis model and attached hardware."
			DISPLAY "This may take up to 1 minute to complete."

			// Is a front panel FRU device present?
			PROBE "PING" "03" "AE"
			FOUND "FP_FRU" ""
		ENDIF

		IFSET "FP_FRU"
		// {
			// Front panel FRU device found so check for FP Type
			FRUNAME "SYSTEM"
			FRUADDRESS 04
			FRUAREA "BOARD" VALIDATE "FP_FRU_IPMI"

			IFSET "FP_FRU_IPMI"
				//
				// When new Storage FP is implemented, this needs to be updated
				// and uncommented.
				//
				FRUAREA "BOARD"
				PROBE FRUFIELD "PN" "F2USTOPANEL2"
				FOUND "STORE_FP_V2"
				IFSET "STORE_FP_V2"
				ELSE
					FRUAREA "BOARD"
					PROBE FRUFIELD "PN" "F2USTOPANEL"
					FOUND "STORE_FP_V1"
					IFSET "STORE_FP_V1"
					ELSE
						SET "NON_STORE_FP"
					ENDIF
				ENDIF
			ELSE
				CLEAR "FP_FRU"
			ENDIF

			// Continue process of auto-detecting chassis model
			// Is the first hot-swap HDD backplane present?
			PROBE "PING" "0B" "D0"
			FOUND "HSBP1" ""

			// Is the second hot-swap HDD backplane present?
			PROBE "PING" "0B" "D2"
			FOUND "HSBP2" ""

			// Is the third hot-swap HDD backplane present?
			PROBE "PING" "0B" "D4"
			FOUND "HSBP3" ""
                    
			IFSET "HSBP1"
			// {
				// First hot-swap backplane found so continue process to auto-detect chassis model
				// Read the HSBP FRU to determine if installing FRU/SDR package in a R1000 or R2000 chassis
				FRUNAME "SYSTEM"
				FRUADDRESS 05
				FRUAREA "BOARD" VALIDATE HSBP1_FRU_IPMI

				IFSET "HSBP1_FRU_IPMI"
				// {
					FRUAREA "BOARD"
					PROBE FRUFIELD "PN" "F1U8X25HSBP"
					FOUND "HSBP1_1U8X25" ""
					IFSET "HSBP1_1U8X25"
					// {
						SET "R1000"
					ELSE
						PROBE FRUFIELD "PN" "FXX1304HSBP"
						FOUND "HSBP1_1U4X35" "NO_XX"
						IFSET "NO_XX"
							// Some older HSBPs may have FR in the name instead of FXX
							PROBE FRUFIELD "PN" "FR1304HSBP"
							FOUND "HSBP1_1U4X35" ""
						ENDIF
						IFSET "HSBP1_1U4X35"
						// {
							SET "R1000"
						ELSE
							PROBE FRUFIELD "PN" "FXX8X25HSBP"
							FOUND "HSBP1_2U8X25" ""
							IFSET "HSBP1_2U8X25"
							// {
								SET "R2000"
								SET "R2XXX"
								SET "R2000FAMILY"
							ELSE
								PROBE FRUFIELD "PN" "FXX8X25DPBP"
								FOUND "HSBP1_2U8X25DP" ""
								IFSET "HSBP1_2U8X25DP"
								// {
									SET "R2000"
									SET "R2XXX"
									SET "R2000FAMILY"
								ELSE
									PROBE FRUFIELD "PN" "F2U8X35HSBP"
									FOUND "HSBP1_2U8X35" ""
									IFSET "HSBP1_2U8X35"
									// {
										SET "R2000"
										SET "R2XXX"
										SET "R2000FAMILY"
									ELSE
										PROBE FRUFIELD "PN" "F2U12X35HSBP"
										FOUND "HSBP1_2U12X35" ""
										IFSET "HSBP1_2U12X35"
											SET "R2000"
											SET "R2312"
											SET "R2000FAMILY"
											CLEAR "HSBP2"
											CLEAR "HSBP3"
										ENDIF
									// }
									ENDIF
								// }
								ENDIF
							// }
							ENDIF
						// }
						ENDIF
					// }
					ENDIF
						
					IFSET "R1000"
					ELSE
						IFSET "R2000"
						ELSE
							DISPLAY ""
							DISPLAY "Hot-swap HDD backplane detected but its FRU data is either corrupted or blank."
							DISPLAY "Falling back to User chassis selection as auto detection is not possible.!"
							SET "CHASSIS_MENU"
						ENDIF
					ENDIF
				ELSE
                        		DISPLAY ""
                        		DISPLAY "Hot-swap HDD backplane detected but FRU data in it is either corrupted or blank."
                        		DISPLAY "Falling back to user chassis selection as auto detection is not possible."
                        		SET "CHASSIS_MENU"
				// }
 				ENDIF
			ELSE
				DISPLAY ""
				DISPLAY "Hot-swap HDD backplane not detected."
				DISPLAY "Falling back to user chassis selection as auto detection is not possible."
				SET "CHASSIS_MENU"
			// }
			ENDIF

			IFSET "CHASSIS_MENU"
			// {
			ELSE
				IFSET "HSBP2"
				// {
					// Second HSBP detected and need to probe FRU to determine model
					FRUNAME "SYSTEM"
					FRUADDRESS 06
					FRUAREA "BOARD" VALIDATE HSBP2_FRU_IPMI

					IFSET "HSBP2_FRU_IPMI"
					// {
						FRUAREA "BOARD"
						PROBE FRUFIELD "PN" "FXX8X25HSBP"
						FOUND "HSBP2_2U8X25" ""

						IFSET "HSBP2_2U8X25"
						ELSE
							DISPLAY "Second hot-swap HDD backplane detected but unable to identify model"
						ENDIF
					ELSE
						DISPLAY ""
						DISPLAY "Second hot-swap HDD backplane detected but FRU data in it is either corrupted or blank."
					// }
					ENDIF
				// }
				ENDIF
			// }
			ENDIF

                	IFSET "CHASSIS_MENU"
			// {
			ELSE
				IFSET "HSBP3"
				// {
					// Third HSBP detected and need to probe FRU to determine model
					FRUNAME "SYSTEM"
					FRUADDRESS 07
					FRUAREA "BOARD" VALIDATE HSBP3_FRU_IPMI

					IFSET "HSBP3_FRU_IPMI"
					// {
						FRUAREA "BOARD"
						PROBE FRUFIELD "PN" "FXX8X25HSBP"
						FOUND "HSBP3_2U8X25" ""

						IFSET "HSBP3_2U8X25"
						// {
							CLEAR "R2XXX"
                                                        SET "R2000"
							SET "R2224"
							SET "R2000FAMILY"
						ELSE
							DISPLAY "Third hot-swap HDD backplane detected but unable to identify model"
						// }
						ENDIF
					ELSE
						DISPLAY ""
						DISPLAY "Third hot-swap HDD backplane detected but FRU data in it is either corrupted or blank."
					// }
					ENDIF
				// }
				ENDIF
                	// }
                	ENDIF
			

			// Is riser 1 installed with a FRU device?                
			PROBE "PING" "05" "A0"
			FOUND "RISER_1_FRU" ""
                    
			// Is riser 2 installed with a FRU device?                
			PROBE "PING" "05" "A2"
			FOUND "RISER_2_FRU" ""
					
			IFSET "RISER_1_FRU"
			// {
				FRUNAME "SYSTEM"
				FRUADDRESS 0B
				FRUAREA "BOARD" VALIDATE RISER_1_FRU_IPMI
					
				IFSET "RISER_1_FRU_IPMI"
					FRUAREA "BOARD"
					PROBE FRUFIELD "PN" "A2UL16RISER"
					FOUND "RISER_1_R2AUXCOOL" ""
				ENDIF
			// }
			ENDIF
				
			FRUNAME "SYSTEM"
			FRUADDRESS 0C
			FRUAREA "BOARD" VALIDATE RISER_2_FRU_IPMI
					
				IFSET "RISER_2_FRU_IPMI"
					FRUAREA "BOARD"
					PROBE FRUFIELD "PN" "A2UL16RISER"
					FOUND "RISER_2_R2AUXCOOL" ""
				ENDIF
				
				IFSET "RISER_1_R2AUXCOOL"
					SET "R2AUXCOOL"
                ENDIF

				IFSET "RISER_2_R2AUXCOOL"
					SET "R2AUXCOOL"
                ENDIF

		IFSET "R2AUXCOOL"
                // {
			CLEAR "R1000"
			CLEAR "R2000"
			CLEAR "R2224"
			CLEAR "R2312"
			CLEAR "R2XXX"
			CLEAR "CHASSIS_MENU"
			SET "R2000FAMILY"
		// }
                ENDIF

            ELSE
		IFSET "FORCE_MANUAL"
			DISPLAY "Forcing manual selection of chassis..."
		ELSE
                	DISPLAY ""
                	DISPLAY "Front panel FRU device not detected"
                	DISPLAY "Falling back to user chassis selection as auto detection is not possible."
		ENDIF
               	SET "CHASSIS_MENU"
            // }
            ENDIF

            // HSBP hardware maybe installed in a test plate. Clear detected chassis if fan config incorrect
            // for R1000 or R2000 (missing fan at tachometer input 8)
            PROBE FAN_SIGNAL 08 00
                FOUND "SYS_FAN5" "NO_SYS_FAN5"
            
            IFSET "NO_SYS_FAN5"
                DISPLAY ""
                DISPLAY "Fan configuration invalid for supported chassis models."
                DISPLAY "Falling back to user chassis selection as auto detection is not possible."
		CLEAR "R1000"
		CLEAR "R2000"
		CLEAR "R2224"
		CLEAR "R2312"
		CLEAR "R2XXX"
		CLEAR "R2AUX"
                CLEAR "R2000FAMILY"
                SET "CHASSIS_MENU"
            ENDIF

            //****************************************************************************************************
	    // Display chassis selection menu only if auto-detection fails
	    //*****************************************************************************************************
	    IFSET "CHASSIS_MENU"
			// {
				DISPLAY    " "
				MENUTITLE   "Select the Chassis"
				MENU        "R1000"		"Intel(R) Server Chassis R1000"
				MENU        "R2000"		"Intel(R) Server Chassis R2000"
				//MENU		"TEST_PLATE"	"Open Test Plate"
				MENU		"OTHER"			"Other Chassis"
				MENUPROMPT
			// }
			ENDIF
			
			IFSET "CHASSIS_MENU" "R2000" 
                		MENUTITLE   "Select the R2000 chassis type"
                		MENU    "R2XXX"     "R2208/R2216/R2308 chassis"
                		MENU    "R2224"     "R2224 chassis"
                		MENU    "R2312"     "R2312 chassis"
				MENU    "R2AUXCOOL" "Intel(R) Server Chassis R2000 with Aux PCIe"
                		MENUPROMPT

                		DISPLAY ""
                		SET R2000FAMILY
				IFSET "R2AUXCOOL"
					CLEAR "R2000"
				ENDIF
            ENDIF //"CHASSIS_MENU R2000"
			
			IFSET "OTHER"
                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     " "
                MENUTITLE   "Select the fan speed for the chassis"
                MENU    "OTHER_SR"     "Slow Ramp"
                MENU    "OTHER_MR"     "Medium Ramp"
                MENU    "OTHER_FR"     "Fast Ramp"
                MENUPROMPT
                DISPLAY ""
            ENDIF //"OTHER"       

			IFSET "CHASSIS_MENU"
				DISPLAY " "
				DISPLAY "Continuing to probe chassis hardware."
			ENDIF

			IFSET   "SKIP_PROBE"
			//{
				// Skip probing the hardware 
			ELSE
                // Is a power supply module installed at the PS1 slot?
                PROBE "PING" "0F" "A0"
                    FOUND "PS1" "NO_PS1"
                    
                // Is a power supply module installed at the PS2 slot?                
                PROBE "PING" "0F" "A2"
                    FOUND "PS2" "NO_PS2"
                    

		// Do not probe for the temperature sensor on the IO Module.
		// Some parts will hang the bus if only 1 byte is read from them.
		//
                // Is an I/O (LAN) module installed with a temperature sensor on it?
                // PROBE "PING" "0D" "94"
                //    FOUND "IO_MODULE"
                    
                // Is there a FRU storage device on the I/O (LAN) module?
                PROBE "PING" "0D" "A4"
                    FOUND "IO_MODULE_FRU"
                    
		// Assume that if the FRU device is present on the IO Module, that
		// it also has a temperature sensor.
		IFSET "IO_MODULE_FRU"
			SET "IO_MODULE"
		ENDIF

                // Is a SAS module installed with a temperature sensor on it?
                PROBE "PING" "0D" "98"
                    FOUND "SAS_MODULE"
                    
                // And is a FRU storage device on the SAS module?
                PROBE "PING" "0D" "A8"
                    FOUND "SAS_MODULE_FRU"
                    
                
                    
                IFSET "NO_PS1" "PS2"
                    DISPLAY ""
                    DISPLAY "Please move the single power supply module to the other slot and re-install this SDR update."
                    DISPLAY ""
                    CLEAR "PS2"
                    SET "SKIP_UPDATE"
                ENDIF
                    
                IFSET "NO_PS1" "NO_PS2"
                    DISPLAY ""
                    DISPLAY "Unable to communicate with any power supply modules."
                    DISPLAY "Please resolve this issue and then re-install this SDR update."
                    DISPLAY ""
                    SET "SKIP_UPDATE"
                ENDIF

                IFSET "PS1"
                // {
                    FRUNAME "SYSTEM"
                    FRUADDRESS 02
                    FRUAREA "PRODUCT" VALIDATE PS1_FRU_IPMI
                    
                    IFSET "PS1_FRU_IPMI"
                    // {
                        FRUAREA "PRODUCT"
                        PROBE FRUFIELD "PN" "DPS-460"
                        FOUND "PS1_460W" ""
                            
                        IFSET "PS1_460W"
                        // {
                        ELSE
                            FRUAREA "PRODUCT"
                            PROBE FRUFIELD "PN" "DPS-750"
                            FOUND "PS1_750W" ""
                                
                            IFSET "PS1_750W"
                            // {
                            ELSE
                                DISPLAY ""
                                DISPLAY "Power supply 1 detected but unable to identify model."
                                DISPLAY "Sensors for power supply 1 will not be installed."        
                            // }
                            ENDIF
                        // }    
                        ENDIF
                    ELSE
                        DISPLAY ""
                        DISPLAY "Power supply 1 detected but its FRU data is invalid."
                        DISPLAY "Sensors for power supply 1 will not be installed."        
                    // }
                    ENDIF
                // }
                ENDIF

                IFSET "PS2"
                // {
                    FRUNAME "SYSTEM"
                    FRUADDRESS 03
                    FRUAREA "PRODUCT" VALIDATE PS2_FRU_IPMI
                    
                    IFSET "PS2_FRU_IPMI"
                    // {
                        FRUAREA "PRODUCT"
                        PROBE FRUFIELD "PN" "DPS-460"
                        FOUND "PS2_460W" ""
                            
                        IFSET "PS2_460W"
                        // {
                        ELSE
                            FRUAREA "PRODUCT"
                            PROBE FRUFIELD "PN" "DPS-750"
                            FOUND "PS2_750W" ""
                                
                            IFSET "PS2_750W"
                            // {
                            ELSE
                                DISPLAY ""
                                DISPLAY "Power supply 2 detected but unable to identify model."
                                DISPLAY "Sensors for power supply 2 will not be installed."        
                            // }
                            ENDIF
                        // }    
                        ENDIF
                    ELSE
                        DISPLAY ""
                        DISPLAY "Power supply 2 detected but its FRU data is invalid."
                        DISPLAY "Sensors for power supply 2 will not be installed."        
                    // }
                    ENDIF
                // }
                ENDIF

				// Probe the hardware to discover installed devices
				PROBE	"PROCESSOR"	1
					FOUND	"PROCESSOR_1"	""

				PROBE	"PROCESSOR"	2
					FOUND	"PROCESSOR_2"	""

				PROBE "PING" "03" "9A"
					FOUND "FP_TEMP" ""
				   
                IFSET "SKIP_UPDATE"
                // {
                    // Do not print out a summary of detected hardware if skipping the update
                ELSE
                    // Print out summary of detected hardware
                    DISPLAY ""
                    DISPLAY "                                Detected Hardware"
                    DISPLAY "********************************************************************************"

                    IFSET   "R1000"
                        DISPLAY "Intel(R) Server System R1000GZ/GL Product Family"
                    ENDIF
                    
                    IFSET   "R2000FAMILY"
			DISPLAY "Intel(R) Server System R2000GZ/GL Product Family"
                    ENDIF

                    IFSET   "TEST_PLATE"
                        DISPLAY "Open Test Plate Chassis"
                    ENDIF

					DISPLAY "Intel(R) Server Board S2600GZ/GL"

                    IFSET	"PROCESSOR_1"
                        DISPLAY "Intel(R) Xeon(R) Processor E5-2600 in socket 1"
                    ENDIF

                    IFSET	"PROCESSOR_2"
                        DISPLAY "Intel(R) Xeon(R) Processor E5-2600 in socket 2"
                    ENDIF

		    IFSET "R2000FAMILY"
			// Determine if R2000 chassis contains hot-swap redundant fans.
			PROBE "FAN_SIGNAL" 00 01
			FOUND "R2000_HS_FAN" ""
			IFSET "R2000_HS_FAN"
			    SET R2000_RED_FAN
			ENDIF

			IFSET "R2000_RED_FAN"
			    DISPLAY "Hot-swap redundant fans"
			ELSE
			    DISPLAY "Fixed non-redundant fans"
			ENDIF
		    ENDIF

		    IFSET "R1000"
			SET "R1000_RED_FAN"
                        DISPLAY "Fixed redundant fans"
		    ENDIF
			
		    IFSET "FP_FRU"		
                    	IFSET	"NON_STORE_FP"
                        	DISPLAY "Front Panel Temperature Sensor"
                    	ELSE
				IFSET "STORE_FP_V1"
					DISPLAY "Storage FP Temperature Sensor"
				ELSE
					IFSET "STORE_FP_V2"
						DISPLAY "Storage FP Temperature Sensor (v2)"
					ENDIF
				ENDIF
			ENDIF
		    ELSE
                        // All Intel(R) chassis have a front panel intel temp sensor
                       	DISPLAY ""
                        DISPLAY "Front Panel Temperature sensor device hardware not found."
                        DISPLAY "Chassis fan Speed Control (FSC) will not work properly without this sensor!"
                        DISPLAY ""
                    ENDIF

                    DISPLAY "Baseboard FRU Device"

                    IFSET	"PS1_460W"
                        DISPLAY "460 Watt Power Supply Module 1"
                        DISPLAY "Power Supply Module 1 FRU Device"
                    ENDIF

                    IFSET	"PS1_750W"
                        DISPLAY "750 Watt Power Supply Module 1"
                        DISPLAY "Power Supply Module 1 FRU Device"
                    ENDIF

                    IFSET	"PS2_460W"
                        DISPLAY "460 Watt Power Supply Module 2"
                        DISPLAY "Power Supply Module 2 FRU Device"
                    ENDIF

                    IFSET	"PS2_750W"
                        DISPLAY "750 Watt Power Supply Module 2"
                        DISPLAY "Power Supply Module 2 FRU Device"
                    ENDIF

                    IFSET   "PS1" "PS2"
                        DISPLAY "Redundant Power Supply Configuration"
                        SET "REDUNDANT_PS"
                    ENDIF

                    IFSET   "HSBP1_1U4X35"
                        DISPLAY "FR1304HSBP 1U 3.5 HDD 4 Slot Hot-swap backplane"
                        DISPLAY "Hot-swap backplane 1 FRU Device"
                    ENDIF
                    
                    IFSET   "HSBP1_1U8X25"
                        DISPLAY "F1U8X25HSBP 1U 2.5 HDD 8 Slot Hot-swap backplane"
                        DISPLAY "Hot-swap backplane 1 FRU Device"
                    ENDIF

                    IFSET   "HSBP1_2U8X25"
                        DISPLAY "FXX8X25HSBP 2U 2.5 HDD 8 Slot Hot-swap backplane 1"
                        DISPLAY "Hot-swap backplane 1 FRU Device"
                    ENDIF

                    IFSET   "HSBP1_2U8X25DP"
                        DISPLAY "FXX8X25DPBP 2U 2.5 HDD Dual Port 8 Slot Hot-swap Backplane"
                        DISPLAY "Hot-swap backplane 1 FRU Device"
                    ENDIF

                    IFSET   "HSBP1_2U8X35"
                        DISPLAY "F2U8X35HSBP 2U 3.5 HDD 8 Slot Hot-swap Backplane"
                        DISPLAY "Hot-swap backplane 1 FRU Device"
                    ENDIF

                    IFSET   "HSBP1_2U12X35"
                        DISPLAY "F2U12X35HSBP 2U 3.5 HDD 12 Slot Hot-swap Backplane"
                        DISPLAY "Hot-swap backplane 1 FRU Device"
                    ENDIF

                    IFSET   "HSBP2_2U8X25"
                        DISPLAY "FXX8X25HSBP 2U 2.5 HDD 8 Slot Hot-swap backplane 2"
                        DISPLAY "Hot-swap backplane 2 FRU Device"
                    ENDIF

                    IFSET   "HSBP3_2U8X25"
                        DISPLAY "FXX8X25HSBP 2U 2.5 HDD 8 Slot Hot-swap backplane 3"
                        DISPLAY "Hot-swap backplane 3 FRU Device"
                    ENDIF

                    IFSET   "IO_MODULE"
                        DISPLAY "IO Module Temperature Device"
                    ENDIF

                    IFSET   "IO_MODULE_FRU"
                        DISPLAY "IO Module FRU Storage Device"
                    ENDIF

                    IFSET   "SAS_MODULE"
                        DISPLAY "SAS Module Temperature Device"
                    ENDIF

                    IFSET   "SAS_MODULE_FRU"
                        DISPLAY "SAS Module FRU Storage Device"
                    ENDIF
                    
			IFSET   "RISER_1_R2AUXCOOL"
				DISPLAY "PCIe Riser 1 with Intel Specific Auxillary Cooling"
			ENDIF
			IFSET   "RISER_2_R2AUXCOOL"
				DISPLAY "PCIe Riser 2 with Intel Specific Auxillary Cooling"
			ENDIF

                    DISPLAY "********************************************************************************"
                // }
                ENDIF
			// }
			ENDIF
			
			//*****************************************************************
			// Set additional SDR tags based on chassis detected
			//*****************************************************************
            
			IFSET "R1000"
			// {
				// Set additional SDR tags for the R1000 chassis
                CLEAR "INTRUSION"
				SET "NO_INTRUSION"
				SET "FP_NMI"
			// }
			ENDIF

			IFSET "R2000FAMILY"
			// {
				// Set additional SDR tags for the R2000 chassis
                CLEAR "INTRUSION"
				SET "NO_INTRUSION"
				SET "FP_NMI"
			// }
			ENDIF
			
			IFSET "OTHER"
			// {
				//System Fans
                DISPLAY ""
                PROMPT "Is System Fan 1A installed?"
                YES "OTHER_FAN_1A"
                NO ""
                PROMPT "Is System Fan 1B installed?"
                YES "OTHER_FAN_1B"
                NO ""
                PROMPT "Is System Fan 2A installed?"
                YES "OTHER_FAN_2A"
                NO ""
                PROMPT "Is System Fan 2B installed?"
                YES "OTHER_FAN_2B"
                NO ""
                PROMPT "Is System Fan 3A installed?"
                YES "OTHER_FAN_3A"
                NO ""
                PROMPT "Is System Fan 3B installed?"
                YES "OTHER_FAN_3B"
                NO ""
                PROMPT "Is System Fan 4A installed?"
                YES "OTHER_FAN_4A"
                NO ""
                PROMPT "Is System Fan 4B installed?"
                YES "OTHER_FAN_4B"
                NO ""
                PROMPT "Is System Fan 5A installed?"
                YES "OTHER_FAN_5A"
                NO ""
                PROMPT "Is System Fan 5B installed?"
                YES "OTHER_FAN_5B"
                NO ""
                PROMPT "Is System Fan 6A installed?"
                YES "OTHER_FAN_6A"
                NO ""
                PROMPT "Is System Fan 6B installed?"
                YES "OTHER_FAN_6B"
                NO ""
				PROMPT "Is CPU 1 Fan installed?"
                YES "OTHER_PROC1_FAN"
                NO ""
                PROMPT "Is CPU 2 Fan installed?"
                YES "OTHER_PROC2_FAN"
                NO ""
                CLEAR "INTRUSION"
                CLEAR "NO_INTRUSION"
                PROMPT "Is Chassis Intrusion Switch installed?"
                YES "INTRUSION"
                NO "NO_INTRUSION"
                CLEAR "R1000_RED_FAN"
                CLEAR "R2000_RED_FAN"
				//CLEAR "PS1_460W"
				//CLEAR "PS1_460W"
				//CLEAR "PS1_750W"
				//CLEAR "PS2_460W"
				//CLEAR "PS2_750W"
				SET "FP_NMI"
			// }
			ENDIF
			
			IFSET "OTHER_SR"
			// {
				// Set additional SDR tags for the Other Slow Ramp chassis
			// }
			ENDIF
			
			IFSET "OTHER_MR"
			// {
				// Set additional SDR tags for the Other Med Ramp chassis
			// }
			ENDIF
			
			IFSET "OTHER_FR"
			// {
				// Set additional SDR tags for the Other Fast Ramp chassis
			// }
			ENDIF
			
			IFSET "SHIPPING"
			// {
				CLEAR "REDUNDANT_PS"
                CLEAR "R1000_RED_FAN"
                CLEAR "R2000_RED_FAN"
				CLEAR "PS1_460W"
				CLEAR "PS1_750W"
				CLEAR "PS2_460W"
				CLEAR "PS2_750W"
				// Set additional SDR tags for the Other Slow Ramp chassis
                CLEAR "INTRUSION"
				SET "NO_INTRUSION"
				SET "FP_NMI"
				
			// }
			ENDIF

			IFSET "TEST_PLATE"
			// {
				// Set additional SDR tags for the R2000 chassis
                CLEAR "R1000_RED_FAN"
                CLEAR "R2000_RED_FAN"
                CLEAR "INTRUSION"
				SET "NO_INTRUSION"
				SET "FP_NMI"
            // }
			ENDIF

			// Update the SDR Repository with selected records
            IFSET "SKIP_UPDATE"
                // Do nothing
            ELSE
				// Update SDR Repository
                SDRNAME   "S2600GZ.sdr"
				// Run the init agent so new SDR data is read and used
				BMC_REFRESH
            ENDIF
		// }
		ENDIF
			
		//*****************************************************************************
		// FRU file or asset tag programming
		//*****************************************************************************
	    // Process Asset tag if requested.  
	    IFSET "ASSET"
	    // {   
            FRUNAME     "SYSTEM"
            FRUADDRESS  "IMBDEVICE" FF 20
            FRUAREA     "PRODUCT"  
            FRUFIELD    "AT" "@STDIN:ASCII"
	    ELSE
            // Begin baseboard FRU update
            IFSET "FRU"
            // {
                FRUNAME     "SYSTEM"
                FRUADDRESS  0
                FRUAREA     "BOARD"

                PROBE FRUFIELD "PN" "S2600GZ"
                FOUND "" "NO_GZ_FRU_PN"

                IFSET "NO_GZ_FRU_PN"
                    PROBE FRUFIELD "PN" "S2600GL"
                    FOUND "GL_FRU_PN" ""
                    IFSET "GL_FRU_PN"
                        CLEAR "NO_GZ_FRU_PN"
						SET "S2600GL"
                    ENDIF
                ENDIF

                IFSET "NO_GZ_FRU_PN"
                	DISPLAY " "
                	DISPLAY "FRU Board P/N data is invalid."
                ELSE
                // {
	                DISPLAY     " "

	                IFSET "S2600GL"
	                    FRUNAME     "S2600GL.fru"
					ELSE
	                    FRUNAME     "S2600GZ.fru"
	                ENDIF

	                FRUAREA     "HEADER"
	                FRUAREA     "INTERNALUSE"
	                FRUAREA     "CHASSIS"
	                FRUFIELD    "CT" 

	                PROMPT      "Do you want to update the chassis info area of the FRU (Y/N)?"
	                    YES     "UPD_CHS"
	                    NO      ""

	                IFSET "UPD_CHS"
	                // {		    
	                    DISPLAY     " "

	                    PROMPT      "Do you want to enter the chassis serial number (Y/N)?"
	                        YES         "CHASS_SN"
	                        NO          ""

	                    IFSET       "CHASS_SN"
	                        FRUFIELD    "S#" "@STDIN:ASCII"
	                    ENDIF

	                    DISPLAY     " "

	                    PROMPT      "Do you want to enter the chassis part number (Y/N)?"
	                        YES         "CHASS_PN"
	                        NO          ""

	                    IFSET       "CHASS_PN"
	                        FRUFIELD    "P#" "@STDIN:ASCII"
	                    ENDIF

	                    DISPLAY     " "

						PROMPT		"Do you want to enter data into the additional chassis field 1 (Y/N)?"
	                        YES         "CHASS_INFO_1"
	                        NO          ""

	                    IFSET       "CHASS_INFO_1"
	                        FRUFIELD  "AM1" "@STDIN:ASCII"
	                    ENDIF

	                    DISPLAY		" "

						PROMPT		"Do you want to enter data into the additional chassis field 2 (Y/N)?"
	                        YES         "CHASS_INFO_2"
	                        NO          ""

	                    IFSET       "CHASS_INFO_2"
	                        FRUFIELD  "AM2" "@STDIN:ASCII"
	                    ENDIF
	                // }
	                ENDIF

	                // Update board area, S/N and P/N fields will not be written to.
	                FRUAREA     "BOARD"
	                FRUFIELD    "MN"
	                FRUFIELD    "PN"
	                FRUFIELD    "ID"

	                DISPLAY     " "

		            FRUAREA     "PRODUCT"
	                PROMPT      "Do you want to update the product info area of the FRU (Y/N)?"
		                YES     "UPD_PRD"
		                NO      ""

	                IFSET "UPD_PRD"
	                // {
	                    FRUFIELD    "MN"
	                    FRUFIELD    "PN"	      
	                    FRUFIELD    "PV"
	                    DISPLAY      " "
	                    PROMPT      "Do you want to enter the product part number (Y/N)?"
	                        YES         "PROD_PN"
	                        NO          ""

	                    IFSET "PROD_PN"
	                        FRUFIELD    "P#" "@STDIN:ASCII"
	                    ENDIF

	                    DISPLAY     " "

	                    PROMPT      "Do you want to enter the product serial number (Y/N)?"
	                        YES         "PROD_SN"
	                        NO          ""

	                    IFSET "PROD_SN"
	                        FRUFIELD    "S#" "@STDIN:ASCII"
	                    ENDIF

	                    DISPLAY     " "

	                    PROMPT      "Do you want to enter an product asset tag (Y/N)?"
	                        YES         "PROD_ASSET"
	                        NO          ""

	                    IFSET "PROD_ASSET"
	                        FRUFIELD    "AT" "@STDIN:ASCII"
	                    ENDIF
	                // }
	                ENDIF
	            // }
	            ENDIF
	        // }
	        ENDIF
	    // }
	    ENDIF
	// }
	ENDIF
// }
ENDIF

