mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-18 02:24:18 +00:00
Merge "fix(drivers/tzc400): never disable filter 0" into integration
This commit is contained in:
commit
95ef4a0f6b
1 changed files with 13 additions and 5 deletions
|
@ -291,6 +291,11 @@ void tzc400_enable_filters(void)
|
||||||
for (filter = 0U; filter < tzc400.num_filters; filter++) {
|
for (filter = 0U; filter < tzc400.num_filters; filter++) {
|
||||||
state = _tzc400_get_gate_keeper(tzc400.base, filter);
|
state = _tzc400_get_gate_keeper(tzc400.base, filter);
|
||||||
if (state != 0U) {
|
if (state != 0U) {
|
||||||
|
/* Filter 0 is special and cannot be disabled.
|
||||||
|
* So here we allow it being already enabled. */
|
||||||
|
if (filter == 0U) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
* The TZC filter is already configured. Changing the
|
* The TZC filter is already configured. Changing the
|
||||||
* programmer's view in an active system can cause
|
* programmer's view in an active system can cause
|
||||||
|
@ -312,14 +317,17 @@ void tzc400_enable_filters(void)
|
||||||
void tzc400_disable_filters(void)
|
void tzc400_disable_filters(void)
|
||||||
{
|
{
|
||||||
unsigned int filter;
|
unsigned int filter;
|
||||||
|
unsigned int state;
|
||||||
|
unsigned int start = 0U;
|
||||||
|
|
||||||
assert(tzc400.base != 0U);
|
assert(tzc400.base != 0U);
|
||||||
|
|
||||||
/*
|
/* Filter 0 is special and cannot be disabled. */
|
||||||
* We don't do the same state check as above as the Gatekeepers are
|
state = _tzc400_get_gate_keeper(tzc400.base, 0);
|
||||||
* disabled after reset.
|
if (state != 0U) {
|
||||||
*/
|
start++;
|
||||||
for (filter = 0; filter < tzc400.num_filters; filter++)
|
}
|
||||||
|
for (filter = start; filter < tzc400.num_filters; filter++)
|
||||||
_tzc400_set_gate_keeper(tzc400.base, filter, 0);
|
_tzc400_set_gate_keeper(tzc400.base, filter, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue