merge work

This commit is contained in:
Able 2022-02-20 05:05:50 -06:00
parent d8d093cb98
commit e661e5c255
8 changed files with 134 additions and 32 deletions

107
ableos/Cargo.lock generated
View file

@ -27,31 +27,52 @@ name = "ableos"
version = "0.1.0"
dependencies = [
"ab_glyph",
"acpi",
"bootloader",
"cpuio",
"ext2",
"externc-libm",
"facepalm",
"hashbrown",
"genfs",
"hashbrown 0.11.2",
"lazy_static",
"libwasm",
"linked_list_allocator",
"lliw",
"log",
"pc-beeper",
"pci",
"pic8259",
"picorand",
"pretty-hex",
"rdrand",
"rhai",
"riscv",
"rkyv",
"serde",
"serde_json",
"shadeable",
"spin 0.5.2",
"uart_16550",
"unicode-width",
"volatile 0.2.7",
"wasmi",
"watson",
"x86_64",
"y-compositor-protocol",
]
[[package]]
name = "acpi"
version = "4.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "55237649c6e747ea67e5ed45125af5e6a35ea1250c5e44995eb6049a955bd004"
dependencies = [
"bit_field",
"log",
"rsdp",
]
[[package]]
name = "ahash"
version = "0.7.6"
@ -206,6 +227,15 @@ version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
[[package]]
name = "hashbrown"
version = "0.12.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c21d40587b92fa6a6c6e3c1bdbf87d75511db5672f9c93175574b3a00df1758"
dependencies = [
"ahash",
]
[[package]]
name = "instant"
version = "0.1.12"
@ -350,6 +380,22 @@ version = "0.42.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92"
[[package]]
name = "pc-beeper"
version = "0.1.0"
source = "git+https://github.com/AbleOS/pc-beeper#9b61a9d60552a9da4285f5ceb39ab2cccbb60b4b"
dependencies = [
"x86_64",
]
[[package]]
name = "pci"
version = "0.0.1"
source = "git+https://gitlab.com/robigalia/pci#4e2fddc61825568b1d14d09fdc669389e6c43f02"
dependencies = [
"bitflags",
]
[[package]]
name = "pic8259"
version = "0.10.2"
@ -359,6 +405,18 @@ dependencies = [
"x86_64",
]
[[package]]
name = "picorand"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b6fc30519d2508c7e20e01da371cd27b1d4533fdb98e279955cb636b50210688"
[[package]]
name = "pretty-hex"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bc5c99d529f0d30937f6f4b8a86d988047327bb88d04d2c4afc356de74722131"
[[package]]
name = "proc-macro-hack"
version = "0.5.19"
@ -403,6 +461,21 @@ dependencies = [
"proc-macro2",
]
[[package]]
name = "rand_core"
version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
[[package]]
name = "rdrand"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c4e0d5cb05cb40e4e5805399c27b12a064427cf553081ae9b82bc1a88111a576"
dependencies = [
"rand_core",
]
[[package]]
name = "regex"
version = "1.5.4"
@ -475,6 +548,7 @@ version = "0.7.32"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e3791595bf1ee951356964271bea7dafd1e1730e8be812f44a31afc38fa7bba"
dependencies = [
"hashbrown 0.12.0",
"ptr_meta",
"rkyv_derive",
"seahash",
@ -497,6 +571,15 @@ version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc874b127765f014d792f16763a81245ab80500e2ad921ed4ee9e82481ee08fe"
[[package]]
name = "rsdp"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66d3add2fc55ef37511bcf81a08ee7a09eff07b23aae38b06a29024a38c604b1"
dependencies = [
"log",
]
[[package]]
name = "ryu"
version = "1.0.9"
@ -636,6 +719,12 @@ dependencies = [
"x86_64",
]
[[package]]
name = "unicode-width"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973"
[[package]]
name = "unicode-xid"
version = "0.2.2"
@ -690,6 +779,22 @@ dependencies = [
"parity-wasm",
]
[[package]]
name = "watson"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1cea7ead78c402dbf14e7f11911b0b48955ea13d46e012e2d98775e23c65d4ef"
dependencies = [
"serde",
"webassembly",
]
[[package]]
name = "webassembly"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1d1a10e1dedffff9cfcbdd33c289c65b87da634259a460a3f23d513649fa7a8c"
[[package]]
name = "x86_64"
version = "0.14.8"

View file

@ -12,12 +12,6 @@ run-args = [
"-cpu",
"Broadwell-v3",
"-serial",
"stdio",
"-smp",
@ -60,22 +54,20 @@ lliw = "0.2.0"
spin = "0.5.2"
# vga = "*"
log = "*"
riscv="*"
# pretty-hex = "0.2.1"
# unicode-width = "0.1.7"
# picorand = "*"
# watson = "0.4"
pretty-hex = "0.2.1"
unicode-width = "0.1.7"
picorand = "*"
watson = "0.4"
# genfs = "0.1.0"
genfs = "0.1.0"
# pc-beeper = "0.1.0"
# pc-beeper = {git = "https://github.com/AbleOS/pc-beeper"}
rhai = "1.5"
# pci = {git="https://gitlab.com/robigalia/pci"}
pci = {git="https://gitlab.com/robigalia/pci"}
libwasm = {git="https://git.ablecorp.us:443/able/libwasm.git"}
# acpi = "4.1.0"
acpi = "4.1.0"
# [dependencies.ockam]
@ -84,9 +76,9 @@ libwasm = {git="https://git.ablecorp.us:443/able/libwasm.git"}
# features = ["alloc"]
# [dependencies.rdrand]
# version = "0.8.1"
# default-features = false
[dependencies.rdrand]
version = "0.8.1"
default-features = false
@ -105,10 +97,10 @@ version = "0.11.2"
default-features = false
features = ["inline-more"]
# [dependencies.rkyv]
# version = "0.7.29"
# default-features = false
# features = ["size_64", "alloc"]
[dependencies.rkyv]
version = "0.7.29"
default-features = false
features = ["size_64", "alloc"]
# [dependencies.smoltcp]
# version = "0.8.0"
@ -117,6 +109,7 @@ features = ["inline-more"]
[dependencies.y-compositor-protocol]
git = "https://git.ablecorp.us:443/able/y-compositor-protocol.git"
[dependencies.ext2]
git = "https://git.ablecorp.us:443/able/ext2-rs.git"
@ -145,6 +138,8 @@ git = "https://git.ablecorp.us:443/able/externc-libm.git"
[target.'cfg(target_arch = "riscv")'.dependencies]
riscv="*"
[target.'cfg(target_arch = "x86_64")'.dependencies]
bootloader = { version = "0.9.8", features = ["map_physical_memory"] }
@ -153,3 +148,4 @@ pic8259 = "0.10.1"
uart_16550 = "0.2.0"
volatile = "0.2.6"
x86_64 = "*"
pc-beeper = {git = "https://github.com/AbleOS/pc-beeper"}

View file

@ -39,6 +39,7 @@ extern "C" fn _start() -> ! {
loop {
if let Some(c) = uart.get() {
match c {
66 => break,
10 | 13 => {
uart.put('\n' as u8);
uart.put('\r' as u8);

View file

@ -1,5 +1,7 @@
#![allow(clippy::empty_loop)]
use crate::scheduler::SCHEDULER;
// use acpi::AcpiTables;
// use x86_64::instructions::interrupts::{disable, enable};
@ -46,8 +48,8 @@ pub fn kernel_main() -> ! {
init::init();
// log::set_max_level(BOOT_CONF.log_level());
/*
let mut scheduler = SCHEDULER.lock();
/*

View file

@ -53,7 +53,7 @@ pub mod logger;
pub mod panic;
// pub mod proto_filetable;
pub mod relib;
// pub mod scheduler;
pub mod scheduler;
mod unicode_utils;
pub mod utils;
// pub mod vga_e;

View file

@ -1,7 +1,5 @@
use alloc::vec::Vec;
use crate::file::PathRep;
pub type SoundCardID = u8;
pub type DeviceID = u8;
pub type ControllerID = u8;
@ -9,7 +7,7 @@ pub type ControllerID = u8;
#[derive(Clone, Debug, PartialEq)]
pub enum FileAccess {
All,
Some(Vec<PathRep>),
Some(Vec<u8>),
None,
}

View file

@ -17,7 +17,7 @@ use proc::{Process, PID};
#[cfg(test)]
mod tests;
use crate::{file::PathRep, kmain::generate_process_pass};
use crate::kmain::generate_process_pass;
use self::capabilities::Capabilities;
@ -41,7 +41,7 @@ pub enum Priority {
#[derive(Clone, Debug)]
pub enum FileAccessTypes {
All,
Some(Vec<PathRep>),
Some(Vec<u8>),
None,
}

View file

@ -1,8 +1,8 @@
use crate::kmain::generate_process_pass;
use alloc::{string::ToString, vec::Vec};
use crate::{
use super::{
capabilities::Capabilities,
kmain::generate_process_pass,
proc::{Process, PID},
Priority,
};