//****************************************************************************
//                   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) 2017 Intel Corporation. All Rights Reserved.
//****************************************************************************
//
// NOTE: Please use only TAB stops for indentation when editing this file!
//
// Built from git revision: v0.11-0-gb9c57dc


CONFIGURATION	"Revision 2600STB_1.02"
DISPLAY		"FRU & SDR Update Package for Intel(R) Server Board 2600STB (2600STB_1.02)"
DISPLAY		"Copyright (c) 2017 Intel Corporation"
DISPLAY		""


// Detect baseboard by looking at the BMC product ID
//

PROBE        "BASEBOARD_PRODID" "7D"
FOUND        "S2600"  "WRONG_PKG"

IFSET "WRONG_PKG"
    DISPLAY ""
    DISPLAY "This is the incorrect FRU/SDR package for this baseboard."
    DISPLAY ""
    ERRORLEVEL 1
ENDIF


IFSET "S2600"
	// Uncomment to force manual _ selection
	//SET "CHASSIS_MENU"

	// Uncomment to allow setting Board Mfg FRU fields
	//SET "ALLOW_BRD_UPDATE"

	// Uncomment to use a non-Intel GPGPU card (not yet implemented)
	//SET "USE_GPGPU"

	// Determine if this is a variant
	FRUNAME     "SYSTEM"
	FRUADDRESS  0
	FRUAREA "BOARD" VALIDATE "BB_FRU_IPMI"
	IFSET "BB_FRU_IPMI"
		PROBE FRUFIELD "PN" "S2600STB"	//S2600ST
		FOUND "STB_FRU_PN" ""
		IFSET "STB_FRU_PN"
			DISPLAY		"Intel(R) Server Board S2600STB detected"
			SET "S2600STB"
		ELSE
			PROBE FRUFIELD "PN" "S2600STQ"
			FOUND "STQ_FRU_PN" ""
			IFSET "STQ_FRU_PN"
				DISPLAY        "Intel(R) Server Board S2600STQ detected"
				SET "S2600STQ"
			ELSE
				PROBE FRUFIELD "PN" "S2600STS"
				FOUND "STS_FRU_PN" ""
				IFSET "STS_FRU_PN"
					DISPLAY        "Intel(R) Server Board S2600STS detected"
					SET "S2600STS"
				ELSE
					PROBE FRUFIELD "PN" "S2600STK"
					FOUND "STK_FRU_PN" ""
					IFSET "STK_FRU_PN"
						DISPLAY        "Intel(R) Server Board S2600STK detected"
						SET "S2600STK"
					ELSE
						DISPLAY		"Incorrect Baseboard FRU!"
						SET "NO_WT_FRU"
					ENDIF
				ENDIF
			ENDIF
		ENDIF
	ELSE
		DISPLAY "No Valid Baseboard FRU detected!"
		SET "NO_WT_FRU"
	ENDIF
	DISPLAY ""
	MENUTITLE	"Select the function you want to perform:"
	MENU		"SDR"	"Update only the SDR"
	//MENU		"MANUAL"	"Manual Update the SDR(no auto-detection)"
	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"
		SET "SKIP_PROBE"
	ENDIF

	IFSET "FOQM"
		SET "MFG_CONFIG"
		SET "SKIP_PROBE"
	ENDIF

	IFSET "SHIPPING"
		SET "MFG_CONFIG"
		SET "SKIP_PROBE"
	ENDIF

	IFSET "EXIT1"
		DISPLAY "Exiting without performing any updates"
	ELSE
		// Skip all hardware probing and program the selected manufacturing configuration

		IFSET "MFG_CONFIG"
		SDRNAME   "S2600STB.sdr"		// Update SDR Repository
	ENDIF

	SET "CONTINUE"

	IFSET "SDR"

		IFSET "CHASSIS_MENU"

		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 "IMBDEVICE" "04"
			FOUND "FP_FRU" ""

		ENDIF

		IFSET "FP_FRU" "CONTINUE"
			SET "NO_STORE_FP"

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

			IFSET "FP_FRU_IPMI"
				FRUAREA "BOARD"
				PROBE FRUFIELD "PN" "FFPANEL"
				FOUND "STORE_FP"
				IFSET "STORE_FP"
					CLEAR "NO_STORE_FP"
				ELSE
					//DISPLAY ""
					DISPLAY "No Intel Front Panel detected!"
					//DISPLAY "Reverting to Manual Chassis Selection."
					CLEAR "FP_FRU"
					SET "CHASSIS_MENU"
					SET "OTHER"

				ENDIF

			ELSE
				//DISPLAY ""
				DISPLAY "Front Panel detected but FRU data is invalid!"
				//DISPLAY "Reverting to Manual Chassis Selection."
				SET "CHASSIS_MENU"
				SET "OTHER"
			ENDIF
		ELSE
			//DISPLAY ""
			DISPLAY "Front panel FRU device not detected"
			//DISPLAY "Falling back to user chassis selection as auto detection is not possible."
			SET "CHASSIS_MENU"
			SET "OTHER"
		ENDIF

		// LAN Riser Detection ---------------------------------------------------------------------------------------------
		CLEAR "LAN_RISER"

		PROBE "PING"    "28"    "90"
		FOUND "LAN_RISER"    ""

		// System Fan Detection ---------------------------------------------------------------------------------------------

		//Check Red Fan---
		PROBE "FAN_SIGNAL" 00 01
		FOUND "FAN_1" ""

		PROBE "FAN_SIGNAL" 01 01
		FOUND "FAN_2" ""

		PROBE "FAN_SIGNAL" 02 01
		FOUND "FAN_3" ""

		PROBE "FAN_SIGNAL" 03 01
		FOUND "FAN_4" ""

		PROBE "FAN_SIGNAL" 04 01
		FOUND "FAN_5" ""

		IFSET "FAN_1" "FAN_2" "FAN_3" "FAN_4" "FAN_5"
			//DISPLAY "UPM_Red_Fan is set"
			SET "UPM_Red_Fan"
		ENDIF

		//Check Non-Red Fan---
		IFSET "FAN_1"

		ELSE
			PROBE "FAN_SIGNAL" 00 00
			FOUND "NR_FAN_1" ""
		ENDIF

		IFSET "FAN_2"

		ELSE
			PROBE "FAN_SIGNAL" 01 00
			FOUND "NR_FAN_2" ""
		ENDIF

		IFSET "NR_FAN_1" "NR_FAN_2"
			IFSET "FAN_3"
				DISPLAY ""
			ELSE
				IFSET "FAN_4"
					DISPLAY ""
				ELSE
					IFSET "FAN_5"
						DISPLAY ""
					ELSE
						//DISPLAY "UPM_No_Red_Fan is set"
						SET "UPM_No_Red_Fan"
					ENDIF
				ENDIF
			ENDIF
		ENDIF

		// Power Supply Detection -------------------------------------------------------------------------------------
		// Is a power supply module installed at the PS1 slot?
		PROBE "IMBDEVICE" "02"
		FOUND "PS1" "NO_PS1"

		// Is a power supply module installed at the PS2 slot?
		PROBE "IMBDEVICE" "03"
		FOUND "PS2" "NO_PS2"

		IFSET "NO_PS1" "NO_PS2"
			//DISPLAY ""
			//DISPLAY "Unable to communicate with any power supply modules."
			//DISPLAY ""
			// Set to NON PSU
			SET "NON_PSU"
		ENDIF

		IFSET "PS1"
			FRUNAME "SYSTEM"
			FRUADDRESS 02
			FRUAREA "PRODUCT" VALIDATE PS1_FRU_IPMI

			IFSET "PS1_FRU_IPMI"
				SET "CONTINUE_PROBE"
				FRUAREA "PRODUCT"
				PROBE FRUFIELD "PN" "DPS-750XB A"
				FOUND "PS1_750W" ""

				IFSET "PS1_750W"
					CLEAR "CONTINUE_PROBE"
					CLEAR "STICKY_PS1_1600W"
					SET   "STICKY_PS1_750W"
					SET   "PS1_750W_FRU"
					SET   "VALID_PSU"
				ENDIF

				IFSET "CONTINUE_PROBE"
					PROBE FRUFIELD "PN" "IS162F22"
					FOUND "PS1_1600W" ""

					IFSET "PS1_1600W"
						CLEAR "CONTINUE_PROBE"
						CLEAR "STICKY_PS1_750W"
						SET   "STICKY_PS1_1600W"
						SET   "PS1_1600W_FRU"
						SET   "VALID_PSU"
					ENDIF
				ENDIF

				IFSET "CONTINUE_PROBE"
					DISPLAY ""
					DISPLAY "Power supply 1 detected but unable to identify model."
					DISPLAY "Sensors for power supply 1 will not be installed."
					CLEAR "STICKY_PS1_1600W"
					CLEAR "STICKY_PS1_750W"
					CLEAR "CONTINUE_PROBE"
				ELSE
					SET "VALID_PS1"
				ENDIF
			ELSE
				DISPLAY ""
				DISPLAY "Power supply 1 detected but its FRU data is invalid."
				DISPLAY "Sensors for power supply 1 will not be installed."
				DISPLAY ""
				CLEAR "STICKY_PS1_750W"
				CLEAR "STICKY_PS1_1600W"
			ENDIF
		ENDIF

		IFSET "PS2"
			FRUNAME "SYSTEM"
			FRUADDRESS 03
			FRUAREA "PRODUCT" VALIDATE PS2_FRU_IPMI

			IFSET "PS2_FRU_IPMI"
				SET "CONTINUE_PROBE"
				FRUAREA "PRODUCT"
				PROBE FRUFIELD "PN" "DPS-750XB A"
				FOUND "PS2_750W" ""

				IFSET "PS2_750W"
					CLEAR "CONTINUE_PROBE"
					CLEAR "STICKY_PS2_1600W"
					SET   "STICKY_PS2_750W"
					SET   "PS2_750W_FRU"
					SET   "VALID_PSU"
				ENDIF

				IFSET "CONTINUE_PROBE"
					PROBE FRUFIELD "PN" "IS162F22"
					FOUND "PS2_1600W" ""
					IFSET "PS2_1600W"
						CLEAR "CONTINUE_PROBE"
						CLEAR "STICKY_PS2_750W"
						SET   "STICKY_PS2_1600W"
						SET   "PS2_1600W_FRU"
						SET   "VALID_PSU"
					ENDIF
				ENDIF

				IFSET "CONTINUE_PROBE"
					DISPLAY ""
					DISPLAY "Power supply 2 detected but unable to identify model."
					DISPLAY "Sensors for power supply 2 will not be installed."
					CLEAR "STICKY_PS2_1600W"
					CLEAR "STICKY_PS2_750W"
					CLEAR "CONTINUE_PROBE"
				ELSE
					SET "VALID_PS2"
				ENDIF
			ELSE
				DISPLAY ""
				DISPLAY "Power supply 2 detected but its FRU data is invalid."
				DISPLAY "Sensors for power supply 1 will not be installed."
				DISPLAY ""
				CLEAR "STICKY_PS2_750W"
				CLEAR "STICKY_PS2_1600W"
			ENDIF
		ENDIF

		// SKU dection ------------------------------------------------------------------------------

		DISPLAY " "
		DISPLAY "                                Detected Hardware"
		DISPLAY "********************************************************************************"
		DISPLAY " "

		IFSET "CHASSIS_MENU" "OTHER"

		ELSE
			SET "CHASSIS_MENU"
			SET "OTHER"
			IFSET "NON_PSU" "UPM_No_Red_Fan"
				SET "NRED"
				CLEAR "OTHER"
				CLEAR "CHASSIS_MENU"
				DISPLAY " "
				DISPLAY "Intel(R) Server Chassis Non Redundant Fan SKU"
			ELSE//NON_PSU
				IFSET "UPM_Red_Fan" "VALID_PSU"
					SET "RED"
					CLEAR "OTHER"
					CLEAR "CHASSIS_MENU"
					DISPLAY "Intel(R) Server Chassis Redundant Fan SKU"
					DISPLAY " "
				ENDIF
			ENDIF//NON_PSU
		ENDIF

		IFSET "LAN_RISER"
			DISPLAY "LAN Riser is detected."
			DISPLAY " "
		ENDIF

		IFSET "FAN_1"
			DISPLAY "System Fan 1 is detected."
		ELSE
			IFSET "NR_FAN_1"
				DISPLAY "System Fan 1 is detected."
			ENDIF
		ENDIF

		IFSET "FAN_2"
			DISPLAY "System Fan 2 is detected."
		ELSE
			IFSET "NR_FAN_2"
				DISPLAY "System Fan 2 is detected."
			ENDIF
		ENDIF

		IFSET "FAN_3"
			DISPLAY "System Fan 3 is detected."
		ENDIF

		IFSET "FAN_4"
			DISPLAY "System Fan 4 is detected."
		ENDIF

		IFSET "FAN_5"
			DISPLAY "System Fan 5 is detected."
		ENDIF
		DISPLAY " "

		CLEAR "FAN_1"
		CLEAR "FAN_2"
		CLEAR "FAN_3"
		CLEAR "FAN_4"
		CLEAR "FAN_5"
		CLEAR "NR_FAN_1"
		CLEAR "NR_FAN_2"

		// Detect Processor
		SET "PROCESSOR_1"
		PROBE "PROCESSOR" 2
		FOUND "PROCESSOR_2"

		IFSET "PROCESSOR_2"
			//DISPLAY ""
			DISPLAY "Processor 1 and Processor 2 are detected."
		ELSE
			//DISPLAY ""
			DISPLAY "Processor 1 is detected."
		ENDIF

		// Probe the PHI card directly for a FRU
		PROBE "IMBDEVICE" "14"
		FOUND "RISER_1_PHI" ""

		// Probe the PHI card directly for a FRU
		PROBE "IMBDEVICE" "15"
		FOUND "RISER_2_PHI" ""

                // Probe the PHI card directly for a FRU
		PROBE "IMBDEVICE" "16"
		FOUND "RISER_3_PHI" ""

                //Check for PCIE AIC
                PROBE "IMBDEVICE" "D0"
                FOUND "AIC_IN_SLOT_1"
                IFSET "AIC_IN_SLOT_1"
                    SET     "AIC_YES"
                    DISPLAY "PCIe Add In Card found in Slot 1"
                ENDIF

                //Check for PCIE AIC
                PROBE "IMBDEVICE" "D1"
                FOUND "AIC_IN_SLOT_2"
                IFSET "AIC_IN_SLOT_2"
                    IFSET   "RISER_1_PHI"
                        DISPLAY "Intel PHI (c) Card found in Slot 2"
                    ELSE
                        SET "AIC_YES"
                        DISPLAY "PCIe Add In Card found in Slot 2"
                    ENDIF
                ENDIF

                //Check for PCIE AIC
                PROBE "IMBDEVICE" "D2"
                FOUND "AIC_IN_SLOT_3"
                IFSET "AIC_IN_SLOT_3"
                    SET     "AIC_YES"
                    DISPLAY "PCIe Add In Card found in Slot 3"
                ENDIF

                //Check for PCIE AIC
                PROBE "IMBDEVICE" "D3"
                FOUND "AIC_IN_SLOT_4"
                IFSET "AIC_IN_SLOT_4"
                    IFSET   "RISER_2_PHI"
                        DISPLAY "Intel PHI (c) Card found in Slot 4"
                    ELSE
                        SET "AIC_YES"
                        DISPLAY "PCIe Add In Card found in Slot 4"
                    ENDIF
                ENDIF

                //Check for PCIE AIC
                PROBE "IMBDEVICE" "D4"
                FOUND "AIC_IN_SLOT_5"
                IFSET "AIC_IN_SLOT_5"
                    SET     "AIC_YES"
                    DISPLAY "PCIe Add In Card found in Slot 5"
                ENDIF

                //Check for PCIE AIC
                PROBE "IMBDEVICE" "D5"
                FOUND "AIC_IN_SLOT_6"
                IFSET "AIC_IN_SLOT_6"
                    IFSET   "RISER_3_PHI"
                        DISPLAY "Intel PHI (c) Card found in Slot 6"
                    ELSE
                        SET "AIC_YES"
                        DISPLAY "PCIe Add In Card found in Slot 6"
                    ENDIF
                ENDIF

                PROBE "IMBDEVICE" "12"
                FOUND "SSD_AIC_1" ""
                IFSET "SSD_AIC_1"
                    DISPLAY "SSD PCIe Add In Card 1 found"
                ENDIF

                PROBE "IMBDEVICE" "13"
                FOUND "SSD_AIC_2" ""
                IFSET "SSD_AIC_2"
                    DISPLAY "SSD PCIe Add In Card 2 found"
                ENDIF

		//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 "HSBP1_4X35S3HSBP" ""
				PROBE FRUFIELD "PN" "FXX8X25PCIHSBP"
				FOUND "HSBP1_8X25PCIHSBP" ""
				PROBE FRUFIELD "PN" "FXX8X25S3PHSBP"
				FOUND "HSBP1_8X25PCIHSBP" ""
				PROBE FRUFIELD "PN" "FXX8X25S3DPBP"
				FOUND "HSBP1_8X25S3HSBP" ""
			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 "HSBP2_4X35S3HSBP" ""
					PROBE FRUFIELD "PN" "FXX8X25PCIHSBP"
					FOUND "HSBP2_8X25PCIHSBP" ""
					PROBE FRUFIELD "PN" "FXX8X25S3PHSBP"
					FOUND "HSBP2_8X25PCIHSBP" ""
					PROBE FRUFIELD "PN" "FXX8X25S3DPBP"
					FOUND "HSBP2_8X25S3HSBP" ""
				ENDIF
			ENDIF //ENDIF "HSBP2_PR"
		ENDIF //ENDIF "HSBP1_PR"

		IFSET   "HSBP1_PR"
			//HSBP1 is detected.
			SET "BOTH_HSBP_FRU"
		ELSE
			IFSET   "HSBP2_PR"
				//HSBP2 is detected.
			ELSE
				//DISPLAY ""
				//DISPLAY "Hot Swap Backplane is not detected."
			ENDIF
		ENDIF

		IFSET   "HSBP1_PR"
			IFSET "HSBP1_4X35S3HSBP"
				SET "HSBP1_4X35"
				SET "HDD_4"
				//DISPLAY ""
				//DISPLAY "4 X 3.5 Hot Swap Backplane 1 is detected."
			ELSE
				IFSET "HSBP1_8X25PCIHSBP"
					SET "HSBP1_8X25_COMBO"
					SET "HDD_8"
					//DISPLAY ""
					//DISPLAY "8 X 2.5 Combo Hot Swap Backplane 1 is detected."
				ELSE
					IFSET "HSBP1_8X25S3HSBP"
						SET "HSBP1_8X25"
						SET "HDD_8"
						//DISPLAY ""
						//DISPLAY "8 X 2.5 SAS Only Hot Swap Backplane 1 is detected."
					ELSE
						//DISPLAY ""
						DISPLAY "Hot Swap Backplane 1 FRU is invalid."
					ENDIF
				ENDIF
			ENDIF
		ENDIF

		IFSET   "HSBP2_PR"
			IFSET "HSBP2_4X35S3HSBP"
				SET "HSBP2_4X35"
				IFSET "HDD_8"
					CLEAR "HDD_8"
					SET "HDD_12"
				ELSE
					IFSET "HDD_4"
						CLEAR "HDD_4"
						SET "HDD_8"
					ENDIF
				ENDIF
				//DISPLAY ""
				//DISPLAY "4 X 3.5 Hot Swap Backplane 2 is detected."
			ELSE
				IFSET "HSBP2_8X25PCIHSBP"
					SET "HSBP2_8X25_COMBO"
					IFSET "HDD_8"
						CLEAR "HDD_8"
						SET "HDD_16"
					ELSE
						IFSET "HDD_4"
							CLEAR "HDD_4"
							SET "HDD_12"
						ENDIF
					ENDIF
					//DISPLAY ""
					//DISPLAY "8 X 2.5 Combo Hot Swap Backplane 2 is detected."
				ELSE
					IFSET "HSBP2_8X25S3HSBP"
						SET "HSBP2_8X25"
						IFSET "HDD_8"
							CLEAR "HDD_8"
							SET "HDD_16"
						ELSE
							IFSET "HDD_4"
								CLEAR "HDD_4"
								SET "HDD_12"
							ENDIF
						ENDIF
						//DISPLAY ""
						//DISPLAY "8 X 2.5 SAS/SATA Hot Swap Backplane 2 is detected."
					ELSE
						//DISPLAY ""
						DISPLAY "Hot Swap Backplane 2 FRU is invalid."
					ENDIF
				ENDIF
			ENDIF
		ENDIF

		//show detected HDD Back Plane
		IFSET "HSBP1_4X35S3HSBP"
			DISPLAY "HSBP 1 is a 4 slot 3.5 inch HDD Backplane"
		ENDIF

		IFSET "HSBP1_8X25PCIHSBP"
			DISPLAY "HSBP 1 is a 8 slot 2.5 inch Combo Hot Swap HDD Backplane"
		ENDIF

		IFSET "HSBP1_8X25S3HSBP"
			DISPLAY "HSBP 1 is a 8 slot 2.5 inch HDD Backplane"
		ENDIF

		IFSET "HSBP2_4X35S3HSBP"
			DISPLAY "HSBP 2 is a 4 slot 3.5 inch HDD Backplane"
		ENDIF

		IFSET "HSBP2_8X25PCIHSBP"
			DISPLAY "HSBP 2 is a 8 slot 2.5 inch Combo Hot Swap HDD Backplane"
		ENDIF

		IFSET "HSBP2_8X25S3HSBP"
			DISPLAY "HSBP 2 is a 8 slot 2.5 inch HDD Backplane"
		ENDIF

		IFSET "STICKY_PS1_750W"
			DISPLAY "750 Watt Power Supply Module 1"
		ENDIF

		IFSET "STICKY_PS1_1600W"
			DISPLAY "1600 Watt Power Supply Module 1"
		ENDIF

		IFSET "STICKY_PS2_750W"
			DISPLAY "750 Watt Power Supply Module 2"
		ENDIF

		IFSET "STICKY_PS2_1600W"
			DISPLAY "1600 Watt Power Supply Module 2"
		ENDIF

		IFSET   "VALID_PS1" "VALID_PS2"
			DISPLAY "Redundant Power Supply Configuration"
			SET "STICKY_REDUNDANT_PS"
		ENDIF

		DISPLAY "********************************************************************************"
		IFSET "CHASSIS_MENU"

		ELSE

			//****************************************************************
			// Check for PHI card(s) installed.
			// Note that currently, only the riser is checked to see if is one
			// that supports the PHI card. The PHI itself is not probed since
			// the frusdr utility does not handle riser muxes.
			// This should be changed so that the PHI card itself is detected.
			//****************************************************************
			// Check for PHI cards if we are not using non-Intel GPGPU(s)
			IFSET "USE_GPGPU"
			ELSE
				// Probe the PHI card directly for a FRU
				PROBE "IMBDEVICE" "14"
				FOUND "RISER_1_PHI" ""
				IFSET "RISER_1_PHI"
					SET "R2PHI"
				ENDIF

				// Probe the PHI card directly for a FRU
				PROBE "IMBDEVICE" "15"
				FOUND "RISER_2_PHI" ""
				IFSET "RISER_2_PHI"
					SET "R2PHI"
				ENDIF

				// Probe the PHI card directly for a FRU
				PROBE "IMBDEVICE" "16"
				FOUND "RISER_3_PHI" ""
				IFSET "RISER_3_PHI"
					SET "R2PHI"
				ENDIF
			ENDIF
		ENDIF
		//****************************************************************************************************
		// Display chassis selection menu only if auto-detection fails
		//*****************************************************************************************************
		IFSET "CHASSIS_MENU"
			//************************************************************************
			// If we could not detect a chassis type, signal Auto Config by setting
			// the AUTO_CFG_ERR_CHASSIS_DETECT tag.
			//************************************************************************

			SET "AUTO_CFG_ERR_CHASSIS_DETECT"

			//DISPLAY    " "
			//MENUTITLE   "Select the Chassis"
			//MENU        "RED"		"Intel(R) Server 2600STB Redundant  SKU"
			//MENU        "NRED"		"Intel(R) Server 2600STB Non-Redundant SKU"
			//MENU		"TEST_PLATE"	"Open Test Plate"
			//MENU		"OTHER"			"Other Chassis"
			//MENUPROMPT

			DISPLAY    " "
			MENUTITLE   "Select the HDD Counts"
			MENU    "HDD_4"		"4 HDDs"
			MENU    "HDD_8"		"8 HDDs"
			MENU    "HDD_16"	"16 HDDs"
			MENUPROMPT
			DISPLAY    " "

			//DISPLAY ""
			//MENUTITLE   "Select the CPU Counts"
			//MENU    "PROCESSOR_1"     "Single Processor"
			//MENU    "PROCESSOR_2"     "Dual Processor"
			//MENUPROMPT


			//DISPLAY    " "
			//IFSET "RED"
			//	DISPLAY    " "
			//	MENUTITLE   "Select the Power Supply Type"
			//	MENU    "PS_750"     "750  Watt power supply"
			//	MENU    "PS_1600"     "1600  Watt power supply"
			//	MENUPROMPT
			//	DISPLAY    " "

				//PROMPT "Is PHI CARD 1 Present?"
				//YES "RISER_1_PHI"
				//NO ""

				//PROMPT "Is PHI CARD 2 Present?"
				//YES "RISER_2_PHI"
				//NO ""
				//DISPLAY    " "

				//PROMPT "Is PHI CARD 3 Present?"
				//YES "RISER_3_PHI"
				//NO ""
				//DISPLAY    " "

			//	IFSET "PS_750"
			//		SET "PS1_750W"
			//		SET "PS2_750W"
			//	ENDIF
			//	IFSET "PS_1600"
			//		SET "PS1_1600W"
			//		SET "PS2_1600W"
			//	ENDIF
			//ENDIF

			IFSET "OTHER"
				DISPLAY ""
				PROMPT  "Auto Detect Fan Population & Speeds (Y/N)?"
					YES     "OTHER_AUTO_FAN_DETECT"
					NO      ""

				IFSET "OTHER_AUTO_FAN_DETECT"
					FAN_AUTODETECT
					DISPLAY ""
					DISPLAY "Make sure to go into BIOS setup and choose the appropriate setting for"
					DISPLAY " 'Acoustic' or 'Performance' depending on your system thermal needs."

				ELSE
					PROMPT "Is System Fan 1 installed?"
					YES "OTHER_FAN_1"
					NO ""
					PROMPT "Is System Fan 2 installed?"
					YES "OTHER_FAN_2"
					NO ""
					PROMPT "Is System Fan 3 installed?"
					YES "OTHER_FAN_3"
					NO ""
					PROMPT "Is System Fan 4 installed?"
					YES "OTHER_FAN_4"
					NO ""
					PROMPT "Is System Fan 5 installed?"
					YES "OTHER_FAN_5"
					NO ""
					PROMPT "Is System Fan 6 installed?"
					YES "OTHER_FAN_6"
					NO ""
					PROMPT "Is Processor Fan 1 installed?"
					YES "OTHER_PROC1_FAN"
					NO ""
					PROMPT "Is Processor Fan 2 installed?"
					YES "OTHER_PROC2_FAN"
					NO ""
					PROMPT "Is Rear FAN installed?"
					YES "OTHER_REAR_FAN"
					NO ""
					DISPLAY    " "
				ENDIF
			ENDIF
		ENDIF

		//*****************************************************************
		// Manage NVMe functionality
		//*****************************************************************
		CLEAR "ENABLE_NVME_FUNCTIONS"
		IFSET "HSBP1_8X25_COMBO"
			SET "ENABLE_NVME_FUNCTIONS"
		ENDIF

		IFSET "HSBP2_8X25_COMBO"
			SET "ENABLE_NVME_FUNCTIONS"
		ENDIF

		IFSET "HSBP3_8X25_COMBO"
			SET "ENABLE_NVME_FUNCTIONS"
		ENDIF

		IFSET "ENABLE_NVME_FUNCTIONS"
		ELSE
			SET "DISABLE_NVME_FUNCTIONS"
		ENDIF

		//*****************************************************************
		// Set additional SDR tags based on chassis detected
		//*****************************************************************

		DISPLAY    " "
        SET "INTRUSION"
		IFSET "RED"
			// Set additional SDR tags for the Redundant chassis
			SET "FP_NMI"
			SET "UPM_R"
                        SET "R_P4008"

			IFSET "HDD_16"
                                CLEAR "R_P4008"
				SET "R_P4016"
			ENDIF
		ENDIF

		IFSET "NRED"
			// Set additional SDR tags for the Non_Redundant chassis
			SET "FP_NMI"
			SET "UPM_NR"
			SET "PS1_550W"
                        SET "NR_P4008"

			IFSET "HDD_16"
                                CLEAR "NR_P4008"
				SET "NR_P4016"
			ENDIF
		ENDIF

		IFSET "OTHER"
			SET "FP_NMI"
			SET "OTHER_SLOW"
		ENDIF

		IFSET "SHIPPING"
			SET "FP_NMI"
		ENDIF

		IFSET "TEST_PLATE"
			// Set additional SDR tags for the R2000 chassis
			CLEAR "STICKY_R1000_RED_FAN"
			CLEAR "STICKY_R2000_RED_FAN"
			CLEAR "INTRUSION"
			SET "NO_INTRUSION"
			SET "FP_NMI"
		ENDIF
		// 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"
		CLEAR "PS2"
		CLEAR "NO_PS1"
		CLEAR "NO_PS2"
		CLEAR "VALID_PS1"
		CLEAR "VALID_PS2"
		CLEAR "PS1_FRU_IPMI"
		CLEAR "PS2_FRU_IPMI"
		CLEAR "PS1_750W"
		CLEAR "PS1_1600W"
		CLEAR "PS2_75WC"
		CLEAR "PS2_1600W"
		CLEAR "CONTINUE"
		CLEAR "RED"
		CLEAR "NRED"
		// Update the SDR Repository with selected records

		// Update SDR Repository
		SDRNAME   "S2600STB.sdr"
		// Run the init agent so new SDR data is read and used
		RUN_INIT_AGENT

	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"
			IFSET "NO_WT_FRU"
				DISPLAY " "
				DISPLAY "FRU Board P/N data is invalid."
			ELSE
				DISPLAY     " "
				IFSET S2600STB
					FRUNAME "S2600STB.fru"
				ENDIF

				IFSET S2600STQ
					FRUNAME "S2600STQ.fru"
				ENDIF

				IFSET S2600STS
					FRUNAME "S2600STS.fru"
				ENDIF

				IFSET S2600STK
					FRUNAME "S2600STK.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
				DISPLAY     " "

				IFSET "ALLOW_BRD_UPDATE"
					PROMPT  "Do you want to update Board info area of the FRU (Y/N)?"
					YES     "UPD_BRD"
					NO      ""

					IFSET "UPD_BRD"
						// Update board area
						FRUAREA     "BOARD"
						FRUFIELD    "P#"
						FRUFIELD    "S#"

						DISPLAY     " "
						PROMPT      "Do you want to enter the Board part number (Y/N)?"
						YES         "BRD_PN"
						NO          ""

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

						DISPLAY     " "
						PROMPT      "Do you want to enter the Board serial number (Y/N)?"
							YES         "BRD_SN"
							NO          ""

						IFSET "BRD_SN"
							FRUFIELD    "S#" "@STDIN:ASCII"
						ENDIF
					ENDIF
					DISPLAY     " "
				ENDIF

				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"
					DISPLAY     " "
					PROMPT      "Do you want to enter the product version (Y/N)?"
					YES         "PROD_PV"
					NO          ""

					IFSET "PROD_PV"
						FRUFIELD    "PV" "@STDIN:ASCII"
					ENDIF

					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 a product asset tag (Y/N)?"
					YES         "PROD_ASSET"
					NO          ""

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

				ENDIF
				DISPLAY     " "
			ENDIF
		ENDIF
	ENDIF
    ENDIF //EXIT1 ENDIF
ENDIF
