Skip to content

Commit

Permalink
opal-prd: hservice: Enable hservice->wakeup() in BMC
Browse files Browse the repository at this point in the history
This patch enables HBRT to use HYP special wakeup register in openBMC
which until now was only used in FSP based machines.

This patch also adds a capability check for opal-prd so that HBRT can
decide if the host special wakeup register can be used.

Fixes: 4999930("opal-prd: Add support for runtime OCC reset in ZZ")
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
  • Loading branch information
shilpasri authored and stewartsmith committed Dec 12, 2018
1 parent f12bdee commit 05dc67b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions external/opal-prd/hostboot-interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum MemoryError_t
* Previous implementations may have incorrectly ignored failures.
*/
#define HBRT_CAPS_OPAL_HAS_XSCOM_RC (1ul << 0)
#define HBRT_CAPS_OPAL_HAS_WAKEUP_SUPPORT (1ul << 1)

/**
* Load types for the load_pm_complex() interface
Expand Down
6 changes: 2 additions & 4 deletions external/opal-prd/opal-prd.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,8 @@ int hservice_memory_error(uint64_t i_start_addr, uint64_t i_endAddr,
uint64_t hservice_get_interface_capabilities(uint64_t set)
{
if (set == HBRT_CAPS_SET1_OPAL)
return HBRT_CAPS_OPAL_HAS_XSCOM_RC;
return HBRT_CAPS_OPAL_HAS_XSCOM_RC ||
HBRT_CAPS_OPAL_HAS_WAKEUP_SUPPORT;

return 0;
}
Expand Down Expand Up @@ -2196,9 +2197,6 @@ static int run_prd_daemon(struct opal_prd_ctx *ctx)
hinterface.pnor_write = NULL;
}

if (!is_fsp_system())
hinterface.wakeup = NULL;

ipmi_init(ctx);

pr_debug("HBRT: calling hservices_init");
Expand Down

0 comments on commit 05dc67b

Please sign in to comment.