From patchwork Thu Aug 19 15:40:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 1518728 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ozlabs.org (client-ip=112.213.38.117; helo=lists.ozlabs.org; envelope-from=skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=G/PVJWyF; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Gr8B30H5wz9t0T for ; Fri, 20 Aug 2021 01:40:58 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Gr8B22NzDz3cGS for ; Fri, 20 Aug 2021 01:40:58 +1000 (AEST) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=G/PVJWyF; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=hegdevasant@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=G/PVJWyF; dkim-atps=neutral Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Gr89w3dg0z3bZK for ; Fri, 20 Aug 2021 01:40:51 +1000 (AEST) Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 17JFX1qV022178 for ; Thu, 19 Aug 2021 11:40:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=pp1; bh=cteJaj3bnrBudDXZiki99qiRxjQ8AdSbU26ZC272D2Q=; b=G/PVJWyF6xiKx1veXpMpUof+xybmqrF+arx746U2CFpViwvLyQpZUwLqxTyl1w2gU4NX +LT06vOs/W9Zv5LXhh+PR/HiQ0UK1/w+KIUaWx41f7bSGXIlEPTLvoroVVPa3pPXUwED YA9kHqvlXvLq8/7dy73xHRzbOA4aZTEtTuADrY/jfKO/7Kb6fRikjhYv7yfT3I11oBj0 xYkxIlwYG0J5SgGHKDgJ0RLvSk/whItKSKNDe8Az/cbw85O2yuKyZJTrcRD0JWJE8DAg ZyxvSKGB1PlIHKln+A94eO63dhzPac3yTzeOPblAUYLxXePlRmAk8j1nS8RHScohOiTJ Pw== Received: from ppma01fra.de.ibm.com (46.49.7a9f.ip4.static.sl-reverse.com [159.122.73.70]) by mx0a-001b2d01.pphosted.com with ESMTP id 3ahjgbe80s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Aug 2021 11:40:48 -0400 Received: from pps.filterd (ppma01fra.de.ibm.com [127.0.0.1]) by ppma01fra.de.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 17JFcFSx001953 for ; Thu, 19 Aug 2021 15:40:46 GMT Received: from b06cxnps4075.portsmouth.uk.ibm.com (d06relay12.portsmouth.uk.ibm.com [9.149.109.197]) by ppma01fra.de.ibm.com with ESMTP id 3ae5f8faeu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 19 Aug 2021 15:40:46 +0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 17JFeh2h29950392 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 19 Aug 2021 15:40:44 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D9AEE11C04A; Thu, 19 Aug 2021 15:40:43 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B730711C052; Thu, 19 Aug 2021 15:40:41 +0000 (GMT) Received: from hegdevasant.in.ibm.com (unknown [9.199.62.102]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Thu, 19 Aug 2021 15:40:41 +0000 (GMT) From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Thu, 19 Aug 2021 21:10:39 +0530 Message-Id: <20210819154039.52851-1-hegdevasant@linux.vnet.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: LYV_tQFILP4yxvmjf_-7vFCxHGbnCv5- X-Proofpoint-GUID: LYV_tQFILP4yxvmjf_-7vFCxHGbnCv5- X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.790 definitions=2021-08-19_05:2021-08-17, 2021-08-19 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 bulkscore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 phishscore=0 clxscore=1015 impostorscore=0 mlxlogscore=999 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2107140000 definitions=main-2108190091 Subject: [Skiboot] [PATCH v2] hello_world: Add p10 mambo tests X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Vasant Hegde --- Changes in v2: I had missed to add run_mambo_p10_hello_world.sh in v1. -Vasant test/hello_world/Makefile.check | 16 +++++ test/hello_world/run_mambo_p10_hello_world.sh | 64 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100755 test/hello_world/run_mambo_p10_hello_world.sh diff --git a/test/hello_world/Makefile.check b/test/hello_world/Makefile.check index 0390cf662..8cf15cb2f 100644 --- a/test/hello_world/Makefile.check +++ b/test/hello_world/Makefile.check @@ -4,14 +4,18 @@ HELLO_WORLD_STB_TEST := test/hello_world/hello_kernel/hello_kernel.stb .PHONY: hello_world-tests hello_world-tests: $(HELLO_WORLD_TEST:%=%-check-smt-mambo) hello_world-tests: $(HELLO_WORLD_TEST:%=%-check-smt-p9-mambo) +hello_world-tests: $(HELLO_WORLD_TEST:%=%-check-smt-p10-mambo) hello_world-tests: $(HELLO_WORLD_TEST:%=%-check-mambo) hello_world-tests: $(HELLO_WORLD_TEST:%=%-check-p9-mambo) +hello_world-tests: $(HELLO_WORLD_TEST:%=%-check-p10-mambo) hello_world-tests: $(HELLO_WORLD_TEST:%=%-check-qemu) hello_world-tests: $(HELLO_WORLD_STB_TEST:%=%-check-stb-smt-mambo) hello_world-tests: $(HELLO_WORLD_STB_TEST:%=%-check-stb-smt-p9-mambo) +hello_world-tests: $(HELLO_WORLD_STB_TEST:%=%-check-stb-smt-p10-mambo) hello_world-tests: $(HELLO_WORLD_STB_TEST:%=%-check-stb-mambo) hello_world-tests: $(HELLO_WORLD_STB_TEST:%=%-check-stb-p9-mambo) +hello_world-tests: $(HELLO_WORLD_STB_TEST:%=%-check-stb-p10-mambo) boot-tests: hello_world-tests check: hello_world-tests @@ -29,12 +33,18 @@ $(HELLO_WORLD_TEST:%=%-check-smt-mambo): %-check-smt-mambo: % skiboot.lid $(HELLO_WORLD_TEST:%=%-check-smt-p9-mambo): %-check-smt-p9-mambo: % skiboot.lid $(call Q , BOOT TEST , THREADS=2 ./test/hello_world/run_mambo_p9_hello_world.sh , $@) +$(HELLO_WORLD_TEST:%=%-check-smt-p10-mambo): %-check-smt-p10-mambo: % skiboot.lid + $(call Q , BOOT TEST , THREADS=2 ./test/hello_world/run_mambo_p10_hello_world.sh , $@) + $(HELLO_WORLD_TEST:%=%-check-mambo): %-check-mambo: % skiboot.lid $(call Q , BOOT TEST , ./test/hello_world/run_mambo_hello_world.sh, $@) $(HELLO_WORLD_TEST:%=%-check-p9-mambo): %-check-p9-mambo: % skiboot.lid $(call Q , BOOT TEST , ./test/hello_world/run_mambo_p9_hello_world.sh, $@) +$(HELLO_WORLD_TEST:%=%-check-p10-mambo): %-check-p10-mambo: % skiboot.lid + $(call Q , BOOT TEST , ./test/hello_world/run_mambo_p10_hello_world.sh, $@) + # and now, with secure and trusted boot: $(HELLO_WORLD_STB_TEST:%=%-check-stb-smt-mambo): %-check-stb-smt-mambo: % skiboot.lid.stb $(call Q , BOOT TEST , SKIBOOT_ENABLE_MAMBO_STB=1 THREADS=2 ./test/hello_world/run_mambo_hello_world.sh , $@) @@ -42,12 +52,18 @@ $(HELLO_WORLD_STB_TEST:%=%-check-stb-smt-mambo): %-check-stb-smt-mambo: % skiboo $(HELLO_WORLD_STB_TEST:%=%-check-stb-smt-p9-mambo): %-check-stb-smt-p9-mambo: % skiboot.lid.stb $(call Q , BOOT TEST , SKIBOOT_ENABLE_MAMBO_STB=1 THREADS=2 ./test/hello_world/run_mambo_p9_hello_world.sh , $@) +$(HELLO_WORLD_STB_TEST:%=%-check-stb-smt-p10-mambo): %-check-stb-smt-p10-mambo: % skiboot.lid.stb + $(call Q , BOOT TEST , SKIBOOT_ENABLE_MAMBO_STB=1 THREADS=2 ./test/hello_world/run_mambo_p10_hello_world.sh , $@) + $(HELLO_WORLD_STB_TEST:%=%-check-stb-mambo): %-check-stb-mambo: % skiboot.lid.stb $(call Q , BOOT TEST , SKIBOOT_ENABLE_MAMBO_STB=1 ./test/hello_world/run_mambo_hello_world.sh, $@) $(HELLO_WORLD_STB_TEST:%=%-check-stb-p9-mambo): %-check-stb-p9-mambo: % skiboot.lid.stb $(call Q , BOOT TEST , SKIBOOT_ENABLE_MAMBO_STB=1 ./test/hello_world/run_mambo_p9_hello_world.sh, $@) +$(HELLO_WORLD_STB_TEST:%=%-check-stb-p10-mambo): %-check-stb-p10-mambo: % skiboot.lid.stb + $(call Q , BOOT TEST , SKIBOOT_ENABLE_MAMBO_STB=1 ./test/hello_world/run_mambo_p10_hello_world.sh, $@) + # qemu $(HELLO_WORLD_TEST:%=%-check-qemu): %-check-qemu: % skiboot.lid diff --git a/test/hello_world/run_mambo_p10_hello_world.sh b/test/hello_world/run_mambo_p10_hello_world.sh new file mode 100755 index 000000000..4ce54494d --- /dev/null +++ b/test/hello_world/run_mambo_p10_hello_world.sh @@ -0,0 +1,64 @@ +#!/bin/bash + +if [ -z "$P10MAMBO_PATH" ]; then + P10MAMBO_PATH=/opt/ibm/systemsim-p10-1.1-0 +fi + +if [ -z "$P10MAMBO_BINARY" ]; then + P10MAMBO_BINARY="run/p10/power10" +fi + +if [ ! -x "$P10MAMBO_PATH/$P10MAMBO_BINARY" ]; then + echo "Could not find executable P10MAMBO_BINARY ($P10MAMBO_PATH/$P10MAMBO_BINARY). Skipping hello_world test"; + exit 0; +fi + +if [ -n "$KERNEL" ]; then + echo 'Please rebuild skiboot without KERNEL set. Skipping hello_world test'; + exit 0; +fi + +if [ ! $(command -v expect) ]; then + echo 'Could not find expect binary. Skipping hello_world test'; + exit 0; +fi + +if [ -n "$SKIBOOT_ENABLE_MAMBO_STB" ]; then + export SKIBOOT_ZIMAGE=$(pwd)/test/hello_world/hello_kernel/hello_kernel.stb + export SKIBOOT_CVC_CODE=$(pwd)/external/mambo/cvc.bin +else + export SKIBOOT_ZIMAGE=$(pwd)/test/hello_world/hello_kernel/hello_kernel +fi + +# Currently getting some core dumps from mambo, so disable them! +ulimit -c 0 + +t=$(mktemp) || exit 1 + +trap "rm -f -- '$t'" EXIT + +( cd external/mambo; +cat <&1 > $t + +r=$? +if [ $r != 0 ]; then + cat $t + exit $r +fi + +if [ -n "$V" ] ; then cat "$t" ; fi +rm -f -- "$t" +trap - EXIT +exit 0;