2016-09-19 04:17:08 +02:00
|
|
|
#![feature(asm)]
|
|
|
|
|
2016-09-20 01:19:49 +02:00
|
|
|
#[macro_use]
|
|
|
|
extern crate bitflags;
|
|
|
|
extern crate io;
|
Orbital (#16)
* Port previous ethernet scheme
* Add ipd
* Fix initfs rebuilds, use QEMU user networking addresses in ipd
* Add tcp/udp, netutils, dns, and network config
* Add fsync to network driver
* Add dns, router, subnet by default
* Fix e1000 driver. Make ethernet and IP non-blocking to avoid deadlocks
* Add orbital server, WIP
* Add futex
* Add orbutils and orbital
* Update libstd, orbutils, and orbital
Move ANSI key encoding to vesad
* Add orbital assets
* Update orbital
* Update to add login manager
* Add blocking primitives, block for most things except waitpid, update orbital
* Wait in waitpid and IRQ, improvements for other waits
* Fevent in root scheme
* WIP: Switch to using fevent
* Reorganize
* Event based e1000d driver
* Superuser-only access to some network schemes, display, and disk
* Superuser root and irq schemes
* Fix orbital
2016-10-14 01:21:42 +02:00
|
|
|
extern crate orbclient;
|
2016-09-19 04:17:08 +02:00
|
|
|
extern crate syscall;
|
|
|
|
|
|
|
|
use std::thread;
|
|
|
|
|
|
|
|
use syscall::iopl;
|
|
|
|
|
2016-09-20 01:19:49 +02:00
|
|
|
mod controller;
|
|
|
|
mod keyboard;
|
2016-09-19 18:24:19 +02:00
|
|
|
mod keymap;
|
2016-09-20 01:19:49 +02:00
|
|
|
mod mouse;
|
2016-09-19 17:43:30 +02:00
|
|
|
|
2016-09-20 01:19:49 +02:00
|
|
|
fn main() {
|
|
|
|
unsafe {
|
|
|
|
iopl(3).expect("ps2d: failed to get I/O permission");
|
|
|
|
asm!("cli" :::: "intel", "volatile");
|
2016-09-19 18:24:19 +02:00
|
|
|
}
|
2016-09-19 04:17:08 +02:00
|
|
|
|
2016-09-20 01:19:49 +02:00
|
|
|
let extra_packet = controller::Ps2::new().init();
|
2016-09-19 18:24:19 +02:00
|
|
|
|
2016-09-19 17:43:30 +02:00
|
|
|
thread::spawn(|| {
|
2016-09-19 04:17:08 +02:00
|
|
|
unsafe {
|
2016-09-20 01:19:49 +02:00
|
|
|
iopl(3).expect("ps2d: failed to get I/O permission");
|
2016-09-19 04:17:08 +02:00
|
|
|
asm!("cli" :::: "intel", "volatile");
|
|
|
|
}
|
|
|
|
|
2016-09-20 01:19:49 +02:00
|
|
|
keyboard::keyboard();
|
2016-09-19 18:24:19 +02:00
|
|
|
});
|
2016-09-19 04:17:08 +02:00
|
|
|
|
2016-09-20 01:19:49 +02:00
|
|
|
thread::spawn(move || {
|
2016-09-19 18:24:19 +02:00
|
|
|
unsafe {
|
2016-09-20 01:19:49 +02:00
|
|
|
iopl(3).expect("ps2d: failed to get I/O permission");
|
2016-09-19 18:24:19 +02:00
|
|
|
asm!("cli" :::: "intel", "volatile");
|
2016-09-19 04:17:08 +02:00
|
|
|
}
|
2016-09-19 17:43:30 +02:00
|
|
|
|
2016-09-20 01:19:49 +02:00
|
|
|
mouse::mouse(extra_packet);
|
2016-09-19 18:24:19 +02:00
|
|
|
});
|
2016-09-19 04:17:08 +02:00
|
|
|
}
|