summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C13
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_init.H11
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.C8
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.H11
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C3
5 files changed, 30 insertions, 16 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
index 381cf1481..f8c29e45f 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.C
@@ -77,16 +77,6 @@ fapi2::ReturnCode pm_init(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
void* i_pHomerImage);
-///
-/// @brief Clears OCC special wake-up on all configured EX chiplets
-///
-/// @param[in] i_target Chip target
-///
-/// @return FAPI2_RC_SUCCESS on success, else error code.
-///
-fapi2::ReturnCode clear_occ_special_wakeups(
- const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);
-
// -----------------------------------------------------------------------------
// Function definitions
// -----------------------------------------------------------------------------
@@ -237,7 +227,8 @@ fapi2::ReturnCode pm_init(
FAPI_DBG("Executing p9_pm_occ_control to start OCC PPC405");
FAPI_EXEC_HWP(l_rc, p9_pm_occ_control, i_target,
p9occ_ctrl::PPC405_START,// Operation on PPC405
- p9occ_ctrl::PPC405_BOOT_MEM // PPC405 boot location
+ p9occ_ctrl::PPC405_BOOT_MEM, // PPC405 boot location
+ 0 //Jump to 405 main instruction - not used here
);
FAPI_TRY(l_rc, "ERROR: Failed to initialize OCC PPC405");
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After OCC PPC405 init"));
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.H
index 342387732..ae3ba1ffd 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.H
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_init.H
@@ -76,6 +76,17 @@ extern "C"
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const p9pm::PM_FLOW_MODE i_mode,
void* i_pHomerImage);
+
+//------------------------------------------------------------------------------
+///
+/// @brief Clears special wakeups on OCC.
+///
+/// @param[in] i_target Chip target
+///
+/// @return FAPI2_RC_SUCCESS on success, else error code.
+///
+ fapi2::ReturnCode clear_occ_special_wakeups(
+ const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target);
}
#endif // _P9_PM_INIT_H
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.C
index 6c778570f..1f5ce85fc 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.C
@@ -263,7 +263,8 @@ fapi_try_exit:
fapi2::ReturnCode p9_pm_occ_control
(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const p9occ_ctrl::PPC_CONTROL i_ppc405_reset_ctrl,
- const p9occ_ctrl::PPC_BOOT_CONTROL i_ppc405_boot_ctrl)
+ const p9occ_ctrl::PPC_BOOT_CONTROL i_ppc405_boot_ctrl,
+ const uint64_t i_ppc405_jump_to_main_instr)
{
FAPI_IMP("Entering p9_pm_occ_control ....");
@@ -295,6 +296,11 @@ fapi2::ReturnCode p9_pm_occ_control
FAPI_INF("Setting up for memory boot");
FAPI_TRY(bootMemory(i_target, l_data64), "Booting from Memory Failed");
}
+ else if(i_ppc405_boot_ctrl == p9occ_ctrl::PPC405_BOOT_WITHOUT_BL)
+ {
+ FAPI_DBG("Setting up for boot without bootloader");
+ l_data64.flush<0>().insertFromRight(i_ppc405_jump_to_main_instr, 0, 64);
+ }
else
{
l_data64.flush<0>().insertFromRight(PPC405_BRANCH_OLD_INSTR, 0, 32);
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.H
index 7b0f93c1c..a9fe4a7b3 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.H
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_occ_control.H
@@ -94,7 +94,8 @@ enum PPC_BOOT_CONTROL
PPC405_BOOT_NULL, ///< Do nothing
PPC405_BOOT_SRAM, ///< Boot from OCC SRAM
PPC405_BOOT_MEM, ///< Boot from memory
- PPC405_BOOT_OLD ///< Deprecated
+ PPC405_BOOT_OLD, ///< Deprecated
+ PPC405_BOOT_WITHOUT_BL ///< Bypass OCC bootloader and execute main
};
}
@@ -102,7 +103,8 @@ enum PPC_BOOT_CONTROL
typedef fapi2::ReturnCode (*p9_pm_occ_control_FP_t)
(const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>&,
const p9occ_ctrl::PPC_CONTROL,
- const p9occ_ctrl::PPC_BOOT_CONTROL);
+ const p9occ_ctrl::PPC_BOOT_CONTROL,
+ const uint64_t i_ppc405_jump_to_main_instr);
extern "C" {
@@ -114,12 +116,15 @@ extern "C" {
/// @param [in] i_target Chip Target
/// @param [in] i_ppc405_reset_ctrl Actionto be taken on PPC405
/// @param [in] i_ppc405_boot_ctrl Location of boot instruction
+/// @param [in] i_ppc405_jump_to_main_instr The instruction to jump to PPC405
+/// main. Used to bypass the OCC bootloader. Default = 0
///
/// @return FAPI_RC_SUCCESS on success or error return code
fapi2::ReturnCode p9_pm_occ_control(
const fapi2::Target<fapi2::TARGET_TYPE_PROC_CHIP>& i_target,
const p9occ_ctrl::PPC_CONTROL i_ppc405_reset_ctrl,
- const p9occ_ctrl::PPC_BOOT_CONTROL i_ppc405_boot_ctrl);
+ const p9occ_ctrl::PPC_BOOT_CONTROL i_ppc405_boot_ctrl,
+ const uint64_t i_ppc405_jump_to_main_instr = 0);
} // extern "C"
#endif // _P9_OCC_CONTROL_H_
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C
index 80a14282f..d0f445658 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_reset.C
@@ -111,7 +111,8 @@ fapi2::ReturnCode p9_pm_reset(
FAPI_EXEC_HWP(l_rc, p9_pm_occ_control,
i_target,
p9occ_ctrl::PPC405_RESET_SEQUENCE, //Operation on PPC405
- p9occ_ctrl::PPC405_BOOT_NULL); // Boot instruction location
+ p9occ_ctrl::PPC405_BOOT_NULL, // Boot instruction location
+ 0); //Jump to 405 main instruction - not used here
FAPI_TRY(l_rc, "ERROR: Failed to reset OCC PPC405");
FAPI_TRY(p9_pm_glob_fir_trace(i_target, "After safe reset of OCC PPC405"));
OpenPOWER on IntegriCloud