Commit graph

56 commits

Author SHA1 Message Date
DrDeano
fab372a6cf
Initial FAT32 interface
Include code page 437

This is now moved to a better location

Fixed initrd doc for allocator


Added test files

 Plus minor extras

Created initial FAT32 filesystem

This initial FAT32 filesystem will parse a stream, which could be a HDD or a in memory filesystem and produce a FAT32 filesystem. This will check if the raw bytes is a valid FAT32 filesystem as descibed in the spec.

This is only a skeleton with no open, read or write functionality.

Part of #216

logger -> log


Fmt


Removed 'zero_' from struct fields


number_free_cluster -> number_free_clusters


Return non allocated FAT32FS


prefix test_


Added doc comment for boot sector arrays


Moved code_page.zig


info -> debug for init FAT32


Abstracted getting code page table
2020-11-22 21:37:39 +00:00
Sam Tebbs
6bbdadfa94 Rework copyDataToVMM to work in both directions 2020-11-20 17:44:01 +00:00
Sam Tebbs
307ea7a52e Add user mode 2020-11-07 09:00:10 +00:00
Sam Tebbs
238e050c8c Check for memory leaks in all tests that allocate memory 2020-11-05 18:50:55 +00:00
DrDeano
8f0961bb3f
imported gitignore
Added binaries
2020-10-19 09:09:03 +01:00
DrDeano
abc712233b
Initial PCI interface
Closes #244

Move PCI to arch

Plus spelling

Added new out and in functions


Added new out and in to mocking


Return pci devices as a list


Improved comment


Removed mask for the return


Removed type for OUT


Added new types
2020-10-10 00:35:20 +01:00
DrDeano
7cafcec49e
Generate the mocking framework (a bit)
Instead of adding new types in 5 different places, this adds a generation tool that you add the type once and it will be populated in the framework for you.
This is defo one of those over engineered projects, but I had fun making it.

Replaces empty spaces with const


Refactor spaces
2020-10-10 00:25:09 +01:00
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
c60efc5239
Tidy up the mocking framwork
Closes #69
Lol 69, I am a child
2020-09-23 15:58:47 +01:00
Sam Tebbs
1a74b085b8 Use vmm.virtToPhys in x86 paging 2020-08-25 17:43:07 +01:00
Sam Tebbs
b7c3084f09 Fix for TailQueue and std.log changes 2020-08-23 14:42:56 +01:00
Sam Tebbs
73d0b2fd3d Add keyboard and an x86 driver 2020-08-06 19:40:24 +01:00
DrDeano
1ea9dbe79d
Fix mapping of addresses that span the 4MB boundary
Also removed unused variables

Fixed unmapping of addresses that span the 4MB boundary


Fixed clearing directory


Fmt


Improved paging maps and unmaps
2020-07-26 13:21:06 +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
1030633d1d
WIP
Page fault loop

Fixed up the virtual memory mapping

Removed un-used parameters in arch.init
Some doc comments
Name changes
2020-07-24 23:51:27 +01:00
DrDeano
fbd135c437
Move to std.log
Removed nothing to pass tests


Removed log imports

Plus some spelling
2020-07-23 20:47:56 +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
Sam Tebbs
afcaf96e6e Replace var with anytype 2020-07-12 18:10:00 +01:00
Sam Tebbs
d60164bec6 Update for latest zig 2020-07-06 14:17:59 +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
e2533a2264 Move tty to arch 2020-06-18 22:19:41 +01:00
Sam Tebbs
5101990044 Pass boot payload to serial init 2020-06-12 11:48:36 +01:00
Sam Tebbs
256e5fe245 Set arch in rt-test.py 2020-06-09 13:49:47 +01:00
Sam Tebbs
ecc3de413c Make serial arch-dependent 2020-06-07 17:38:42 +01:00
Sam Tebbs
554b9706f2 Abstract away boot modules and memory map 2020-05-30 23:24:45 +01:00
DrDeano
a432e45e9d
zig fmt 2020-05-14 23:01:05 +01:00
Sam Tebbs
f5a22fdd4b Add heap allocator 2020-05-06 23:19:11 +01:00
Sam Tebbs
02ce6a5923 Add virtual memory manager 2020-04-14 03:58:25 +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
DrDeano
7ab180f622
Added RTC
Added I/O waits to PIC remapping

Added fmt step to build 

When building will format all the code to the standard

Fixed cascading interrupts

Re-named to selectAnd*Register. Moved switching on registers into emun


Removed build fmt step
2020-01-15 19:50:47 +00:00
Sam Tebbs
7043ccd6b9 Add a physical memory manager 2020-01-09 12:47:05 +00:00
Sam Tebbs
33136033c1 Update calling convention syntax 2020-01-07 13:30:54 +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
Sam Tebbs
7b2d4c1190 Fix T() style casts 2019-11-10 22:07:20 +00:00
Sam Tebbs
01490f051c Load grub modules on mem init 2019-11-08 22:09:01 +00:00
ED
89a1873e7c No more assembly
Pure zig
Added doc comments


Feedback
2019-11-06 21:31:44 +00:00
ED
419d8ad585 Added run time tests for PIT
Also changed the TTY a bit
Merged new run time testing


Code layout change


Feedback


Feedback 2
2019-11-06 21:21:27 +00:00
Sam Tebbs
36aeced2c3 Add log tests 2019-10-25 20:08:59 +01:00
Sam Tebbs
35b76d5f1c Add serial tests 2019-10-15 17:20:22 +01:00
Sam Tebbs
a3b565629e Stop rt-test script from hanging 2019-10-06 20:54:39 +01:00
ED
2906d6ca13 Added unit and runtime tests
Also changed up panic call
Fixed rebasing


Feedback
2019-10-06 17:40:12 +01:00
ED
42bdbf6b7f Added unit and runtime tests
Also fixed some typos
Also changed the panic a bit
Removed changed to unnecessary files


Fixed merge


Feedback


Fixed tests
2019-10-05 20:46:31 +01:00
Sam Tebbs
7fb55437e3 Add x86 paging runtime tests 2019-10-01 23:08:19 +01:00
ED
2a0c2e4708 Added unit tests for PIC
Removed I/O wait as it isn't needed and uses the syscall interrupt.
Added runtime tests

Fixed styling for TTY
Fixed runtime tests


Now they are fixed
2019-10-01 17:59:42 +01:00
ED
60164d9252 Added runtime tests for TTY
Removed types
Styling
Added printing error and multi line string for logo


Fix panic after rebase
2019-10-01 11:52:23 +01:00
ED
420a09f039 Added runtime tests for VGA
Added doc comments as well
A little refactor of code
Reordered


Removed types
2019-09-29 12:55:34 +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