From patchwork Tue Jun 28 04:53:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 585560 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5036:0:0:0:0 with SMTP id e22csp546189mab; Tue, 28 Jun 2022 01:26:57 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vt1UsrA27Xj8JvMXemp9SM0ZH299w5f9hkBXuLTaFKYbHuM0SEAA+VJgRAE6Rd7PrivO0B X-Received: by 2002:a05:6214:cab:b0:470:2e0e:476c with SMTP id s11-20020a0562140cab00b004702e0e476cmr2591394qvs.92.1656404817586; Tue, 28 Jun 2022 01:26:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656404817; cv=none; d=google.com; s=arc-20160816; b=MFeuRoq7hiaiYeWeAd1g+LaGm3zP6wpYEEiK5PrvDXJ9PJiwRONdpF5Tm2Ho+0QAQW ECwlxzaSTbZhl/hDvmm1MBU3gTOMLKTn+fQB+BL2mqIG0GZDagsJxzs5uGl8wV6oVVwg k2m0Oqhb80ZwZZA7ltQo6KIrlW2KRarmfhKqA3joUyG9mdFicyPvFqZ3Dueh/7o1XCEF T1yDjXLuCNArSj5nq1lhNoMeecfE2AgvWi3j5+JEer6T+K9fdIshEU7KGzXJ6SD2fmCy CyRiyNRdX1v1Ti8LJNbB2pJkHNOXW0UJHKgv/wBIGM3TNcSLBaXVp2aGoAdUfZwOUzFB XYfw== 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:cc:to :from:dkim-signature; bh=S34t29VeZyFZjhq+3Izzb9WFwxolWUsOd1jqso6L3og=; b=vp4g9Ous+x7iKICELEpF+0h8g2bvvh8+5vQRuYdhyo6XNdslKgiU5v+ZEblEJZ3MDu q1+Iai4WKS6RyUk2vS4jIgngEPULZRwEmk4AyeJlk9Yr3nXUFIv+g0NkexOEndF/JTkt Wr7Gj7YymRHzp0pMw2Saqlo56uU6twMT8Mu8GuJMMVJ0dsC5yuwjGbeBgddgeTG6Az76 uZG+wccSIdk3PEX8S496Yis5FbhEuEd/Bt0GrVlR1METBRVaMaWRq4nUnUqJqovcr766 OZGbqcmBWvMVkTwwGL576awKOC3LcBtw2x4oa0ARHdHpSnyRn5m1GegziCgHx4Cgw0v/ DDnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uGh6j6f3; 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 b76-20020ae9eb4f000000b006a02c12bfb0si6894499qkg.588.2022.06.28.01.26.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jun 2022 01:26:57 -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=uGh6j6f3; 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]:55054 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o66Yj-0003iL-3W for patch@linaro.org; Tue, 28 Jun 2022 04:26:57 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44278) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o63Jk-000247-HG for qemu-devel@nongnu.org; Tue, 28 Jun 2022 00:59:16 -0400 Received: from mail-pg1-x52a.google.com ([2607:f8b0:4864:20::52a]:41712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o63Ji-0000Xh-UM for qemu-devel@nongnu.org; Tue, 28 Jun 2022 00:59:16 -0400 Received: by mail-pg1-x52a.google.com with SMTP id 23so11066822pgc.8 for ; Mon, 27 Jun 2022 21:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=S34t29VeZyFZjhq+3Izzb9WFwxolWUsOd1jqso6L3og=; b=uGh6j6f3BuXBXVpVaLU/i3ugslAm00P6tGr4mj2JI33hh+YZXUIcyA0wnSmfWUgbHT 9xeLjd53PjDNJOAcevnWJpHjozNDsnJ+o/IHYwGqK4SHjr3tlr04FlsitnKdqjuWAFOw lI/SfFEp861V3t4nJHSuZyKSwrH0pAExwFZV/mins8brBcxH9ngkvgnKTuRgHKzCtVa6 vjh0obrrlyUKwfATUodl9J/3ZcdzI72k6thgOOwpVrF0VTpvtfz8r5Sw4LVL/Nb7wHOo zcpYtx4tM/m8kVsJTpT8CTGTDwz2Ljc7WOMEP4VBuhP1fVDRMob1brDNZKU6a5WktRE7 ZYFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=S34t29VeZyFZjhq+3Izzb9WFwxolWUsOd1jqso6L3og=; b=IFmuFK/s7eaqOYU+Wl0mFy8T9W1ulPuNFQXXMMGDZ0S9MrqBUTWZZOZo1xZErr4/10 NAR8TXJnmGi1q2kVEuaxbYgh1AgKRKvQAmZmw+EExRq/0oBQiVWijRR7pzjt+ioaZi4g 06AyVqRojw3LsVk74z9OkfDiRsy6/uY464cM24L8Acn0mG/yTO0XW69bUl49eHxmnaUv nV84rMuFTHcN1Xisd3cNbW9x0wCefm25y8haYvfervwJbOdzdBupwvUh6XqqYFdYuPIQ KKGhWSJ1NoKUjPan4kmRqM6hUCaldjd/nK7sSg6dqXivgA884NY+hUHeVptl/JRHC/Ox MWeg== X-Gm-Message-State: AJIora8DHFilUvJNXOphPx+zf7cUhRaltF+kDyhsHZK/4ibqjtlqxwPR YgeKmEAZ0bhO0F5CkQOt7W1ZIG1tFncTtw== X-Received: by 2002:a63:7a5e:0:b0:40c:f760:2f18 with SMTP id j30-20020a637a5e000000b0040cf7602f18mr16094000pgn.456.1656392353530; Mon, 27 Jun 2022 21:59:13 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id y7-20020aa78f27000000b00522c0a75c39sm8259686pfr.196.2022.06.27.21.59.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 21:59:13 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Luc Michel Subject: [PULL 50/60] semihosting: Remove qemu_semihosting_console_outc Date: Tue, 28 Jun 2022 10:23:53 +0530 Message-Id: <20220628045403.508716-51-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220628045403.508716-1-richard.henderson@linaro.org> References: <20220628045403.508716-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::52a; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52a.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. Reviewed-by: Luc Michel 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 955880514e..fe7ee85137 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)