Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-09-14 | merge the `syscall_handler` and `_syscall` declarations | dzwdz | |
i think that making the call a bit more "transparent" makes the code nicer | |||
2021-09-14 | add support for 4-parameter syscalls | dzwdz | |
2021-09-12 | log cr2 on page faults | dzwdz | |
2021-09-12 | make the inline functions static | dzwdz | |
otherwise this doesn't compile with -O0 | |||
2021-09-11 | replace `user_ptr` with a linux-style `__user` annotation | dzwdz | |
2021-09-11 | fix the `sparse` warnings | dzwdz | |
2021-09-05 | move most of the memory stuff to kernel/mem/ | dzwdz | |
2021-08-24 | switch to using user_ptr for pointers coming from userland | dzwdz | |
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-24 | replace () with (void) in function definitions | dzwdz | |
`()` means that any amt of arguments will be accepted, which isn't what i want | |||
2021-08-22 | kernel: implement assert | dzwdz | |
2021-08-18 | "fix" _tty_hex and _tty_var | dzwdz | |
well i guess it compiles now | |||
2021-08-10 | fix typo referring to unexistent function | dzwdz | |
2021-08-10 | statically assert that the pointer size == 4 bytes | dzwdz | |
2021-08-09 | move the x86 port io code to a separate file | dzwdz | |
2021-08-09 | print the boot heart on both VGA and serial | dzwdz | |
2021-08-09 | vga tty: vga_putchar is now static | dzwdz | |
2021-08-09 | implement serial output | dzwdz | |
2021-08-09 | rename `log_` to `tty_`, `tty_` to `vga_` | dzwdz | |
2021-08-09 | move all the tty stuff to a tty directory | dzwdz | |
2021-07-26 | fork() pt 1: cloning process memory | dzwdz | |
2021-07-24 | fix some warnings | dzwdz | |
2021-07-24 | simplify the struct copy in sysexit() | dzwdz | |
2021-07-24 | sysenter: save the registers into _sysexit_regs, makes the code cleaner (imo) | dzwdz | |
2021-07-24 | merge the `register` and `register_pushad` structs | dzwdz | |
2021-07-24 | sysexit() now overrides all registers | dzwdz | |
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-24 | remove sysenter_setup from arch/generic.h - it's not even used | dzwdz | |
2021-07-24 | save all registers on syscalls | dzwdz | |
2021-07-23 | update the process' EIP/ESP when it syscalls | dzwdz | |
2021-07-22 | disable paging when handling interrupts | dzwdz | |
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-22 | implement the debuglog() syscall | dzwdz | |
2021-07-21 | syscall parameter & return value passing | dzwdz | |
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-21 | barebones syscall | dzwdz | |
2021-07-21 | fix sysenter()'s stack argument | dzwdz | |
It was taken from the wrong place - also I don't think that functions should change their EIP in the first place? | |||
2021-07-21 | simplify the IDT generation | dzwdz | |
2021-07-21 | create ISR stubs, which call a single main isr handler | dzwdz | |
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-20 | remove an already finished TODO | dzwdz | |
2021-07-20 | rename pagedir_use() to pagedir_switch() | dzwdz | |
imo "use" was slightly misleading | |||
2021-07-20 | only enable paging when jumping into ring 0 | dzwdz | |
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-20 | global PAGE_MASK define | dzwdz | |
it's pretty useful, so it makes sense to define it alongside PAGE_SIZE | |||
2021-07-19 | fix some style inconsistenties | dzwdz | |
2021-07-19 | very basic paging | dzwdz | |
2021-07-19 | add a page fault handler | dzwdz | |
2021-07-18 | clean up the linker script, remove duplicate labels | dzwdz | |
2021-07-18 | fix most current compiler warnings | dzwdz | |
stack_top got changed into a char, because `extern void` isn't even valid. others are self-explanatory | |||
2021-07-18 | move all kernel sources to src/kernel/ | dzwdz | |