From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1mcsFR-0000ds-9h for mharc-qemu-trivial@gnu.org; Tue, 19 Oct 2021 12:45:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45798) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcsEw-0000Bw-5p for qemu-trivial@nongnu.org; Tue, 19 Oct 2021 12:45:26 -0400 Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:36602) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcsEj-0000HE-EI for qemu-trivial@nongnu.org; Tue, 19 Oct 2021 12:45:24 -0400 Received: by mail-io1-xd34.google.com with SMTP id e144so21146635iof.3 for ; Tue, 19 Oct 2021 09:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NAOR1xdlj+WVz0/eC/F+PLm/lzyts9sAm9QAoPvWdyM=; b=UmfUbmTN/kWpXarVj+lgqIYHQFjgTVhZDp8yCriXUny78jIUjxW7n6SRXhOn6g6ytQ DnYrge95kExwb7A6lN2vU6IB+TAEevPY/aDzk/OneW5mexnaZflWzHlHfkF5P1AiInaJ I2QeridW7ZDFcBEWuOvYcyAWqrZ31/+7PF+LQ5S3IWkbcte+2fA+HD6/RGgJmlgwG5Gd HcU+pMHdWGzkPB/jrq04wxnxGWC2+3SJmDBjBzPx9wG2uSGb0SHv0W9kqiM4pFvq5fxb 4XpHDjakc3/CxccMUwpwoWw8aSUfUY3rfDOt9RFujln4CY+67ECnqpybxlf7st6YZDCx VOzg== 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=NAOR1xdlj+WVz0/eC/F+PLm/lzyts9sAm9QAoPvWdyM=; b=TP7TRT8gC3npqmaixuakN25W2v0Bt/9hkJih6Z111UrvFEWXQEf9QFgJluSd8Q4zdU iuGoUaRn4PnTGeTR/EC1AYgn6mBSjkjXDhfe8UMvd3NnBK9JjlCRhJG7TLlmxnxo2Qiq sq0mgTxuIbG9/1lzWjBRlcsdt+BND6X6ZfGUkjkaezGJzXyw9s8l+czuBES15ZjsqqBo fTvD7yifigMU6PX+RMROh1kwtQ926xD+c1Bu59K4xAMMH4H6ewqaNizPx3gWO3IC2APi CYu0TRK+7oYYJEI2rZ1gu9CpMAtspy/ddMmnWNjGrzmpiqhVLPHnJSPZ3xcePxu0btat j7vw== X-Gm-Message-State: AOAM533LDs7fzYUpH7xAOmhX790nDJ5VB7tsG+EoXp120VSKjj3okBV4 iBQsBPbYe5RLRnpS5b6SJPKICQ== X-Google-Smtp-Source: ABdhPJwdOgj3ldNBvNQKiV8FTNhaGdD8q3y0izLOb8laN3RIjsiRpcgB47nJG+vZ9mwGafsi2MKwuA== X-Received: by 2002:a05:6602:2b8f:: with SMTP id r15mr19697380iov.93.1634661912360; Tue, 19 Oct 2021 09:45:12 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id q7sm1133951ilv.48.2021.10.19.09.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 09:45:11 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Cc: Warner Losh , Laurent Vivier , qemu-trivial@nongnu.org, Kyle Evans , Michael Tokarev , Sean Bruno , Stacey Son Subject: [PATCH 06/24] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation Date: Tue, 19 Oct 2021 10:44:29 -0600 Message-Id: <20211019164447.16359-7-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211019164447.16359-1-imp@bsdimp.com> References: <20211019164447.16359-1-imp@bsdimp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2607:f8b0:4864:20::d34; envelope-from=imp@bsdimp.com; helo=mail-io1-xd34.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2021 16:45:26 -0000 X-List-Received-Date: Tue, 19 Oct 2021 16:45:26 -0000 Add a boiler plate CPU loop that does nothing except return an error for all traps. Signed-off-by: Sean Bruno Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h index c71ec000b3..94c9109c3f 100644 --- a/bsd-user/arm/target_arch_cpu.h +++ b/bsd-user/arm/target_arch_cpu.h @@ -35,6 +35,28 @@ static inline void target_cpu_init(CPUARMState *env, } } +static inline void target_cpu_loop(CPUARMState *env) +{ + int trapnr; + target_siginfo_t info; + CPUState *cs = env_cpu(env); + + for (;;) { + cpu_exec_start(cs); + trapnr = cpu_exec(cs); + cpu_exec_end(cs); + process_queued_cpu_work(cs); + switch (trapnr) { + default: + fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n", + trapnr); + cpu_dump_state(cs, stderr, 0); + abort(); + } /* switch() */ + process_pending_signals(env); + } /* for (;;) */ +} + static inline void target_cpu_clone_regs(CPUARMState *env, target_ulong newsp) { if (newsp) { -- 2.32.0 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 343EFC433FE for ; Tue, 19 Oct 2021 17:25:31 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BBFA6610FC for ; Tue, 19 Oct 2021 17:25:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org BBFA6610FC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=bsdimp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=nongnu.org Received: from localhost ([::1]:36930 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mcsrh-0004hT-Ro for qemu-devel@archiver.kernel.org; Tue, 19 Oct 2021 13:25:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45754) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mcsEt-00006Y-1u for qemu-devel@nongnu.org; Tue, 19 Oct 2021 12:45:23 -0400 Received: from mail-io1-xd35.google.com ([2607:f8b0:4864:20::d35]:45654) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mcsEj-0000HI-NY for qemu-devel@nongnu.org; Tue, 19 Oct 2021 12:45:22 -0400 Received: by mail-io1-xd35.google.com with SMTP id 188so21074170iou.12 for ; Tue, 19 Oct 2021 09:45:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20210112.gappssmtp.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=NAOR1xdlj+WVz0/eC/F+PLm/lzyts9sAm9QAoPvWdyM=; b=UmfUbmTN/kWpXarVj+lgqIYHQFjgTVhZDp8yCriXUny78jIUjxW7n6SRXhOn6g6ytQ DnYrge95kExwb7A6lN2vU6IB+TAEevPY/aDzk/OneW5mexnaZflWzHlHfkF5P1AiInaJ I2QeridW7ZDFcBEWuOvYcyAWqrZ31/+7PF+LQ5S3IWkbcte+2fA+HD6/RGgJmlgwG5Gd HcU+pMHdWGzkPB/jrq04wxnxGWC2+3SJmDBjBzPx9wG2uSGb0SHv0W9kqiM4pFvq5fxb 4XpHDjakc3/CxccMUwpwoWw8aSUfUY3rfDOt9RFujln4CY+67ECnqpybxlf7st6YZDCx VOzg== 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=NAOR1xdlj+WVz0/eC/F+PLm/lzyts9sAm9QAoPvWdyM=; b=kpaisVISh7O7HR3KawleIhD4KxPFoB2kI3x/lerX+YKk4dy2GMkzCB1ifcKKPpXygU GRWYirEKPO3ipkr9RLAAWiggCXMzEjIQi3VZFP/ysnGqpawWp8uVl/30OL6iGY9XeqtN CE7Utvpqi2cBhh+5Lpo51QX9gH4PMYUGTBEhtEyjzFIjYAA/FdMbWFtsJhmk1JW+AkBX M4Dvy+JBQAY/JjrwyLDRC9wuK9V56S6msfhMGAyIp4hI77KySUphznedrvbRF1BUzmGm LWKQUUTJAhR0sdW8xIH54ULKXJlU4YviiVCfnLl8tUhAAJIdniL+yJIwt7jGhF6pK19a dOaA== X-Gm-Message-State: AOAM530NQ/+YfoCCSvmmuLCXbqtkzlOq6S95iJhXW9BKbFvu/gMiJYHY 4PRbStbPUqQNK8SuTPq49Ybvp780oL72Jw== X-Google-Smtp-Source: ABdhPJwdOgj3ldNBvNQKiV8FTNhaGdD8q3y0izLOb8laN3RIjsiRpcgB47nJG+vZ9mwGafsi2MKwuA== X-Received: by 2002:a05:6602:2b8f:: with SMTP id r15mr19697380iov.93.1634661912360; Tue, 19 Oct 2021 09:45:12 -0700 (PDT) Received: from dune.bsdimp.com (50-253-99-174-static.hfc.comcastbusiness.net. [50.253.99.174]) by smtp.gmail.com with ESMTPSA id q7sm1133951ilv.48.2021.10.19.09.45.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Oct 2021 09:45:11 -0700 (PDT) From: Warner Losh To: qemu-devel@nongnu.org Subject: [PATCH 06/24] bsd-user/arm/target_arch_cpu.h: Dummy target_cpu_loop implementation Date: Tue, 19 Oct 2021 10:44:29 -0600 Message-Id: <20211019164447.16359-7-imp@bsdimp.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20211019164447.16359-1-imp@bsdimp.com> References: <20211019164447.16359-1-imp@bsdimp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=2607:f8b0:4864:20::d35; envelope-from=imp@bsdimp.com; helo=mail-io1-xd35.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: Stacey Son , qemu-trivial@nongnu.org, Kyle Evans , Michael Tokarev , Laurent Vivier , Sean Bruno , Warner Losh Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Add a boiler plate CPU loop that does nothing except return an error for all traps. Signed-off-by: Sean Bruno Signed-off-by: Stacey Son Signed-off-by: Warner Losh --- bsd-user/arm/target_arch_cpu.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/bsd-user/arm/target_arch_cpu.h b/bsd-user/arm/target_arch_cpu.h index c71ec000b3..94c9109c3f 100644 --- a/bsd-user/arm/target_arch_cpu.h +++ b/bsd-user/arm/target_arch_cpu.h @@ -35,6 +35,28 @@ static inline void target_cpu_init(CPUARMState *env, } } +static inline void target_cpu_loop(CPUARMState *env) +{ + int trapnr; + target_siginfo_t info; + CPUState *cs = env_cpu(env); + + for (;;) { + cpu_exec_start(cs); + trapnr = cpu_exec(cs); + cpu_exec_end(cs); + process_queued_cpu_work(cs); + switch (trapnr) { + default: + fprintf(stderr, "qemu: unhandled CPU exception 0x%x - aborting\n", + trapnr); + cpu_dump_state(cs, stderr, 0); + abort(); + } /* switch() */ + process_pending_signals(env); + } /* for (;;) */ +} + static inline void target_cpu_clone_regs(CPUARMState *env, target_ulong newsp) { if (newsp) { -- 2.32.0