Menu

#63 Add robustness code to handle BT interface detection

v1.0_(example)
closed-fixed
Driver (6)
5
2017-08-03
2012-01-19
Ashvin M
No

For the condition where the BMC is in a bad state and does not respond to the presence check, the driver fails in the SMBIOS or PCI lookup, thus falling through to built-in default I/O addresses. The probes to detect the presence of the interface in such a scenario is too simplistic.

If the interface is "detected" by the simplistic probes, we get into a long hang waiting for it to do stuff that it will never do. We suspect KCS and SMIC could act the same, but have noticed this issue when the BT interface has been falsely detected leading to an indefinite system hang eventually leading to a forced reboot.

The suggestion is to include a more elaborate detection mechanism as explained below:

The BT interface has several status bits which could be used for much stronger detection. Section 11.6.4 "BT Control Register (BT_CTRL)" of the Intelligent Platform Management Interface Specification 2.0 documents:

- write-only bits 0 (CLR_WR_PTR) & 1 (CLR_RD_PTR) always read back 0; detect() can insist that ((BT_STATUS & 3) == 0)

- bits 2,3,4 are "write to set" or "write to clear" bits; writing 0 has no effect. If any are set, can test-write 0 to them, if they become 0 then it's not BT. (Then write back original bits to leave unknown HW in least disturbed state.)

- bit 6 (H_BUSY) is a toggled by writing 1 to it. Test: toggle, check it, toggle again, check it. Only an actual toggle bit will respond correctly to this; leaves BMC in initial state.

Proposed fix will be uploaded in the next update.

Discussion

  • Ashvin M

    Ashvin M - 2012-01-19

    Proposed patch

     
  • Ashvin M

    Ashvin M - 2012-01-19

    Patch containing the proposed fix has been uploaded.

     
  • Corey Minyard

    Corey Minyard - 2017-08-03
    • status: open --> closed-fixed
    • assigned_to: Corey Minyard
    • Group: --> v1.0_(example)
     
  • Corey Minyard

    Corey Minyard - 2017-08-03

    Default addresses have been disabled in the kernel, and the current detection, IMHO, shoudl be good enough.

    Plus, patches to the kernel shoudl be submitted to the mailing lists per that process.

     

Log in to post a comment.