From b0452e3a1fb7482911d88468de45307ae9b91e2c Mon Sep 17 00:00:00 2001 From: Andre Richter Date: Mon, 16 May 2022 23:01:47 +0200 Subject: [PATCH] More README fixes --- 13_exceptions_part2_peripheral_IRQs/README.md | 7 ++----- 14_virtual_mem_part2_mmio_remap/README.md | 4 ++-- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/13_exceptions_part2_peripheral_IRQs/README.md b/13_exceptions_part2_peripheral_IRQs/README.md index e2e2e169..634686d6 100644 --- a/13_exceptions_part2_peripheral_IRQs/README.md +++ b/13_exceptions_part2_peripheral_IRQs/README.md @@ -277,8 +277,7 @@ Here is the implementation for the `PL011Uart`: ```rust fn register_and_enable_irq_handler(&'static self) -> Result<(), &'static str> { - use bsp::exception::asynchronous::irq_manager; - use exception::asynchronous::{interface::IRQManager, IRQDescriptor}; + use exception::asynchronous::{irq_manager, IRQDescriptor}; let descriptor = IRQDescriptor { name: Self::COMPATIBLE, @@ -369,10 +368,8 @@ the the implementation of the trait's handling function: ```rust #[no_mangle] unsafe extern "C" fn current_elx_irq(_e: &mut ExceptionContext) { - use exception::asynchronous::interface::IRQManager; - let token = &exception::asynchronous::IRQContext::new(); - bsp::exception::asynchronous::irq_manager().handle_pending_irqs(token); + exception::asynchronous::irq_manager().handle_pending_irqs(token); } ``` diff --git a/14_virtual_mem_part2_mmio_remap/README.md b/14_virtual_mem_part2_mmio_remap/README.md index be0997ac..911a2d76 100644 --- a/14_virtual_mem_part2_mmio_remap/README.md +++ b/14_virtual_mem_part2_mmio_remap/README.md @@ -324,7 +324,7 @@ the first time, an instance of the newly introduced `NullConsole` is used as the `NullConsole` implements all the console traits, but does nothing. It discards outputs, and returns dummy input. For example, should one of the printing macros be called before the UART driver has been instantiated and registered, the kernel does not need to crash because the driver is not -brought up yet. Instead, it can just discards the output. With this new scheme of things, it is +brought up yet. Instead, it can just discard the output. With this new scheme of things, it is possible to safely switch global references like the UART or the IRQ Manager at runtime. That all the post-driver-init work has now been moved to callbacks is motivated by the idea that @@ -382,7 +382,7 @@ been turned on. fn kernel_init_mmio_va_allocator() { let region = bsp::memory::mmu::virt_mmio_remap_region(); - page_alloc::kernel_mmio_va_allocator().lock(|allocator| allocator.initialize(region)); + page_alloc::kernel_mmio_va_allocator().lock(|allocator| allocator.init(region)); } ```