-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enabled pHAL infrastructure to boot the host
IPL (libipl) used for executing hardware procedures to initilize the power processor based host. Tested by: 1. ./configure 2. ./configure --enable-phal --enable-openfsi Change-Id: I57ff64595a757041ee60ccb420092975b064462d Signed-off-by: Ramesh Iyyar <[email protected]>
- Loading branch information
1 parent
6230b0d
commit b181d3b
Showing
4 changed files
with
76 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
extern "C" { | ||
#include <libipl.h> | ||
} | ||
|
||
#include "xyz/openbmc_project/Common/error.hpp" | ||
|
||
#include <phosphor-logging/elog-errors.hpp> | ||
#include <phosphor-logging/log.hpp> | ||
#include <registration.hpp> | ||
namespace openpower | ||
{ | ||
namespace phal | ||
{ | ||
|
||
using namespace phosphor::logging; | ||
using namespace sdbusplus::xyz::openbmc_project::Common::Error; | ||
|
||
/** | ||
* @brief Starts the self boot engine on POWER processor position 0 | ||
* to kick off a boot. | ||
* @return void | ||
*/ | ||
void startHost() | ||
{ | ||
if (ipl_init() != 0) | ||
{ | ||
log<level::ERR>("ipl_init failed"); | ||
// TODO ibm-openbmc#1470 | ||
elog<InternalFailure>(); | ||
} | ||
|
||
if (ipl_run_major(0) > 0) | ||
{ | ||
log<level::ERR>("step 0 failed to start the host"); | ||
// TODO ibm-openbmc#1470 | ||
elog<InternalFailure>(); | ||
} | ||
} | ||
|
||
REGISTER_PROCEDURE("startHost", startHost); | ||
|
||
} // namespace phal | ||
} // namespace openpower |