summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2021-08-03remove the dummy kernel testdzwdz
what's the point, we have real tests now
2021-08-03fix inconsistent semicolonsdzwdz
2021-08-03kernel: implement static_strcmp()dzwdz
will be used to test functions operating on strings
2021-08-03kernel: implement memcmpdzwdz
2021-08-03a bad testing frameworkdzwdz
2021-08-03put the NUM2STR macro in util.hdzwdz
i'll use it outside of panic.h
2021-07-31try documenting the syscalls (and fail badly)dzwdz
2021-07-31change the syscall naming convention; same one in kernel and userlanddzwdz
2021-07-31kmalloc() and kfree() stubsdzwdz
2021-07-26rename process_new() to process_seed()dzwdz
it's only meant to create the root process, the old name could've been misleading
2021-07-26exit() now switches to the first running processdzwdz
i used a linked list because it's the simplest way to implement this
2021-07-26fork() pt 1: cloning process memorydzwdz
2021-07-26mark sc_exit() as noreturndzwdz
gets rid of the double panic() call
2021-07-25print a heart on bootdzwdz
2021-07-24fix some warningsdzwdz
2021-07-24simplify the struct copy in sysexit()dzwdz
2021-07-24sysenter: save the registers into _sysexit_regs, makes the code cleaner (imo)dzwdz
2021-07-24merge the `register` and `register_pushad` structsdzwdz
2021-07-24sysexit() now overrides all registersdzwdz
when doing anything more complex than starting a new program, you pretty much need to pass a full register dump. otherwise stuff will break
2021-07-24remove sysenter_setup from arch/generic.h - it's not even useddzwdz
2021-07-24save all registers on syscallsdzwdz
2021-07-23add a barebones exit() syscalldzwdz
2021-07-23update the process' EIP/ESP when it syscallsdzwdz
2021-07-22don't map the VGA console buffer in user processesdzwdz
2021-07-22disable paging when handling interruptsdzwdz
The kernel code assumes that paging is always disabled. I've also added a bit of comments to the assembly / ruined the git blame.
2021-07-22implement the debuglog() syscalldzwdz
2021-07-21syscall parameter & return value passingdzwdz
Sadly, sysenter on i386 limits me to only 4 arguments (so, 1 for the syscall id + 3 real args). If that turns out to be an issue I'll either just switch to interrupts, or switch to x64.
2021-07-21barebones syscalldzwdz
2021-07-21fix init stack alignmentdzwdz
2021-07-21fix sysenter()'s stack argumentdzwdz
It was taken from the wrong place - also I don't think that functions should change their EIP in the first place?
2021-07-21simplify the IDT generationdzwdz
2021-07-21create ISR stubs, which call a single main isr handlerdzwdz
quick explaination of how this even works: The `call` in each stub pushes its own address onto the stack before calling stage2. We can substract the address of the 0th ISR to get the offset, which we then divide by the size of each stub to get the index.
2021-07-20remove an already finished TODOdzwdz
2021-07-20per-process virtual memorydzwdz
VGA is only mapped into the virtual memory because there are no other ways of interacting with the OS.
2021-07-20rename pagedir_use() to pagedir_switch()dzwdz
imo "use" was slightly misleading
2021-07-20only enable paging when jumping into ring 0dzwdz
The kernel can't use the limited paging tables of user processes. Alternatively, sysenter could accept a parameter with a new cr3. That would allow/require using paging in the kernel - so I'll switch to it later, but I want to get other stuff done first.
2021-07-20global PAGE_MASK definedzwdz
it's pretty useful, so it makes sense to define it alongside PAGE_SIZE
2021-07-19fix some style inconsistentiesdzwdz
2021-07-19remove the unused r3_test functiondzwdz
2021-07-19very basic pagingdzwdz
2021-07-19add a page fault handlerdzwdz
2021-07-18basic executable loadingdzwdz
2021-07-18clean up the linker script, remove duplicate labelsdzwdz
2021-07-18fix most current compiler warningsdzwdz
stack_top got changed into a char, because `extern void` isn't even valid. others are self-explanatory
2021-07-18move the kernel linker script to src/kernel/dzwdz
2021-07-18move all kernel sources to src/kernel/dzwdz
2021-07-17detect the highest used memory address, and only allocate pages above itdzwdz
2021-07-17Revert "debug code, verifies if the memory gets set up correctly"dzwdz
not meant to be in the main tree, included for completeness
2021-07-17debug code, verifies if the memory gets set up correctlydzwdz
i guess that i can include this for completeness. if not for the awful pointer printing thingy this could probably get into the main version. TODO?
2021-07-17basic boot module supportdzwdz
This loads a file from the boot disk into memory. Currently it just gets printed, but it's going to become a real executable soon.