Received: by 2002:ac2:4841:0:0:0:0:0 with SMTP id 1csp696292lfy; Wed, 19 Aug 2020 11:56:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzEmEkHKQhZG+xfKhHbF3N5dsqTKJsgvN/YI//CKfrItEUNZ9f7O6Rkuj4xet5aczew8tfy X-Received: by 2002:a25:d917:: with SMTP id q23mr33622620ybg.450.1597863370629; Wed, 19 Aug 2020 11:56:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597863370; cv=none; d=google.com; s=arc-20160816; b=OcK8XxgxCYsWvde+xlXp2jpno24MyNxc/3BQjA2pVcB+w6QzqmaAOrhzBAMSyA3h8V ddZ76ffUIkK6hbUj7PQ6C+wQETf2sO8oyooASmfG+aT9eBV77qtOR/Xbxuq67O8hKwV5 Wp9zxZrzZbJRaZ5gev9+GOuV0JTMSSBKLVYZvtXq6KPcbv5NW+BjjAL/VaQbhop008MR Cq1FmxTig6J5z8Lmj5etCt8WUiz58UbU6rsRcirQT7Y+J4iMXE6QvM3wrI7R0w61GO5N hqsgi2nqvI//K4ICNNXKYa3ntiEq9Hox9BRY9sdR0NNXesBwqRZQ9bGnAxu0wqGTrGle Kl9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:mime-version :subject:references:in-reply-to:message-id:cc:to:from:date :dkim-signature; bh=pQ1Uo1aefN2Blt4tcdHK70GPdjWRqvNCNtkmaDPmCXg=; b=tgbmfoSGyHCXcKvOfmLAAIDH4BFAO0VO5N/ipjs4iOGc/lsKZkTp8iKOhhHnKW3Y38 b+hnuOIaLiPEeow28u5rqD/H0WOsNg3NF4I2Fj0ysQK9YItASwOvTAt/v1Av4IPwn6/z 06BL2tTvd56T9hzArLePEpjGRgCxpjNuwPKwACYUzEFE2Dgd7fsM9qmCXmgbdwVmpJcO p9Z/jLEEJVVhdS1YUis1UlPwKmp4I1mqkql9PUWSqx1u9eVdz7KZXI7ZSL9f1A6KpsY9 GHLX1tE18k1A52jC0QdNP7YurTkZQVwW/I4wJ8bybqCwxl7P4LthtXMFYDjR5Fils4CY b2VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@yahoo.com header.s=s2048 header.b=ANjhGL54; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.com Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id b3si25165513ybr.323.2020.08.19.11.56.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 19 Aug 2020 11:56:10 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-arm-bounces+alex.bennee=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=@yahoo.com header.s=s2048 header.b=ANjhGL54; spf=pass (google.com: domain of qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=yahoo.com Received: from localhost ([::1]:54652 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k8TFp-0000qj-JJ for alex.bennee@linaro.org; Wed, 19 Aug 2020 14:56:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k8TFi-0000qO-SJ for qemu-arm@nongnu.org; Wed, 19 Aug 2020 14:56:02 -0400 Received: from sonic307-9.consmr.mail.ne1.yahoo.com ([66.163.190.32]:46681) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k8TFg-0005Ta-JE for qemu-arm@nongnu.org; Wed, 19 Aug 2020 14:56:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1597863356; bh=pQ1Uo1aefN2Blt4tcdHK70GPdjWRqvNCNtkmaDPmCXg=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=ANjhGL54k2I8Cj3bK2s0FXN7CBoEZdaFHFVjdagaCAx7KqKWnIuibAW7FDjMAZoL2QONSaMVh+2LbCmxr8xP3hiJwYXldcFHLdeaEGBNSdyl8K1rKjDGxykb76XPpW9e3qqGx/qA82jTyfCobDp+wIbXCCeWrSKe9s6ZMtjgf0m2ZxcnvL9avpCr71dT1CKPjipwhui609ZVlxknLkCWgyfsfFclx8qjBwYsCr2W18pvCWEcy8HiB/CotO5kzdSJ6b0trlfEKW6ziWz/OsB1n5bqq0ApuI6jG8iea1Pzw4LTGpuJwLmUZkK5YvfV09Ef1emDq6zNR1xwwZzsRaLYrg== X-YMail-OSG: VhvKwjkVM1kocxzYjQcNWCXRRy626PfJGqQoDeYpQrZ2hr5d4jn08MHL2ZOrodO khZHGh6KYrgqzlqkPgQkJAPPT1xbKOoyi5FH6Dy5oklEBdATZ6.Dy1kK7HpBBGG02LFO1mf_Q.VW j6Xlf3QI.8jN3UW9XbgFGj8BxqxeLyKr8qMxr2FcYevpIuV44FdBU.9aUuynw2x3ZcmE.WgFhJTT O_sTQm6MIadNV3aUHDf.tVIr9v0jmboGEsoFp0R3HSEMxRUizeCALCpnkIUVn.zIoJflwdI3_ZNo K.0CBPibEJ66rFKrHQriv4J53e6bYYhKoLGYrb9its.S5RhP2Um7geufHRDYiA2CEfbiIAMBzKb2 dhWQBXSGe85y_vBUgdaMWfL65YU4GrXu_7YylJw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consmr.mail.ne1.yahoo.com with HTTP; Wed, 19 Aug 2020 18:55:56 +0000 Date: Wed, 19 Aug 2020 18:55:51 +0000 (UTC) From: Mircea Cociuba To: Peter Maydell Cc: "qemu-arm@nongnu.org" Message-ID: <1948646316.4529673.1597863351319@mail.yahoo.com> In-Reply-To: References: <1995755327.3077884.1597670507808.ref@mail.yahoo.com> <1995755327.3077884.1597670507808@mail.yahoo.com> <2127347711.3710404.1597756636356@mail.yahoo.com> <1348331683.3733974.1597759332262@mail.yahoo.com> <1227370812.4280844.1597836314970@mail.yahoo.com> Subject: Re: Arm Cortex M4 floating point MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_4529672_1606691419.1597863351318" X-Mailer: WebService/1.1.16455 YMailNorrin Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36 Received-SPF: pass client-ip=66.163.190.32; envelope-from=cociuba_mircea@yahoo.com; helo=sonic307-9.consmr.mail.ne1.yahoo.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/19 14:55:56 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -30 X-Spam_score: -3.1 X-Spam_bar: --- X-Spam_report: (-3.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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-arm@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Mircea Cociuba Errors-To: qemu-arm-bounces+alex.bennee=linaro.org@nongnu.org Sender: "Qemu-arm" X-TUID: BqYYJK+tdY5d ------=_Part_4529672_1606691419.1597863351318 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hello,I managed to get it to work.Thank you all for your support! Mircea Cociuba"To be or not to be, that is not a question, it's FF".=20 On Wednesday, August 19, 2020, 02:58:43 PM GMT+3, Peter Maydell wrote: =20 =20 On Wed, 19 Aug 2020 at 12:25, Mircea Cociuba wr= ote: > > hello, > This email will be non qemu related, but close to the original problem. > > I managed to get the FPU activation sequence to compile, found it on the = ARM comunity site: > >=C2=A0 =C2=A0 // ARM 100166_0001_00_en S7.3.2 >=C2=A0 =C2=A0 __asm("ldr.w r0, =3D0xE000ED88"); // CPACR >=C2=A0 =C2=A0 __asm("ldr r1, [r0]"); >=C2=A0 =C2=A0 __asm("orr r1, r1, 0xF << 20"); // [20:23] enable CP10 and C= P11 >=C2=A0 =C2=A0 __asm("str r1, [r0]"); > > The documentation also specifies that this code must be executed in privi= ledged mode. > There is little to no reference to priviledged mode in the Arm documentat= ion. > It briefly specifies that a certain CONTROL register must have a specific= bit(nPriv) set to be in privileged mode. > Where can I find the description of the is register and memory location? = and are there specific instructions that work on it? All this kind of detail is documented in the M-profile Architecture Reference Manual (definition of privileged mode, what the CONTROL register is, what memory location it is at, etc). As Vincent says, execution starts in privileged mode anyway, so unless your bare-metal code is going to do operating-system like work of switching into unprivileged mode to run tasks and then switching back again, you don't need to change CONTROL.nPRIV. thanks -- PMM =20 ------=_Part_4529672_1606691419.1597863351318 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,
I managed to get it to work.
Thank you all for your support!

