From patchwork Tue May 3 19:48:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 569003 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:6886:0:0:0:0 with SMTP id m6csp9801897map; Tue, 3 May 2022 13:40:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyiqA2ihWVanbpWkP4Yk98jq2HxsmN1EuVmIkhMC7EAtS8N+y7xHOOX0v0JLTkIx6U/o0tG X-Received: by 2002:a05:622a:c4:b0:2f3:a257:b60 with SMTP id p4-20020a05622a00c400b002f3a2570b60mr11678444qtw.291.1651610401600; Tue, 03 May 2022 13:40:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651610401; cv=none; d=google.com; s=arc-20160816; b=lUH5vTBD0XCMLVNzP++Z/0l/eEFhtPtNYNcM4wPQmUo6x44fclZ+y+igmpzPeqk4fA isYgwVUj1zt49AI/8kdXbdzh7su+g+dYAlz8ieOhYsgg6IiR05tS5a7Spo4RvpUkHGrO kw3AlXHExLJqc4ICI8NuosoC8BnYNzGQtVi/l0pv1AXMK+lf8VhF4YdYiRpu6HkfyTEG RQgIi2wGSdFOWSWpolv7ddcOoEj6aUa1hZQhKtXo9qAVJ7xy4itnOrn5no67vio+r25r PP19LRxdRIxr/3tFDC7aZ8bkNrmVWn9sjopH+bGuPrsborvi89bLMospktAP2cKpQqcU y2Mg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=3j65Vrb+cTtoRUM0a2SN2E+0qaLnPvILTBqh1dXrOWQ=; b=yO60wt93l47ixVwP1YMfsUabz8/LeHteLcHVnCa4Y172Fl1xR2hjFQFRUxySVG8Vh8 fWm+LfKW9sVBlRpJ2xs/1RozEpV1TZpLlfk+xr+ScxsuuTPucnQ1q6eWP/gwArsHipo0 XPgx/izoaJwymvCyjZ8wkWisR7kXLkjpZ4ppA/h8ChRNCvqAz8kfnvP7SS3gtKljNygy 3T64Bdb0DzDy78OHE/GsDSWMDOPvZ+zGaPw2walaQn5FtMJmA8OxgwnfYDLLibqMGfY1 7DlMvlNe077/qwYKvJRBTM+Aahu5MYwD7lP5++6NyzSkKKOmDaFuZ2/huQluw3Vbv97p wlvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jrHav2i+; 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 v5-20020a05622a014500b002f368aa943dsi8448968qtw.66.2022.05.03.13.40.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 May 2022 13:40:01 -0700 (PDT) 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=jrHav2i+; 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]:37894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nlzJR-0002hD-4o for patch@linaro.org; Tue, 03 May 2022 16:40:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40160) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nlyZU-0007kf-5A for qemu-devel@nongnu.org; Tue, 03 May 2022 15:52:32 -0400 Received: from mail-pj1-x1034.google.com ([2607:f8b0:4864:20::1034]:33363) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nlyZS-0006Gc-I9 for qemu-devel@nongnu.org; Tue, 03 May 2022 15:52:31 -0400 Received: by mail-pj1-x1034.google.com with SMTP id cu23-20020a17090afa9700b001d98d8e53b7so2552004pjb.0 for ; Tue, 03 May 2022 12:52:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=3j65Vrb+cTtoRUM0a2SN2E+0qaLnPvILTBqh1dXrOWQ=; b=jrHav2i+5I/qLGY9K9HW1GUG1B0v0tqQaw1sxwF8+hAXzl/nlrWcIhOBNH+MhU01jj ybi0bBD4d39hxFNlMrwfj7I2Jce4BDonJqnCvr+kLxPQXhSNoc7N6gTJmXXp9lvPKXqY 8A4X4Bzb8H6YFbH7gW8Xs82lEStXTeMOf4iTHs8nzmKZMsVmSDBudvNQu1nkr629NEMc iTL3WlJhoet6C+naIpnRPyzaJFoiJrJUqUCBxi1xFnrHsx1juSjFEZJHgOqwMonELOB7 rnp9rASI/j35SJed8jEf1Z0jov2938eOKB1WZ1S+b6hBEd7OIYXVQlxN4EkfF3gGXJJr Z1gQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=3j65Vrb+cTtoRUM0a2SN2E+0qaLnPvILTBqh1dXrOWQ=; b=nGlkYv7wLrVjoyQsLv2QQR2iri1ZrQWh9nW/+8p8NynNNAfACJw7JajPCpVlpNd+y0 l53vA7qx8lmeZ0eIE1jkbw8D+0tl607nitr8oOYzSXOOCXigFwztlUvu6DkFNnhlwfQr dNhPxmMzwoAKE9JG7hkLirY7ckbfuCPSRlsGJsC6X1mYEeW8V9QcCS8IUviGf6UktPaC +Yz2VxZOazbiYN/E1YuTixViMjW6rECVtBuKhS8elouKDY4c/usDcjVs1z2DXvOQUbG9 LAzA5ktVKMm2sK2NHvGRFhhKedKTeAf6za73WfWZzo65QUklqG48p67SFCdkrkF3UvLd OhjA== X-Gm-Message-State: AOAM530mt9Ty35BtCUFCAVGRA/NQKyM40UY8LFVQ1oX8O6UktTRENnab WeJh81EZNdZtsKr/BtX1YPtptWRzYlRh9A== X-Received: by 2002:a17:902:8304:b0:155:d594:5c04 with SMTP id bd4-20020a170902830400b00155d5945c04mr17582533plb.105.1651607549270; Tue, 03 May 2022 12:52:29 -0700 (PDT) Received: from stoup.. ([71.212.142.129]) by smtp.gmail.com with ESMTPSA id fz16-20020a17090b025000b001dbe11be891sm1692286pjb.44.2022.05.03.12.52.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 May 2022 12:52:28 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH v2 44/74] semihosting: Remove qemu_semihosting_console_outc Date: Tue, 3 May 2022 12:48:13 -0700 Message-Id: <20220503194843.1379101-45-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220503194843.1379101-1-richard.henderson@linaro.org> References: <20220503194843.1379101-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::1034; envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1034.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" This function has been replaced by *_write. Signed-off-by: Richard Henderson --- include/semihosting/console.h | 13 ------------- linux-user/semihost.c | 16 ---------------- semihosting/console.c | 18 ------------------ 3 files changed, 47 deletions(-) diff --git a/include/semihosting/console.h b/include/semihosting/console.h index 6994f23c82..d6c1cc58ab 100644 --- a/include/semihosting/console.h +++ b/include/semihosting/console.h @@ -24,19 +24,6 @@ */ int qemu_semihosting_console_outs(CPUArchState *env, target_ulong s); -/** - * qemu_semihosting_console_outc: - * @env: CPUArchState - * @s: host address of null terminated guest string - * - * Send single character from guest memory to the debug console. This - * may be the remote gdb session if a softmmu guest is currently being - * debugged. - * - * Returns: nothing - */ -void qemu_semihosting_console_outc(CPUArchState *env, target_ulong c); - /** * qemu_semihosting_console_read: * @cs: CPUState diff --git a/linux-user/semihost.c b/linux-user/semihost.c index 871edf993a..f8bc8889f3 100644 --- a/linux-user/semihost.c +++ b/linux-user/semihost.c @@ -33,22 +33,6 @@ int qemu_semihosting_console_outs(CPUArchState *env, target_ulong addr) return len; } -void qemu_semihosting_console_outc(CPUArchState *env, target_ulong addr) -{ - char c; - - if (get_user_u8(c, addr)) { - qemu_log_mask(LOG_GUEST_ERROR, - "%s: passed inaccessible address " TARGET_FMT_lx, - __func__, addr); - } else { - if (write(STDERR_FILENO, &c, 1) != 1) { - qemu_log_mask(LOG_UNIMP, "%s: unexpected write to stdout failure", - __func__); - } - } -} - /* * For linux-user we can safely block. However as we want to return as * soon as a character is read we need to tweak the termio to disable diff --git a/semihosting/console.c b/semihosting/console.c index 677ec2b176..f6fab5933a 100644 --- a/semihosting/console.c +++ b/semihosting/console.c @@ -96,24 +96,6 @@ int qemu_semihosting_console_outs(CPUArchState *env, target_ulong addr) return out; } -void qemu_semihosting_console_outc(CPUArchState *env, target_ulong addr) -{ - CPUState *cpu = env_cpu(env); - uint8_t c; - - if (cpu_memory_rw_debug(cpu, addr, &c, 1, 0) == 0) { - if (use_gdb_syscalls()) { - gdb_do_syscall(semihosting_cb, "write,2,%x,%x", addr, 1); - } else { - qemu_semihosting_log_out((const char *) &c, 1); - } - } else { - qemu_log_mask(LOG_GUEST_ERROR, - "%s: passed inaccessible address " TARGET_FMT_lx, - __func__, addr); - } -} - #define FIFO_SIZE 1024 static int console_can_read(void *opaque)