More README fixes

pull/165/head
Andre Richter 2 years ago
parent 99e937c4de
commit b0452e3a1f
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -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);
}
```

@ -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));
}
```

Loading…
Cancel
Save