Skip to content

fby3.5: cl: Fix that BIC reports wrong PCH sensor value during in-ban…#296

Closed
DelphineChiu wants to merge 1 commit into
facebook:mainfrom
Wiwynn:Ren/PCH-Sensor-Issue
Closed

fby3.5: cl: Fix that BIC reports wrong PCH sensor value during in-ban…#296
DelphineChiu wants to merge 1 commit into
facebook:mainfrom
Wiwynn:Ren/PCH-Sensor-Issue

Conversation

@DelphineChiu

Copy link
Copy Markdown

…d BIOS firmware updating

Summary:

  • BIC reads the PCH sensors from ME through IPMI command.
    The wrong sensor value is reported while doing BIOS firmware updated.
    Follow the ME spec, the completion code, the scanning and reading state should be checked.
    If the completion code is not successfully or the scanning and reading state are disabled or unavailable,
    BIC returns unspecified error completion code.

Test Plan:

  • Check the sensor reading value and SEL during in-band BIOS firmware updating - pass

[Log]
[root@OpenBIC_Refactor_Slot3 Y35CLE16]# ./afulnx_64 Y35CLE16.bin /x /me /RLC:F
Skipping BTF generation for /root/Y35CLE16/DriverSource/amifldrv_impl.ko due to unavailability of vmlinux
Skipping BTF generation for /root/Y35CLE16/DriverSource/amifldrv_mod.ko due to u[ 5421.687187] amifldrv_mod: loading out-of-tree module taints kernel.
[ 5421.703248] amifldrv_mod: module license 'Proprietary' taints kernel.
[ 5421.717549] Disabling lock debugging due to kernel taint
navailability of vmlinux
+---------------------------------------------------------------------------+
| AMI Firmware Update Utility v5.12.04.2099 |
| Copyright (c) 1985-2020, American Megatrends International LLC. |
| All rights reserved. Subject to AMI licensing agreement. |
+---------------------------------------------------------------------------+
Reading flash ...................... Done

  • ME Data Size Checking ............ Pass
  • Check RomLayout .................. Pass
    Loading The ME Data To BIOS ........ Done
  • Update success for FDR
  • Update success for GBER
  • DER is locked, skip updating. Or trying assert HDA_SDO pin.
  • REGD is locked, skip updating. Or trying assert HDA_SDO pin.
  • Successful update recovery region to OPRx!!
  • Successful update MFSB
  • Successful update factory data and recovery region
  • Update MER ......................[ 5657.771270] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter.
  • ME Entire Image update success !!
    WARNING !!
    System must power-off to have the changes which take effect!

Process completed.
root@bmc-oob:# while [ 1 ]; do sensor-util slot1|grep "PCH Temp"; done
...
PCH Temp (0x4) : 34.00 C | (ok)
PCH Temp (0x4) : 34.00 C | (ok)
PCH Temp (0x4) : 34.00 C | (ok)
PCH Temp (0x4) : NA | (na)
PCH Temp (0x4) : NA | (na)
PCH Temp (0x4) : NA | (na)
PCH Temp (0x4) : NA | (na)
...
PCH Temp (0x4) : NA | (na)
PCH Temp (0x4) : NA | (na)
PCH Temp (0x4) : NA | (na)
PCH Temp (0x4) : 34.00 C | (ok)
PCH Temp (0x4) : 34.00 C | (ok)
PCH Temp (0x4) : 34.00 C | (ok)
root@bmc-oob:
# log-util slot1 --print
2018 Mar 09 07:41:47 log-util: User cleared FRU: 1 logs
1 slot1 2018-03-09 07:46:48 ipmid SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:48, Sensor: ME_POWER_STATE (0x16), Event Data: (020000) POWER_OFF Assertion
1 slot1 2018-03-09 07:46:49 ipmid SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:49, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1 slot1 2018-03-09 07:46:49 ipmid SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:49, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1 slot1 2018-03-09 07:46:49 ipmid SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:49, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1 slot1 2018-03-09 07:46:49 ipmid SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:49, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1 slot1 2018-03-09 07:47:10 ipmid SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:47:10, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1 slot1 2018-03-09 07:47:37 ipmid SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:47:37, Sensor: ME_POWER_STATE (0x16), Event Data: (000000) RUNNING Assertion

