summaryrefslogtreecommitdiff
path: root/src/kernel/arch/i386
AgeCommit message (Collapse)Author
2021-10-05kill the process that caused an exception instead of panickingdzwdz
2021-10-02implement serial/tty inputdzwdz
2021-10-02serial: implement a selftestdzwdz
2021-10-02rename kernel/arch/log.h to io.hdzwdz
it's not related to logging but to general io, the old name didn't make sense
2021-09-21start using sparse's `-Wnon-pointer-null`dzwdz
While I personally don't see a reason to use NULL instead of 0, I assume that whoever made that a sparse default knew what they were doing.
2021-09-21start using sparse's `-Wdecl`dzwdz
2021-09-20create a few specialized panic()sdzwdz
thanks to this i can tell which ones are placeholders, and which ones should stay
2021-09-19call sysenter_setup before kmain_earlydzwdz
makes the code slightly simpler, imo
2021-09-18merge `kernel/types.h` and `init/types.h`dzwdz
2021-09-14merge the `syscall_handler` and `_syscall` declarationsdzwdz
i think that making the call a bit more "transparent" makes the code nicer
2021-09-14add support for 4-parameter syscallsdzwdz
2021-09-12log cr2 on page faultsdzwdz
2021-09-12make the inline functions staticdzwdz
otherwise this doesn't compile with -O0
2021-09-11replace `user_ptr` with a linux-style `__user` annotationdzwdz
2021-09-11fix the `sparse` warningsdzwdz
2021-09-05move most of the memory stuff to kernel/mem/dzwdz
2021-08-24switch to using user_ptr for pointers coming from userlanddzwdz
this avoid accidental dereferences, and now it's easy to tell apart which pointers are safe to directly read and which aren't. cons: - const is completely discarded
2021-08-24replace () with (void) in function definitionsdzwdz
`()` means that any amt of arguments will be accepted, which isn't what i want
2021-08-22kernel: implement assertdzwdz
2021-08-10statically assert that the pointer size == 4 bytesdzwdz
2021-08-09move the x86 port io code to a separate filedzwdz
2021-08-09print the boot heart on both VGA and serialdzwdz
2021-08-09vga tty: vga_putchar is now staticdzwdz
2021-08-09implement serial outputdzwdz
2021-08-09rename `log_` to `tty_`, `tty_` to `vga_`dzwdz
2021-08-09move all the tty stuff to a tty directorydzwdz
2021-07-26fork() pt 1: cloning process memorydzwdz
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-24save all registers on syscallsdzwdz
2021-07-23update the process' EIP/ESP when it syscallsdzwdz
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 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-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-19fix some style inconsistentiesdzwdz
2021-07-19very basic pagingdzwdz
2021-07-19add a page fault handlerdzwdz
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 all kernel sources to src/kernel/dzwdz