From: ard.biesheuvel@linaro.org (Ard Biesheuvel)
To: linux-arm-kernel@lists.infradead.org
Subject: ARM64 SMMU Setup
Date: Wed, 31 Jan 2018 23:48:22 +0000 [thread overview]
Message-ID: <EAD74C8F-E30A-4E6F-B7AA-0E77F0FEC05C@linaro.org> (raw)
In-Reply-To: <2b9c4adb-9645-0c02-ffb6-9357ff421355@linux.intel.com>
> On 31 Jan 2018, at 23:31, Thor Thayer <thor.thayer@linux.intel.com> wrote:
>
> Hi Ard,
>
>> On 01/31/2018 04:21 PM, Ard Biesheuvel wrote:
>>> On 31 January 2018 at 22:09, Thor Thayer <thor.thayer@linux.intel.com> wrote:
>>> Hi,
>>>
>>> I'm enabling the ARM SMMU-500 on an ARM64 A53. I'm hitting a data abort in
>>> the probe functions because I'm accessing the registers in EL1 mode.
>>>
>> Why do you think the fact that you are running at EL1 is causing the data abort?
> Yes, I may not be diagnosing this correctly. I narrowed it down to failing on the first read in arm_smmu_device_cfg_probe().
>
> When I read the same register with a debugger (I'm in EL1), it fails. I just realized the read also fails in EL2.
>
> If I elevate the read to EL3, I can read the default reset value from the register but I mistakenly thought this was EL2.
>
This confirms my suspicion. It is up to the secure firmware running in EL3 (or secure EL1) to configure the SMMU itself and the interconnect in a way that allows code running in EL2 or non-secure EL1 to access it (note that EL3 is always secure and EL2 is always non-secure)
I don?t know the details of the MMU-500 or the way it is integrated into your platform, so I can?t be of any more help, unfortunately.
>
>>> Linux starts in EL2 mode but drops down to EL1 mode by the time it reaches
>>> the arm-smmu probe function.
>>>
>>> Is there something else I need to add to either move the arm-smmu probe
>>> earlier or remain in EL2 until after the arm-smmu probe?
>>>
>> No. I am pretty sure EL2 vs EL1 is not causing your issue. Could you
>> elaborate on the nature of the exception you are getting?
> The error I'm getting is:
>
> Unhandled fault: synchronous external abort (0x96000010) at 0xffff000008e40020
> Internal error: : 96000010 [#1] PREEMPT SMP
> To be honest I got lost trying to decode 0x96000010 and I may have used the wrong ARM document. I ended up interpreting this as Data Abort taken without an Exception level from the ARMv8 ARM.
>
> Additionally, the SMMU documentation seemed to indicate the Hypervisor would need to run at EL2 so I ran with that.
>
> Thank you for the reply and I'll go back and examine my assumptions again.
>
> Thor
>
>>> A Google search didn't turn up anything so I hoped posting to the list would
>>> help.
>>>
>>> Thanks in advance,
>>>
>>> Thor
>>>
>>>
>>> _______________________________________________
>>> linux-arm-kernel mailing list
>>> linux-arm-kernel at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
next prev parent reply other threads:[~2018-01-31 23:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-31 22:09 ARM64 SMMU Setup Thor Thayer
2018-01-31 22:21 ` Ard Biesheuvel
2018-01-31 23:31 ` Thor Thayer
2018-01-31 23:48 ` Ard Biesheuvel [this message]
2018-02-01 12:00 ` Robin Murphy
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=EAD74C8F-E30A-4E6F-B7AA-0E77F0FEC05C@linaro.org \
--to=ard.biesheuvel@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).