Commit graph

313 commits

Author SHA1 Message Date
Sam Tebbs
028dd60a60
Merge pull request #225 from ZystemOS/feature/zig-update
Update to zig master
2020-08-23 14:58:54 +01:00
Sam Tebbs
b7c3084f09 Fix for TailQueue and std.log changes 2020-08-23 14:42:56 +01:00
Sam Tebbs
fb66e2795f
Merge pull request #221 from iamgweej/bugfix/vfs
Added file closing in VFS functions
2020-08-16 11:47:19 +01:00
iamgweej
34bc8d0ae1 Added file closing in VFS functions 2020-08-16 11:43:29 +01:00
Sam Tebbs
4cdc6e47ce
Merge pull request #222 from ZystemOS/feature/zig-update
Add new parameters for resize and alloc
2020-08-15 21:39:22 +01:00
Sam Tebbs
95885f4407 Add new parameters for resize and alloc 2020-08-15 21:35:31 +01:00
Sam Tebbs
651e07146d
Merge pull request #204 from ZystemOS/feature/x86-keyboard
Keyboard
2020-08-06 19:45:23 +01:00
Sam Tebbs
73d0b2fd3d Add keyboard and an x86 driver 2020-08-06 19:40:24 +01:00
Edward Dean
b8a47d6e08
Merge pull request #219 from ZystemOS/feature/initrd-use-FixedBufferStream
Feature/initrd use fixed buffer stream
2020-08-06 18:17:33 +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
Sam Tebbs
f9244c63cd
Merge pull request #213 from ZystemOS/feature/vmm-convert-addr
Add physToVirt and virtToPhys to VMM
2020-08-03 17:56:10 +01:00
Sam Tebbs
e914841ade Add virtToPhys and physToVirt 2020-07-30 09:18:01 +01:00
Sam Tebbs
80e80da830
Merge pull request #210 from ZystemOS/bugfix/map_dir_entry-override-attrs
Don't override attributes when creating a new paging table
2020-07-26 19:34:20 +01:00
Sam Tebbs
154f7c6d6c Don't override attributes when creating a new paging table 2020-07-26 14:30:52 +01:00
Edward Dean
b4cab2922c
Merge pull request #208 from ZystemOS/bugfix/paging-map-4MB-boundary
Bugfix/paging map 4 mb boundary
2020-07-26 13:26:32 +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
Edward Dean
18284daaa1
Merge pull request #202 from ZystemOS/feature/initrd
Feature/initrd
2020-07-25 11:23:50 +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
Edward Dean
7b4a5e97aa
Merge pull request #206 from ZystemOS/bugfix/vmm-map-correctly
Bugfix/vmm map correctly
2020-07-24 23:54:03 +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
Edward Dean
fde6894bf2
Merge pull request #203 from SamTebbs33/feature/move-to-std.log
Move to std.log
2020-07-23 20:51:57 +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
Edward Dean
387d02f439
Merge pull request #200 from SamTebbs33/bugfix/symbol-name
Add newline parsing for symbol map name
2020-07-23 11:55:34 +01:00
DrDeano
6bca2de1c6
Add newline parsing
The symbol name can have spaces.
Changed the parseName to use the newline parsing.
Also used str.len

Missed whitespace => newline


Add a nothing to run release safe tests
2020-07-23 11:42:18 +01:00
Edward Dean
fd56aa0081
Merge pull request #198 from SamTebbs33/bugfix/heap-len-alignment
Fix the size alignment
2020-07-22 11:00:49 +01:00
DrDeano
f189fa8976
Fix the size alignment
The size alignment need to use alignAllocLen and not alignForward as the size align may not be a power of 2.
2020-07-22 10:35:47 +01:00
Edward Dean
7e0c1fd589
Merge pull request #138 from SamTebbs33/feature/initial_multitasking
Initial scheduler
2020-07-18 23:48:51 +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
20826548e8
Merge pull request #183 from SamTebbs33/feature/free-list-allocator
Replace buddy allocator with free list allocator
2020-07-14 19:49:55 +01:00
Sam Tebbs
6d4b3e90a4 Replace buddy allocator with free list allocator 2020-07-14 19:38:20 +01:00
Edward Dean
17f0892561
Merge pull request #188 from SamTebbs33/feature/comptime-bitmap
A comptime bitmap
2020-07-14 18:48:22 +01:00
DrDeano
8acf4e03cb
A comptime bitmap
This allows for a bitmap that doesn't need an allocator.
2020-07-13 23:49:41 +01:00
Sam Tebbs
c164f5ee4d
Merge pull request #186 from SamTebbs33/feature/zig-update
Zig update
2020-07-12 19:05:25 +01:00
Sam Tebbs
afcaf96e6e Replace var with anytype 2020-07-12 18:10:00 +01:00
Sam Tebbs
f0add1917c
Merge pull request #177 from SamTebbs33/bugfix/heap-free-too-many
Fix heap freeing one too many blocks
2020-07-08 15:35:23 +01:00
Sam Tebbs
f3ba8c3e05 Fix heap freeing one too many blocks 2020-07-08 15:31:14 +01:00
Sam Tebbs
676232af03 Merge pull request #179 from SamTebbs33/bugfix/vmm-correct-addr-in-allocations
Insert the correct address into the allocations map
2020-07-06 14:52:58 +01:00
Sam Tebbs
36a0f24fc8 Insert the correct address into the allocations map 2020-07-06 14:50:33 +01:00
Sam Tebbs
34d7bb6806
Merge pull request #181 from SamTebbs33/feature/zig-update
Update for latest zig
2020-07-06 14:23:53 +01:00
Sam Tebbs
d60164bec6 Update for latest zig 2020-07-06 14:17:59 +01:00
Sam Tebbs
7204c422e0
Merge pull request #180 from SamTebbs33/feature/update-allocator-interface
Update to new allocator interface
2020-07-01 23:31:57 +01:00
Sam Tebbs
04896f1168 Update to new allocator interface 2020-07-01 22:33:08 +01:00
Sam Tebbs
e9fd88c96d
Merge pull request #175 from SamTebbs33/bugfix/vmm-start-address
Set the kernel VMM start address to the virtual address offset
2020-06-24 21:09:26 +01:00
Sam Tebbs
e7635142ed Fix the kernel VMM start address 2020-06-24 20:59:29 +01:00
Edward Dean
2d3ea3a81b
Merge pull request #168 from SamTebbs33/feature/add-standardTargetOptions
Use the standardTargetOptions for built targets
2020-06-23 13:00:23 +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
Edward Dean
10bf2439d9
Merge pull request #164 from SamTebbs33/feature/replace-python-rt-with-zig
Replace python rt with zig
2020-06-23 12:47:04 +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
d6d99ef667
Merge pull request #139 from SamTebbs33/feature/virtual-fs
Virtual filesystem
2020-06-22 19:02:42 +01:00
Sam Tebbs
28128dd18a Add virtual filesystem 2020-06-22 19:00:13 +01:00