Stewart Smith | a9ebe67 | 2019-12-08 22:48:04 -0800 | [diff] [blame] | 1 | From d90e6c513094231f622a427030f3dbca1eeb5ed5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Timothy Pearson <tpearson@raptorengineering.com> |
| 3 | Date: Thu, 18 Apr 2019 06:28:50 +0000 |
| 4 | Subject: [PATCH] Add detailed ISTEP output option to hostboot |
| 5 | |
| 6 | Output detailed ISTEP data over LPC port 81h/82h in support of RCS |
| 7 | Talos II systems. These systems will deadlock due to FSI silicon bugs |
| 8 | in the CPUs unless the BMC is aware of the current ISTEP data in order |
| 9 | to properly sequence BMC-side FSI service startup. |
| 10 | --- |
| 11 | src/usr/initservice/istepdispatcher/HBconfig | 5 ++++ |
| 12 | .../istepdispatcher/istepdispatcher.C | 27 +++++++++++++++++++ |
| 13 | 2 files changed, 32 insertions(+) |
| 14 | |
| 15 | diff --git a/src/usr/initservice/istepdispatcher/HBconfig b/src/usr/initservice/istepdispatcher/HBconfig |
| 16 | index 7987f8ef3..ccbd43854 100644 |
| 17 | --- a/src/usr/initservice/istepdispatcher/HBconfig |
| 18 | +++ b/src/usr/initservice/istepdispatcher/HBconfig |
| 19 | @@ -21,6 +21,11 @@ config ISTEP_LPC_PORT80_DEBUG |
| 20 | help |
| 21 | Writes ISTEP progress to LPC port 80h. |
| 22 | |
| 23 | +config ISTEP_LPC_PORT8X_DEBUG |
| 24 | + default n |
| 25 | + help |
| 26 | + Writes detailed ISTEP progress to LPC port 81h / 82h. |
| 27 | + |
| 28 | config HANG_ON_MFG_SRC_TERM |
| 29 | default y |
| 30 | help |
| 31 | diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C |
| 32 | index e8db88f33..8f2d57298 100644 |
| 33 | --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C |
| 34 | +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C |
| 35 | @@ -2521,6 +2521,33 @@ errlHndl_t IStepDispatcher::sendProgressCode(bool i_needsLock) |
| 36 | port80_val++; |
| 37 | #endif |
| 38 | |
| 39 | +#ifdef CONFIG_ISTEP_LPC_PORT8X_DEBUG |
| 40 | + // Detailed istep output for consumption by BMC on e.g. RCS Talos II systems. |
| 41 | + // |
| 42 | + // Due to FSI silicon issues, those platforms may fail to start correctly |
| 43 | + // if the BMC is not aware of the exact ISTEP being run to control BMC |
| 44 | + // service sequencing. |
| 45 | + // |
| 46 | + // NEVER output fake values here, only real ISTEP data. |
| 47 | + // Data is latched in on write to port 82h |
| 48 | + uint8_t port81_val = iv_curIStep & 0xff; |
| 49 | + uint8_t port82_val = iv_curSubStep & 0xff; |
| 50 | + size_t port81_len = sizeof(port81_val); |
| 51 | + size_t port82_len = sizeof(port82_val); |
| 52 | + // Write port 81h first |
| 53 | + err = deviceWrite(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, |
| 54 | + &port81_val, port81_len, |
| 55 | + DEVICE_LPC_ADDRESS(LPC::TRANS_IO, 0x81)); |
| 56 | + delete err; // this is debug only, ignore any errors |
| 57 | + err = NULL; |
| 58 | + // Then write port 82h, latching in the full 16-bit value for read |
| 59 | + err = deviceWrite(TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL, |
| 60 | + &port82_val, port82_len, |
| 61 | + DEVICE_LPC_ADDRESS(LPC::TRANS_IO, 0x82)); |
| 62 | + delete err; // this is debug only, ignore any errors |
| 63 | + err = NULL; |
| 64 | +#endif |
| 65 | + |
| 66 | #ifdef CONFIG_CONSOLE_OUTPUT_PROGRESS |
| 67 | //--- Display step on serial console |
| 68 | if ((iv_curIStep != lastIstep) || (iv_curSubStep != lastSubstep)) |
| 69 | -- |
| 70 | 2.23.0 |
| 71 | |