summaryrefslogtreecommitdiff
path: root/src/sys/io
AgeCommit message (Collapse)Author
22 hourskern: os: Support up to 8 max namespacesIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
8 dayskern: mac: Add MAC resource queryingIan Moffett
Introduce a feature where a program with the correct rights may get information about a MAC object Signed-off-by: Ian Moffett <ian@osmora.org>
9 dayskern: fbdev: Create namespace object for fbdevIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
10 dayskern: pci: Remove redundant semicolonIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-23kern: security: Add initial support for MACIan Moffett
This commit introduces initial support for mandatory access control. As one may recall, L5 follows "everything is memory". In order to interact with a resource, a process must request it from the kernel in the form of a (sometimes) syncable memory buffer. Each resource as well as processes have an access level, if a process attempts to request a resource with a higher access level than it, the request is rejected by the kernel. However, if a process has a greater than or equal access level as a resource, the request can be granted. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-22kern: ahci: Bring up ports via COMRESETIan Moffett
As we rely on resetting the controller via GHC.HR, we'll need to re-establish a link with each implemented port to actually bring them online. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-22kern: ahci: Replace printf calls with dtrace()Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-22kern: ahci: Add initial port bring-up logicIan Moffett
This commit introduces this initial bring-up logic for ports on the HBA. We have allocated the command headers and each FIS RX area for each respective command slot. More work to be done but this lays the groundwork Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-22kern: ahci: Fix typo in dtrace() macroIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-22kern: dma: Zero new memory by defaultIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-22kern: ahci: Keep track of number of command slotsIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-21kern: ahci: Only support 64-bit HBAs for nowIan Moffett
Abort if the host controller does not support 64-bit addressing Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-21kern: ahci: Add initial port startup logicIan Moffett
Here we ensure that the port is in a stopped state, we have also added port descriptor lists to keep track of each port. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-21kern: ahci: Scan for implemented ports with PI regIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-21kern: ahci: Add debug tracingIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-21kern: ahci: Ensure HBA is in AHCI-mode after resetIan Moffett
The global host control register (described by section 3.1.2 in the AHCI spec) has an HBA reset bit which resets *everything* to a known state. This means that after the reset, we'll have to indicate to the HBA that we want to speak to it over the AHCI interface. We do it once before the reset if needed, then we do it again after. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-21kern: ahci: Add AHCI host bus adapter reset implIan Moffett
This commit introduces this initial ahci_init() logic by resetting HBA state on startup. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-20kern: cons: Constantly update ch x/y in loopIan Moffett
If we do not do this, we'll get stale x/y values the the characters will never advance position when using multichar strings Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-20kern: pci: Ensure lookup data is copied on attachIan Moffett
When an attached device is detected, the driver will need information about the PCI device for the bring up process. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-20kern: pci: Handle base address registers (BARs)Ian Moffett
This commit handles base address registers by storing them in a bar array within the PCI device structure. We also introduced a helper header to perform operations with BARs such as getting the length of their underlying region Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-20kern: dma: Add DMA frame allocatorIan Moffett
Introduce a special frame allocation utility to reserve memory for DMA done between devices and the host. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-19kern: pci: Implement PCI leaf drivers + AHCI stubIan Moffett
This commit introduces the support for having PCI specific device drivers while providing a tiny AHCI stub that logs the existence of the host bus adapter. The PCI bus itself has a driver for enumerating the devices and associating a specific driver to it, the device drivers themselve must advertise themselves to the PCI driver. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-19kern: pci: Add module creditIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-19kernel: pci: Add PCI lookup routineIan Moffett
This commit adds a new 'lookup_type_t' for representing the various kinds of lookups one can perform on the PCI bus. The actual code to drive the lookups is exposed as the pci_bus_lookup() routine. When doing a lookup of a PCI device, you must specify the kind of lookup to perform. If a PCI_LU_CLASSREV is requested, only the PCI class and subclass fields in the PCI lookup are used. If the PCI_LU_VENDEV is requested, only the PCI vendor ID and device ID are used in the lookup. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-19kern: pci: Add 'class' and 'subclass' to deviceIan Moffett
This commit adds the PCI class and revion (subclass) IDs to the PCI device descriptor provided by L5. Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-18kern: pci: Implement device list as TAILQIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-18kern: pci: Make max buses to scan configurableIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-18kern: pci: Handle logging of device and vendor IDIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-18kern: pci: Get device_id with 'vend_dev[31:16]'Ian Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-18kern: pci: Add initial bus enumerationIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-18kern: io: Add initial PCI CAM driverIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern: cons: Handle ASCII linefeed charIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern: cons: Finish string writing logicIan Moffett
- Wrap on X overflow - Wrap on Y overflow - Keep track of max console width and height - Add console enable/disable control Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern: cons: Add console string writing routineIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>
2025-09-15kern: io: Implement initial console logicIan Moffett
Signed-off-by: Ian Moffett <ian@osmora.org>