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
a57e6e49
Commit
a57e6e49
authored
3 years ago
by
Alexei Fedorov
Committed by
TrustedFirmware Code Review
3 years ago
Browse files
Options
Download
Plain Diff
Merge "refactor(gicv3): add helper function to get the limit of SPI INTID" into integration
parents
dd0592c9
1e9428ea
master
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
drivers/arm/gic/v3/gicv3_helpers.c
+19
-0
drivers/arm/gic/v3/gicv3_helpers.c
drivers/arm/gic/v3/gicv3_private.h
+1
-0
drivers/arm/gic/v3/gicv3_private.h
with
20 additions
and
0 deletions
+20
-0
drivers/arm/gic/v3/gicv3_helpers.c
View file @
a57e6e49
...
...
@@ -91,6 +91,25 @@ void gicv3_rdistif_base_addrs_probe(uintptr_t *rdistif_base_addrs,
}
while
((
typer_val
&
TYPER_LAST_BIT
)
==
0U
);
}
/*******************************************************************************
* Helper function to get the maximum SPI INTID + 1.
******************************************************************************/
unsigned
int
gicv3_get_spi_limit
(
uintptr_t
gicd_base
)
{
unsigned
int
spi_limit
;
unsigned
int
typer_reg
=
gicd_read_typer
(
gicd_base
);
/* (maximum SPI INTID + 1) is equal to 32 * (GICD_TYPER.ITLinesNumber+1) */
spi_limit
=
((
typer_reg
&
TYPER_IT_LINES_NO_MASK
)
+
1U
)
<<
5
;
/* Filter out special INTIDs 1020-1023 */
if
(
spi_limit
>
(
MAX_SPI_ID
+
1U
))
{
return
MAX_SPI_ID
+
1U
;
}
return
spi_limit
;
}
/*******************************************************************************
* Helper function to configure the default attributes of (E)SPIs.
******************************************************************************/
...
...
This diff is collapsed.
Click to expand it.
drivers/arm/gic/v3/gicv3_private.h
View file @
a57e6e49
...
...
@@ -233,6 +233,7 @@ void gicr_set_icfgr(uintptr_t base, unsigned int id, unsigned int cfg);
/*******************************************************************************
* Private GICv3 helper function prototypes
******************************************************************************/
unsigned
int
gicv3_get_spi_limit
(
uintptr_t
gicd_base
);
void
gicv3_spis_config_defaults
(
uintptr_t
gicd_base
);
void
gicv3_ppi_sgi_config_defaults
(
uintptr_t
gicr_base
);
unsigned
int
gicv3_secure_ppi_sgi_config_props
(
uintptr_t
gicr_base
,
...
...
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