aboutsummaryrefslogtreecommitdiff
path: root/demo_functionality.c
diff options
context:
space:
mode:
authorWojtek Kosior <kwojtus@protonmail.com>2019-12-30 14:40:26 +0100
committerWojtek Kosior <kwojtus@protonmail.com>2019-12-30 14:40:26 +0100
commiteae54c24e2e2b89f399bc2d3be195468c2e462a5 (patch)
treef1d1f94bf47a8ec0750bb37ec10d709bfa987c09 /demo_functionality.c
parent26685f5203bc38cfa082b96182a406f4f7e6435a (diff)
downloadrpi-MMU-example-eae54c24e2e2b89f399bc2d3be195468c2e462a5.tar.gz
rpi-MMU-example-eae54c24e2e2b89f399bc2d3be195468c2e462a5.zip
stop direct uart usage from PL0
Diffstat (limited to 'demo_functionality.c')
-rw-r--r--demo_functionality.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/demo_functionality.c b/demo_functionality.c
index 12bba9b..d8fbdb5 100644
--- a/demo_functionality.c
+++ b/demo_functionality.c
@@ -75,30 +75,20 @@ void demo_setup_PL0(void)
short_section_descriptor_t volatile *PL0_section_entry =
&TRANSLATION_TABLE[PL0_SECTION_NUMBER];
- short_section_descriptor_t volatile *UART_memory_section_entry =
- &TRANSLATION_TABLE[((uint32_t) GPIO_BASE) >> 20];
- short_section_descriptor_t
- PL0_section = *PL0_section_entry,
- UART_memory_section = *UART_memory_section_entry;
+ short_section_descriptor_t PL0_section = *PL0_section_entry;
// set up address of PL0 section
PL0_section.SECTION_BASE_ADDRESS_31_20 =
UNPRIVILEGED_MEMORY_START >> 20;
- // make the selected section and uart section available for PL0
+ // make the selected section available for PL0
PL0_section.ACCESS_PERMISSIONS_2 =
AP_2_0_MODEL_RW_ALL >> 2;
PL0_section.ACCESS_PERMISSIONS_1_0 =
AP_2_0_MODEL_RW_ALL & 0b011;
- UART_memory_section.ACCESS_PERMISSIONS_2 =
- AP_2_0_MODEL_RW_ALL >> 2;
- UART_memory_section.ACCESS_PERMISSIONS_1_0 =
- AP_2_0_MODEL_RW_ALL & 0b011;
-
*PL0_section_entry = PL0_section;
- *UART_memory_section_entry = UART_memory_section;
// invalidate main Translation Lookup Buffer (just in case)
asm("mcr p15, 0, %0, c8, c7, 0\n\r"