mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 09:34:18 +00:00
Precede a 'sev' with a 'dsb' in bakery lock code
This patch fixes a bug in the bakery lock implementation where a data synchronisation barrier instruction is not issued before sending an event as mandated by the ARMv8 ARM. This can cause a event to be signalled before the related memory accesses have completed resulting in erroneous execution. Fixes ARM-software/tf-issues#272 Change-Id: I5ce02bf70afb001d967b9fa4c3f77442931d5349
This commit is contained in:
parent
82b9b2973b
commit
66ce001e7d
1 changed files with 2 additions and 0 deletions
|
@ -107,6 +107,7 @@ static unsigned int bakery_get_ticket(bakery_lock_t *bakery, unsigned int me)
|
|||
++my_ticket;
|
||||
bakery->number[me] = my_ticket;
|
||||
bakery->entering[me] = 0;
|
||||
dsb();
|
||||
sev();
|
||||
|
||||
return my_ticket;
|
||||
|
@ -189,5 +190,6 @@ void bakery_lock_release(bakery_lock_t *bakery)
|
|||
*/
|
||||
bakery->owner = NO_OWNER;
|
||||
bakery->number[me] = 0;
|
||||
dsb();
|
||||
sev();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue