Skip to content

Commit

Permalink
ipmi: Introduce register_for_event() interface
Browse files Browse the repository at this point in the history
register_for_event() allows the IPMI PNOR implementation to indicate
interest in SELs from the hiomap protocol used for managing the LPC FW
space.

Change-Id: I3bf6cb7f860d41a0c46755e23fd54276ae2258ff
Signed-off-by: Andrew Jeffery <andrewrj@au1.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/65938
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: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67387
  • Loading branch information
Andrew Jeffery authored and dcrowell77 committed Oct 16, 2018
1 parent 72084f6 commit 76fc880
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/include/usr/ipmi/ipmiif.H
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2012,2017 */
/* Contributors Listed Below - COPYRIGHT 2012,2018 */
/* [+] Google Inc. */
/* [+] International Business Machines Corp. */
/* */
Expand Down Expand Up @@ -358,6 +358,15 @@ namespace IPMI
const size_t i_len,
uint8_t* i_data);

/**
* Register a queue to receive an IPMI SEL.
*
* @param[in] i_cmd, the SEL command
* @param[in] i_msgq, the message queue on which to send the SEL
*/
void register_for_event(const IPMI::command_t& i_cmd,
const msg_q_t& i_msgq);

/**
* Get the max buffer size
* @param void
Expand Down
6 changes: 6 additions & 0 deletions src/usr/ipmi/ipmirp.C
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,12 @@ void IpmiRP::registerForEvent(const IPMI::command_t& i_cmd,
IPMI_TRAC("event registration for %x:%x", i_cmd.first, i_cmd.second);
}

void IPMI::register_for_event(const IPMI::command_t& i_cmd,
const msg_q_t& i_msgq)
{
Singleton<IpmiRP>::instance().registerForEvent(i_cmd, i_msgq);
}

/**
* @brief Give the resource provider a message to put in the eventq
* @param[in] i_event, pointer to the new'd event (OEM SEL)
Expand Down

0 comments on commit 76fc880

Please sign in to comment.