feat: devices via caps (BootInfo, init assigns devices, drivers map MMIO/DMA themselves, IRQ-driven input); drop boot device wiring and info pages; headless display fallback
This commit is contained in:
@@ -14,10 +14,14 @@ pub trait Server {
|
||||
|
||||
fn handle(&mut self, request: Self::Request) -> Self::Response;
|
||||
|
||||
/// A notification bound to the serving thread fired (typically the
|
||||
/// server's device interrupt). `bits` are the signalled bits.
|
||||
fn signal(&mut self, _bits: usize) {}
|
||||
|
||||
/// Serves `endpoint` until receiving on it fails (it was destroyed or
|
||||
/// the capability revoked), then returns why. Every `Call` gets a
|
||||
/// reply, `[MALFORMED, ..]` if it does not decode; a one-way `Send` is
|
||||
/// handled without one; notification signals are ignored.
|
||||
/// handled without one; notification signals go to `signal`.
|
||||
fn run(&mut self, endpoint: CapSlot) -> libkos::syscall::Error {
|
||||
use libkos::syscall::{Received, receive_msg, reply_recv};
|
||||
let mut next = receive_msg(endpoint);
|
||||
@@ -40,7 +44,10 @@ pub trait Server {
|
||||
}
|
||||
receive_msg(endpoint)
|
||||
}
|
||||
Received::Signal { .. } => receive_msg(endpoint),
|
||||
Received::Signal { bits } => {
|
||||
self.signal(bits);
|
||||
receive_msg(endpoint)
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user