summaryrefslogtreecommitdiff
path: root/src/kernel/arch
AgeCommit message (Collapse)Author
2021-10-07kernel/i386: fix port_in16's return value sizedzwdz
2021-10-07kernel/i386: add 16bit port io functionsdzwdz
2021-10-07kernel/i386: rename the port io functions with their bit lengthdzwdz
2021-10-06kernel/i386: implement part of ATA IDENTIFYdzwdz
2021-10-05isr: simplify the exception handlerdzwdz
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-18"fix" _tty_hex and _tty_vardzwdz
well i guess it compiles now
2021-08-10fix typo referring to unexistent functiondzwdz
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-24remove sysenter_setup from arch/generic.h - it's not even useddzwdz
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