summaryrefslogtreecommitdiff
path: root/sys
AgeCommit message (Collapse)Author
22 hourskernel/amd64: i8042: Use DMI for quirk checkingIan Moffett
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>
23 hourskernel/amd64: Throw away any pre-kernel huge pagesIan Moffett
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>
23 hourskernel/amd64: Only use USER_DS in md_td_kick()Ian Moffett
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>
40 hourskernel: Add SMBIOS/DMI supportIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2 daysusr: Start shell + rc through /usr/sbin/initIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 daysusr: Add init.rc for userspace startup flexibilityIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
3 dayskernel: exit: Only kill leaf if not exitingIan Moffett
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>
3 dayskernel: conf: Default to console fg of #B57614Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: mman: Make MAP_ANON 0x0000Ian Moffett
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>
4 dayssys: param: Add PTR_NOFFSET define to sub pointersIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: Fix base-16 style in endian.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: e1000: Reset the controller before initIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: e1000: Read MAC address into `netif'Ian Moffett
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>
4 dayskernel/amd64: Only print SIMD logs on BSP initIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: e1000: Grant NIC PCI MMIO/DMA capabilitiesIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
4 dayskernel: e1000: Use raw register VAP offsetsIan Moffett
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>
5 dayskernel: phy: Add initial E1000 sourcesIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel/amd64: Add SIMD (SSE + AVX) supportIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
5 dayskernel: ctlfs: Do not reclaim ctlfs entriesIan Moffett
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>
5 dayskernel/amd64: mc1468xx: Add year, month and dayIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel/amd64: intr: Add driver specific intr dataIan Moffett
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>
7 dayskernel/amd64: intr: Ensure intr_hand.name has '\0'Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel/amd64: Remove unused 'intr_entry' structIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel/aarch64: pmap: Handle PROT_EXEC prot flagIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel/aarch64: Implement vas and map/unmap stubsIan Moffett
- Implement pmap_map() - Implement pmap_unmap() - Implement pmap_read_vas() - Implement pmap_switch_vas() Signed-off-by: Ian Moffett <ian@osmora.org>
7 dayskernel: pmap: Add arch-shared pmap_init() routineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/aarch64: Add exception code + frame fixupsIan Moffett
- 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>
8 dayskernel: Add __aligned(n) attributeIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/aarch64: frame: Remove extra whitespaceIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/aarch64: Remove stray alignment directiveIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/aarch64: Implement initial vector stubsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/aarch64: Add intr_register() stubIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/aarch64: Make stubs up to dateIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskernel/aarch64: cdefs: Make halt macro properIan Moffett
- md_halt() -> md_hlt() - Pass dummy operand Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: time: Introduce SYS_sleepIan Moffett
Add SYS_sleep to put a thread to sleep for some time through a timespec Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: Introduce timespec structIan Moffett
- Introduce timespec structure for nanosecond/second precision Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: Remove deprecated func declarationIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: netinet: Implement ARP reply logicIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskernel: netinet: Simply memcpy ether_saddrIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: rtl: Fix up includes and remove "TODO"Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: net: Implement IEEE 802.3 + ARP requestsIan Moffett
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>
11 dayskernel: Add sys/endian.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: rtl: Expose NIC properly through if_var.hIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: rtl: Remove TODO comment (completed)Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
11 dayskernel: rtl: Implement packet TXIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
12 dayskernel: ahci: Wait until ready before any I/OIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
13 dayskernel: ahci: Don't zero allocated PAs anymoreIan Moffett
This is no longer needed as the Hyra PMM now does this automatically by default. Signed-off-by: Ian Moffett <ian@osmora.org>
13 dayskernel: Prevent physmem clobbers + zero memoryIan Moffett
To prevent a situation where there is a data race between one thread freeing physical memory and one allocating physical memory. Do not immediately reuse freed physical memory. Instead, keep allocating upwards and once there is no more room, wrap the last_idx back to the bitmap free index. We now also zero allocated physical memory for security reasons. Signed-off-by: Ian Moffett <ian@osmora.org>
13 dayskernel: physmem: Make globals staticIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
13 dayskernel: cons: Clear entire screen on demandIan Moffett
- 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>