Commit Graph

13 Commits

Author SHA1 Message Date
Vincent Ollivier dd5899a74d
Read command line args from userspace programs (#351)
* Read command line args from userspace programs

* Use Stop syscall to debug pointers from userpace

* Fix address translation system

* Update binaries

* Move print to bin

* Add hardcoded alias system

* Strip debug from binaries

* Build userspace binaries before running tests

* Save all the args in args including the command invocation name

* Move sleep command to /bin

* Rebuild binaries
2022-06-14 22:43:33 +02:00
Vincent Ollivier cd2e0166e6
Executable loading (#349)
* Add header to binary

* Add result to spawn

* Use spawn result to display error message

* Use info result to change directory

* Fix binary detection

* Fix lock issue
2022-06-09 22:59:33 +02:00
Vincent Ollivier 13ca997b7b
Add lazy allocation (#275)
* Add lazy allocation

* Add debug info

* Alloc stack directly

* Remove debug
2022-06-06 15:53:45 +02:00
Vincent Ollivier 41eaae9fbe
Fix issues with process alloc (#327)
* Fix off by one errors

* Simplify phys_addr

* Add offset to frame allocator

* Change code_addr

* Remove unknown commands

* Use allocated frames counter

* Remove debug code
2022-04-11 19:06:16 +02:00
Vincent Ollivier e75c287098
Add process table and exit syscall (#268)
* Add process table

* Add exit syscall

* Update binaries

* Make pid mutable

* Use RW lock for the process table

* Change pid atomic ordering

* Fix return code

* Fix lock issue

* Add debug print

* Add exit to sleep binary

* Enable asm_sym feature

* Use the end of code area for stack area

* Add debug macro

* Use array instead of vec for process

* Refactor process data clone

* Increase max file handles to 32

* Increase sleep to 5 seconds

* Fix MAX_PID calculation

* Revert max file handle value to fix crash

* Close file handle after dup syscall

* Remove init

* Run the test in release mode

* Refactor debug

* Refactor debug output of syscall

* Remove NULL syscall

* Save and restore stack frame

* Fix install

* Save only scratch registers to the stack

* Add write volatile to registers

* Overwrite rax register on exit

* Set pid back to 0 after exit

* Add alloc_page function

* Remove debug output

* Unmap pages after exit

* Allocate memory after kernel heap

* Hide unmap error
2021-11-27 09:56:52 +01:00
Vincent Ollivier 71303cd455
Fix VGA issues with real hardware (#258)
* Enable cursor after boot

* Remove unused time attribute on file

* Fix compilation warning

* Clear screen after vga init

* Add disable_blinking function

* Set palette registers at boot

* Set default palette

* Fix attribute control registers initialization

* Clear palette address source bit when setting palette

* Refactor code

* Remove index from palette

* Update comment

* Update changelog
2021-10-24 18:23:01 +02:00
Vincent Ollivier d541ed949a
Add rust binaries support (#255)
* Parse elf segments instead of sections

* Add hello binary

* Build only kernel in makefile

* Add rust and nasm userspace examples

* Create empty files prior to compilation

* Change segment locations

* Simplify binaries

* Update binaries

* Update changelog

* Fix stack overflow
2021-10-14 09:49:30 +02:00
Vincent Ollivier 71d83cd688
Add dynamical disk information (#252)
* Add sys::ata::Drive struct

* Add fs size to superblock

* Add missing usage option to disk command

* Update changelog

* Store ata::Drive in AtaBlockDevice

* Store allocated block count in superblock

* Rename Superblock to SuperBlock

* Add superblock to memfs

* Use Block instead of LinkedBlock for BlockBitmap

* Rename BlockBitmap to BitmapBlock

* Fix removed const

* Remove some hardcoded constants

* Fix BitmapBlock::free_all

* Allocate the whole remaining disk space

* Use memory size to alloc memfs

* Dynamically use half of the memory for the heap

* Add SuperBlock::check_ata

* Move init to mod.rs

* Update python fuse

* Add BITMAP_SIZE constant

* Fix available space computation

* Limit the heap to 8 GB max

* Fix memfs size
2021-10-04 21:37:47 +02:00
Vincent Ollivier c67ca13b51
Add ELF loader (#248)
* Add ELF loader

* Add elf reader

* Fix jump to entry point

* Update mapping code

* Update kernel data segment in GDT

* Refactor wrap macro

* Remove debug from process

* Remove jump to entry point

* Update hello binary

* Improve comments on asm code

* Rename Process#entry to Process#entry_point

* Use cli directly

* Add pic::init()

* Disable again interrupts after halt if needed

* Allow keyboard and serial events during memory init

* Update changelog
2021-09-26 22:50:45 +02:00
Vincent Ollivier e5a7b63bc2
Add chess game (#230)
* Add chess game

* Add missing file

* Add moves parsing

* Add autocompletion

* Add perft command to chess

* Update Cargo.lock

* Add undo and time commands

* Improve output of commands

* Add endgame support

* Split main into multiple methods of a Chess struct

* Update littlewing

* Use chess prelude

* Add show board command

* Add help

* Update docs

* Fix url syntax in doc

* Add commands to doc index

* Update doc/index.md

* Fix typos
2021-08-12 23:15:28 +02:00
Vincent Ollivier d706e973aa
Refactor filesystem (#225)
* Split fs file into multiple files

* Use DirEntry#into

* Reorganize dir entry creation prior to refactoring

* Refactor Block

* Refactor bits manipulation in Dir#create_entry

* Refactor ReadDir

* Truncate filename to 255 chars at most

* Refactor Dir#update_entry

* Refactor new block alloc

* Allow different kinds of block devices

* Display disk usage

* Add fs::read to API

* Add command to mount fs in memory

* Add tests
2021-08-07 11:29:45 +02:00
Vincent Ollivier 5e115ced6c
Fix clippy warnings (#214)
* Fix slow zero-filled vector initialization

* Fix warnings in user command

* Fix clippy error in httpd command

* Fix warnings about using print instead println

* Fix length comparison to zero

* Fix some clippy warnings

* Fix length comparison to zero

* Fix some clippy warnings

* Fix some clippy warnings

* Fix bug introduced by clippy
2021-07-25 12:41:44 +02:00
Vincent Ollivier 6b8de261ca
Move kernel code to api (#204)
* Move code to api

* Add palette::from_csv

* Refactor palette::from_str with tests

* Add tests to api::font::from_bytes

* Add TODO comments to fs code

* Rename kernel and user dirs to sys and usr

* Add missing files from migration

* Move console::Style to api

* Add more missing changes
2021-07-16 10:19:18 +02:00