summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
40 hourskernel/amd64: Add support for coredumpsIan Moffett
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>
40 hourskernel: lib: Add CRC32 supportIan Moffett
- Add support for 32-bit cyclic redundancy checks Signed-off-by: Ian Moffett <ian@osmora.org>
43 hourskernel/amd64: conf: Add CPU_SMEP optionIan Moffett
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>
44 hourskernel/amd64: cpu: Support SMEPIan Moffett
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>
44 hourskernel/amd64: Add 'feat' field in cpu_infoIan Moffett
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>
44 hourskernel: tmpfs: Prevent read() on empty filesIan Moffett
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>
44 hourskernel: tmpfs: Do not NULL np->data during reclaimIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: Ensure mutually exclusive console accessIan Moffett
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>
3 dayskernel: devfs: Add block device stat mechanismIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: synch: Use md_pause() in spinwait loopIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: synch: Add mutual exclusion locksIan Moffett
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>
3 daysusr: libc: Add POSIX getpid() and getppid()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: proc: Add getpid() and getppid()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: driver: Implement driver blacklistIan Moffett
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>
3 dayskernel: driver: Assign names to all driversIan Moffett
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>
4 dayskernel/aarch64: Add 'board_info' structureIan Moffett
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>
4 dayskernel: console: Add 'show_curs' feat flagIan Moffett
Add 'show_curs' feat flag to enable/disable whether or not the cursor should be drawn Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: console: Remove extra newlineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: console: Introduce /ctl/console/featIan Moffett
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>
5 dayskernel: ctlfs: Implement ctlfs write() operationsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: ctlfs: Add ctlfs_get_ops() to fetch ctlopsIan Moffett
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>
5 dayskernel: console: Introduce cons_screen featuresIan Moffett
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>
5 dayskernel: cons_ansi: Use `scr' var for console callsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 daysdev: uacpi: Always include machine/intr.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: tmpfs: Add tmpfs getattr callbackIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: tmpfs: Add 'mode' field to tmpfs nodesIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: descrip: Return new offset in fd_seek()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: tmpfs: Store the *real* size in a nodeIan Moffett
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>
6 dayskernel: tmpfs: Remove debugging kprintf()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
6 dayskernel: vnode: Only include vm/*.h ifdef _KERNELIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: driver: Only init non-deferred driversIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: syslog: Remove unused variableIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: Introduce SYS_inject syscallIan Moffett
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>
7 daysusr.sbin: init: Allow start path to be overriddenIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: panic: Implement fresh panic screenIan Moffett
Clear the screen and tweak console foreground/background to urgent looking colors during a system panic Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: panic: Remove redundant newlineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel: syslog: Remove problematic lockIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/amd64: trap: Wrap regdump into a panic()Ian Moffett
- Rename regdump() to trap_fatal() - Use panic() rather than kprintf() Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/amd64: trap: Restore IPL during user trapsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 daysusr: libc: Store auxiliary vector tag/value pairsIan Moffett
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>
8 dayskernel: exec_elf64: Ensure '.bss' is zero filledIan Moffett
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>
8 dayskernel: cons: Handle horizontal tabs ('\t')Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel/amd64: mp: Give each core an idle threadIan Moffett
Having the same amount of idle threads per core allow the CPU to always have a thread assigned to one of its cores even when there are currently no other threads for it to take. Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: descrip: Validate operations against sealIan Moffett
Ensure file I/O operations match the seal that their respective file descriptors were set with. Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: Add initial support for tmpfsIan Moffett
Introduce the initial support for tmpfs, a readable and writable in-memory filesystem. Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskernel: vfs: Add support for O_CREAT flagIan Moffett
Add support for the O_CREAT flag which allows file creation upon an open() call. Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: namei: Add NAMEI_WANTPARENT flagIan Moffett
In some lookup cases, we may only be interested in the parent component. For example, the parent of "/foo/bar/mrow" is "/foo/bar/". The NAMEI_WANTPARENT asks namei to only look for the parent rather than the full path. Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: Add "starting init" message for verbosityIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel/amd64: Deprecate reboot keyIan Moffett
Remove logic to reboot machine by simply pressing a key. Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel/amd64: mc1468xx: Implement date settingIan Moffett
Implement logic to update the date returned by the MC1468XX/RTC chip. This can be used to later implement some sort of time synchronization protocol or manual setting of the date. Signed-off-by: Ian Moffett <ian@osmora.org>