[AArch64] Workaround for cortex-a53 erratum 843419

Marcus Shawcroft marcus.shawcroft@arm.com
Mon Mar 30 14:39:00 GMT 2015


On 30/03/15 15:23, Marcus Shawcroft wrote:
> Hi,
>
> Some early revisions of the Cortex-A53 have an erratum (843419).  The
> details of the erratum are quite complex and involve dynamic conditions.
>    For the purposes of the workaround we have simplified the static
> conditions to an ADRP in the last two instructions of a 4KByte page,
> followed within four instructions by a load/store dependent on the ADRP.
>
> This patch adds support to conservatively scan for and workaround the
> erratum.  There are two different workaround strategies used.  The first
> is to rewrite ADRP instructions which form part of an erratum sequence
> with an ADR instruction.  In situations where the ADR provides
> insufficient offset the dependent load or store instruction from the
> sequence is moved to a stub section and branches are inserted from the
> original sequence to the relocated instruction and back again.
>
> Stub section sizes are rounded up to a multiple of 4096 in order to
> ensure that the act of inserting work around stubs does not create more
> errata sequences.
>
> Workaround stubs are always inserted into the stub section associated
> with the input section containing the erratum sequence.  This ensures
> that the fully relocated form of the veneered load store instruction is
> available at the point in time when the stub section is written.

In order to apply this patch to a binutils-2.25 tree the following 
prerequisite patches from trunk are also required (git hash, title, mail 
link):

6186551 [AArch64] Implement branch over stub section.
https://sourceware.org/ml/binutils/2015-03/msg00344.html

d9ced15 [AArch64] Remove padding before stub sections.
https://sourceware.org/ml/binutils/2015-03/msg00343.html

357d152 [AArch64] Adjust veneer count.
https://sourceware.org/ml/binutils/2015-03/msg00341.html

fc6d53b [AArch64] Factor out _bfd_aarch64_get_stub_for_link_section.
https://sourceware.org/ml/binutils/2015-03/msg00328.html

30068a6 [AArch64] Refactor section_group[] representation.
https://sourceware.org/ml/binutils/2015-03/msg00327.html

5421cc6 [AArch64] Refactor generation of 835769 workaround stubs.
https://sourceware.org/ml/binutils/2015-03/msg00324.html

e572930 [AArch64] Use _bfd_aarch64_add_stub_entry_in_group.
https://sourceware.org/ml/binutils/2015-03/msg00323.html

c53ed7c [OBV] Fix build -- missing ';'
https://sourceware.org/ml/binutils/2015-03/msg00304.html

35fee8b Factor out _bfd_aarch64_erratum_835769_stub_name
https://sourceware.org/ml/binutils/2015-03/msg00302.html

13f622e [AArch64] Factor out _bfd_aarch64_resize_stubs()
https://sourceware.org/ml/binutils/2015-03/msg00300.html

6658567 [AArch64] Factor stub creation code into 
_bfd_aarch64_create_stub_section.
https://sourceware.org/ml/binutils/2015-03/msg00299.html

ef85752 [AArch64] Factor out common behaviour between 
elf_aarch64_create_or_find_stub_sec and elfNN_aarch64_add_stub
https://sourceware.org/ml/binutils/2015-03/msg00298.html

2144188 [AArch64] Flip sense of erratum_835769_scan.
https://sourceware.org/ml/binutils/2015-03/msg00297.html

4c77202 [AArch64] Drop unused argument to 
elf_aarch64_create_or_find_stub_sec
https://sourceware.org/ml/binutils/2015-03/msg00296.html

9b9971a [AArch64] Remove unused variable.
https://sourceware.org/ml/binutils/2015-03/msg00295.html

e2cdef4 Remove dead code.
https://sourceware.org/ml/binutils/2015-03/msg00294.html

8ef229f [AArch64] Removing unused functions.
https://sourceware.org/ml/binutils/2015-03/msg00033.html


The following pre-requisite patch currently proposed for binutils-2.25 
but not yet committed is also required:

https://sourceware.org/ml/binutils/2015-03/msg00332.html

Cheers
/Marcus



More information about the Binutils mailing list