…d BIOS firmware updating

Summary:
- BIC reads the PCH sensors from ME through IPMI command.
  The wrong sensor value is reported while doing BIOS firmware updated.
  Follow the ME spec, the completion code, the scanning and reading state should be checked.
  If the completion code is not successfully or the scanning and reading state are disabled or unavailable,
  BIC returns unspecified error completion code.

Test Plan:
- Check the sensor reading value and SEL during in-band BIOS firmware updating - pass

[Log]
[root@OpenBIC_Refactor_Slot3 Y35CLE16]# ./afulnx_64 Y35CLE16.bin /x /me /RLC:F
Skipping BTF generation for /root/Y35CLE16/DriverSource/amifldrv_impl.ko due to unavailability of vmlinux
Skipping BTF generation for /root/Y35CLE16/DriverSource/amifldrv_mod.ko due to u[ 5421.687187] amifldrv_mod: loading out-of-tree module taints kernel.
[ 5421.703248] amifldrv_mod: module license 'Proprietary' taints kernel.
[ 5421.717549] Disabling lock debugging due to kernel taint
navailability of vmlinux
+---------------------------------------------------------------------------+
|              AMI Firmware Update Utility v5.12.04.2099                    |
|      Copyright (c) 1985-2020, American Megatrends International LLC.      |
|         All rights reserved. Subject to AMI licensing agreement.          |
+---------------------------------------------------------------------------+
 Reading flash ...................... Done
 - ME Data Size Checking ............ Pass
 - Check RomLayout .................. Pass
 Loading The ME Data To BIOS ........ Done
 - Update success for FDR
 - Update success for GBER
 - DER is locked, skip updating. Or trying assert HDA_SDO pin.
 - REGD is locked, skip updating. Or trying assert HDA_SDO pin.
 - Successful update recovery region to OPRx!!
 - Successful update MFSB
 - Successful update factory data and recovery region
 - Update MER ......................[ 5657.771270] NMI watchdog: Enabled. Permanently consumes one hw-PMU counter.
 - ME Entire Image update success !!
 WARNING !!
  System must power-off to have the changes which take effect!

 Process completed.
root@bmc-oob:~# while [ 1 ]; do sensor-util slot1|grep "PCH Temp"; done
...
PCH Temp                     (0x4) :   34.00 C     | (ok)
PCH Temp                     (0x4) :   34.00 C     | (ok)
PCH Temp                     (0x4) :   34.00 C     | (ok)
PCH Temp                     (0x4) : NA | (na)
PCH Temp                     (0x4) : NA | (na)
PCH Temp                     (0x4) : NA | (na)
PCH Temp                     (0x4) : NA | (na)
...
PCH Temp                     (0x4) : NA | (na)
PCH Temp                     (0x4) : NA | (na)
PCH Temp                     (0x4) : NA | (na)
PCH Temp                     (0x4) :   34.00 C     | (ok)
PCH Temp                     (0x4) :   34.00 C     | (ok)
PCH Temp                     (0x4) :   34.00 C     | (ok)
root@bmc-oob:~# log-util slot1 --print
2018 Mar 09 07:41:47 log-util: User cleared FRU: 1 logs
1    slot1    2018-03-09 07:46:48    ipmid            SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:48, Sensor: ME_POWER_STATE (0x16), Event Data: (020000) POWER_OFF Assertion
1    slot1    2018-03-09 07:46:49    ipmid            SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:49, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1    slot1    2018-03-09 07:46:49    ipmid            SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:49, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1    slot1    2018-03-09 07:46:49    ipmid            SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:49, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1    slot1    2018-03-09 07:46:49    ipmid            SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:46:49, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1    slot1    2018-03-09 07:47:10    ipmid            SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:47:10, Sensor: SPS_FW_HEALTH (0x17), Event Data: (A00600) Direct Flash update
1    slot1    2018-03-09 07:47:37    ipmid            SEL Entry: FRU: 1, Record: Standard (0x02), Time: 2018-03-09 07:47:37, Sensor: ME_POWER_STATE (0x16), Event Data: (000000) RUNNING Assertion
@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 May 25, 2022

@GoldenBug GoldenBug left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the in-depth code comment. It really helps improve readability!

@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.

4 participants