public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Marc Zyngier <marc.zyngier@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	 "edk2-devel@lists.01.org" <edk2-devel@lists.01.org>,
	Ryan Harkin <ryan.harkin@linaro.org>,
	 Leif Lindholm <leif.lindholm@linaro.org>
Subject: Re: [PATCH] ArmPkg/ArmGenericTimerVirtCounterLib: deal with broken generic timers
Date: Fri, 20 Jan 2017 15:20:54 +0000	[thread overview]
Message-ID: <CAKv+Gu836jG9MmNd_Q6u5azNBqR7KsQ65fGu1sJaFNVGSDhatg@mail.gmail.com> (raw)
In-Reply-To: <22373f4c-043b-3ee4-1c60-ecf2c7fa6845@arm.com>

On 20 January 2017 at 15:06, Marc Zyngier <marc.zyngier@arm.com> wrote:
> On 20/01/17 14:41, Mark Rutland wrote:
>> [Adding Marc Zyngier]
>>
>> On Fri, Jan 20, 2017 at 02:20:43PM +0000, Ard Biesheuvel wrote:
>>> Users of ArmGenericTimerVirtCounterLib may execute under virtualization,
>>> which implies that they may be affected by core errata of the host.
>>>
>>> Some implementations of the ARM Generic Timer are affected by errata where
>>> reads of the counter and reads or writes to the timer value may execute
>>> incorrectly when issued around the time the counter is incremented by
>>> the hardware.
>>
>> So far, there are at least two slightly different errata I've seen in
>> this area: Freescale erratum A-008585, and Hisilicon erratum #161010101.
>>
>> The first has a workaround in upstream Linux, whereas the latter
>> apparently requires a different workaround, and is currently under
>> review.
>>
>> There may not be a one-size-fits-all solution, here. To that end, I
>> would strongly suggest that we document precisely which errata we are
>> trying to handle here.
>
> Also, is there any way that DT/ACPI could be used to identify the actual
> erratum? When running a guest on my FSL box, my guest launch script adds
> the required property to the guest DT for the kernel to pick it up. Not
> as nice as a "one size fits all" method, but as Mark pointed out, such a
> method may simply not exist...
>

DT should be feasible, given that the UEFI firmware for QEMU does
consume the DT supplied to it. ACPI tables are produced by the
firmware rather than consumed by it, so fortunately we don't need to
care about those.

So if a binding should be defined that describes this erratum, we
could in fact use it to enable it rather than enable it
unconditionally. Are we talking about just 'fsl,erratum-a008585' here?
Or have additional ones been specified already? And is anyone aware if
any work has been done on the QEMU side of this?


      parent reply	other threads:[~2017-01-20 15:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20 14:20 [PATCH] ArmPkg/ArmGenericTimerVirtCounterLib: deal with broken generic timers Ard Biesheuvel
2017-01-20 14:22 ` Ard Biesheuvel
2017-01-20 14:41 ` Mark Rutland
     [not found]   ` <22373f4c-043b-3ee4-1c60-ecf2c7fa6845@arm.com>
2017-01-20 15:20     ` Ard Biesheuvel [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-list 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=CAKv+Gu836jG9MmNd_Q6u5azNBqR7KsQ65fGu1sJaFNVGSDhatg@mail.gmail.com \
    --to=devel@edk2.groups.io \
    /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