From patchwork Fri Aug 5 22:02:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ryan Grimm X-Patchwork-Id: 1664206 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.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=cGJI/LPz; dkim-atps=neutral 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=) 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 (2048 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4M002W2d4dz9s07 for ; Sat, 6 Aug 2022 08:02:41 +1000 (AEST) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4M002T4B50z2xHb for ; Sat, 6 Aug 2022 08:02:41 +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=cGJI/LPz; dkim-atps=neutral X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=grimm@linux.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=cGJI/LPz; 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 4M002M0qGTz2xGN for ; Sat, 6 Aug 2022 08:02:34 +1000 (AEST) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 275LEagv007317 for ; Fri, 5 Aug 2022 22:02:30 GMT 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=nT5o7nxcULmJqKB7YwArq7QVqvFKOnnweAleyH9M19Y=; b=cGJI/LPzTAjM2kb7WnX4fa3myvk0J0FNe559MrIwsd07OuyYPBWDq5WOgdCoWG89jU/t 7wIQIeCZ32aQHVLOPIWo6a+270fwCE2uAqmftDdSYHRm+dfO9M84qZr/v83j0bUt3tG4 Aob8BY3eXqPcLde5ikd7mm6a4Q3SQ57KR5QUsjOI/mpTYNz8ZVH7LLG+hHGF1OzxWpX/ /zkpRgekiryxyYSvgchJqb1BFSUV8r9mNFsaY6kKBJ9j9JQDzhwDgd/nl78ydtaef+oP eP/jYylz7HL93U8SkFuLDnbV19lRW5Mb4EcupLc+jThKsukA13lDJ533Izz7msWtHPty fA== Received: from ppma03dal.us.ibm.com (b.bd.3ea9.ip4.static.sl-reverse.com [169.62.189.11]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3hsaxx94eu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 05 Aug 2022 22:02:29 +0000 Received: from pps.filterd (ppma03dal.us.ibm.com [127.0.0.1]) by ppma03dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 275LoFWC012693 for ; Fri, 5 Aug 2022 22:02:29 GMT Received: from b01cxnp23032.gho.pok.ibm.com (b01cxnp23032.gho.pok.ibm.com [9.57.198.27]) by ppma03dal.us.ibm.com with ESMTP id 3hmv9a8rk2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 05 Aug 2022 22:02:29 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 275M2STQ58261776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 5 Aug 2022 22:02:28 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EFFA028059; Fri, 5 Aug 2022 22:02:27 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8173E2805A; Fri, 5 Aug 2022 22:02:27 +0000 (GMT) Received: from alain.ibm.com (unknown [9.163.18.5]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Fri, 5 Aug 2022 22:02:27 +0000 (GMT) From: Ryan Grimm To: skiboot@lists.ozlabs.org Date: Fri, 5 Aug 2022 18:02:23 -0400 Message-Id: <20220805220223.576936-1-grimm@linux.ibm.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: zZvAmA2Jl63FkJmCDQGhJPlKVPcoU6aw X-Proofpoint-ORIG-GUID: zZvAmA2Jl63FkJmCDQGhJPlKVPcoU6aw X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-05_11,2022-08-05_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 bulkscore=0 phishscore=0 mlxlogscore=988 spamscore=0 impostorscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2206140000 definitions=main-2208050097 Subject: [Skiboot] [PATCH] mambo: print useful error when mysim mmap fails 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: , Cc: Ryan Grimm Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" My user id didn't have access to disk.img and the code printed the error message: ERROR: pmem: 'mysim mmap' command needs newer mambo mysim mmap has been in Mambo for a while so this patch prints out the error message from catch. Now we get the useful: ERROR: pmem: 'mysim mmap' Error opening file disk.img for mapping Signed-off-by: Ryan Grimm Reviewed-by: Dan HorĂ¡k --- external/mambo/skiboot.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/external/mambo/skiboot.tcl b/external/mambo/skiboot.tcl index 33a892d9..6c0eb5a0 100644 --- a/external/mambo/skiboot.tcl +++ b/external/mambo/skiboot.tcl @@ -364,8 +364,8 @@ foreach pmem_file $pmem_files { # PMEM_DISK } else { set pmem_mode "rw" } - if {[catch {mysim memory mmap $pmem_start $pmem_size $pmem_file $pmem_mode}]} { - puts "ERROR: pmem: 'mysim mmap' command needs newer mambo" + if {[catch {mysim memory mmap $pmem_start $pmem_size $pmem_file $pmem_mode} err]} { + puts "ERROR: pmem: 'mysim mmap' $err" exit } set pmem_start [pmem_node_add $pmem_root $pmem_start $pmem_size]