Commit Graph

329 Commits

Author SHA1 Message Date
Vincent Ollivier beff99cd4b
Fix DNS address (#279) 2021-12-06 23:50:36 +01:00
Vincent Ollivier 6f81dcedb6 Fix DNS address 2021-12-06 23:48:04 +01:00
Vincent Ollivier 749b111d68
Rewrite Lisp parser with Nom (#277)
* Rewrite Lisp parser

* Parse special symbols

* Add eval for calculator

* Replace original parser with the new one

* Handle escaped chars in strings

* Add more special characters to parser

* Refactor eval

* Add operations on files

* Refactor more of eval

* Add number parsing

* Refactor eval

* Improve error messages

* Use .lsp for lisp files

* Refactor eval

* Add ensure_len macro
2021-12-04 13:39:14 +01:00
Vincent Ollivier 009786b140
Add pci command and switch IDE controllers to compatible mode (#276)
* Add waiting times to identify command

* Read more attributes from PCI devices

* Add pci::list

* Add pci command

* Switch PCI IDE controllers to compatibility mode

* Add comment

* Update changelog
2021-11-28 19:43:40 +01:00
Vincent Ollivier 0f70d67c91
Improve user experience (#274)
* Add default-run attribute

* Use f64 instead of f32 in calc

* Allow empty line in REPL

* Check that FS is mounted before reading superblock

* Add cmd env var

* Update changelog
2021-11-27 10:08:08 +01: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 35f03ee644
Fix editor cursor after status change (#272) 2021-11-14 09:33:52 +01:00
Vincent Ollivier c30e5a9ed6
Fix autocomplete bug (#271)
* Cleanup code

* Fix autocomplete bug

* Use extend instead of append
2021-11-14 09:27:44 +01:00
Vincent Ollivier 8e828bb619
Enable asm_sym feature (#269) 2021-11-12 10:05:53 +01:00
dependabot[bot] edcb6bb588
Bump object from 0.26.2 to 0.27.1 (#259) 2021-11-06 09:33:51 +00:00
Vincent Ollivier 0093e8f8a2
Improve UTF-8 support (#267)
* Add support for Extended ASCII to VGA

* Read multibyte chars

* Fix deletion of extended ascii chars

* Add UTF-8 support to Prompt

* Refactor vec char

* Add unicode support to text editor

* Refactor code

* Update changelog
2021-11-06 10:31:14 +01:00
dependabot[bot] 2b239e9dc1
Bump acpi from 4.0.0 to 4.1.0 (#265) 2021-11-05 08:10:14 +00:00
Vincent Ollivier d053f17124
Add shell redirections (#262)
* Reorder syscalls

* Add DUP syscall

* Add api::fs::reopen

* Add shell redirections

* Use regex to parse arrow

* Add tests

* Refactor install

* Add eprint macro

* Change exit code of empty command in shell

* Update changelog
2021-11-05 09:06:40 +01:00
Vincent Ollivier 15ae9bb6c3 Use version 7.1 for Nom 2021-11-05 08:51:25 +01:00
dependabot[bot] 39f91617a9
Bump linked_list_allocator from 0.9.0 to 0.9.1 (#256) 2021-11-01 11:25:33 +00:00
Vincent Ollivier 8457c0fc53
Add calc command (#263)
* Add calc command

* Parse float

* Refactor parser

* Add tests

* Refactor parser

* Update changelog
2021-11-01 11:13:52 +01:00
Vincent Ollivier 591a54e348
Add website (#261)
* Add www dir for the website

* Update html

* Add website

* Refactor CSS

* Fix image path

* Update assets

* Update doc and readme description

* Reorder badges

* Update doc index title
2021-11-01 08:58:22 +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 1b4075bb3b
Enabe array_map feature (#254) 2021-10-02 22:01:38 +02:00
Konrad Borowski 07075dc6b3
Remove array-macro dependency (#253) 2021-10-02 19:26:29 +02:00
Vincent Ollivier 79860fb6de
Add spawn syscall (#251)
* Add spawn syscall

* Update changelog

* Fix changelog format typo
2021-09-29 22:40:37 +02:00
dependabot[bot] c94c151978
Bump x86_64 from 0.14.5 to 0.14.6 (#247) 2021-09-26 20:52:32 +00: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 07ff76991a
Add basic userspace (#228)
* Testing userspace code

* Update program example

* Refactor code

* Read bin from dsk/bin at compile time

* Create mapper and frame allocator during process creation

* Read bin from disk at runtime

* Add missing file

* Add missing bin

* Add src bin

* Replace debug output by a test syscall+binary

* Remove comments from asm files

* Rewrite sleep

* Replace test by hello

* Refactor hello example

* Translate address from user code segment

* Rename entry label

* Update readme and changelog

* Use entry_name for DirEntry

* Increase stack size
2021-09-24 18:19:37 +02:00
Vincent Ollivier ded918b158 Update changelog 2021-09-15 23:13:59 +02:00
dependabot[bot] f24670a303
Bump acpi from 3.1.0 to 4.0.0 (#243) 2021-09-15 21:12:22 +00:00
dependabot[bot] d0d6c2293d
Bump sha2 from 0.9.6 to 0.9.8 (#244) 2021-09-15 21:10:26 +00:00
dependabot[bot] fb2a6aabf8
Bump x86_64 from 0.14.4 to 0.14.5 (#245) 2021-09-15 21:10:05 +00:00
Vincent Ollivier 43ac7cdc8c
Add file syscalls (#242)
* Add file syscalls

* Change syscalls return type

* Add stat syscall

* Add file creation

* Use api::fs::read_to_string in more user programs

* Use syscalls in fs api

* Move some functions from sys::fs to api::fs

* Add FileIO for generic read and write

* Write to stdout

* Add stdout test

* Disable output

* Move FileIO to API

* Add io::stdin and io::stdout to API

* Add a real /dev/random

* Fix test

* Add missing device file

* Refactor stdin read

* Truncate read_line result if larger than buf

* Use fs::read and fs::write to copy files

* Use fs::read for user password database

* Use fs::read for vga command

* Use api::syscall::stat instead of sys::fs::File::open

* Use fs::read and fs::write in httpd

* Add RNG to API

* Add fs::open_dir and fs::create_dir

* Add fs::exists
2021-09-15 22:27:32 +02:00
dependabot[bot] 0036d06d7e
Bump aml from 0.15.0 to 0.16.0 (#241) 2021-08-31 07:51:13 +00:00
dependabot[bot] b651cd6cd2
Bump pic8259 from 0.10.1 to 0.10.2 (#235) 2021-08-30 11:23:12 +00:00
dependabot[bot] af7e48ebaa
Bump aml from 0.14.0 to 0.15.0 (#236) 2021-08-30 09:18:13 +00:00
dependabot[bot] 32baff2556
Bump pbkdf2 from 0.8.0 to 0.9.0 (#239) 2021-08-30 09:15:15 +00:00
dependabot[bot] 14d6e6a8a6
Bump sha2 from 0.9.5 to 0.9.6 (#240) 2021-08-30 09:13:34 +00:00
Vincent Ollivier b8ee316240 Publish version 0.6.0 2021-08-21 11:21:34 +02:00
Vincent Ollivier 7724936400 Update changelog 2021-08-21 11:00:30 +02:00
Vincent Ollivier e55ff2446e
Add beep command (#234)
* Add beep command

* Add pc speaker to qemu

* Add source to beep musics

* Use beep -l instead of beep -t

* Reuse PIT manipulation from time module
2021-08-21 10:57:39 +02:00
Vincent Ollivier f10c3db1ac
Improve baremetal experience (#232)
* Fix rtc bug during update

* Fix panic in hex command

* Add erroneous commands to shell history

* Fix hex command
2021-08-21 10:55:02 +02:00
Vincent Ollivier 97bdd26e02 Update changelog 2021-08-12 23:20:19 +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
dependabot[bot] 54b52ee05c
Bump bootloader from 0.9.18 to 0.9.19 (#233) 2021-08-11 06:52:12 +00:00
dependabot[bot] 5fe44aa980
Bump raw-cpuid from 10.0.0 to 10.2.0 (#224) 2021-08-07 15:42:36 +00:00
dependabot[bot] f520f1e860
Bump aml from 0.13.0 to 0.14.0 (#227) 2021-08-07 15:42:12 +00: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 8f103f6b0b
Add keyboard layout change at runtime (#226)
* Change keyboard layout at runtime

* Add keyboard command

* Add env var to makefile

* Add azerty layout

* Fix tests

* Fix CI
2021-08-04 22:07:26 +02:00
Vincent Ollivier 40a97aa12a Update Prompt#input when receiving ^C
When `Prompt#input` received a `^C` or `^D` it would return `None`.
It is used in a `while let` loop so in the shell and the lisp
interpreter it translated to exiting. This is good for `^D` but `^C`
should just cancel the current line.

So now in the latter case it returns `Some(String::new())` instead and
let the application deal with the empty string, which is fine for the
shell and the lisp interpreter.
2021-08-02 04:50:41 +02:00
Vincent Ollivier 41cc200375 Add network screenshot 2021-08-01 13:14:49 +02:00
Vincent Ollivier 89458a732c Add index page to the doc 2021-08-01 13:03:29 +02:00