DOCS: adding in some docs in various spots and added a contrib guide
This commit is contained in:
parent
03667f6039
commit
b9b798efff
4
CONTRIBUTING.md
Normal file
4
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Commit style
|
||||
`[SCOPE]: [COMMENT]`
|
||||
SCOPE is what you changed
|
||||
COMMENT is why you changed that
|
|
@ -13,6 +13,8 @@ TODO
|
|||
- HBVM assembler (with IDL support)
|
||||
- HBVM Lisp/s-expr Compiler (Also (with (IDL (support))))
|
||||
- Documentation
|
||||
# Community
|
||||
[Discord](https://discord.gg/5TnJ8sa7)
|
||||
|
||||
# Compiling
|
||||
1. `git submodule update --init`
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// TODO: Turn apic keyboard interrupt into a standard ipc message
|
||||
use {
|
||||
log::trace,
|
||||
spin::{Lazy, Mutex},
|
||||
|
@ -15,7 +16,7 @@ pub unsafe fn init() {
|
|||
#[repr(u8)]
|
||||
enum Interrupt {
|
||||
Timer = 32,
|
||||
Keyboard = 33,
|
||||
|
||||
ApicErr = u8::MAX - 1,
|
||||
Spurious = u8::MAX,
|
||||
}
|
||||
|
@ -46,7 +47,6 @@ static IDT: Lazy<InterruptDescriptorTable> = Lazy::new(|| {
|
|||
|
||||
idt[Interrupt::ApicErr as usize].set_handler_fn(apic_err);
|
||||
idt[Interrupt::Spurious as usize].set_handler_fn(spurious);
|
||||
|
||||
idt[Interrupt::Timer as usize].set_handler_fn(timer);
|
||||
|
||||
idt
|
||||
|
@ -64,6 +64,8 @@ extern "x86-interrupt" fn page_fault(
|
|||
}
|
||||
|
||||
extern "x86-interrupt" fn timer(_isf: InterruptStackFrame) {
|
||||
// TODO: Pause the running program then schedule the next program
|
||||
|
||||
unsafe { LAPIC.lock().end_of_interrupt() };
|
||||
}
|
||||
|
||||
|
|
|
@ -12,4 +12,26 @@ pub struct IpcBuffer {
|
|||
buffer: BufferTypes,
|
||||
}
|
||||
|
||||
pub struct Protocol {}
|
||||
impl IpcBuffer {
|
||||
pub fn validate_messages(&mut self) -> Result<(), IpcError> {
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
pub enum IpcError {
|
||||
InvalidMessage,
|
||||
}
|
||||
|
||||
/// TODO: define this, possibly as the binary form of the IDL
|
||||
/// DEPEND: This depends on an IDL
|
||||
pub struct Protocol {
|
||||
// TODO: add in settings
|
||||
// like `invalid_message_handler` with some options similar to
|
||||
// `Deny` Drops the message
|
||||
// `Allow` Allows invalid messages (This disables validators IPC side and relies on programs to handle invalid messages)
|
||||
// `CustomFunct` a callback
|
||||
// and `report_invalid_messages_to_sender`
|
||||
// `True`
|
||||
// `False`
|
||||
// settings: PSettings,
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
//! An ipc message structured in a nice convenient way
|
||||
|
||||
use alloc::vec::Vec;
|
||||
|
||||
/// TODO: Extend this into a full structure
|
||||
/// DEPEND: This depends on an IDL
|
||||
pub type Message = Vec<u8>;
|
||||
|
|
|
@ -48,6 +48,17 @@ pub fn kmain(cmdline: &str, bootstrap: Option<&'static [u8]>) -> ! {
|
|||
|
||||
let mut sc = SERIAL_CONSOLE.lock();
|
||||
loop {
|
||||
// TODO: Implement an API for sending and recieving serial stuff
|
||||
{
|
||||
fn read_ipc_buff() {}
|
||||
fn write_ipc_buff() {}
|
||||
// TODO: read from the IPC buffer and push to serial stream
|
||||
let _msg = read_ipc_buff();
|
||||
for byte in 0..0 {
|
||||
sc.send(byte);
|
||||
}
|
||||
}
|
||||
|
||||
let byte = sc.receive();
|
||||
if byte == b'\r' {
|
||||
sc.send(b'\n');
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
//! The ableOS kernel.
|
||||
//! Named akern.
|
||||
//! Akern is woefully undersupported at the moment but we are looking to add support improve hardware discovery and make our lives as kernel and operating system developers easier and better
|
||||
|
||||
#![no_std]
|
||||
#![feature(
|
||||
|
@ -14,7 +16,6 @@
|
|||
#![deny(clippy::pedantic, warnings)]
|
||||
#![allow(dead_code)]
|
||||
#![test_runner(crate::test_runner)]
|
||||
|
||||
// #![deny(missing_docs)]
|
||||
|
||||
extern crate alloc;
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
//! A module for small utilities to be used kernel wide
|
||||
//! Simple functions and constants
|
||||
|
||||
/// Used when tab `\t` in hardware is not known and we will default to two spaces
|
||||
pub const TAB: &str = " ";
|
||||
|
|
Loading…
Reference in a new issue