From 88eef19960700eb911dd256b9f223fc812fb1aa3 Mon Sep 17 00:00:00 2001 From: Andrew Geissler Date: Thu, 17 Dec 2020 11:37:11 -0600 Subject: mpreboot: move to obmc-host-crash target For phal based systems, move the memory preserving reboot function to the obmc-host-crash target. This target is currently un-used on phal based systems. Make this move so that the obmc-host-diagnostic target can be utilized as a more generic target. Dumps like hostboot, sbe, and hardware can now utilize the obmc-host-diagnostic target to ensure the user knows when any type of diagnostic event is occurring in the system. Note that the obmc-host-diagnostic target will still be started as a part of obmc-host-crash since that target is what communicates to outside users that a diagnostic action is occurring. To ensure we do not regress the dump functionality on our non-pHAL systems, ensure the obmc-host-quiesce target remains within the obmc-host-crash target. Our non pHAL systems go straight to quiesce on a crash target call. Tested: - Verified with all commits in this Topic that the witherspoon system has the same service layout as before and the rainier system has the new layout (crash used for mpipl) (From meta-openpower rev: b3f8d51109a607c6efc158198767395c6441b152) Signed-off-by: Andrew Geissler Change-Id: Ia6d5411f84ec6c83a7edb177a1635c931bbda041 Signed-off-by: Andrew Geissler --- .../host/op-proc-control-systemd-links.bb | 41 +++++++++++++++++----- 1 file changed, 33 insertions(+), 8 deletions(-) (limited to 'meta-openpower/recipes-phosphor/host') diff --git a/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb b/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb index f493d3aae..cae79bef0 100644 --- a/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb +++ b/meta-openpower/recipes-phosphor/host/op-proc-control-systemd-links.bb @@ -47,11 +47,7 @@ pkg_postinst_${PN}() { TARGET="../op-continue-mpreboot@.service" ln -s $TARGET $LINK - LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/op-enter-mpreboot@0.service" - TARGET="../op-enter-mpreboot@.service" - ln -s $TARGET $LINK - - # Only install phal reinit service if phal enabled + # Only install certain units if phal enabled if [ "${@bb.utils.filter('OBMC_MACHINE_FEATURES', 'phal', d)}" = phal ]; then mkdir -p $D$systemd_system_unitdir/obmc-host-start@0.target.requires LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phal-reinit-devtree.service" @@ -61,6 +57,28 @@ pkg_postinst_${PN}() { LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.requires/proc-pre-poweroff@0.service" TARGET="../proc-pre-poweroff@.service" ln -s $TARGET $LINK + + # on phal systems, obmc-host-crash@.target is used for MPIPL + mkdir -p $D$systemd_system_unitdir/obmc-host-crash@0.target.requires + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.requires/obmc-host-force-warm-reboot@0.target" + TARGET="../obmc-host-force-warm-reboot@.target" + ln -s $TARGET $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.requires/op-enter-mpreboot@0.service" + TARGET="../op-enter-mpreboot@.service" + ln -s $TARGET $LINK + + # ensure diagnostic mode is shown for MPIPL + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.requires/obmc-host-diagnostic-mode@0.target" + TARGET="../obmc-host-diagnostic-mode@.target" + ln -s $TARGET $LINK + else + # If not phal, default to quiesce target in crash target to support + # older system designs like witherspoon + mkdir -p $D$systemd_system_unitdir/obmc-host-crash@0.target.wants + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/obmc-host-quiesce@0.target" + TARGET="../obmc-host-quiesce@.target" + ln -s $TARGET $LINK fi } @@ -78,15 +96,22 @@ pkg_prerm_${PN}() { fi LINK="$D$systemd_system_unitdir/obmc-host-startmin@0.target.requires/op-continue-mpreboot@0.service" rm $LINK - LINK="$D$systemd_system_unitdir/obmc-host-diagnostic-mode@0.target.requires/op-enter-mpreboot@0.service" - rm $LINK - # Only phal reinit service if phal enabled + # Remove phal specific units if enabled if [ "${@bb.utils.filter('OBMC_MACHINE_FEATURES', 'phal', d)}" = phal ]; then LINK="$D$systemd_system_unitdir/obmc-host-start@0.target.requires/phal-reinit-devtree.service" rm $LINK LINK="$D$systemd_system_unitdir/obmc-chassis-poweroff@0.target.requires/proc-pre-poweroff@0.service" rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.requires/obmc-host-force-warm-reboot@0.target" + rm $LINK + + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.requires/op-enter-mpreboot@0.service" + rm $LINK + else + LINK="$D$systemd_system_unitdir/obmc-host-crash@0.target.wants/obmc-host-quiesce@0.target" + rm $LINK fi } -- cgit v1.2.3