Commit graph

31 commits

Author SHA1 Message Date
DrDeano
c9a9be8182
Create a blank FAT32 image
This will be used for testing the FAT32 driver for the kernel and will be integrated into the OS as a mkfs.fat32 program.
Plus typos

Fixed dependencies


Removed `fat32_` in options

Plus fixed doc comment

Removed the DefaultOrValue

Also reordered some stuff

Removed the serial time for more parameters


Moved writer() and seekableStream() to variables


Refactored mkFAT32
2020-09-27 20:58:18 +01:00
DrDeano
7b5f921d9f
File system files to new folder and use FixedBufferStream for initrd
Fixed non-header aligned sizes

When allocating a size that isn't aligned to the Header, then we get a incorrect alignment.
To fix this, added additional alignment padding to the next free header.

Fixed adding strings to build options
2020-08-06 18:13:53 +01:00
DrDeano
bcc1712737
Created ramdisk build step
Refactored tests for the scheduler and task


Revert "Refactored tests for the scheduler and task"

This reverts commit 2bf56a368bc18f2bd2d33c385e3672d07e4431d9.

Refactored tests for the scheduler and task


Task fmt


Task fmt again >:(


Ramdisk


Added NotOpened error for file read and write
Added vfs init to initialise the root node
Added the ramdisk.initrd file to grub
Update makeiso to copy the ramdisk to the modules folder
Add a ramdisk step to create a ramdisk to be leaded by grub and parsed by the kernel
Add test files for runtime tests of ramdisk

vfs.init => vfs.setRoot


Improved ramdisk step

Also spelling

Changed name for the initrd


Rename RamdiskFS => InitrdFS


Add deinit for initrd

Fixed VMM unmap

{}
2020-07-25 11:18:19 +01:00
DrDeano
d600be874c
Initial scheduler
Fix TSS

Also change to .{} syntax where appropriate.
Added the SS segment
Fixed spelling

Refactoring GDT


Multitasking working for now


WIP scheduler

Refactored Bitmap a bit

WIP still


Task switching working

Handlers return the stack pointer that will be used to restore the tasks stack, normal handlers will return the same stack pointer it was called with where task switching will return the stack pointer of the next task and restore its state using the interrupt stub.

Initial scheduler done


Created a stage 2 init task


Change u32 to usize


Move Task to arch specific


WIP


WIP2


Removed esp from task, replaced with stack_pointer


Removed the debug logs


Fixed init task stack


Change pickNextTask to pointer manipulation

This allows less allocations so faster switching

Temporary enable interrupts for some runtime tests

PIT and RTC need interrupts enabled to run their runtime tests

Renamed schedule => pickNextTask, comptime bitmap for pids not task init

And some other stuff: No pub for the task anymore
Use the leak detector allocator

Fmt


Fix unit tests

And some other stuff :P

PR review

Moved Task out of arch and have the stack init in the arch file
Mocking clean up
Removed commented code
Renamed createTask to scheduleTask where the user will have to provide a task to schedule
Removed redundant pub in log runtime test
Removed global allocator for scheduler
Cleaner assembly in paging

Fmt


Added new Scheduler test mode


Added new test mode to CI


Removed one of the prints


Added doc comment, task test for i386


Removed test


WIP


Runtime tests work

Have a global set in one task and reacted to in another. Also test that local variables are preserved after a task switch.

Removed new lines


Increased line length


Move the allocation of the bool above the task creation
2020-07-18 22:46:24 +01:00
DrDeano
1b32fd309b
Use the standardTargetOptions for built targets
This will allow the user to build the OS with more fine grain, but there is a white list of supported build targets.
Closes #129

Updated the README to reflect the new build options


x86 => i386
2020-06-23 12:49:40 +01:00
DrDeano
2c91e6f9d0
Remove the old and in with the new
Added the new testing to the OS files

Some spelling
INOUT => IN/OUT
Added some doc comments to log

Added the new runtime to the build + added the None test mode

Moved some stuff around
None test mode is the default to run/build the OS normally with no runtime tests.

Add the new runtime testing to the CI


Updated README and CI


Increased timeout


Print the log message


Spelling


Move runtime to test folder


Add new RT to tty


Add a log to use the unmapped memory to cause page fault in release


Ensure the integer overflow happens even in release builds
2020-06-23 12:43:52 +01:00
Sam Tebbs
cec5d3c68d Move linker script 2020-06-04 12:01:53 +01:00
Sam Tebbs
a9589c2e56 Add architecture option to build.zig 2020-06-02 18:54:41 +01:00
DrDeano
1f97a5c6c8
Updating to zig master
Added cpu model


Moved logging to defer done log

Moved mem.init to bottom

Updated again to new zig master
2020-04-12 22:26:34 +01:00
Sam Tebbs
2352a04928 Update zig code 2020-02-01 20:58:02 +00:00
ED
9332fc67b5
Add Format set to build 2020-01-15 16:30:30 +00:00
ED
0746048a00
Run unit tests under the building architecture
This also removed the need for `@intCase()`
Also move the making directories and copying to a script to the build is simpler.

Install qemu earler
Added chmod +x
Fixed copy elf


Added missing switch for qemu binary


Spelling


Make makeiso.sh executable

No longer chmod makeiso.sh

Use the cache root to set the output directory
2020-01-09 13:08:11 +00:00
Sam Tebbs
91b2a61acf Update code to work with zig master 2020-01-06 14:28:09 +00:00
Sam Tebbs
f0161f0ec9 Add simple stacktrace logging 2019-12-06 20:28:28 +00:00
ED
89a1873e7c No more assembly
Pure zig
Added doc comments


Feedback
2019-11-06 21:31:44 +00:00
Sam Tebbs
16bd3f57a1 Remove debug option 2019-10-03 17:15:05 +01:00
Sam Tebbs
b4b3fb06c3 Only test a single build mode 2019-09-17 19:00:33 +01:00
ED
4d9b963310 Added IDT unit and run-time tests 2019-09-17 18:24:44 +01:00
ED
07cc1ae89b Added gdt unit and runtime tests
Updated runtime tests


Added doc comments for runtime tests


PR review


WIP


Fixed testing


Import GDT to run the unit tests


Removed redundant arch tests


Removed whitespace
2019-09-16 22:19:33 +01:00
Sam Tebbs
2373331716 Clean up argument thing 2019-09-11 23:25:34 +01:00
Sam Tebbs
37b6c58c3c Fix gdb symbol-file argument 2019-09-10 23:08:57 +01:00
ED
d5d4082a66 Fixed tesing
Add mocking of functions


Added new function type


Fixed up the mock testing


Working mock_framework :), fixed up all tests for VGA and TTY


