This is the mail archive of the
mailing list for the binutils project.
Re: [AArch64] Workaround for cortex-a53 erratum 843419
- From: Marcus Shawcroft <marcus dot shawcroft at arm dot com>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>, Marcus Shawcroft <Marcus dot Shawcroft at arm dot com>
- Date: Mon, 30 Mar 2015 15:40:29 +0100
- Subject: Re: [AArch64] Workaround for cortex-a53 erratum 843419
- Authentication-results: sourceware.org; auth=none
- References: <55195C5C dot 5060304 at arm dot com>
On 30/03/15 15:23, Marcus Shawcroft wrote:
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
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
6186551 [AArch64] Implement branch over stub section.
d9ced15 [AArch64] Remove padding before stub sections.
357d152 [AArch64] Adjust veneer count.
fc6d53b [AArch64] Factor out _bfd_aarch64_get_stub_for_link_section.
30068a6 [AArch64] Refactor section_group representation.
5421cc6 [AArch64] Refactor generation of 835769 workaround stubs.
e572930 [AArch64] Use _bfd_aarch64_add_stub_entry_in_group.
c53ed7c [OBV] Fix build -- missing ';'
35fee8b Factor out _bfd_aarch64_erratum_835769_stub_name
13f622e [AArch64] Factor out _bfd_aarch64_resize_stubs()
6658567 [AArch64] Factor stub creation code into
ef85752 [AArch64] Factor out common behaviour between
elf_aarch64_create_or_find_stub_sec and elfNN_aarch64_add_stub
2144188 [AArch64] Flip sense of erratum_835769_scan.
4c77202 [AArch64] Drop unused argument to
9b9971a [AArch64] Remove unused variable.
e2cdef4 Remove dead code.
8ef229f [AArch64] Removing unused functions.
The following pre-requisite patch currently proposed for binutils-2.25
but not yet committed is also required: