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
03f3632c
Unverified
Commit
03f3632c
authored
Sep 07, 2018
by
Soby Mathew
Committed by
GitHub
Sep 07, 2018
Browse files
Merge pull request #1566 from EvanLloyd/non_secure_uart
ARM Platforms:Enable non-secure access to UART1
parents
b51d4337
2431d00f
Changes
2
Show whitespace changes
Inline
Side-by-side
plat/arm/css/common/css_common.mk
View file @
03f3632c
...
@@ -85,3 +85,12 @@ endif
...
@@ -85,3 +85,12 @@ endif
# Process CSS_USE_SCMI_SDS_DRIVER flag
# Process CSS_USE_SCMI_SDS_DRIVER flag
$(eval
$(call
assert_boolean,CSS_USE_SCMI_SDS_DRIVER))
$(eval
$(call
assert_boolean,CSS_USE_SCMI_SDS_DRIVER))
$(eval
$(call
add_define,CSS_USE_SCMI_SDS_DRIVER))
$(eval
$(call
add_define,CSS_USE_SCMI_SDS_DRIVER))
# Process CSS_NON_SECURE_UART flag
# This undocumented build option is only to enable debug access to the UART
# from non secure code, which is useful on some platforms.
# Default (obviously) is off.
CSS_NON_SECURE_UART
:=
0
$(eval
$(call
assert_boolean,CSS_NON_SECURE_UART))
$(eval
$(call
add_define,CSS_NON_SECURE_UART))
plat/arm/soc/common/soc_css_security.c
View file @
03f3632c
...
@@ -23,7 +23,7 @@ void soc_css_init_nic400(void)
...
@@ -23,7 +23,7 @@ void soc_css_init_nic400(void)
/*
/*
* Allow non-secure access to some SOC regions, excluding UART1, which
* Allow non-secure access to some SOC regions, excluding UART1, which
* remains secure.
* remains secure
(unless CSS_NON_SECURE_UART is set)
.
* Note: This is the NIC-400 device on the SOC
* Note: This is the NIC-400 device on the SOC
*/
*/
mmio_write_32
(
SOC_CSS_NIC400_BASE
+
mmio_write_32
(
SOC_CSS_NIC400_BASE
+
...
@@ -36,9 +36,15 @@ void soc_css_init_nic400(void)
...
@@ -36,9 +36,15 @@ void soc_css_init_nic400(void)
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_CSS_NIC400_PL354_SMC
),
~
0
);
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_CSS_NIC400_PL354_SMC
),
~
0
);
mmio_write_32
(
SOC_CSS_NIC400_BASE
+
mmio_write_32
(
SOC_CSS_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_CSS_NIC400_APB4_BRIDGE
),
~
0
);
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_CSS_NIC400_APB4_BRIDGE
),
~
0
);
#if CSS_NON_SECURE_UART
/* Configure UART for non-secure access */
mmio_write_32
(
SOC_CSS_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_CSS_NIC400_BOOTSEC_BRIDGE
),
~
0
);
#else
mmio_write_32
(
SOC_CSS_NIC400_BASE
+
mmio_write_32
(
SOC_CSS_NIC400_BASE
+
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_CSS_NIC400_BOOTSEC_BRIDGE
),
NIC400_ADDR_CTRL_SECURITY_REG
(
SOC_CSS_NIC400_BOOTSEC_BRIDGE
),
~
SOC_CSS_NIC400_BOOTSEC_BRIDGE_UART1
);
~
SOC_CSS_NIC400_BOOTSEC_BRIDGE_UART1
);
#endif
/* CSS_NON_SECURE_UART */
}
}
...
...
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