Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
72bc6318
Unverified
Commit
72bc6318
authored
6 years ago
by
Dimitris Papastamos
Committed by
GitHub
6 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #1498 from glneo/cache-early-fixes
Early cache enable and coherency fixes
parents
2ee596c4
903f13d3
master
v2.5
v2.5-rc1
v2.5-rc0
v2.4
v2.4-rc2
v2.4-rc1
v2.4-rc0
v2.3
v2.3-rc2
v2.3-rc1
v2.3-rc0
v2.2
v2.2-rc2
v2.2-rc1
v2.2-rc0
v2.1
v2.1-rc1
v2.1-rc0
v2.0
v2.0-rc0
v1.6
v1.6-rc1
v1.6-rc0
arm_cca_v0.2
arm_cca_v0.1
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
drivers/arm/gic/v2/gicv2_main.c
+4
-3
drivers/arm/gic/v2/gicv2_main.c
drivers/arm/gic/v3/gicv3_main.c
+3
-2
drivers/arm/gic/v3/gicv3_main.c
lib/psci/psci_common.c
+2
-2
lib/psci/psci_common.c
plat/ti/k3/common/plat_common.mk
+1
-1
plat/ti/k3/common/plat_common.mk
with
10 additions
and
8 deletions
+10
-8
drivers/arm/gic/v2/gicv2_main.c
View file @
72bc6318
...
...
@@ -221,9 +221,10 @@ void gicv2_driver_init(const gicv2_driver_data_t *plat_driver_data)
* enabled. When the secondary CPU boots up, it initializes the
* GICC/GICR interface with the caches disabled. Hence flush the
* driver_data to ensure coherency. This is not required if the
* platform has HW_ASSISTED_COHERENCY enabled.
* platform has HW_ASSISTED_COHERENCY or WARMBOOT_ENABLE_DCACHE_EARLY
* enabled.
*/
#if !HW_ASSISTED_COHERENCY
#if !
(
HW_ASSISTED_COHERENCY
|| WARMBOOT_ENABLE_DCACHE_EARLY)
flush_dcache_range
((
uintptr_t
)
&
driver_data
,
sizeof
(
driver_data
));
flush_dcache_range
((
uintptr_t
)
driver_data
,
sizeof
(
*
driver_data
));
#endif
...
...
@@ -360,7 +361,7 @@ void gicv2_set_pe_target_mask(unsigned int proc_num)
if
(
driver_data
->
target_masks
[
proc_num
]
==
0
)
{
driver_data
->
target_masks
[
proc_num
]
=
gicv2_get_cpuif_id
(
driver_data
->
gicd_base
);
#if !HW_ASSISTED_COHERENCY
#if !
(
HW_ASSISTED_COHERENCY
|| WARMBOOT_ENABLE_DCACHE_EARLY)
/*
* PEs only update their own masks. Primary updates it with
* caches on. But because secondaries does it with caches off,
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/gic/v3/gicv3_main.c
View file @
72bc6318
...
...
@@ -147,9 +147,10 @@ void gicv3_driver_init(const gicv3_driver_data_t *plat_driver_data)
* enabled. When the secondary CPU boots up, it initializes the
* GICC/GICR interface with the caches disabled. Hence flush the
* driver data to ensure coherency. This is not required if the
* platform has HW_ASSISTED_COHERENCY enabled.
* platform has HW_ASSISTED_COHERENCY or WARMBOOT_ENABLE_DCACHE_EARLY
* enabled.
*/
#if !HW_ASSISTED_COHERENCY
#if !
(
HW_ASSISTED_COHERENCY
|| WARMBOOT_ENABLE_DCACHE_EARLY)
flush_dcache_range
((
uintptr_t
)
&
gicv3_driver_data
,
sizeof
(
gicv3_driver_data
));
flush_dcache_range
((
uintptr_t
)
gicv3_driver_data
,
...
...
This diff is collapsed.
Click to expand it.
lib/psci/psci_common.c
View file @
72bc6318
...
...
@@ -267,7 +267,7 @@ static plat_local_state_t *psci_get_req_local_pwr_states(unsigned int pwrlvl,
static
plat_local_state_t
get_non_cpu_pd_node_local_state
(
unsigned
int
parent_idx
)
{
#if !USE_COHERENT_MEM ||
!
HW_ASSISTED_COHERENCY
#if !
(
USE_COHERENT_MEM || HW_ASSISTED_COHERENCY
)
flush_dcache_range
(
(
uintptr_t
)
&
psci_non_cpu_pd_nodes
[
parent_idx
],
sizeof
(
psci_non_cpu_pd_nodes
[
parent_idx
]));
...
...
@@ -283,7 +283,7 @@ static void set_non_cpu_pd_node_local_state(unsigned int parent_idx,
plat_local_state_t
state
)
{
psci_non_cpu_pd_nodes
[
parent_idx
].
local_state
=
state
;
#if !USE_COHERENT_MEM ||
!
HW_ASSISTED_COHERENCY
#if !
(
USE_COHERENT_MEM || HW_ASSISTED_COHERENCY
)
flush_dcache_range
(
(
uintptr_t
)
&
psci_non_cpu_pd_nodes
[
parent_idx
],
sizeof
(
psci_non_cpu_pd_nodes
[
parent_idx
]));
...
...
This diff is collapsed.
Click to expand it.
plat/ti/k3/common/plat_common.mk
View file @
72bc6318
...
...
@@ -12,7 +12,7 @@ COLD_BOOT_SINGLE_CPU := 1
PROGRAMMABLE_RESET_ADDRESS
:=
1
# System coherency is managed in hardware
HW_ASSISTED_COHERENCY
:=
1
WARMBOOT_ENABLE_DCACHE_EARLY
:=
1
USE_COHERENT_MEM
:=
0
ERROR_DEPRECATED
:=
1
...
...
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help