Skip to content

Release/v0.2#193

Merged
SamTebbs33 merged 78 commits intomasterfrom
release/v0.2
Jul 21, 2020
Merged

Release/v0.2#193
SamTebbs33 merged 78 commits intomasterfrom
release/v0.2

Conversation

@SamTebbs33
Copy link
Collaborator

This release has a heavy emphasis on memory management, a preqreuisite for more complex functionality in the kernel. A highlight was finally merging multitasking support.

Features:
* Physical memory manager (#104)
* Running unit tests on the target architecture (#122)
* x86 real-time-clock (#123)
* Formatting as part of the build process (#124)
* Virtual memory manager (#128)
* Using /usr/bin/env bash instead of /bin/bash in makeiso.sh (#131)
* Multitasking (#138)
* Virtual filesystem (#139)
* Logging CPU state on a page fault (#140)
* Target architecture option for build.zig (#168)
* Heap allocator (#183)
* Comptime-capable bitmap (#188)

Bug fixes:
* Keeping the stack section intact (#126)
* Write full symbol name to the kernel symbol file (#144)
* Change integer types to usize for 64-bit scaling (#146)

Miscellaneous:
* Run CI checks on PRs and pushes (#132)
* Removal of start.asm and start.s (#151)
* Delegate boot module and memory initialisation to the architecture (#149)
* Move of the linker script to the architecture folder (#153)
* Delegate serial initialisation to the architecture (#157 and #159)
* Delegate TTY initialisation to the architecture (#163)
* Replace python runtime testing to zig (#164)

SamTebbs33 and others added 30 commits January 7, 2020 16:10
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
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
Added cpu model


Moved logging to defer done log

Moved mem.init to bottom

Updated again to new zig master
Run CI checks on pull requests and pushes
use /usr/bin/env bash instead of /bin/bash
Add VMM start address to allocation result
Moved CR assembly to arch file


Fixed new line


Moved control registers from arch to paging
SamTebbs33 and others added 25 commits June 22, 2020 18:58
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
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
…ions

Use the standardTargetOptions for built targets
Set the kernel VMM start address to the virtual address offset
…locations

Insert the correct address into the allocations map
This allows for a bitmap that doesn't need an allocator.
Replace buddy allocator with free list allocator
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
@SamTebbs33 SamTebbs33 requested a review from DrDeano July 20, 2020 16:49
Copy link
Member

@DrDeano DrDeano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is 0.2 lol not 0.3.

@SamTebbs33 SamTebbs33 merged commit 2042b85 into master Jul 21, 2020
@SamTebbs33 SamTebbs33 deleted the release/v0.2 branch July 21, 2020 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants