//****************************************************************************
//                   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) 2012 Intel Corporation. All Rights Reserved.
//****************************************************************************
//
//  TITLE: Master.CFG             DATE CREATED:  08/28/2013
//****************************************************************************
//  Revision History:
//
//****************************************************************************

CONFIGURATION   "Master.cfg, Rev 1.05"
DISPLAY         "S1600JP platform FRU & SDR package version 1.05"

// Detect Product ID**********************************************************
PROBE           "BASEBOARD_PRODID" "5B"
FOUND           "JP" ""

IFSET "JP"
    DISPLAY "Intel(R) Server Board S1600JP platform"
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) 2012 Intel Corporation"
DISPLAY         " "

// If it's for factory use, please un-comment following 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
        IFSET "SDR"
            // 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" ""
                    ENDIF
                ELSE
                    DISPLAY ""
                    DISPLAY "Front Panel FRU is not detected."
                ENDIF

                // Check power supply and all fans
                IFSET "SKUS"
                    DISPLAY ""
                    // 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 "750W_HS_PS1" ""
                                PROBE FRUFIELD "PN" "DPS-500WB A"
                                FOUND "450W_ERP_PS1" ""
                                PROBE FRUFIELD "PN" "DPS-500WB B"
                                FOUND "450W_ERP_PS1" ""
                                PROBE FRUFIELD "PN" "DPS-500WB-1 A"
                                FOUND "450W_ERP_PS1" ""
                                PROBE FRUFIELD "PN" "SUNNY451DM"
                                FOUND "450W_DC_PS1" ""
                            ENDIF
                        ENDIF
                    ENDIF // END IFSET "PS1"

                    // Detect PS2 --------------------------------------------------
                    IFSET "750W_HS_PS1"
                        // Need not to probe power supply 2.
                    ELSE
                        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-500WB A"
                                    FOUND "450W_ERP_PS2" ""
                                    PROBE FRUFIELD "PN" "DPS-500WB B"
                                    FOUND "450W_ERP_PS2" ""
                                    PROBE FRUFIELD "PN" "DPS-500WB-1 A"
                                    FOUND "450W_ERP_PS2" ""
                                    PROBE FRUFIELD "PN" "SUNNY451DM"
                                    FOUND "450W_DC_PS2" ""
                                ENDIF
                            ENDIF
                        ENDIF // END IFSET "PS2"
                    ENDIF // END IFSET "750W_HS_PS1"

                    // Display msg for PS1 --------------------------------------------------
                    IFSET "PS1"
                        IFSET "750W_HS_PS1"
                            DISPLAY ""
                            DISPLAY "750W Hot Swap Power Supply 1 is detected."
                        ELSE
                            IFSET "450W_ERP_PS1"
                                SET "450W_ERP_PSU" // It can enough to recognize what SKU is if any PSU exists
                                DISPLAY ""
                                DISPLAY "450W mini-ERP Power Supply 1 is detected."
                            ELSE
                                IFSET "450W_DC_PS1"
                                    SET "450W_DC_PSU" // It can enough to recognize what SKU is if any PSU exists
                                    DISPLAY ""
                                    DISPLAY "450W DC Power Supply 1 is detected."
                                ELSE
                                    DISPLAY ""
                                    DISPLAY "Power supply 1 FRU is invalid."
                                ENDIF
                            ENDIF
                        ENDIF
                    ENDIF // END IFSET "PS1"

                    // Display msg for PS2 --------------------------------------------------
                    IFSET "PS2"
                        IFSET "450W_ERP_PS2"
                            SET "450W_ERP_PSU" // It can enough to recognize what SKU is if any PSU exists
                            DISPLAY ""
                            DISPLAY "450W mini-ERP Power Supply 2 is detected."
                        ELSE
                            IFSET "450W_DC_PS2"
                                SET "450W_DC_PSU" // It can enough to recognize what SKU is if any PSU exists
                                DISPLAY ""
                                DISPLAY "450W DC Power Supply 2 is detected."
                            ELSE
                                DISPLAY ""
                                DISPLAY "Power supply 2 FRU is invalid."
                            ENDIF
                        ENDIF
                    ENDIF // END IFSET "PS2"

                    //Power supply redundancy check --------------------------------------------------
                    IFSET "PS1" 
                        //Power Supply 1 is detected.
                        IFSET "PS2" 
                            //If both PS are installed, load PS redundancy sensor
                            SET "PS_REDUNDANCY"
                        ENDIF
                    ELSE
                        IFSET "PS2"
                            //Power Supply 2 is detected.
                        ELSE
                            DISPLAY ""
                            DISPLAY "Power Supply is not detected."
                        ENDIF
                    ENDIF

                    // Detect fan speed by tachometer ----------------------------------------------------------------------------------------------------
                    // Skip all found command because need detect again
                    PROBE "FAN_SIGNAL" 08 // System fan 1a
                    PROBE "FAN_SIGNAL" 09 // System fan 1b
                    PROBE "FAN_SIGNAL" 06 // System fan 2a
                    PROBE "FAN_SIGNAL" 07 // System fan 2b
                    PROBE "FAN_SIGNAL" 04 // System fan 3a
                    PROBE "FAN_SIGNAL" 05 // System fan 3b
                    PROBE "FAN_SIGNAL" 02 // System fan 4a
                    PROBE "FAN_SIGNAL" 03 // System fan 4b
                    PROBE "FAN_SIGNAL" 00 // System fan 5a
                    PROBE "FAN_SIGNAL" 01 // System fan 5b
                    PROBE "FAN_SIGNAL" 0A // System fan 6a
                    PROBE "FAN_SIGNAL" 0B // System fan 6b

                    // Work-around for hardware register to be reset by detecting twice --------------------------------------------------
                    PROBE "FAN_SIGNAL" 08
                    FOUND "FAN_1A" ""
                    PROBE "FAN_SIGNAL" 09
                    FOUND "FAN_1B" ""
                    PROBE "FAN_SIGNAL" 06
                    FOUND "FAN_2A" ""
                    PROBE "FAN_SIGNAL" 07
                    FOUND "FAN_2B" ""
                    PROBE "FAN_SIGNAL" 04
                    FOUND "FAN_3A" ""
                    PROBE "FAN_SIGNAL" 05
                    FOUND "FAN_3B" ""
                    PROBE "FAN_SIGNAL" 02
                    FOUND "FAN_4A" ""
                    PROBE "FAN_SIGNAL" 03
                    FOUND "FAN_4B" ""
                    PROBE "FAN_SIGNAL" 00
                    FOUND "FAN_5A" ""
                    PROBE "FAN_SIGNAL" 01
                    FOUND "FAN_5B" ""
                    PROBE "FAN_SIGNAL" 0A
                    FOUND "FAN_6A" "NO_FAN_6A"
                    PROBE "FAN_SIGNAL" 0B
                    FOUND "FAN_6B" "NO_FAN_6B"

                    // Count how many fans
                    IFSET "FAN_2A" "FAN_2B" "FAN_3A" "FAN_3B" "FAN_4A" "FAN_4B" "FAN_5A" "FAN_5B"
                        IFSET "NO_FAN_6A" "NO_FAN_6B"
                            IFSET "FAN_1A" "FAN_1B"
                                // 3+2 fans
                                SET "Five_FAN"
                            ELSE
                                // 3+1 fans
                                SET "Four_FAN"
                            ENDIF
                        ENDIF
                    ELSE
                        // Detecting again if detect abnormal
                        CLEAR "NO_FAN_6A"
                        CLEAR "NO_FAN_6B"

                        // Work-around for hardware register to be reset by detecting three times --------------------------------------------------
                        PROBE "FAN_SIGNAL" 08
                        FOUND "FAN_1A" ""
                        PROBE "FAN_SIGNAL" 09
                        FOUND "FAN_1B" ""
                        PROBE "FAN_SIGNAL" 06
                        FOUND "FAN_2A" ""
                        PROBE "FAN_SIGNAL" 07
                        FOUND "FAN_2B" ""
                        PROBE "FAN_SIGNAL" 04
                        FOUND "FAN_3A" ""
                        PROBE "FAN_SIGNAL" 05
                        FOUND "FAN_3B" ""
                        PROBE "FAN_SIGNAL" 02
                        FOUND "FAN_4A" ""
                        PROBE "FAN_SIGNAL" 03
                        FOUND "FAN_4B" ""
                        PROBE "FAN_SIGNAL" 00
                        FOUND "FAN_5A" ""
                        PROBE "FAN_SIGNAL" 01
                        FOUND "FAN_5B" ""
                        PROBE "FAN_SIGNAL" 0A
                        FOUND "FAN_6A" "NO_FAN_6A"
                        PROBE "FAN_SIGNAL" 0B
                        FOUND "FAN_6B" "NO_FAN_6B"

                        // Count how many fans
                        IFSET "NO_FAN_6A" "NO_FAN_6B"
                            IFSET "FAN_2A" "FAN_2B" "FAN_3A" "FAN_3B" "FAN_4A" "FAN_4B" "FAN_5A" "FAN_5B"
                                IFSET "FAN_1A" "FAN_1B"
                                    // 3+2 fans
                                    SET "Five_FAN"
                                ELSE
                                    // 3+1 fans
                                    SET "Four_FAN"
                                ENDIF
                            ENDIF
                        ENDIF
                    ENDIF // END IFSET "FAN_2A" "FAN_2B" "FAN_3A" "FAN_3B" "FAN_4A" "FAN_4B" "FAN_5A" "FAN_5B"

                    // HSBP Check ----------------------------------------------------------------------------------------------------
                    // Detect HSBP1
                    PROBE "PING" "0B" "D0"
                    FOUND "HSBP1" ""
                    IFSET "HSBP1"
                        FRUNAME "SYSTEM"
                        FRUADDRESS 05
                        FRUAREA "BOARD" VALIDATE HSBP_CK11
                        IFSET HSBP_CK11
                            FRUAREA "BOARD"
                            PROBE FRUFIELD "PN" "F1U8X25HSBP"
                            FOUND "HSBP_1_BP8" ""
                            IFSET "HSBP_1_BP8"
                                DISPLAY ""
                                DISPLAY "8 X 2.5 Hot Swap Backplane 1 is detected."
                            ENDIF
                            PROBE FRUFIELD "PN" "FR1304HSBP"
                            FOUND "HSBP_1_BP4" ""
                            IFSET "HSBP_1_BP4"
                                DISPLAY ""
                                DISPLAY "4 X 3.5 Hot Swap Backplane 1 is detected."
                            ENDIF
                            PROBE FRUFIELD "PN" "FXX1304HSBP"
                            FOUND "HSBP_1_BP4" ""
                            IFSET "HSBP_1_BP4"
                                DISPLAY ""
                                DISPLAY "4 X 3.5 Hot Swap Backplane 1 is detected."
                            ENDIF
                        ENDIF

                        // Detect HSBP2 --------------------------------------------------
                        PROBE "PING" "0B" "D2"
                        FOUND "HSBP2" ""
                        IFSET "HSBP2"
                            FRUNAME "SYSTEM"
                            FRUADDRESS 06
                            FRUAREA "BOARD" VALIDATE HSBP_CK21
                            IFSET HSBP_CK21
                                FRUAREA "BOARD"
                                PROBE FRUFIELD "PN" "F1U8X25HSBP"
                                FOUND "HSBP_2_BP8" ""
                                IFSET "HSBP_2_BP8"
                                    DISPLAY ""
                                    DISPLAY "8 X 2.5 Hot Swap Backplane 1 is detected."
                                ENDIF
                                PROBE FRUFIELD "PN" "FR1304HSBP"
                                FOUND "HSBP_2_BP4" ""
                                IFSET "HSBP_2_BP4"
                                    DISPLAY ""
                                    DISPLAY "4 X 3.5 Hot Swap Backplane 1 is detected."
                                ENDIF
                                PROBE FRUFIELD "PN" "FXX1304HSBP"
                                FOUND "HSBP_2_BP4" ""
                                IFSET "HSBP_2_BP4"
                                    DISPLAY ""
                                    DISPLAY "4 X 3.5 Hot Swap Backplane 1 is detected."
                                ENDIF
                            ENDIF

                            // Detect HSBP3 --------------------------------------------------
                            PROBE "PING"    "0B"    "D4"
                            FOUND "HSBP3"     ""
                            IFSET "HSBP3"
                                FRUNAME "SYSTEM"
                                FRUADDRESS 07
                                FRUAREA "BOARD" VALIDATE HSBP_CK31
                                IFSET HSBP_CK31
                                    FRUAREA "BOARD"
                                    PROBE FRUFIELD "PN" "F1U8X25HSBP"
                                    FOUND "HSBP_3_BP8" ""
                                    IFSET "HSBP_3_BP8"
                                        DISPLAY ""
                                        DISPLAY "8 X 2.5 Hot Swap Backplane 1 is detected."
                                    ENDIF
                                    PROBE FRUFIELD "PN" "FR1304HSBP"
                                    FOUND "HSBP_3_BP4" ""
                                    IFSET "HSBP_3_BP4"
                                        DISPLAY ""
                                        DISPLAY "4 X 3.5 Hot Swap Backplane 1 is detected."
                                    ENDIF
                                    PROBE FRUFIELD "PN" "FXX1304HSBP"
                                    FOUND "HSBP_3_BP4" ""
                                    IFSET "HSBP_3_BP4"
                                        DISPLAY ""
                                        DISPLAY "4 X 3.5 Hot Swap Backplane 1 is detected."
                                        ENDIF
                                ENDIF
                            ENDIF // END IFSET "HSBP3"
                        ENDIF // END IFSET "HSBP2"
                    ENDIF // END IFSET "HSBP1"

                    // Distinguish SKU ----------------------------------------------------------------------------------------------------
                    IFSET "HSBP_1_BP4"
                        IFSET "750W_HS_PS1"
                            IFSET "Five_FAN"
                                DISPLAY ""
                                DISPLAY "Intel(R) Server Chassis R1304JP4GS."
                                SET "BFP_24_5_FAN"
                            ELSE
                                DISPLAY ""
                                DISPLAY "Fan configuration is not valid, falling back to user selection as auto-detection is not possible."
                                SET "USER_SELECT"
                            ENDIF
                        ELSE
                            IFSET "450W_ERP_PSU"
                                IFSET "Four_FAN"
                                    DISPLAY ""
                                    DISPLAY "Intel(R) Server Chassis R1304JP4OC."
                                    SET "BFP_24_4_FAN"
                                ELSE
                                    DISPLAY ""
                                    DISPLAY "Fan configuration is not valid, falling back to user selection as auto-detection is not possible."
                                    SET "USER_SELECT"
                                ENDIF
                            ELSE
                                IFSET "450W_DC_PSU"
                                    IFSET "Four_FAN"
                                        DISPLAY ""
                                        DISPLAY "Intel(R) Server Chassis R1304JP4TC."
                                        SET "BFP_24_4_FAN"
                                    ELSE
                                        DISPLAY ""
                                        DISPLAY "Fan configuration is not valid, falling back to user selection as auto-detection is not possible."
                                        SET "USER_SELECT"
                                    ENDIF
                                ELSE
                                    DISPLAY ""
                                    DISPLAY "Falling back to user selection as auto-detection is not possible."
                                    SET "USER_SELECT"
                                ENDIF // END IFSET "450W_DC_PSU"
                            ENDIF // END IFSET "450W_ERP_PSU"
                        ENDIF // END IFSET "750W_HS_PS1"
                    ELSE
                        IFSET "HSBP_1_BP8"
                            IFSET "750W_HS_PS1"
                                IFSET "Five_FAN"
                                    DISPLAY ""
                                    DISPLAY "Intel(R) Server Chassis R1208JP4GS."
                                    SET "BFP_24_5_FAN"
                                ELSE
                                    DISPLAY ""
                                    DISPLAY "Fan configuration is not valid, falling back to user selection as auto-detection is not possible."
                                    SET "USER_SELECT"
                                ENDIF
                            ELSE
                                IFSET "450W_ERP_PSU"
                                    IFSET "Four_FAN"
                                        DISPLAY ""
                                        DISPLAY "Intel(R) Server Chassis R1208JP4OC."
                                        SET "BFP_24_4_FAN"
                                    ELSE
                                        DISPLAY ""
                                        DISPLAY "Fan configuration is not valid, falling back to user selection as auto-detection is not possible."
                                        SET "USER_SELECT"
                                    ENDIF
                                ELSE
                                    IFSET "450W_DC_PSU"
                                        IFSET "Four_FAN"
                                            DISPLAY ""
                                            DISPLAY "Intel(R) Server Chassis R1208JP4TC."
                                            SET "BFP_24_4_FAN"
                                        ELSE
                                            DISPLAY ""
                                            DISPLAY "Fan configuration is not valid, falling back to user selection as auto-detection is not possible."
                                            SET "USER_SELECT"
                                        ENDIF
                                    ELSE
                                        DISPLAY ""
                                        DISPLAY "Falling back to user selection as auto-detection is not possible."
                                        SET "USER_SELECT"
                                    ENDIF // END IFSET "450W_DC_PSU"
                                ENDIF // END IFSET "450W_ERP_PSU"
                            ENDIF // END IFSET "750W_HS_PS1"
                        ENDIF // END IFSET "HSBP_1_BP8"
                    ENDIF // END IFSET "HSBP_1_BP4"
                ELSE
                    DISPLAY ""
                    DISPLAY "Falling back to user selection as auto-detection is not possible."
                    SET "USER_SELECT"
                ENDIF // END IFSET "SKUS"
            ENDIF // END IFSET "AUTO_DETECTION"

            // Set User select ----------------------------------------------------------------------------------------------------
            IFSET "USER_SELECT"
                DISPLAY ""
                MENUTITLE   "Select the SKUs:"
                MENU    "BFP_24_5_FAN"               "Buffalo Peak 24 3+2 fan SKU"
                MENU    "BFP_24_4_FAN"               "Buffalo Peak 24 3+1 fan SKU"
                MENU    "OTHER"                      "Other Chassis"
                MENUPROMPT
                DISPLAY ""
            ENDIF

            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

            // Set if it's for factory use
            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     ""
            ELSE // If not factory mode, scan sensors and fru devices
                // Probe for sensors and FRU devices
                DISPLAY ""
                DISPLAY "Probing system for sensors and FRU device hardware..."
                // DISPLAY ""

                // Processor Check ----------------------------------------------------------------------------------------------------
                SET "PROC_1"
                // PROBE "PROCESSOR" 1
                // FOUND "PROC_1" ""

                // Detect IO Module ----------------------------------------------------------------------------------------------------
                // Is a I/O (LAN) module installed with a temperature sensor on it?
                PROBE "PING" "0D" "94"
                FOUND "IO_MODULE"
                IFSET "IO_MODULE"
                    DISPLAY ""
                    DISPLAY "I/O module is Detected."
                ENDIF

                // And is a FRU storage device on the I/O (LAN) module?
                PROBE "PING" "0D" "A4"
                FOUND "IO_MODULE_FRU"

                // Detect SAS Module ----------------------------------------------------------------------------------------------------
                // Is a SAS module installed with a temperature sensor on it?
                PROBE "PING" "0D" "98"
                FOUND "SAS_MODULE"
                IFSET "SAS_MODULE"
                    DISPLAY ""
                    DISPLAY "SAS module is Detected."
                ENDIF

                // And is a FRU storage device on the SAS module?
                PROBE "PING" "0D" "A8"
                FOUND "SAS_MODULE_FRU"

                //Detect GPGPU Riser ----------------------------------------------------------------------------------------------------
                // Is a GPGPU Riser installed with a temperature sensor on it?
                PROBE "PING" "05" "92"
                FOUND "GPGPU_Riser"
                IFSET "GPGPU_Riser"
                    DISPLAY ""
                    DISPLAY "GPGPU Riser is Detected."
                ENDIF

                // No FRU storage device on the GPGPU Riser.

                //Detect FHFL Riser ----------------------------------------------------------------------------------------------------
                // Is a FHFL Riser installed with a temperature sensor on it?
                PROBE "PING" "05" "90"
                FOUND "FHFL_Riser"
                IFSET "FHFL_Riser"
                    DISPLAY ""
                    DISPLAY "FHFL Riser is Detected."
                ENDIF

                // No FRU storage device on the FHFL Riser.

                DISPLAY ""
            ENDIF // END IFSET "FACTORY_MODE"

            // Set SDR tags for items that are standard on specific SKU *******************************

            // Buffalo Peak 24" 3+2 fan SKU ----------------------------------------------------------------------------------------------------
            IFSET "BFP_24_5_FAN"
                // System Fans
                SET "STANDARD_FAN_1A"
                SET "STANDARD_FAN_1B"
                SET "STANDARD_FAN_2A"
                SET "STANDARD_FAN_2B"
                SET "STANDARD_FAN_3A"
                SET "STANDARD_FAN_3B"
                SET "STANDARD_FAN_4A"
                SET "STANDARD_FAN_4B"
                SET "STANDARD_FAN_5A"
                SET "STANDARD_FAN_5B"

                // Front Panel Temp
                SET "FP_TEMP"

                // Front Panel NMI button
                SET "FP_NMI"

                // Chassis intrusion
                // SET "CHASSIS_INTRU"
                // Physical Security Sensor with lan leash lost event mask only
                SET "NO_CHASSIS_INTRU"
            ENDIF

            // Buffalo Peak 24" 3+1 fan SKU ----------------------------------------------------------------------------------------------------
            IFSET "BFP_24_4_FAN"
                // System Fans
                SET "STANDARD_FAN_2A"
                SET "STANDARD_FAN_2B"
                SET "STANDARD_FAN_3A"
                SET "STANDARD_FAN_3B"
                SET "STANDARD_FAN_4A"
                SET "STANDARD_FAN_4B"
                SET "STANDARD_FAN_5A"
                SET "STANDARD_FAN_5B"

                // Front Panel Temp
                SET "FP_TEMP"

                //Front Panel NMI button
                SET "FP_NMI"

                // Chassis intrusion
                // SET "CHASSIS_INTRU"
                // Physical Security Sensor with lan leash lost event mask only
                SET "NO_CHASSIS_INTRU"
            ENDIF

            // OTHER chassis ----------------------------------------------------------------------------------------------------
            IFSET "OTHER"
                //System Fans
                DISPLAY ""
                PROMPT "Is System Fan 1A installed?"
                YES "OTHER_FAN_1A"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 1B installed?"
                YES "OTHER_FAN_1B"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 2A installed?"
                YES "OTHER_FAN_2A"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 2B installed?"
                YES "OTHER_FAN_2B"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 3A installed?"
                YES "OTHER_FAN_3A"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 3B installed?"
                YES "OTHER_FAN_3B"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 4A installed?"
                YES "OTHER_FAN_4A"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 4B installed?"
                YES "OTHER_FAN_4B"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 5A installed?"
                YES "OTHER_FAN_5A"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 5B installed?"
                YES "OTHER_FAN_5B"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 6A installed?"
                YES "OTHER_FAN_6A"
                NO ""
                DISPLAY ""
                PROMPT "Is System Fan 6B installed?"
                YES "OTHER_FAN_6B"
                NO ""

                // For fan redundancy sensor

                // Power Supply Module 1 & 2
                SET "PS1"
                CLEAR "750W_HS_PS1"
                CLEAR "450W_ERP_PS1"
                CLEAR "450W_ERP_PS2"
                CLEAR "450W_DC_PS1"
                CLEAR "450W_DC_PS2"
                CLEAR "PS_REDUNDANCY"

                // Chassis intrusion
                DISPLAY ""
                PROMPT "Does the system have chassis intrusion?"
                YES "CHASSIS_INTRU"
                NO "NO_CHASSIS_INTRU"

                DISPLAY ""
                PROMPT "Does the front panel support a NMI button?"
                YES "FP_NMI"
                NO  ""

            ENDIF // END IFSET "OTHER"

            // Shipping ----------------------------------------------------------------------------------------------------
            IFSET "SHIP"

                SET "PROC_1"

                // Power Supply Module 1 & 2

                // HSBP 1/2/3 

                // Physical Security Sensor with lan leash lost event mask only
                SET "NO_CHASSIS_INTRU"

                // Remove stepwise curve record
                CLEAR "JP"

            ENDIF

            // FCT ----------------------------------------------------------------------------------------------------
            IFSET "FCT"

                // System Fans
                SET "OTHER_FAN_1A"
                SET "OTHER_FAN_1B"
                SET "OTHER_FAN_2A"
                SET "OTHER_FAN_2B"
                SET "OTHER_FAN_3A"
                SET "OTHER_FAN_3B"
                SET "OTHER_FAN_4A"
                SET "OTHER_FAN_4B"
                SET "OTHER_FAN_5A"
                SET "OTHER_FAN_5B"
                SET "OTHER_FAN_6A"
                SET "OTHER_FAN_6B"

                // Power Supply Module 1 & 2
                SET "750W_HS_PS1"

                // Processor
                SET "PROC_1"

                // Chassis intrusion
                SET "CHASSIS_INTRU"

                // IO Module & SAS Module
                SET "IO_MODULE"
                SET "IO_MODULE_FRU"

                // Remove stepwise curve record
                CLEAR "JP"

            ENDIF

            // FCT2 ----------------------------------------------------------------------------------------------------
            IFSET "FCT2"

                //System Fans
                SET "OTHER_FAN_1A"
                SET "OTHER_FAN_1B"
                SET "OTHER_FAN_2A"
                SET "OTHER_FAN_2B"
                SET "OTHER_FAN_3A"
                SET "OTHER_FAN_3B"
                SET "OTHER_FAN_4A"
                SET "OTHER_FAN_4B"
                SET "OTHER_FAN_5A"
                SET "OTHER_FAN_5B"
                SET "OTHER_FAN_6A"
                SET "OTHER_FAN_6B"

                // Power Supply Module 1 & 2
                SET "750W_HS_PS1"

                // HSBP 1/2/3 

                // Processor
                SET "PROC_1"

                // Chassis intrusion
                SET "CHASSIS_INTRU"

                // Remove stepwise curve record
                CLEAR "JP"

            ENDIF

            SDRNAME "S1600JP.sdr"        // Update SDR Repository
            BMC_REFRESH
        ENDIF // END IFSET "SDR"

        IFSET "FRU"

            // ******************************
            //   Update Base Board FRU areas
            // ******************************

                IFSET "JP"
                    DISPLAY     ""
                    DISPLAY     "Updating JP FRU areas"

                    //Update Baseboard FRU data
                    FRUNAME     "S1600JP.FRU"
                    FRUAREA     "HEADER"
                    FRUAREA     "INTERNALUSE"
                    FRUAREA     "CHASSIS"
                    FRUFIELD    "CT"
                ENDIF

                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 system info area of the FRU?"
                YES         "UPD_PRD"
                NO          ""
                IFSET       "UPD_PRD"
                    FRUFIELD    "MN"
                    FRUFIELD    "PN"
                    FRUFIELD    "PV"
                    PROMPT     "Do you want to enter system part number?"
                    YES        "PROD_PN"
                    NO         ""
                    IFSET      "PROD_PN"
                        FRUFIELD    "P#" "@STDIN:ASCII"
                    ENDIF

                    PROMPT     "Do you want to enter the system 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 "FRU"
    ENDIF // ASSET TAG
ENDIF // IFSET "EXIT1"