diff options
author | Bill Hoffa <wghoffa@us.ibm.com> | 2018-06-06 13:29:17 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-06-28 22:43:13 -0400 |
commit | 7bd4032abfb75ca6a9a4eb9c44ab9443c81a6198 (patch) | |
tree | 87766c021712bbca5466c117ea0ac86c8cf238dc /src/usr/intr | |
parent | 8a1a0c7e98a9091c62e715b1b9c44a7f3de90b39 (diff) | |
download | talos-hostboot-7bd4032abfb75ca6a9a4eb9c44ab9443c81a6198.tar.gz talos-hostboot-7bd4032abfb75ca6a9a4eb9c44ab9443c81a6198.zip |
Leverage INTRP fully for SBE PSU Interrupt Handling
- Remove PSU Handling from INTRP code and instead treat PSU
interrupts like any other interrupt type
- Add msg_handler to SBE PSU Code to handle interrupts
- Add better interrupt handling to timeout path so the interrupt
condition will be cleared instead of represented continuously
- Handle shutdown message from INTRP
Change-Id: I5eafea806e147c22be235ae1c54a5ce4706aa012
RTC: 149698
CQ: SW418168
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/60049
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/intr')
-rw-r--r-- | src/usr/intr/intrrp.C | 68 | ||||
-rw-r--r-- | src/usr/intr/intrrp.H | 6 |
2 files changed, 3 insertions, 71 deletions
diff --git a/src/usr/intr/intrrp.C b/src/usr/intr/intrrp.C index 20b41fdd9..9e3f5930b 100644 --- a/src/usr/intr/intrrp.C +++ b/src/usr/intr/intrrp.C @@ -483,10 +483,6 @@ errlHndl_t IntrRp::_init() MSG_INTR_SHUTDOWN, INITSERVICE::INTR_PRIORITY); - //The INTRP itself will monitor/handle PSU Interrupts - // so unmask those interrupts - l_err = unmaskInterruptSource(LSI_PSU, l_procIntrHdlr); - //Set value for enabled threads uint64_t l_en_threads = get_enabled_threads(); TRACFCOMP(g_trac_intr, "IntrRp::_init() Threads enabled:" @@ -1520,10 +1516,6 @@ void IntrRp::routeInterrupt(intr_hdlr_t* i_proc, (uint32_t) i_type, rc); } } - else if (i_type == LSI_PSU) - { - handlePsuInterrupt(i_type, i_proc, i_pir); - } else // no queue registered for this interrupt type { // Throw it away for now. @@ -1845,66 +1837,6 @@ errlHndl_t IntrRp::setCommonInterruptBARs(intr_hdlr_t * i_proc, return l_err; } -errlHndl_t IntrRp::handlePsuInterrupt(ext_intr_t i_type, - intr_hdlr_t* i_proc, - PIR_t& i_pir) -{ - //TODO FIXME RTC 149698 - // Long term will leverage mask register to avoid - // polling loop below - errlHndl_t l_err = NULL; - TARGETING::Target* procTarget = i_proc->proc; - - do { - size_t scom_len = 8; - uint64_t l_reg = 0x0; - l_err = deviceRead(procTarget, - &l_reg, - scom_len, - DEVICE_SCOM_ADDRESS(PSI_BRIDGE_PSU_DOORBELL_REG)); - if (l_err) - { - break; - } - TRACDCOMP( g_trac_intr, "%.8X = %.16llX", - PSI_BRIDGE_PSU_DOORBELL_REG, l_reg ); - - //If the interrupt is driven by the doorbell, yield - // to give the driver a chance to take care of it - if( l_reg & PSI_BRIDGE_PSU_HOST_DOORBELL ) - { - nanosleep(0,10000); - task_yield(); - } - - //Clear the PSU Scom Reg Interrupt Status register - // but ignore the bit that the PSU driver uses - // to avoid a race condition - uint64_t l_andVal = PSI_BRIDGE_PSU_HOST_DOORBELL; - uint64_t size = sizeof(l_andVal); - l_err = deviceWrite(procTarget, - &l_andVal, - size, - DEVICE_SCOM_ADDRESS(PSI_BRIDGE_PSU_DOORBELL_ANDREG)); - - if (l_err) - { - TRACFCOMP(g_trac_intr, "Error clearing scom - %x", - PSI_BRIDGE_PSU_DOORBELL_ANDREG); - break; - } - - //Interrupt Processing is complete - re-enable - // this interrupt source - uint64_t intSource = i_type; - TRACFCOMP(g_trac_intr, "handlePsuInterrupt - Calling completeInterruptProcessing"); - completeInterruptProcessing(intSource, i_pir); - - } while(0); - - return l_err; -} - void IntrRp::completeInterruptProcessing(uint64_t& i_intSource, PIR_t& i_pir) { diff --git a/src/usr/intr/intrrp.H b/src/usr/intr/intrrp.H index 46f6f2616..b0245a868 100644 --- a/src/usr/intr/intrrp.H +++ b/src/usr/intr/intrrp.H @@ -182,9 +182,9 @@ namespace INTR //PSI Host Bridge ESB Constants PSI_BRIDGE_ESB_BAR_VALID = 0x0000000000000001ULL, PSI_BRIDGE_ESB_NOTIFY_VALID = 0x0000000000000001ULL, - PSI_BRIDGE_PSU_DOORBELL_REG = 0x000D0063, - PSI_BRIDGE_PSU_DOORBELL_ANDREG = 0x000D0064, - PSI_BRIDGE_PSU_HOST_DOORBELL = 0x8000000000000000, + PSI_BRIDGE_ESB_QUERY_OFFSET = 0x800, + PSI_BRIDGE_ESB_OFF_OFFSET = 0xD00, + PSI_BRIDGE_ESB_RESET_OFFSET = 0XC00, //XIVE Interrupt Controller Constants XIVE_IC_BAR_SCOM_ADDR = 0x05013010, |