From: Mark Rutland <mark.rutland@arm.com>
To: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: linux-arm-kernel@lists.infradead.org, andre.przywara@arm.com,
robin.murphy@arm.com
Subject: Re: [bootwrapper PATCH] aarch64: Enable BRBE for the non-secure world
Date: Tue, 18 Jan 2022 10:34:29 +0000 [thread overview]
Message-ID: <20220118103429.GA16043@C02TD0UTHF1T.local> (raw)
In-Reply-To: <b76978f3-4a34-c196-956a-ee95c7f663d2@arm.com>
On Tue, Jan 18, 2022 at 08:12:39AM +0530, Anshuman Khandual wrote:
> On 1/17/22 6:55 PM, Mark Rutland wrote:
> > On Mon, Jan 17, 2022 at 04:06:44PM +0530, Anshuman Khandual wrote:
> >> On 1/13/22 3:54 PM, Mark Rutland wrote:
> >>> On Thu, Jan 13, 2022 at 03:11:08PM +0530, Anshuman Khandual wrote:
> >>>> +1: mrs x1, id_aa64dfr0_el1
> >>>> + ubfx x1, x1, #52, #4
> >>>> + cbz x1, 1f
> >>>> +
> >>>> + // Enable BRBE for the non-secure world.
> >>>> + ldr x1, =(0x3 << 32)
> >>>> + orr x0, x0, x1
> >>>> +
> >>>
> >>> I assume this is the `SBRBE` field, which naming-wise sounds like it controls
> >>> Secure rather than Non-Secure (e,g. by way of comparison to `NSPB`). Is that
> >>
> >> Right, that is some what counter-intuitive.
> >>
> >>> correct? What effect does the value 0x3 have?
> >>
> >> As per the definition above.
> >>
> >> 0b11 This control does not cause any direct accesses to BRBE registers or
> >> instruction to be trapped, and does not cause any Exception levels to
> >> be a prohibited region.
> >>
> >> This basically allows BRBE usage in EL2/EL1.
> >
> > Thanks for this!
> >
> > Just to check, my understanding, there's nothing else that we need to
> > initialize to ensure that BRBE won't start recording unexpectedly
> > out-of-reset, becuase in BRBCR_EL* the E*BRE bits all warm-reset to 0
> > and hence prevent recording in any of EL0/EL1/EL2 (and BRBE never
> > records at EL3). Is that right?
>
> Right, that is my understanding as well. Those required bits that start
> BRBE recording, always warm-reset to 0.
Thanks for confirming!
I've applied this and pushed it out.
Mark.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-01-18 10:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-13 9:41 [bootwrapper PATCH] aarch64: Enable BRBE for the non-secure world Anshuman Khandual
2022-01-13 10:24 ` Mark Rutland
2022-01-17 10:36 ` Anshuman Khandual
2022-01-17 13:25 ` Mark Rutland
2022-01-18 2:42 ` Anshuman Khandual
2022-01-18 10:34 ` Mark Rutland [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220118103429.GA16043@C02TD0UTHF1T.local \
--to=mark.rutland@arm.com \
--cc=andre.przywara@arm.com \
--cc=anshuman.khandual@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=robin.murphy@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox