diff options
author | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-30 14:40:26 +0100 |
---|---|---|
committer | Wojtek Kosior <kwojtus@protonmail.com> | 2019-12-30 14:40:26 +0100 |
commit | eae54c24e2e2b89f399bc2d3be195468c2e462a5 (patch) | |
tree | f1d1f94bf47a8ec0750bb37ec10d709bfa987c09 | |
parent | 26685f5203bc38cfa082b96182a406f4f7e6435a (diff) | |
download | rpi-MMU-example-eae54c24e2e2b89f399bc2d3be195468c2e462a5.tar.gz rpi-MMU-example-eae54c24e2e2b89f399bc2d3be195468c2e462a5.zip |
stop direct uart usage from PL0
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | demo_functionality.c | 14 |
2 files changed, 3 insertions, 13 deletions
@@ -5,7 +5,7 @@ ARM_OBJECTS=kernel.o paging.o demo_functionality.o PL0_test.o uart.o loader_stag KERNEL_STAGE2_OBJECTS=setup.o interrupt_vector.o interrupts.o uart.o demo_functionality.o paging.o ramfs_embeddable.o ramfs.o -PL_0_TEST_OBJECTS=PL0_utils.o svc.o PL0_test.o uart.o +PL_0_TEST_OBJECTS=PL0_utils.o svc.o PL0_test.o RAMFS_FILES=PL_0_test.img 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" |