From aca1b1548357774470106883c6ea5b2c5d998a9d Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Fri, 10 Mar 2017 15:08:56 -0600 Subject: Use openpower-proc-control in bitbake The executable built from this repository will now be used in start_host@.service and vcs_workaround@.service instead of the shell scripts that use pdbg to do FSI commands. Change-Id: I8ef3075449b562d64295ae330bd2c150264a0607 Signed-off-by: Matt Spinler --- .../host/op-host-control/start_host@.service | 17 ++++++++++++ .../host/op-host-control/vcs_workaround@.service | 18 ++++++++++++ .../host/op-pdbg-host-control/start_host.sh | 21 -------------- .../host/op-pdbg-host-control/start_host@.service | 17 ------------ .../host/op-pdbg-host-control/vcs_workaround.sh | 32 ---------------------- .../op-pdbg-host-control/vcs_workaround@.service | 18 ------------ .../recipes-phosphor/host/op-proc-control.bb | 16 +++++++++++ .../common/recipes-phosphor/host/p9-host-start.bb | 13 ++------- .../recipes-phosphor/host/p9-vcs-workaround.bb | 14 ++-------- .../host/op-host-control/vcs_workaround@.service | 13 +++++++++ .../op-pdbg-host-control/vcs_workaround@.service | 13 --------- .../host/p9-vcs-workaround.bbappend | 2 +- 12 files changed, 69 insertions(+), 125 deletions(-) create mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/start_host@.service create mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/vcs_workaround@.service delete mode 100755 meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host.sh delete mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service delete mode 100755 meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround.sh delete mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service create mode 100644 meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-proc-control.bb create mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/op-host-control/vcs_workaround@.service delete mode 100644 meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service (limited to 'meta-openbmc-machines') diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/start_host@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/start_host@.service new file mode 100644 index 000000000..20a2938e3 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/start_host@.service @@ -0,0 +1,17 @@ +[Unit] +Description=Start host%i SBE +After=obmc-host-start-pre@%i.target +Wants=obmc-host-start@%i.target +Before=obmc-host-start@%i.target +Before=obmc-host-started@%i.target +Wants=obmc-power-on@%i.target +After=obmc-power-on@%i.target +Conflicts=obmc-chassis-stop@%i.target + +[Service] +ExecStart={sbindir}/openpower-proc-control startHost +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=obmc-chassis-start@%i.target diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/vcs_workaround@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/vcs_workaround@.service new file mode 100644 index 000000000..8d3e26c8e --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-host-control/vcs_workaround@.service @@ -0,0 +1,18 @@ +[Unit] +Description=Run VCS workaround on host%i +Wants=obmc-host-start-pre@%i.target +Before=obmc-host-start-pre@%i.target +Wants=obmc-power-on@%i.target +After=obmc-power-on@%i.target +Wants=fsi-scan@%i.service +After=fsi-scan@%i.service +Conflicts=obmc-power-chassis-off@%i.target +ConditionPathExists=!/run/openbmc/chassis@%i-on + +[Service] +ExecStart={sbindir}/openpower-proc-control vcsWorkaround +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=obmc-power-chassis-on@%i.target diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host.sh b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host.sh deleted file mode 100755 index 43b433fc8..000000000 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -e -# Starts POWER9 IPL (boot) - -PDBG=${PDBG:-pdbg} - -putcfam() -{ - $PDBG $1 putcfam $2 $3 $4 -} - -#Clock mux select override -#Can maybe be removed in DD2 -putcfam -a 0x2918 0x0000000C 0x0000000C - -#Allow xstop/ATTN to flow to BMC -putcfam -p0 0x081C 0x20000000 # Setup FSI2PIB to report -putcfam -p0 0x100D 0x60000000 # Enable Xstop/ATTN interrupt -putcfam -p0 0x100B 0xFFFFFFFF # Arm mechanism - -putcfam -p0 0x283f 0x20000000 # Write scratch register 8 -putcfam -p0 0x2801 0x80000000 0x80000000 # Set SBE start bit to start IPL diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service deleted file mode 100644 index 13f7c3bd4..000000000 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/start_host@.service +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Start host%i SBE (pdbg) -After=obmc-host-start-pre@%i.target -Wants=obmc-host-start@%i.target -Before=obmc-host-start@%i.target -Before=obmc-host-started@%i.target -Wants=obmc-power-on@%i.target -After=obmc-power-on@%i.target -Conflicts=obmc-chassis-stop@%i.target - -[Service] -ExecStart={bindir}/start_host.sh {MACHINE} -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=obmc-chassis-start@%i.target diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround.sh b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround.sh deleted file mode 100755 index 9ebf60136..000000000 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -e -# Apply fixes over FSI to POWER9 hosts. Required before VCS rail on. - -PDBG=${PDBG:-pdbg} - -putcfam() -{ - $PDBG $1 putcfam $2 $3 $4 -} - -# P9 dd1 required workaround needed before powering VCS rails -p9_dd1_vcs_workaround() -{ - putcfam -a 0x2810 0x00000000 0x00010000 && # Unfence PLL controls - putcfam -a 0x281A 0x40000000 0x40000000 && # Assert Perv chiplet endpoint reset, just in case - putcfam -a 0x281A 0x00000001 0x00000001 # Enable Nest PLL -} - -# Put the CFAM/FSI slave into async mode -putcfam -p0 0x900 1 - -#Set hMFSI error recovery -putcfam -p0 0x34b8 0x0000c000 - -#Set hMFSI timings -putcfam -p0 0x3400 0xd0040110 -putcfam -p0 0x3401 0xffff0000 - -#Enable hMFST ports -putcfam -p0 0x3404 0xf0000000 - -p9_dd1_vcs_workaround diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service deleted file mode 100644 index c9cd09aa8..000000000 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service +++ /dev/null @@ -1,18 +0,0 @@ -[Unit] -Description=Run VCS workaround on host%i -Wants=obmc-host-start-pre@%i.target -Before=obmc-host-start-pre@%i.target -Wants=obmc-power-on@%i.target -After=obmc-power-on@%i.target -Wants=fsi-scan@%i.service -After=fsi-scan@%i.service -Conflicts=obmc-power-chassis-off@%i.target -ConditionPathExists=!/run/openbmc/chassis@%i-on - -[Service] -ExecStart={bindir}/vcs_workaround.sh {MACHINE} -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=obmc-power-chassis-on@%i.target diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-proc-control.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-proc-control.bb new file mode 100644 index 000000000..0999c8297 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/op-proc-control.bb @@ -0,0 +1,16 @@ +SUMMARY = "OpenPower procedure control" +DESCRIPTION = "Provides procedures that run against the host chipset" +PR = "r1" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e3fc50a88d0a364313df4b21ef20c29e" + +S = "${WORKDIR}/git" + +inherit autotools pkgconfig + +DEPENDS += "autoconf-archive-native phosphor-logging" +RDEPENDS_${PN} += "phosphor-logging" + +SRC_URI += "git://github.com/openbmc/openpower-proc-control" +SRCREV = "0c0eeff6e991077f6a4570880b01396ac1b9e2e5" diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb index 16d24c79a..0caa074d4 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-host-start.bb @@ -5,22 +5,14 @@ PR = "r1" inherit obmc-phosphor-systemd inherit obmc-phosphor-license -FILESEXTRAPATHS_prepend := "${THISDIR}/op-pdbg-host-control:" +FILESEXTRAPATHS_prepend := "${THISDIR}/op-host-control:" PROVIDES += 'virtual/obmc-host-ctl' RPROVIDES_${PN} += 'virtual-obmc-host-ctl' -RDEPENDS_${PN} += "pdbg \ - p9-vcs-workaround" +RDEPENDS_${PN} += "p9-vcs-workaround op-proc-control" S = "${WORKDIR}" -SRC_URI += "file://start_host.sh" - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/start_host.sh \ - ${D}${bindir}/start_host.sh -} TMPL = "start_host@.service" INSTFMT = "start_host@{0}.service" @@ -29,4 +21,3 @@ FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}" SYSTEMD_SERVICE_${PN} += "${TMPL}" SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" -SYSTEMD_SUBSTITUTIONS += "MACHINE:${MACHINE}:${TMPL}" diff --git a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb index b03e26c0c..53b84a639 100644 --- a/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb +++ b/meta-openbmc-machines/meta-openpower/common/recipes-phosphor/host/p9-vcs-workaround.bb @@ -5,19 +5,10 @@ PR = "r1" inherit obmc-phosphor-systemd inherit obmc-phosphor-license -FILESEXTRAPATHS_prepend := "${THISDIR}/op-pdbg-host-control:" - -RDEPENDS_${PN} += "pdbg \ - virtual-p9-vcs-workaround" +FILESEXTRAPATHS_prepend := "${THISDIR}/op-host-control:" +RDEPENDS_${PN} += "virtual-p9-vcs-workaround op-proc-control" S = "${WORKDIR}" -SRC_URI += "file://vcs_workaround.sh" - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/vcs_workaround.sh \ - ${D}${bindir}/vcs_workaround.sh -} TMPL = "vcs_workaround@.service" INSTFMT = "vcs_workaround@{0}.service" @@ -26,4 +17,3 @@ FMT = "../${TMPL}:${TGTFMT}.requires/${INSTFMT}" SYSTEMD_SERVICE_${PN} += "${TMPL}" SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT', 'OBMC_CHASSIS_INSTANCES')}" -SYSTEMD_SUBSTITUTIONS += "MACHINE:${MACHINE}:${TMPL}" diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/op-host-control/vcs_workaround@.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/op-host-control/vcs_workaround@.service new file mode 100644 index 000000000..fa414b9fb --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/op-host-control/vcs_workaround@.service @@ -0,0 +1,13 @@ +[Unit] +Description=Run VCS workaround on host%i +Wants=avsbus-enable@%i.service +After=avsbus-enable@%i.service +Conflicts=obmc-power-chassis-off@%i.target + +[Service] +ExecStart={sbindir}/openpower-proc-control vcsWorkaround +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=obmc-power-chassis-on@%i.target diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service deleted file mode 100644 index a2b5397ea..000000000 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/op-pdbg-host-control/vcs_workaround@.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Run VCS workaround on host%i -Wants=avsbus-enable@%i.service -After=avsbus-enable@%i.service -Conflicts=obmc-power-chassis-off@%i.target - -[Service] -ExecStart={bindir}/vcs_workaround.sh {MACHINE} -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=obmc-power-chassis-on@%i.target diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/p9-vcs-workaround.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/p9-vcs-workaround.bbappend index 8e1072c3f..d1d952ed4 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/p9-vcs-workaround.bbappend +++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-romulus/recipes-phosphor/host/p9-vcs-workaround.bbappend @@ -1 +1 @@ -FILESEXTRAPATHS_prepend := "${THISDIR}/op-pdbg-host-control:" +FILESEXTRAPATHS_prepend := "${THISDIR}/op-host-control:" -- cgit v1.2.1