Skip to content

fby3.5: common: Support individual sensor polling enable/disable#398

Closed
DelphineChiu wants to merge 1 commit into
facebook:mainfrom
Wiwynn:fby3.5-Support_sensor_polling_control
Closed

fby3.5: common: Support individual sensor polling enable/disable#398
DelphineChiu wants to merge 1 commit into
facebook:mainfrom
Wiwynn:fby3.5-Support_sensor_polling_control

Conversation

@DelphineChiu

Copy link
Copy Markdown

Summary:

  • Introduce IPMI / CLI platform command to enable/disable sensor polling.
  • Add option of enabling sensor polling to sensor config table of Yv35 CL, Yv35 BB, Yv35 RF, and GT CC.

Note:

  • IPMI command format
    • Request
      Byte 1:3 - MFG ID – 00A015h, LS byte first
      Byte 4 - total sensor count to be polling controlled ( sensor count should be less than or equal to 10 )
      Byte 5 - control operation ( 0:disable, 1:enable )
      Byte 6:N - sensor number list to be polling controlled
    • Response
      Byte 1: Completion code
      Byte 2:N - [sensor num][status] ( status 0:disable, 1:enable )
      note: If the sensor number is not supported will respond 0xFF

Test plan:

  • Build code: Pass
  • Disable six DIMM temperature sensor polling through IPMI command: Pass
  • Enable six DIMM temperature sensor polling through IPMI command: Pass
  • Disable P12V_STBY sensor polling through CLI platform command: Pass
  • Enable P12V_STBY sensor polling through CLI platform command: Pass

Log:
[BMC console]
root@bmc-oob:~# sensor-util slot3 --threshold | grep "DIMM"
DIMMA Temp (0x6) : 34.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMC Temp (0x7) : 33.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMD Temp (0x9) : 32.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMME Temp (0xA) : 33.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMG Temp (0xB) : 31.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMH Temp (0xC) : 29.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
P12V_DIMM Vol (0x26) : 12.57 Volts | (ok) | UCR: 14.21 | UNC: 14.07 | UNR: NA | LCR: 9.87 | LNC: 10.01 | LNR: NA

  • Disable six DIMM temperature sensor polling through IPMI command
    root@bmc-oob:# bic-util slot3 0xE0 0x45 0x15 0xA0 0x00 0x6 0x0 0x6 0x7 0x9 0xA 0xB 0xC
    15 A0 00 06 00 07 00 09 00 0A 00 0B 00 0C 00
    root@bmc-oob:
    # sensor-util slot3 --threshold | grep "DIMM"
    DIMMA Temp (0x6) : NA | (na)
    DIMMC Temp (0x7) : NA | (na)
    DIMMD Temp (0x9) : NA | (na)
    DIMME Temp (0xA) : NA | (na)
    DIMMG Temp (0xB) : NA | (na)
    DIMMH Temp (0xC) : NA | (na)
    P12V_DIMM Vol (0x26) : 12.57 Volts | (ok) | UCR: 14.21 | UNC: 14.07 | UNR: NA | LCR: 9.87 | LNC: 10.01 | LNR: NA

  • Enable six DIMM temperature sensor polling through IPMI command
    root@bmc-oob:# bic-util slot3 0xE0 0x45 0x15 0xA0 0x00 0x6 0x1 0x6 0x7 0x9 0xA 0xB 0xC
    15 A0 00 06 01 07 01 09 01 0A 01 0B 01 0C 01
    root@bmc-oob:
    # sensor-util slot3 --threshold | grep "DIMM"
    DIMMA Temp (0x6) : 34.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
    DIMMC Temp (0x7) : 33.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
    DIMMD Temp (0x9) : 32.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
    DIMME Temp (0xA) : 33.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
    DIMMG Temp (0xB) : 31.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
    DIMMH Temp (0xC) : 29.00 C | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
    P12V_DIMM Vol (0x26) : 12.57 Volts | (ok) | UCR: 14.21 | UNC: 14.07 | UNR: NA | LCR: 9.87 | LNC: 10.01 | LNR: NA

[BIC console]
-Enable/Disable sensor polling
uart:~$ platform sensor
sensor - SENSOR relative command.

Subcommands:
list_all :List all SENSOR config.
get :Get SENSOR config
control_sensor_polling :Enable/Disable sensor polling

  • Disable P12V_STBY sensor polling through CLI platform command
    uart:$ platform sensor control_sensor_polling 0x20 0x0
    Sensor number 0x20 disable sensor polling success
    uart:
    $ platform sensor get 0x20
    [0x20] Unsupported name : adc | access[O] | polling_disable | 255

  • Enable P12V_STBY sensor polling through CLI platform command
    uart:$ platform sensor control_sensor_polling 0x20 0x1
    Sensor number 0x20 enable sensor polling success
    uart:
    $ platform sensor get 0x20
    [0x20] Unsupported name : adc | access[O] | 4byte_acur_read_success | 51970060

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 12, 2022
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@LoraLin1 LoraLin1 force-pushed the fby3.5-Support_sensor_polling_control branch from 49c694e to ff18a0d Compare July 13, 2022 01:08
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@DelphineChiu has updated the pull request. You must reimport the pull request before landing.

@LoraLin1

