Age | Commit message (Collapse) | Author |
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add ctlfs entry for DMI to allow for easy system information from
userspace by reading '/ctl/dmi/*'. This commit implements a ctlfs
node that reports information about the host board.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add DMI helper to grab processor version string
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Zero new control buffer before usage
- Block if the control message queue is empty
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>
|
|
This commit adds logic to socket() that creates a temp file that
represents it.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Keep track of the process that created a socket.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Update the signature of 'fd_get()', 'fd_alloc()' and 'fd_dup()' to
include a pointer to the process to target. This improves the
flexibility of the file descriptor API.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Ensure that the file descriptor represented by 'socket' is of type
AF_UNIX before performing the rest of recvmsg()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce initial implementation for out-of-band socket control messages
and an SCM_RIGHTS stub.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce copyin() and copyout() type functions made for iovec/uio
operation.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
See https://pubs.opengroup.org/onlinepubs/009695399/basedefs/sys/uio.h.html
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The machine word size describes how many bytes of data can be processed
at once. Add a per-arch M_WORD_SIZE constant to represent this platform
specific characteristic. This commit also adds an MALIGN() helper macro
to sys/param.h which can be used for optimization purposes in cases
where you want data to be perfectly aligned on a machine word boundary.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce the following syscalls:
- SYS_socket
- SYS_bind
- SYS_recv
- SYS_send
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce initial support for POSIX sockets. This commit currently
implements the AF_UNIX family for IPC.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Allow specification of which process should be targeted for specific
operations.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces the initial implementation of Virtual System
Resources (VSRs). Virtual system resources enable specific subsystems to
control global state while the VSR acts as a middle man between the
process, and the actual resource itself. This allows the products of
certain operations to be routed to either the global state or a local
(per-process) "shallow copy" whose data and side effects are only
visible through that process. An example of something this would be
useful for is some sort of transparent access control mechanism where
if a process should not modify global system-wide state, it can at least
modify the state for itself.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Adds compatibility flags for c_iflag as well as improved documentation
for the defines.
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 reporting of the number of halted cores for the scheduler
accounting logic.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Give each core a bit that indicates whether the core is online or
halted. We also provide a cpu_halt() which marks the core as offline.
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>
|
|
When validating memory addresses coming from userspace, we currently
only check if it is within range of the program stack or data. However,
data may also be allocated in the heap which involves addresses stored
in the memory map ledger. In order for user programs to be able to pass
references to that kind of memory to syscalls, we must be able to check the
addresses against ledger entries as well.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Each core on the CPU gets one idle thread so that it is always up to
something. To ensure these threads are not bouncing wildly between cores
and are always ready for their respective processor to take when they
have no threads to grab. We must call proc_pin() on each for every
processor.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces support for pinning processes to specific cores
which can be useful for things like, keeping core-specific workthreads
running on their respective processors as well as mitigating very
specific cases of false-sharing and performance degradation caused by a
thread jumping between cores which requires cache-line entries to be thrashed
around between them. Threads pinned to a specific core will always see their
cached data in the same L1, L2, etc.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|