Age | Commit message (Collapse) | Author |
|
Deprecate SPAWN_WAIT in favor of waitpid()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add waitpid() in preparation of deprecating SPAWN_WAIT.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
It is a good idea to have a completely different stack during syscalls.
This commit implements a TSS IST entry for syscalls.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
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>
|
|
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>
|
|
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>
|
|
- 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>
|
|
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>
|
|
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>
|
|
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 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>
|
|
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>
|
|
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>
|
|
The 'len' field within the tmpfs node stores the buffer length which is
relative to the tmpfs block size. Introduce a real size which returns
the amount of data actually present within those buffers.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The SYS_inject syscall will allow the user to inject Kernel Runtime Quantums
(KRQs) into the running kernel. As of now, set paths are not supported and the
initial implementation includes a NULL path used to load all deferrable drivers.
Previously during kernel startup, all deferrable drivers were loaded
automatically. This commit makes it so that they are only loaded when
sys_inject() is called with a NULL path.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces the global libc '__libc_auxv' containing
auxiliary vector entries as per the System V Application Binary
Interface
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Implement logic to go through the section header table and explicitly
zero fill all entries of type SHT_NOBITS
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce the initial support for tmpfs, a readable and writable in-memory
filesystem.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add support for the O_CREAT flag which allows file creation upon an
open() call.
Signed-off-by: Ian Moffett <ian@osmora.org>
|