diff --git a/docs/.obsidian/community-plugins.json b/docs/.obsidian/community-plugins.json new file mode 100644 index 0000000..0637a08 --- /dev/null +++ b/docs/.obsidian/community-plugins.json @@ -0,0 +1 @@ +[] \ No newline at end of file diff --git a/docs/.obsidian/workspace.json b/docs/.obsidian/workspace.json index cd216bb..bf6bc64 100644 --- a/docs/.obsidian/workspace.json +++ b/docs/.obsidian/workspace.json @@ -13,12 +13,32 @@ "state": { "type": "markdown", "state": { - "file": "Usage/Building The Kernel.md", + "file": "Planning & To-Dos.md", "mode": "source", "source": false }, "icon": "lucide-file", - "title": "Building The Kernel" + "title": "Planning & To-Dos" + } + } + ] + }, + { + "id": "c178a2dff57ae0aa", + "type": "tabs", + "children": [ + { + "id": "6d395e6a4c72e1c8", + "type": "leaf", + "state": { + "type": "markdown", + "state": { + "file": "Planning & To-Dos.md", + "mode": "preview", + "source": false + }, + "icon": "lucide-file", + "title": "Planning & To-Dos" } } ] @@ -53,7 +73,7 @@ "state": { "type": "search", "state": { - "query": "tag:#usage", + "query": "tag:#Threading", "matchingCase": false, "explainSearch": false, "collapseAll": false, @@ -74,7 +94,8 @@ "title": "Bookmarks" } } - ] + ], + "currentTab": 1 } ], "direction": "horizontal", @@ -170,12 +191,13 @@ }, "active": "add883d295e04659", "lastOpenFiles": [ + "Usage/Building The Kernel.md", + "Planning & To-Dos.md", "structure/idk.canvas", "structure/kernel.md", "structure/libk.md", "structure/libm.md", "structure/libk", - "Usage/Building The Kernel.md", "structure", "Usage", "Welcome.md" diff --git a/docs/Planning & To-Dos.md b/docs/Planning & To-Dos.md new file mode 100644 index 0000000..2758021 --- /dev/null +++ b/docs/Planning & To-Dos.md @@ -0,0 +1,109 @@ + +> [!todo] Threading +> - [ ] implement thread switching functionality +> - [ ] switch stacks +> - [ ] implement multi-threading +> - [ ] figure out how to turn on another core +> - [ ] Scheduler +> - [ ] which task goes on which thread? +> - [ ] round robin / time slicing algorithm +> - [ ] switch tasks on a given core +> - [ ] push registers +> - [ ] switch stacks +> - [ ] ensure the scheduler knows where to find the stack for each thread +> - [ ] move a given task to a new core +> - [ ] differentiate between kernel threads and user threads +> - [ ] create syscall to create a new thread + +> [!todo] Filesystem +> - [ ] AHCI Implementation +> - [ ] figure out what hard drives are attached +> - [ ] read data +> - [ ] write data +> - [ ] FAT32 Implementation +> - [ ] parse FAT header +> - [ ] figure out where files are / what files are what +> - [ ] parse file metadata / figure out type of file +> - [ ] reading the entirety of a file into memory +> - [ ] *(extension)* ext2 Implementation +> - [ ] Syscall API +> - [ ] provide a user program with file read / write access given a filename +> - [ ] translate a filename into a disk location of data & the size of the data +> - [ ] provide an interface to read from a file or write to a file + +> [!todo] APIC +> - [ ] Enable APIC +> - [x] Get apic location from MSR +> - [x] Enable APIC bit flag +> - [x] Disable Legacy PIC +> - [ ] Map physical APIC address to virtual memory +> +>> [!error] +>> Page fault exception occurs when APIC is activated +> +>- [ ] Setup Interrupt handlers to handle interrupts generated by the APIC +> - [ ] Timer Interrupts +> - [ ] Keyboard Interrupts + +> [!todo] Userspace (req: Threading, Filesystem) +> - [ ] Load program into memory from disk +> - [ ] requires: +> - [ ] Program Loader +> - [ ] Parse ELF File +> - [ ] Load file into memory +> - [ ] Filesystem +> - [ ] Scheduler (to start and manage the process) +> - [ ] Start a user process +> - [ ] switch stacks +> - [ ] jump to user code + +>[!todo] User Interface +>- This will be a library so that programs in userspace can provide a user interface rather than relying on text commands from a basic terminal +>- features required: +> - [ ] Rendering frames to a display buffer +> - [ ] requires: Frame rendering Syscall +> - [ ] I/O +> - [ ] syncio +> - [ ] keystrokes +> - [ ] asyncio +> - [ ] keystrokes +> - [ ] requires: I/O Syscalls +> - [ ] Window struct +> - [ ] stores it's size and location +> - [ ] handles rendering pixels to the screen +> - [ ] Widgets +> - [ ] textbox / label +> - [ ] single line text input +> - [ ] how do we capture keyboard inputs? +> - [ ] multiline text input +> - [ ] how do we capture keyboard inputs? +> - [ ] button +> - [ ] dialog +> - [ ] box widget +> - [ ] figure out how to nest other widgets inside it +>```rust +>pub struct Window { +> position; +> dimensions; +>} +> +>impl Window { +> fn display(&self, frame: &Frame) -> Result<(), RenderError>; +>} +> +>pub struct Frame<'a> { +> window: &'a Window, +> data: <"... a suitable type to store pixels"> +>} +> +>impl<'a> Frame<'a> { +> pub fn display(&self) -> Result<(), RenderError> { +> self.window.display(self) +> } +>} +> +> pub trait Widget { +> fn render(&self) -> Frame; +> } +>``` +