summaryrefslogtreecommitdiff
path: root/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl/ampere-host-force-reset@.service
diff options
context:
space:
mode:
authorThuBaNguyen <thu@os.amperecomputing.com>2021-07-05 09:32:26 +0300
committerThang Q. Nguyen <thang@os.amperecomputing.com>2021-08-04 10:59:04 +0300
commit2f952142e9ed8b436a0e702a0f46ac88842dd51e (patch)
treee4f58ad3c728bd6361d31c738e91b0cf257c079b /meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl/ampere-host-force-reset@.service
parent509991d6a5f34772788ca6d8401c19109e6280a6 (diff)
downloadopenbmc-2f952142e9ed8b436a0e702a0f46ac88842dd51e.tar.xz
meta-ampere: power control: refactor host power control
Refactor the Mt.Jade Host power control operations to support Altra CPU following the Altra SoC BMC Interface specification which still satisfying the OpenBMC power control framework. Tested: check the below cases and ensure Host state report correctly: 1. Run "reboot" from Host Linux. Check the Host is graceful shutdown, then SYS_RESET is asserted and the Host is booted. 2. Run "shutdown" from Host Linux. Check the Host is graceful shutdown then the chassis power is turned OFF. 3. Run "ipmitool chassis power soft". Check the Host is graceful shutdown 4. Execute Redfish GracefulShutdown. Check the Host is graceful shutdown then the chassis power is turned OFF. 5. Execute Redfish GracefulRestart. Check the Host is graceful shutdown then turned ON. 6. Check other IPMI chassis power and Redfish Reset actions work. Signed-off-by: ThuBaNguyen <thu@os.amperecomputing.com> Change-Id: I3a9716f37d7e80bdc1a1d0422e561c8fc51ad040
Diffstat (limited to 'meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl/ampere-host-force-reset@.service')
-rw-r--r--meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl/ampere-host-force-reset@.service14
1 files changed, 14 insertions, 0 deletions
diff --git a/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl/ampere-host-force-reset@.service b/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl/ampere-host-force-reset@.service
new file mode 100644
index 000000000..6e03c8b81
--- /dev/null
+++ b/meta-ampere/meta-common/recipes-ac01/host/ampere-hostctrl/ampere-host-force-reset@.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Ampere Computing LLC force reset host%i
+Wants=phosphor-reboot-host@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+OnFailure=obmc-chassis-powerreset@%i.target
+
+[Service]
+RemainAfterExit=no
+Type=oneshot
+ExecStart=/bin/sh -c "sleep 3 && /usr/bin/env ampere_power_util.sh mb force_reset"
+SyslogIdentifier=ampere_power_util.sh
+
+[Install]
+WantedBy=obmc-host-force-warm-reboot@%i.target \ No newline at end of file