Age | Commit message (Collapse) | Author |
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Remove logic to reboot machine by simply pressing a key.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
The year register of the RTC does not keep track of the century so
default to 2000 until we figure out the non-standard century register.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
On certain embedded controllers (ECs) like the EC present on the
Thinkpad T420s, writes to the i8042 controller configuration byte
are not very liked by the EC internal logic and thus result in them
asserting an NMI as a certain host bus error. To workaround this, Hyra
falls back to polling on these specific devices. Previously, Hyra did not
have DMI/SMBIOS capabilities and therefore had to rely on assuming *all*
Lenovo devices were "hostile". As of now since we are capable grabbing
the product version from DMI, we can target specific devices like the
T420s and this commit provides that logic.
This commit additionally implements logic to enable interrupts on PS/2
port 0 (aka the keyboard).
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Before the Hyra kernel starts up, the Limine bootloader creates a
mapping of the first 4 GiB of memory (identity mapped for base revisions
of zero and mapped to the HDDM on higher base revisions). However, it
usually will create a huge mapping over this which would be problematic
during remaps of device MMIO base addresses as they typically reside at
the 4 GiB region of RAM and as of this commit, huge pages are not a
supported feature of the Hyra AMD64 pmap layer.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
The function md_td_kick() is only used for user threads and there is no
need reference any kernel segments. Furthermore, the previous code would
introduce a bug where rpl would always be 0.
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>
|
|
Waiting for the init script to finish would waste time and slow down the
shell handoff
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 comments for the OSH interpreter. Comments are denoted by
'@' and are ignored by OSH.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Previously, OSH was only capable of interpreting commands that came
directly from the console. This commit allows calling /usr/bin/osh while
passing a path to a script to be parsed and interpreted. This commit
additionally adds a `command_match()` routine to simplify the matching of
commands. On top of this, cmd_run() now also takes a `wait` argument
that allows the caller to specify whether not to daemonize the spawned
process or wait on its execution to finish.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
During an exit(), the parent needs to kill all of the child processes
that depend on it. However, there might be an occurrence where one or
more is already exiting and trying to kill such processes would be
problematic and may result in issues like double frees. This commit
ensures that the exiting parent only kills child processes that aren't
already exiting themselves.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Implement realloc() to resize allocated memory from malloc()
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Add POSIX fileno() to grab a file descriptor number from a stream
pointer.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
- [kernel: physmem]: Improve physical memory allocation [0]
- [kernel: rtl]: Implement packet TX for the RTL81XX NIC driver [1]
- [kernel: net]: Add if_var.h to describe network interfaces [2]
- [kernel: net]: Implement IEEE 802.3 and ARP request/reply logic [3, 4]
- [kernel]: Introduce timespec structure in sys/time.h [5]
- [kernel/aarch64]: Implement interrupt vector table entries [6]
- [kernel: pmap]: Introduce machine shared pmap_init() routine [7]
- [kernel/aarch64]: Implement AARCH64 pmap stubs [8]
- [kernel: intr]: Allow driver specific interrupt data [9]
- [usr: libc]: Implement rand() and srand() with LSFR [10]
- [kernel/amd64]: Add SSE and AVX support (SIMD) [11]
- [usr: libc]: Implement initial malloc() and free() [12]
- [kernel: sys]: Introduce PTR_NOFFSET macro for negative offsets [13]
Commits referenced:
[0]: a9fb11245f3ccc422089ed60a1ce57b7cb2d1c2a
[1]: 9db4bb193ad12b0cf47125543bf7f3f36c0fb0ca
[2]: 8224cdd1059aec4a1342863caa687a28690e6af9
[3]: b130e0e745ce3be4e28fc0eb50011f931157b49a
[4]: 767547ed81651a4ff6977c34c3033c82e1ebee16
[5]: bd1f2f56adf87fbaf69135e2bfd650ff472982d9
[6]: caad8df87d20c5949ef4c1190bc5a63ccf75dc05
[7]: 4a45078c01dc83e95f70b65d244c388ec62c0b98
[8]: c15bb67a2a485eaa498fca20559078eafb4a2298
[9]: 66beb7829271712f6cd2bbe03b38a50c1d953f2c
[10]: 723bb6544cf7a4bf8926e3ee3b07024250d8b68b
[11]: 34eb3b3b8dbca30c0a0702dd7805ac7b811393c8
[12]: 224eb85c88d7cdb442758adc6277bfd4a1c3a214
[13]: 549a3f6ea5e13e39f006125c0f46b79645384604
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Introduce the 'elfdump' utility to dump information relating to
ELF files. This is useful for debugging purposes.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
As malloc() has been recently introduced into the Hyra libc, we should
take advantage of it to allow us to share windows between functions
without relying on the stack.
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>
|
|
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>
|
|
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>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
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>
|
|
The Hyra installer now exists in usr.sbin/installer and is no longer
automatic as it relies on user input for confirmation
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
There will likely be multiple times the reference count of a ctlfs entry
will hit zero. Several programs may open and close a ctlfs node more
than once and as these are hardwired kernel objects, they must always
stay present. At the most we may set the vp->data field to NULL,
indicating that it is currently unused.
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Signed-off-by: Ian Moffett <ian@osmora.org>
|
|
Change the 'time' binary to be called 'date' as it is more fitting for
the type of program it is.
Signed-off-by: Ian Moffett <ian@osmora.org>
|