summaryrefslogtreecommitdiff
path: root/sys/include
AgeCommit message (Collapse)Author
6 dayskernel/amd64: pmap: Add PTE dirty bit handlingIan Moffett
Add support for managing the page table entry dirty bit. This will allow vm(9) to know when to page-out data to backing store, among other things. Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel/amd64: Add support for TLB shootdownsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel/amd64: cdefs: Add __invlpg() asm wrapperIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel/amd64: mp: Keep track of CPUs by indexIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: spawn: Add support for SPAWN_WAIT flagIan Moffett
Add SPAWN_WAIT flag that causes spawn() to wait until the child process completes. Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: proc: Add proc_reap() for zombies, etcIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: proc: Add PROC_SLEEP to pause threadsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: sched: Add sched_switch_to()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: proc: `spawn_data' -> `data'Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: drivers: Add missing whitespaceIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel/amd64: hpet: Add hpet_time_nsec()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: drivers: Add DRIVER_DEFER() macroIan Moffett
- Add DRIVER_DEFER() macro to schedule initialization for lower priority drivers - Expose `proc0' to the rest of the kernel Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: syslog: Handle userspace kmsg loggingIan Moffett
- Add USER_KMSG option to configure if kernel messages should be logged in user contexts - Add syslog_silence() to silence kernel messages in user contexts if USER_KMSG is "yes" Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: proc: Store kernel thread flag in `proc'Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: exit: Handle killings of kernel threadsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: disklabel: Improve clarityIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: Add initial installer implIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: Add md_halt()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayssys: Add initial sys/disklabel.hIan Moffett
Adds initial sys/disklabel.h header which describes the ODT (OSMORA Disk Table) Signed-off-by: Ian Moffett <ian@osmora.org>
12 dayssys: cdefs: Add __used attributeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
12 dayskernel: devfs: Add callback to request block sizeIan Moffett
Add bsize() callback within the bdevsw structure. This returns the number of blocks a block device supports at maximum. This result is *not* in bytes. Signed-off-by: Ian Moffett <ian@osmora.org>
12 dayskernel: ahci: Detect max SATA sector countIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
12 dayskernel: devfs: Detect block devicesIan Moffett
This commit also adds the S_IFBLK flag in sys/stat.h Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-22kernel: Optimize console & loggingQuinn Stephens
* Modified draw loops to use `fbdev_get_index()` less often. * Created `cons_fast_putch()`, then used it to implement `cons_putch()` and `cons_putstr()`. This way, when printing an entire string, the lock acquire/release and cursor hide/show will only happen once, instead of once per character. * Modified `syslog_write()` to use `cons_putstr()`. Signed-off-by: Quinn Stephens <quinn@osmora.org> Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-22kernel: ahci: Create a DCDR per HBA deviceIan Moffett
Optimize reading of logical blocks within SATA drives by giving each device descriptor a drive cache descriptor ring. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-22kernel/amd64: Improve GDT implementationQuinn Stephens
* Switched to using macros for the GDT entry bits, to improve clarity and make the code easier to modify. Also got rid of some junk values in a few of the entries. * Shrunk the GDT data array from 256 entries to 7 (GDT_ENTRY_COUNT) since the GDT will only ever use 7 of the entries for now. * Aligned the GDT using __cacheline_aligned, because the GDT entries will be read every time a segment selector is loaded. * Modified code dealing with the GDTR to just use `g_gdtr`, since the same GDT/GDTR is always used. * In `gdt_load()`, changed `eax` -> `ax`, since segment registers are only 16 bits. Also replaced the `gdtr` to just use `g_gdtr`. Additionally, used the inline assembly formatting to supply segment selectors with KERNEL_CS/DS macros. Signed-off-by: Quinn Stephens <quinn@osmora.org> Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-21kernel: xhci: Add runtime register offset definesIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-19kernel/amd64: Deprecate intr_alloc_vector()Ian Moffett
Replace intr_alloc_vector() with a cleaner and more machine independent intr_register() Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-19kernel: syscall: Add SYS_reboot syscallIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-19kernel/amd64: Add reboot RESET and POWEROFF flagsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-19kernel: acpi: Add acpi_sleep()Ian Moffett
Introduce function for calling ACPI \\_S<n> objects via uACPI Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-19kernel: sched: Rewrite context switch logicIan Moffett
Simplify and improve context switch logic, also stops the LAPIC from being spammed with register accesses. This also updates the default quantum to 9000 us to avoid cache thrashing and all kinds of other nasty things. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-17kernel: acpi: Add uACPI portIan Moffett
See https://github.com/uACPI/uACPI/ Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-17kernel: pci: Add pci_add_device()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-17kernel: pci: Add segment fieldIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-17kernel: acpi: Add acpi_rsdp()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-17kernel/amd64: ioapic: Do not include acpi/tables.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-17kernel: Add compat headersIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-17kernel: lib: Add memmove()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-17kernel: sched: Add sched_detach()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-16kernel: cons: Add lock to console bufferIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-16kernel/amd64: trap: Clear interrupts on trap entryIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-16kernel: Add cpu_halt_others() and harden panic()Ian Moffett
Ensure interrupts are disabled at the start of panic() to prevent any interrupts from further degrading the state of the system. Also adds a newline before "panic: " to clean up the logs. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-16kernel: spawn: Add proper spawn impl + SYS_spawnIan Moffett
This commit introduces a more complete spawn implementation as well as the SYS_spawn syscall and a libc interface. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-16kernel: proc: Handle parent exitIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-15kernel: proc: Do not introduce fork()Ian Moffett
Simplicity is divine, fork() may be powerful but is no longer simple. It became a thing in the late 70s during the early days of UNIX when computing was simple, when CPUs were only 16-bits, MMUs were not prevalent and RAM was only 512 KB. However it isn't 1971 anymore, process management, CPUs and memory architecture has advanced significantly since. This commit ceases work on the fork() syscall as implementing it would only introduce unnecessary complexity, security issues, hefty processing overhead and would perpetuate what should now be considered legacy. The current best alternative would be providing a form of process spawning as well as a mechanism to wait for the child process to complete. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-15kernel: syscall: Check for _OLIBC or _KERNELIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-14kernel: mach: Add TF_IP() macroIan Moffett
Add TF_IP() to extract the instruction pointer from a trapframe between architectures. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-14kernel: ahci: Add /ctl/sdx/bsize control fileIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-05-14kernel: ahci: Include sys/device.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>