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
60663435
Commit
60663435
authored
May 27, 2014
by
Sandrine Bailleux
Browse files
juno: Implement plat_interrupt_type_to_line() function
Change-Id: I87083b5891fa8037cdee567ebadeaa1952f52d0c
parent
7c7f0515
Changes
2
Show whitespace changes
Inline
Side-by-side
plat/juno/plat_gic.c
View file @
60663435
...
@@ -168,3 +168,30 @@ void gic_setup(void)
...
@@ -168,3 +168,30 @@ void gic_setup(void)
gic_cpuif_setup
(
GICC_BASE
);
gic_cpuif_setup
(
GICC_BASE
);
gic_distif_setup
(
GICD_BASE
);
gic_distif_setup
(
GICD_BASE
);
}
}
/*******************************************************************************
* An ARM processor signals interrupt exceptions through the IRQ and FIQ pins.
* The interrupt controller knows which pin/line it uses to signal a type of
* interrupt. The platform knows which interrupt controller type is being used
* in a particular security state e.g. with an ARM GIC, normal world could use
* the GICv2 features while the secure world could use GICv3 features and vice
* versa.
* This function is exported by the platform to let the interrupt management
* framework determine for a type of interrupt and security state, which line
* should be used in the SCR_EL3 to control its routing to EL3. The interrupt
* line is represented as the bit position of the IRQ or FIQ bit in the SCR_EL3.
******************************************************************************/
uint32_t
plat_interrupt_type_to_line
(
uint32_t
type
,
uint32_t
security_state
)
{
assert
(
type
==
INTR_TYPE_S_EL1
||
type
==
INTR_TYPE_EL3
||
type
==
INTR_TYPE_NS
);
assert
(
security_state
==
NON_SECURE
||
security_state
==
SECURE
);
/*
* We ignore the security state parameter because Juno is GICv2 only
* so both normal and secure worlds are using ARM GICv2.
*/
return
gicv2_interrupt_type_to_line
(
GICC_BASE
,
type
);
}
plat/juno/platform.h
View file @
60663435
...
@@ -388,6 +388,8 @@ extern void gic_cpuif_deactivate(unsigned int);
...
@@ -388,6 +388,8 @@ extern void gic_cpuif_deactivate(unsigned int);
extern
void
gic_cpuif_setup
(
unsigned
int
);
extern
void
gic_cpuif_setup
(
unsigned
int
);
extern
void
gic_pcpu_distif_setup
(
unsigned
int
);
extern
void
gic_pcpu_distif_setup
(
unsigned
int
);
extern
void
gic_setup
(
void
);
extern
void
gic_setup
(
void
);
extern
uint32_t
plat_interrupt_type_to_line
(
uint32_t
type
,
uint32_t
security_state
);
/* Declarations for fvp_topology.c */
/* Declarations for fvp_topology.c */
extern
int
plat_setup_topology
(
void
);
extern
int
plat_setup_topology
(
void
);
...
...
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