Age | Commit message (Collapse) | Author |
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
In the previous implementation, passing 0 or values higher than
'hc->maxports' would not be filtered and would result in
underflow/overflow
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Implement a new xhci_stop_hc() an call it before we perform a reset. We
cannot be certain that the firmware (e.g., UEFI, BIOS) took the care to
stop the xHCI before passing control over to us.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Do not return an error in xhci_start_hc() if it is already running as it
complicates things.
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>
|
|
The DCBAA has indexing that starts at zero so 1 must be added to make it
correct.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit adds ACPI address space ID (not to be confused with virtual
memory ASIDs) definitions as well as ones describing various access
sizes.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce the 'hw.machine' sysctl variable to represent the current
machine architecture.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Byte count returned must be the number of bytes read() which may be less
than the number of bytes actually requested.
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 introduces the 'kern.hostname' sysctl variable to store the
machines hostname.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
When setting sysctl variables from userspace, the 'old' fields will
unused and thus typically be set to NULL. This commit modifies the
behaviour of do_sysctl() to enable this.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Since we are approaching the point to where we'll need to set sysctl
variables from userspace. It would be a wise idea to actually set the
length of the new data.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce the sysctl_clearstr() function to clear string variables that
aren't readonly to a known state.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The strlen() function does not count the null terminator when measuring the
length of the string and therefore a value of 1 must be added to do so.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
|
|
A backtrace usually occurs during critcal system events like panics.
When the system in a error state, we cannot trust the correctness of the
stack. This commit aims to improve checks done in a731d4e by adding a
max frame depth that limits how many frames can be walked.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Improve handling within the stacktrace logic used during system panics
and critical events.
- Perform checks on 'rbp' *before* logging
- Ensure RBP is 8-byte aligned
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Improve handling within the stacktrace logic used during system panics
and critical events.
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 implements the POSIX setsockopt syscall so that user
programs may be able to configure sockets they have created.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit implements proper timeout handling for recv(). Previously,
the recv() syscall would yield the current process forver until data is
available to be read. Obviously, that is not the most ideal as it is not
uncommon for programs to try seeing if any data exists on the socket
before deferring to perform some other task until data arrives.
The basics of how this work is that we try reading data off of some
specified socket. However, if no data is present, we must wait for the
given timeout value before attempting to read again.
While this is pretty effective and works perfectly fine as of now, it
might be worth optimizing this later to allow that timeout period to be
somehow "interrupted" by data arriving at a socket so that the program
does not have to defer execution for the full wait-period.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
This commit introduces the kernel-side implementation of setsockopt()
for setting options on a socket file descriptor. See POSIX
setsockopt() for more information.
https://pubs.opengroup.org/onlinepubs/9690949499/functions/setsockopt.html
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce a new sched_suspend() function that allows the caller to
suspend themselves (equivalent to a yield) for a specified amount of
time described by a 'timeval'.
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>
|
|
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>
|