summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
26 hourskernel: accnt: Keep track of per-cpu statsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
26 hourskernel: Sort out switch MI/MD switch logicIan Moffett
Certain operations dealing with context switches are better off being implemented as machine dependent routines which allows us to be flexible with what we can do, as well as the extra benefit of requiring less workarounds to keep things MI. Signed-off-by: Ian Moffett <ian@osmora.org>
27 hourskernel: Move 'g_nthreads' to kern_accnt.cIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
27 hourskernel: Add initial accounting logicIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
27 hourskernel: proc: Decrement proc count on exitIan Moffett
Previously, our process counter was monotonic (wuh oh!). We want to be sure that it decrements when a process exits. - Rename nthreads to g_nthreads as a global - Atomically increment on enter and decrement on exit Signed-off-by: Ian Moffett <ian@osmora.org>
28 hourssys: atomic: Add 64-bit operationsIan Moffett
- Add atomic_inc_64() - Add atomic_dec_64() - Add atomic_load_64() - Add atomic_store_64() Signed-off-by: Ian Moffett <ian@osmora.org>
29 hourskernel: filedesc: Ensure 'fd' is valid during r/wIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
32 hourskernel: et131x: Initialize internal RX/TX buffersIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
32 hourskernel: et131x: Disable loopbacks and watchdogIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: Add initial MII register defsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: et131x: Add initial MAC initializationIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: et131x: Create netcard state structIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: phy: Give more control over LED stateIan Moffett
Allow finer control over which LEDs to toggle and how they should be toggled. Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: phy: Add initial et131x sourcesIan Moffett
Refer to share/docs/hw/et131x.txt Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel/amd64: Track interrupt countIan Moffett
Keep track of how many times an interrupt fires, this can be used for interrupt statistics later on. Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel/amd64: Get CPU family + modelIan Moffett
The CPU family ID and model number are sometimes useful in order to detect the presence of certain CPU features as well as detecting CPU specific quirks. Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel/amd64: cpu_check_feat() -> cpu_get_info()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel/amd64: Add I8042_POLL kconf(9) optionIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: Move crypto specifics to sys/crypto/*Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: sched: Ensure 'ci' is not NULLIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: exit: Detach console on exitIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: time: Leave interrupts be on sleepIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel/amd64: Return NULL if IA32_GS_BASE is unsetIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: Avoid using kprintf() during panicIan Moffett
Avoid using kprintf() during a system panic event as it relies on internal locking that may hang the system preventing diagnostics from being logged Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: Make panic screen configurableIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: limits: Add NAME_MAXIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: vnode: Refactor definitionsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: initramfs: Set file mode to OMAR modeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: initramfs: Use OMAR rev 2 (latest)Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel/amd64: i8042: Decode ESCAPE keyIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel/sched: Undo sched_yield() changesIan Moffett
- Keep old sched_yield() logic as newer logic caused issues on QEMU - TODO: Actually fix and test Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: exit: Clear out file descriptors on reapIan Moffett
Ensure all file descriptors are freed and their respective vnodes released. Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: sched: Greatly simplify yield logicIan Moffett
The purpose of yielding to the scheduler is to tell it you want to preempt early in order to not starve processes while waiting for I/O. We can trigger the timer earlier on for stability as a ~10 usec delay should not be too terrible. Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: cons: Remove problematic lockIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: ucred: Add SYS_getuidIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: dev: Add /dev/randomAlex Funo
Introduce a prototype cryptographically secure (?) random number generator. The RNG uses ChaCha20 seeded with a SipHash-processed entropy pool. Entropy is collected only at read time and is mixed into the internal pool before each ChaCha20 reseed. The design is still experimental. Signed-off-by: Alex Funo <frost@osmora.org> Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: proc: Add cred per processaIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: cred: Introduce SYS_setuid syscallIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: proc: Add initial setuid()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: Add uid_t in sys/types.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: Add sys/ucred.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: exit: Panic if PID 1 diesIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: cons: Use glyph relative pos in cons attrIan Moffett
- Make curs_col/curs_row reference console_attr.cursor_x/cursor_y - Console cursor x/y attributes reflect x/y multiplied by glyph dimensions Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: nvme: Pack nvme_smart_data structIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: nvme: Add SMART + logpage supportIan Moffett
- Implement nvme_get_logpage() routine - Add SMART data structure - Implement basic controller + namespace temperature detection Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: string: Escape '%' with "%%"Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: dmi: Ensure header base is virtualIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: cons: Introduce /ctl/console/attrIan Moffett
In a lot of existing systems, ANSI escape sequences are used to control console attributes such as cursor position, style, etc. However, too many sequences for too many things are implemented at once. If a program has neglected to properly sanitize input coming in (e.g., from a network). Stray sequences may be injected into the receiving console. One may disable the ANSI state machine using the 'ansi_esc' bit within /ctl/console/feat, completely eradicating such issues, while being able to still control various console attributes through /ctl/console/attr. This commit also keeps the builtin ANSI escape sequence parser as simple as possible. Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: ansi: Remove stray newlineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: ansi: Clear screen with "\033[2J"Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>