Age | Commit message (Collapse) | Author |
|
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>
|
|
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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
MAP_ANON does not need to be treated as any specific flag bits as it
isn't even checked with mmap()
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 EEPROM reading logic as well as some code to read
the ethernet address into a `netif' structure.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The E1000 may add padding in-between registers and for the sake of
simplicity, we will deal with raw offsets instead of a silly structure.
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 the intr_hand structure to carry driver specific and interrupt
related data so that it can be passed to an interrupt handler when it
is invoked.
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 handle_exception() as higher level logic to handle the exceptions
- Simplify frame.h
- Call C handler in vector.S
- Clean up stack after creating frame
- Add register dump on exception
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>
|
|
- md_halt() -> md_hlt()
- Pass dummy operand
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add SYS_sleep to put a thread to sleep for some time through a timespec
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- Introduce timespec structure for nanosecond/second precision
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 IEEE 802.3 related headers such as ones containing the
structure of an ethernet frame as well as its types. This commit
additionally introduces ARP request logic.
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>
|
|
- Flush the entire output buffer
- Wipe the whole screen with "bg"
- The entire console will now be cleared when a "\033[H" sequence is
encountered
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>
|