From eae54c24e2e2b89f399bc2d3be195468c2e462a5 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Mon, 30 Dec 2019 14:40:26 +0100 Subject: stop direct uart usage from PL0 --- Makefile | 2 +- demo_functionality.c | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 48bbd14..c3fc2f1 100644 --- a/Makefile +++ b/Makefile @@ -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" -- cgit v1.2.3