Copy link
Copy Markdown
Collaborator

Hi @GoldenBug ,
We have fixed the conflict and do the forced update.
Please help to review again, thank you.

Summary:
- Introduce IPMI / CLI platform command to enable/disable sensor polling.
- Add option of enabling sensor polling to sensor config table of Yv35 CL, Yv35 BB, Yv35 RF, Yv35 HD, WC MB and GT CC.
- Add individual polling time to sensor config table of Yv35 HD and WC MB.

Note:
- IPMI command format
  - Request
    Byte 1:3 - MFG ID – 00A015h, LS byte first
    Byte 4 - total sensor count to be polling controlled ( sensor count should be less than or equal to 10 )
    Byte 5 - control operation ( 0:disable, 1:enable )
    Byte 6:N - sensor number list to be polling controlled
  - Response
    Byte 1: Completion code
    Byte 2:N - [sensor num][status] ( status 0:disable, 1:enable )
    note: If the sensor number is not supported will respond 0xFF

Test plan:
- Build code: Pass
- Disable six DIMM temperature sensor polling through IPMI command: Pass
- Enable six DIMM temperature sensor polling through IPMI command: Pass
- Disable P12V_STBY sensor polling through CLI platform command: Pass
- Enable P12V_STBY sensor polling through CLI platform command: Pass

Log:
[BMC console]
root@bmc-oob:~# sensor-util slot3 --threshold | grep "DIMM"
DIMMA Temp                   (0x6) :   34.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMC Temp                   (0x7) :   33.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMD Temp                   (0x9) :   32.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMME Temp                   (0xA) :   33.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMG Temp                   (0xB) :   31.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMH Temp                   (0xC) :   29.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
P12V_DIMM Vol                (0x26) :   12.57 Volts | (ok) | UCR: 14.21 | UNC: 14.07 | UNR: NA | LCR: 9.87 | LNC: 10.01 | LNR: NA

- Disable six DIMM temperature sensor polling through IPMI command
root@bmc-oob:~# bic-util slot3 0xE0 0x45 0x15 0xA0 0x00 0x6 0x0 0x6 0x7 0x9 0xA 0xB 0xC
15 A0 00 06 00 07 00 09 00 0A 00 0B 00 0C 00
root@bmc-oob:~# sensor-util slot3 --threshold | grep "DIMM"
DIMMA Temp                   (0x6) : NA | (na)
DIMMC Temp                   (0x7) : NA | (na)
DIMMD Temp                   (0x9) : NA | (na)
DIMME Temp                   (0xA) : NA | (na)
DIMMG Temp                   (0xB) : NA | (na)
DIMMH Temp                   (0xC) : NA | (na)
P12V_DIMM Vol                (0x26) :   12.57 Volts | (ok) | UCR: 14.21 | UNC: 14.07 | UNR: NA | LCR: 9.87 | LNC: 10.01 | LNR: NA

- Enable six DIMM temperature sensor polling through IPMI command
root@bmc-oob:~# bic-util slot3 0xE0 0x45 0x15 0xA0 0x00 0x6 0x1 0x6 0x7 0x9 0xA 0xB 0xC
15 A0 00 06 01 07 01 09 01 0A 01 0B 01 0C 01
root@bmc-oob:~# sensor-util slot3 --threshold | grep "DIMM"
DIMMA Temp                   (0x6) :   34.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMC Temp                   (0x7) :   33.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMD Temp                   (0x9) :   32.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMME Temp                   (0xA) :   33.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMG Temp                   (0xB) :   31.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
DIMMH Temp                   (0xC) :   29.00 C     | (ok) | UCR: 85.00 | UNC: NA | UNR: NA | LCR: NA | LNC: NA | LNR: NA
P12V_DIMM Vol                (0x26) :   12.57 Volts | (ok) | UCR: 14.21 | UNC: 14.07 | UNR: NA | LCR: 9.87 | LNC: 10.01 | LNR: NA

[BIC console]
-Enable/Disable sensor polling
uart:~$ platform sensor
sensor - SENSOR relative command.

Subcommands:
  list_all                :List all SENSOR config.
  get                     :Get SENSOR config
  control_sensor_polling  :Enable/Disable sensor polling

- Disable P12V_STBY sensor polling through CLI platform command
uart:~$ platform sensor control_sensor_polling 0x20 0x0
Sensor number 0x20 disable sensor polling success
uart:~$ platform sensor get 0x20
[0x20] Unsupported name                   : adc        | access[O] | polling_disable                | 255

- Enable P12V_STBY sensor polling through CLI platform command
uart:~$ platform sensor control_sensor_polling 0x20 0x1
Sensor number 0x20 enable sensor polling success
uart:~$ platform sensor get 0x20
[0x20] Unsupported name                   : adc        | access[O] | 4byte_acur_read_success        | 51970060
@LoraLin1 LoraLin1 force-pushed the fby3.5-Support_sensor_polling_control branch from ff18a0d to 961dab9 Compare July 13, 2022 01:57
@facebook-github-bot

Copy link
Copy Markdown
Contributor

@DelphineChiu has updated the pull request. You must reimport the pull request before landing.

@facebook-github-bot

Copy link
Copy Markdown
Contributor

@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

3 participants