From patchwork Fri Dec 20 13:22:41 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 182270 Delivered-To: patch@linaro.org Received: by 2002:a92:1f98:0:0:0:0:0 with SMTP id f24csp526675ilf; Fri, 20 Dec 2019 05:25:23 -0800 (PST) X-Google-Smtp-Source: APXvYqxRm0Xr97RE18PRH2WF5Dq1kjHv6sJ6Bj97NFciw97LJV5Au8pJzhE0FAyw/3bb2PFh6ypg X-Received: by 2002:ac8:5513:: with SMTP id j19mr11655584qtq.143.1576848323861; Fri, 20 Dec 2019 05:25:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576848323; cv=none; d=google.com; s=arc-20160816; b=TfgwzaxvX5nwS2uzb1vl2EAkWv19T/oIpkYqEz0YnChvhR1DN4CSjrrJPfZU7UtR61 CfAys49Zd/HdSVOi3qI+AmHxPUj/zTrrhVf2jKbjPOzVWPNgZTWcaP2TiYryET4ke6D3 xdm109AD9UdyZ9C2aKbiQethpeWsvqZnpLuHTmq+7VMXIdtxfRDWDBfBx08F59M8QSAg QegNGg75o5GPVoX00uEY9xXUDxEFg9Nz5PdJ0WMb9JYYEqrh17BvvyIhZKktxdBSTLhv hruTRe5dne2OeFwL1UNTfUyJH2BTA/oPdIpKC+LETkaDVVLcM7PQhZvOK3b4SVN8un5B yegg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:to:from:dkim-signature; bh=xiAAb76pOFZYS2kb+B4csCpUenDpkD5QkNMd1FaRNGI=; b=GDV+FNZL9P8YYumFYVNk/6/8Rv1Z56rGs4jb7GVtzZOmeLe7foN4oXLlK5weyhkcAo Oj4R2AlPrRicD+TeUEp7Nd7PvkKHZS0O41+XMag4LbzEsb3xUo1kPMt63qVxaQ5YOMHB JdFMxUO1eOnDG1568VgrQeybC635HIoZ1O1IXArVumvMtY1EIzQnM/CXDafyweenprM1 /WCCYPLIQBB+NP34Jit4FuKGlPr0VBkCcjEnhsrsiIavUEf4fZfJ5gZBVFyxmqvUBY7A Lb6s6ESZIdwAxosikLqy90RGm9/8RXBgnLOQEM/StE5jhw37HWZQjcWbQyM6jr5wMi1i A/XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bN+mVGYc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id r15si4624893qtn.171.2019.12.20.05.25.23 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 20 Dec 2019 05:25:23 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bN+mVGYc; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiIHS-0002v5-T3 for patch@linaro.org; Fri, 20 Dec 2019 08:25:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42597) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iiIF4-0007SJ-AA for qemu-devel@nongnu.org; Fri, 20 Dec 2019 08:22:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iiIF3-0005Ut-3R for qemu-devel@nongnu.org; Fri, 20 Dec 2019 08:22:54 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:38762) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iiIF2-0005R4-Mp for qemu-devel@nongnu.org; Fri, 20 Dec 2019 08:22:52 -0500 Received: by mail-wm1-x344.google.com with SMTP id u2so9218183wmc.3 for ; Fri, 20 Dec 2019 05:22:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xiAAb76pOFZYS2kb+B4csCpUenDpkD5QkNMd1FaRNGI=; b=bN+mVGYcqMSSDTzLyQVDCq3mZen+JsZOqjGVDW2W8PhOGUcQVcbXb12LvTK3+2zSNe EgeD7beYvGLd3XOctfv3vzckKhsc2kMpjC4Om1IvQEfC47xiTxYoIETMC1EPmnVOvV4S W3O6S/pdE83zsC9CBJ+c1XOVEqx3vVTtMhlY5AlAfGbNpQLGYd9AM0P/hY9Nwzxbz8B7 a2vnjhOKMyOvKWcQWB9GhtDhzgmVP6e/RA4g+Xo27kkrdr8Xvs/XZVNqpWjFmYyCWxrj elc2gLyIJkyfd05kGw0ZChVHG2cRt+iUqQY4gHWk8qBzLLZne5mAz0CsFD36mAtzKrfV 3sMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=xiAAb76pOFZYS2kb+B4csCpUenDpkD5QkNMd1FaRNGI=; b=NvbvvF6fEt6hNseZ4Wc5Q7jVOHOd55RK3pAyQJfBvq+IP1V6dOVVE/K1JzYFDFU89k DZ/oMcUv3Wz+tUZH+14UnK7d2RYiLEvQOPm0OIZ/uw2N/lYJ+/0dz/dResTQe4FdmCDv PAJG+CfmhrOEkQuPMrR8BMSSTbWwC+1SMlf0yBj7GOhH/iiX1iWKsRXsrH59kzTlHttK +6CGf4ZRfLozy6xAlG/pI8f45D8Lx4DEqZEEcDuKNeF+YDB1mONEMOPtD8YvbzeCkH+z cMJu2cVXlyNchhJkhX3zsFK3mUnnLG6ka2p5seQo5wCm0J71Thvw5OScd7l4iyhqIvJq a46w== X-Gm-Message-State: APjAAAUCT8XlVRQo1Z0RZKdHT1hCdqFjmSnjNQ5VqlzpLZz+0nQJG8zL ulSHa7CkAL87wwttj+q93rnASw== X-Received: by 2002:a1c:f213:: with SMTP id s19mr17427208wmc.42.1576848171425; Fri, 20 Dec 2019 05:22:51 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id s65sm9968729wmf.48.2019.12.20.05.22.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Dec 2019 05:22:47 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 96E5F1FF87; Fri, 20 Dec 2019 13:22:46 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 0/5] semihosting read console support Date: Fri, 20 Dec 2019 13:22:41 +0000 Message-Id: <20191220132246.6759-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: keithp@keithp.com, =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, A quick update to introduce a new "blocking" console read function for semihosting. The main change is a new test case for user-mode and changing the linux-user implementation to also block on a getchar() without any fancy polling. Otherwise I've addresses the review comments and re-tested. The following patches need review 05 - tests tcg add user version of dumb as bricks semi Alex Bennée (4): target/arm: remove unused EXCP_SEMIHOST leg target/arm: only update pc after semihosting completes tests/tcg: add a dumb-as-bricks semihosting console test tests/tcg: add user version of dumb-as-bricks semiconsole test Keith Packard (1): semihosting: add qemu_semihosting_console_inc for SYS_READC include/hw/semihosting/console.h | 16 +++++ include/hw/semihosting/semihost.h | 4 ++ hw/semihosting/console.c | 79 +++++++++++++++++++++++ linux-user/aarch64/cpu_loop.c | 1 + linux-user/arm/cpu_loop.c | 1 + linux-user/arm/semihost.c | 27 ++++++++ stubs/semihost.c | 4 ++ target/arm/arm-semi.c | 3 +- target/arm/helper.c | 8 +-- target/arm/m_helper.c | 1 + target/arm/translate-a64.c | 2 +- target/arm/translate.c | 6 +- tests/tcg/aarch64/system/semiconsole.c | 38 +++++++++++ tests/tcg/arm/semiconsole.c | 47 ++++++++++++++ vl.c | 3 + tests/tcg/aarch64/Makefile.softmmu-target | 9 ++- tests/tcg/arm/Makefile.target | 7 ++ 17 files changed, 243 insertions(+), 13 deletions(-) create mode 100644 tests/tcg/aarch64/system/semiconsole.c create mode 100644 tests/tcg/arm/semiconsole.c -- 2.20.1