fby3.5: common: Support individual sensor polling enable/disable#398
Closed
DelphineChiu wants to merge 1 commit into
Closed
fby3.5: common: Support individual sensor polling enable/disable#398DelphineChiu wants to merge 1 commit into
DelphineChiu wants to merge 1 commit into
Conversation
Contributor
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
49c694e to
ff18a0d
Compare
Contributor
|
@DelphineChiu has updated the pull request. You must reimport the pull request before landing. |
Collaborator
|
Hi @GoldenBug , |
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
ff18a0d to
961dab9
Compare
Contributor
|
@DelphineChiu has updated the pull request. You must reimport the pull request before landing. |
Contributor
|
@GoldenBug has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Note:
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
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:
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# sensor-util slot3 --threshold | grep "DIMM"15 A0 00 06 00 07 00 09 00 0A 00 0B 00 0C 00
root@bmc-oob:
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# sensor-util slot3 --threshold | grep "DIMM"15 A0 00 06 01 07 01 09 01 0A 01 0B 01 0C 01
root@bmc-oob:
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$ platform sensor get 0x20Sensor number 0x20 disable sensor polling success
uart:
[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$ platform sensor get 0x20Sensor number 0x20 enable sensor polling success
uart:
[0x20] Unsupported name : adc | access[O] | 4byte_acur_read_success | 51970060