summaryrefslogtreecommitdiff
path: root/src/kernel/arch/amd64/interrupts
AgeCommit message (Collapse)Author
2024-08-03kernel: send user interrupt on page faultdzwdz
I really should just rename interrupts to something else. This is inspired by Plan9 and meant to make debugging easier, as the dying process can take a stacktrace etc. It kinda sucks that the default handler now depends on fprintf, which is quite a bit of code, but whatever.
2024-08-02kernel/interrupts: use UserRegs in the isr handlerdzwdz
2024-07-25kernel: set up the GDT in assemblydzwdz
This is just for simplicity's sake. I think I could even omit the `movw $TSS, (GdtTss + 2)` and have the linker fill that out as a relocation, but that would probably be more complex overall.
2024-07-22kernel/isr: improve interrupt handling codedzwdz
On the assembly side, ensure the stack frame looks always the same, by pushing a fake "error code" for the interrupts that don't generate one. On the C side, use a struct instead of magic indices into an "array", and make it consistent with the current style.
2024-03-13kernel/amd64: print debugging info on NMIdzwdz
the vm isn't getting an NMI for any real reason anyways, so I might as well abuse it
2023-09-19kernel: use HPET timer for sleepsdzwdz
not strictly necessary, but this should improve: 1. sleep performance 2. power efficiency when idle
2023-08-13kern: undo accidentally commited debug codedzwdz
2023-08-06kernel: put every driver in /kdev/dzwdz
there's no real reason for bootstrap to be doing that, and this brings it closer to only doing the elf loading
2023-01-25kernel/irq: use a lookup table for irqsdzwdz
2023-01-25kernel: consolidate some header filesdzwdz
2023-01-25style: typedef structs, shorter namespacesdzwdz
I've wanted to do this for a while, and since I've just had a relatively large refactor commit (pcpy), this is as good of a time as any. Typedefing structs was mostly inspired by Plan 9's coding style. It makes some lines of code much shorter at basically no expense. Everything related to userland kept old-style struct definitions, so as not to force that style onto other people. I also considered changing SCREAMING_ENUM_FIELDS to NicerLookingCamelcase, but I didn't, just in case that'd be confusing.
2023-01-25kernel/virt: replace the virt_cpy api with a more foolproof onedzwdz
2022-09-01kernel: add a debug print for the amount of used memorydzwdz
2022-08-28kernel/amd64: SSE supportdzwdz
2022-08-17amd64: rtl8139 driver with basic rx supportdzwdz
2022-08-07kernel: ps2 mouse supportdzwdz
2022-08-04do some simple TODOs, organize the rest; general code maintainancedzwdz
2022-08-04syscalls: add _syscall_sleep()dzwdz
2022-08-03amd64: cleanup the irq code, #define the magic numbersdzwdz
2022-07-16amd64: back at the shell!dzwdz
2022-07-16amd64: init can print to the terminal nowdzwdz
2022-07-16amd64: seemingly working syscalls (SYSCALL/SYSRET)dzwdz
2022-07-16amd64: barely boot into kernel codedzwdz