Adding tests


VGA testing done


Fin vga and tty mock testing


Fixed build


Removed white spaces


WIP


Added tests for all build modes + reduced import string length for testing


Added comments refactoring


Re-added constants


Added some comments


Updated to master of zig


Added unit tests to pipeline


PR comments


Fixed typos
2019-09-08 20:48:23 +01:00
Andrew Kelley
798b1c1d34 Update to zig master and simplify build script 2019-09-05 16:33:43 +01:00
Sam Tebbs
b8f0b3131c Add infrastructure for build options 2019-09-01 17:29:50 +01:00
Sam Tebbs
35cfbd1686 Add runtime testing harness 2019-07-09 23:25:52 +01:00
ED
995268b04e Added GDT, IDT, IRQ, updated build.zig
Added new build.zig


Interrupts no work :(


Added isr


Interrupts work


Added spurious irq


Code review comments


New name


Refactor


Build asm
2019-05-31 07:41:28 +01:00
Sam Tebbs
08dbf09e00 Refactor compilation of architecture-specific code 2019-05-29 08:18:14 +01:00
ED
faeb433bb0 Add TTY and VGA interface
Line endings


Removed redundant files


Line ending
2019-05-22 20:12:46 +01:00
Sam Tebbs
49d6f19516 Separate arch-specific and arch-agnostic code 2019-05-13 21:10:03 +01:00
Sam Tebbs
47f68ceb9c Start using the zig build system
Start using zig build system
2019-05-03 23:35:00 +01:00
Edward Dean
bee7416b08 Feature/hello world kernel land, closes #3 (#4)
* prints hello world

* Builds with the zig build system
2019-04-17 17:40:26 +01:00