Age | Commit message (Collapse) | Author |
|
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>
|
|
- Add atomic_inc_64()
- Add atomic_dec_64()
- Add atomic_load_64()
- Add atomic_store_64()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Allow finer control over which LEDs to toggle and how they should be
toggled.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Refer to share/docs/hw/et131x.txt
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- 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>
|
|
Ensure all file descriptors are freed and their respective vnodes
released.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- 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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Implement nvme_get_logpage() routine
- Add SMART data structure
- Implement basic controller + namespace temperature detection
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Early userspace *may* rely on storage drivers. If they attempt to access
them before they are set up, things can go south.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Section 3.3.11 of the AHCI spec states that software must leave the DET
field set for a minimum of 1 milisecond. Most hardware conforms to this.
Previously, our buffer time was way too high and would slow down the
time it takes for the AHCI driver to finish initialization. If any SATA
drive takes longer than this to start up, fuck it, something is wrong
with it.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
When going through each node in the tmpfs namespace, 'dirent' will be
NULL if nothing was found. This commit fixes a bad check where we were
using the wrong pointer.
Signed-off-by: Ian Moffett <ian@osmora.org>
|