Age | Commit message (Collapse) | Author |
|
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>
|
|
To make debugging userland program crashes easier, this commit
introduces coredumps that store the last known process state into a
temporary /tmp/core.X file (where X is the PID of the faulting process).
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Add support for 32-bit cyclic redundancy checks
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Allow the user to configure if SMEP would be enabled for their build of
the Hyra AMD64 port
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Some CPUs support Supervisor Memory Execution Protection that prevent ring 3
code from being executed in a ring 0 context. Enable this on CPUs that
support it.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Keep track of per-cpu features by using a 'feat' field which contains
the results of various CPUIDs.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
If we have never written to a tmpfs file, the buffer for it will have
never been allocated and that would lead to NULL pointer issues such as
system-wide crashes. Return zero bytes read if nothing was ever written.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
If multiple processes try to write to the console, a race condition
of sorts may occur. Similarly, if multiple processes try to read from the
console and contend with the console input buffer. One process may steal
keys from the other. Prevent this by implementing a mutex within the
console descriptor. Each time a process reads or writes the console, it
attaches itself. Any other processes attempting to read or write the
console while another is attached will be yielded to the scheduler
until the resource is free.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add mutex locks, these differ from spinlocks as they are named and also
yield to the scheduler instead of just spinning if the lock is acquired.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Sometimes one may not want *all* of the drivers to start up during
system boot. The driver blacklist allows one to mark a driver to be
ignored during startup.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Assign a name to each driver through the DRIVER_EXPORT() or
DRIVER_DEFER() macros. This can be used for blacklisting driver
startups.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a 'board_info' structure as well as an md_get_board() routine
to get information about the host
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add 'show_curs' feat flag to enable/disable whether or not the cursor
should be drawn
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a ctlfs entry for configuring various console features such as
the ability to parse ANSI escape codes.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit cleans up the read routine by creating a helper that fetches
common fields from the ctlfs entry while checking things such as its
magic number.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a 'feat' field in the cons_screen structure to allow certain
console features to be turned on or off.
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>
|