Mircea Cociuba
"To be or not to be, that is not= a question, it's FF".


=20
=20
On Wednesday, August 19, 2020, 02:58:43 PM GMT+3, Peter= Maydell <peter.maydell@linaro.org> wrote:


On Wed, 19 Aug 2020 at 12:25, Mircea = Cociuba <cociuba_mircea@yahoo.com> wrote:
>
> hello,
> Th= is email will be non qemu related, but close to the original problem.
>
> I managed to get the FPU activatio= n sequence to compile, found it on the ARM comunity site:
>
>    // ARM 100166_0001_00_en S7.3.2<= br clear=3D"none">>    __asm("ldr.w r0, =3D0xE000ED88"); // C= PACR
>    __asm("ldr r1, [r0]");
>    __asm("orr r1, r1, 0xF << 20"); // [20:2= 3] enable CP10 and CP11
>    __asm("str r1,= [r0]");
>
> The documentation al= so specifies that this code must be executed in priviledged mode.
> There is little to no reference to priviledged mode in the A= rm documentation.
> It briefly specifies that a certai= n CONTROL register must have a specific bit(nPriv) set to be in privileged = mode.
> Where can I find the description of the is reg= ister and memory location? and are there specific instructions that work on= it?

All this kind of detail is docume= nted in the M-profile
Architecture Reference Manual (defi= nition of privileged
mode, what the CONTROL register is, = what memory location
it is at, etc). As Vincent says, exe= cution starts in
privileged mode anyway, so unless your b= are-metal code
is going to do operating-system like work = of switching
into unprivileged mode to run tasks and then= switching
back again, you don't need to change CONTROL.n= PRIV.
<= br clear=3D"none">
thanks
-- PMM

------=_Part_4529672_1606691419.1597863351318--