Commit Graph

37 Commits

Author SHA1 Message Date
Vincent Ollivier 2b91c9ccc7
Add e1000 driver (#337)
* Add e1000 network card support

* Read MAC from EEPROM

* Read MAC without EEPROM

* Add device id for ThinkPad X200

* Fix makefile merge

* Add todo list

* Add WIP implementation

* Add qemu trace to makefile

* Rewrite parts of the implementation

* Fix descriptor cloning

* Return received buffer

* Break from loop when transmitted

* Comment out debug code

* Comment out more code

* Rename allocator variables

* Fix debug issue

* Add more device ids

* Reset RxDesc status when done

* Process packet even if ICR_RXT0 is set

* Remove debug output

* Refactor code

* Fix typo

* Fix RDT updates

* Update documentation

* Update makefile to match doc

* Group network cards in readme

* Refactor code

* Avoid using ICR to check for new packets

* Fix panic on invalid datagram size

* Refactor code to stay below 80 chars

* Increase buffer size

* Add FIXME to test for EOP

* Clean up code

* Add PCI id for I217-LM

* Update hardware page

* Add PCI id for the Intel PRO/1000 GT

* Update hardware page

* Fix init_tx for Intel I217-LM

* Refactor comments

* Update website

* Fix whitespace

* Update doc for VirtualBox

* Reorder cards in doc

* Reorder cards in doc

* Restore signal

* Move makefile trace option to qemu

* Add ThinkCentre M83 to hardware list

* Increase receive buffer back to 64

* Refactor reset

* Print MAC address in uppercase

* Disable interrupts

* Add TODO comment
2024-04-08 15:23:40 +02:00
Vincent Ollivier 699ddf0ad8
Add time synchronisation with NTP (#579)
* Add api::time::from_timestamp_utc function

* Add date function to lisp

* Add file/exists? function to lisp

* Rewrite lisp ntp client

* Update NTP packet to work with more servers

* Fix userspace binaries build
2024-02-18 21:41:03 +01:00
Vincent Ollivier d22c504726
Improve system information (#553)
* Add socket command to manual

* Update syscall doc

* Update copyright year in help command

* Fix lisp include

* Fix error styling in shell

* Use uppercase hex

* Update website

* Move some CSI color positions

* Update line-height
2023-12-01 16:51:02 +01:00
Vincent Ollivier b4b3b0f425
Add basic userspace allocator (#544)
* Add userspace allocator

* Fix demo

* Return from userspace exceptions

* Add failing test

* Add allocator to process struct

* Update binaries

* Update binaries again

* Fix stack address

* Fix heap size

* Move up debug output in free syscall
2023-11-20 20:44:05 +01:00
Vincent Ollivier 02c1b7f52a
Improve documentation (#547)
* Update readme

* Add hardware page

* Add contributing page

* Update changelog

* Update contributing

* Update index

* Add games page

* Move images to doc/images

* Rebuild website

* Fix dsk/var/www

* Update contributing

* Change games order
2023-11-19 21:03:10 +01:00
Vincent Ollivier 9158bd795c
Update rust version (#495)
* Update rust toolchain file

* Update aml crate to compile

* Avoid installing default toolchain

* Remove warnings

* Add host dependecies to readme

* Update changelog

* Add back strip

* Use earlier toolchain
2023-06-14 00:40:48 +02:00
Vincent Ollivier 2f7f33b950
Improve help system (#481)
* Rename shortcut to command in help

* Add dir arg to list usage

* Add help to read command

* Add help to write command

* Add help to date command

* Add manual

* Add help to copy

* Add help to delete

* Add help to dhcp

* Add help to edit

* Add elf command to autocomplete

* Update boot in manual

* Add help to elf

* Add help to env

* Add help to help

* Add help to hex

* Add help to lisp

* Add help to move

* Add help to shell

* Refactor user help

* Update crates

* Improve debug

* Update binaries

* Increase user process memory space

* Exit process before shutdown

* Add more content to manual

* Update manual

* Update screenshots

* Update index.md

* Add link to the manual

* Update shields in readme

* Add links to the manual

* Add games to README

* Rewrite the first part of the index

* Remove a word

* Rewrite usage section

* Add demo section

* Rewrite part of the doc

* Remove html files

* Add make website command

* Commit html files

* Fix indentation

* Fix code block

* Add monitor option to qemu to take screenshots

* Update CSS

* Fix CSS

* Add font-family sans-serif to website
2023-04-27 19:34:05 +02:00
Vincent Ollivier 87eb51d1ff
Improve lisp (#449)
* Add sort function

* Add slice function

* Fix empty string conversion into number

* Fix failing test

* Update test memory in makefile

* Add string to slice

* Add string to length

* Replace builtin lines with split and trim

* Fix splitting on empty pattern

* Fix slice for strings

* Add uniq

* Refactor slice

* Refactor sort to accept any expression

* Add contains?

* Add chunks

* Split default_env

* Add filter and intersection to core lib

* Update doc

* Update set to return value instead of symbol

* Add splice for variadic functions
2022-12-12 18:43:51 +01:00
Vincent Ollivier 23d622176c
Use git describe to display version (#437)
* Use git describe to print version at boot

* Add version command
2022-11-09 09:29:06 +01:00
Vincent Ollivier 778de3cfe0
Add compilation option to set memory size (#433) 2022-11-05 09:40:02 +01:00
Vincent Ollivier 1e8f9e357d
Exit from alloc errors after page fault in userspace (#404)
* Add debug mode to makefile

* Add page fault exit code

* Fix panic

* Remove warning

* Display error message only in user mode

* Disable debug

* Use alloc conditionally in hello command

* Use standardized style of error message for page fault

* Remove debuginfo from userspace binaries

* Add comment to the page fault issue

* Use default relocation model instead of static

* Refactor import

* Update binaries

* Fix panic info by using debug

* Refactor makefile comment
2022-09-03 15:36:53 +02:00
Vincent Ollivier 7f3baa2c60
Switch HTTP server to HTTP 1.1 (#395)
* Switch to connection keep-alive

* Upgrade to HTTP 1.1

* Add pcap to makefile
2022-08-27 12:36:20 +02:00
Vincent Ollivier ec1fff6440
Fix makefile variables (#394) 2022-08-25 13:48:23 +02:00
Vincent Ollivier 806fbd9d70
Add makefile arg for qemu audio (#393) 2022-08-25 09:08:04 +02:00
Vincent Ollivier f1a19e2055
Improve HTTP server (#391)
* Link host 8080 port to qemu 80

* Add root dir

* Add support for images

* Add Response struct

* Refactor response buffer creation

* Add index file support

* Copy www dir

* Update trailing slash rule

* Add command line arguments

* Remove strftime function

* Add read only mode

* Implement Display

* Add colored output

* Add Request struct

* Add common date time format

* Add time::now_utc

* Add connexions pool

* Reduce wait time

* Add install --yes

* Fix typo

* Add more mime types
2022-08-25 08:42:35 +02:00
Vincent Ollivier 0dc7c381f3
Improve QEMU options (#384)
* Add kvm acceleration

* Ignore signal with serial

* Remove disk warnings

* Remove audio warnings
2022-08-11 08:44:07 +02:00
Vincent Ollivier 82882ec355
Add shell aliases (#357)
* Add shell aliases

* Fix env output error

* Fix sort

* Read aliases from config file

* Simplify arguments parsing

* Fix test

* Clone params to spawn syscall

* Run clippy

* Revert "Clone params to spawn syscall"

This reverts commit 4c91bea196.

* Disable binary stripping

* Remove exit alias

* Update doc
2022-06-26 10:00:54 +02:00
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 6e3f3afcb0
Add binaries (#350)
* Remove linker args

* Add binaries

* Read /bin for autocomplete

* Add /bin path to commands

* Remove api bin

* Remove usr reboot
2022-06-12 15:28:54 +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 429a14974c
Build only moros image (#340) 2022-05-11 09:47:11 +02:00
Vincent Ollivier a7cb32a5c2
Rewrite network interface (#334)
* Rewrite network interface

* Fix issue when cloning RLT8139 device

* Add Interface struct wrapping smoltcp iface

* Revert "Add Interface struct wrapping smoltcp iface"

This reverts commit ede7d5d0c9.

* Add back device stats

* Move stats code

* Rename eth_addr field to mac

* Add device config struct

* Fix usage of config and stats

* Make device init private

* Remove InnerStats and use Arc<Stats> directly

* Remove nic feature
2022-05-05 23:05:39 +02:00
Vincent Ollivier e785942792
Update rust toolchain (#320)
* Update rust-toolchain file

* Remove stable features

* Update bootloader crate

* Remove toolchain from GitHub Actions

* Avoid running installer interactively

* Remove rustup component add commands
2022-04-05 12:03:31 +02: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 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 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 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 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 9ca14297c5
Change vga font (#201)
* Add vga crate

* Rename vga option to screen

* Add fonts

* Add bold font weight

* Revert "Add bold font weight"

This reverts commit aa76cc9800.

* Rename screen output to video output

* Print extended ascii chars

* Fix http empty lines printing

* Add PSF fonts support

* Replace vga crate by internal method to set the font

* Add vga command

* Add psf font files
2021-07-13 22:10:02 +02:00
Vincent Ollivier a3e8e3cec4 Add make clean command 2021-02-04 10:06:06 +01:00
Vincent Ollivier 9d09d1b2ed
Add a web server (#114)
* Add HTTP server

* Update server code

* Support PUT method to update files

* Support DELETE method to delete files

* Add kernel::console::abort() to detect ^C

* Update network monitoring

* Drain console input after a program stopped

* Refactor loop exits

* Remove mut keyword

* Use MTU for TCP sockets buffer size

* Fix empty lines

* Support directory creation

* Use mtu for chunk size
2020-11-15 09:44:10 +01:00
Vincent Ollivier 77b18650a3
Add tests (#118)
* Add custom test framework

* Avoid compiling rand crate in test

* Hide logs in test

* Add test command to the makefile

* Add travis file

* Use QEMU isa-debug-exit device

* Update travis script

* Add more tests

* Merge box alloc tests
2020-11-14 21:52:07 +01:00
Vincent Ollivier 07b58189aa
Add pcnet driver (#82)
* Update crates

* Move kernel::rtl8139 to kernel::net::rtl8139

* Refactor rtl8139 driver

* Add draft PCNET driver

* Add compilation option nic

* Add module file

* Move State to net

* Add draft implementation of smoltcp::phy::Device

* Rewrite RTL8139 to be shared between threads

* Copy buffer for RxToken

* Use only Device inside TxToken

* Fix error in packet transmission

* Update driver code

* Refactor driver

* Fix transmit packet length

* Fix number of descriptor entries setup

* Loop through owned receiver buffers

* Add ip set subcommand

* Fix MTU

* Refactor drivers

* Update readme
2020-10-31 23:20:41 +01:00
Vincent Ollivier f97191b272
Remove cargo xbuild (#83)
* Add nanowait based on calibrated rdtsc

* Add spin_loop_hint

* Update dependencies

* Update cargo config

* Add rlibc dependency to fix compilation bug

* Remove cargo xbuild

* Update crates

* Update readme
2020-07-31 10:31:59 +02:00
Vincent Ollivier 0a4b26a8bb
Improve filesystem (#24)
* Add doc about fs

* Add console on diskless boot

* Enumerate all disks

* Avoid hardcoded allocation of root dir

* Refactor ATA code

* Add BlockDevice

* Add mkfs command

* Update readme

* Add warning in the readme about disk modifications

* Use all bits inside BlockBitmap data

* Add makefile

* Overwrite only bootloader and kernel in disk image

* Update readme

* Add doc about mkfs

* Update mkfs command
2020-02-13 09:42:22 +01:00