Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
b667b369
Commit
b667b369
authored
Jun 22, 2020
by
Madhukar Pappireddy
Committed by
TrustedFirmware Code Review
Jun 22, 2020
Browse files
Merge "TF-A GIC driver: Add barrier before eoi" into integration
parents
34dae47b
5eb16c47
Changes
2
Hide whitespace changes
Inline
Side-by-side
drivers/arm/gic/v2/gicv2_main.c
View file @
b667b369
...
...
@@ -247,6 +247,15 @@ void gicv2_end_of_interrupt(unsigned int id)
assert
(
driver_data
!=
NULL
);
assert
(
driver_data
->
gicc_base
!=
0U
);
/*
* Ensure the write to peripheral registers are *complete* before the write
* to GIC_EOIR.
*
* Note: The completion gurantee depends on various factors of system design
* and the barrier is the best core can do by which execution of further
* instructions waits till the barrier is alive.
*/
dsbishst
();
gicc_write_EOIR
(
driver_data
->
gicc_base
,
id
);
}
...
...
include/drivers/arm/gicv3.h
View file @
b667b369
...
...
@@ -332,6 +332,18 @@ static inline uint32_t gicv3_get_pending_interrupt_id_sel1(void)
static
inline
void
gicv3_end_of_interrupt_sel1
(
unsigned
int
id
)
{
/*
* Interrupt request deassertion from peripheral to GIC happens
* by clearing interrupt condition by a write to the peripheral
* register. It is desired that the write transfer is complete
* before the core tries to change GIC state from 'AP/Active' to
* a new state on seeing 'EOI write'.
* Since ICC interface writes are not ordered against Device
* memory writes, a barrier is required to ensure the ordering.
* The dsb will also ensure *completion* of previous writes with
* DEVICE nGnRnE attribute.
*/
dsbishst
();
write_icc_eoir1_el1
(
id
);
}
...
...
@@ -345,6 +357,18 @@ static inline uint32_t gicv3_acknowledge_interrupt(void)
static
inline
void
gicv3_end_of_interrupt
(
unsigned
int
id
)
{
/*
* Interrupt request deassertion from peripheral to GIC happens
* by clearing interrupt condition by a write to the peripheral
* register. It is desired that the write transfer is complete
* before the core tries to change GIC state from 'AP/Active' to
* a new state on seeing 'EOI write'.
* Since ICC interface writes are not ordered against Device
* memory writes, a barrier is required to ensure the ordering.
* The dsb will also ensure *completion* of previous writes with
* DEVICE nGnRnE attribute.
*/
dsbishst
();
return
write_icc_eoir0_el1
(
id
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment