Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/rtl8127-omega/blob/main/docs/GAPS.md # rtl8127-omega aien-dev/rtl8127-omega Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `rtl8127-omega / docs / GAPS.md` 39 lines ยท 3361 bytes Raw Blame History Rendered 1 # What is missing, and why this release only reads the chip 2 3 This is the plain list of what stops the Omega driver from carrying your network traffic today. Each item is a fact about the 4 Omega compiler I pin (`omega.pin`), or about the chip. None of it was guessed. 5 6 ## The short version 7 8 The driver logic is written in Omega and passes its tests against a **software model** of the chip. To use it on a real card, a 9 program has to do three things Omega cannot do yet: 10 11 | # | What the driver needs | What Omega has today | Status | 12 |---|---|---|---| 13 | 1 | Read and write **1-byte and 2-byte** chip registers (the chip has them: ChipCmd at 0x37, Cfg9346 at 0x50, PHYstatus at 0x6C) | `mapget` / `mapset` handle **4-byte and 8-byte** words only (`seed/host/MAPPING.md`) | **Missing.** The read-only probe works around it for reads by reading the whole 4-byte word and picking out the part it needs. That is not safe for writes: a 4-byte write would also overwrite the neighbouring registers. | 14 | 2 | Hand a block of memory to the card so the card can read and write it (the TX and RX rings) | Needs the VFIO ioctls: set up an IOMMU container, map a memory block for the card (`VFIO_IOMMU_MAP_DMA`), get the device (`VFIO_GROUP_GET_DEVICE_FD`), read region info. `devctl` accepts only `FIONREAD` and NVIDIA requests. | **Missing.** There is no "arbitrary ioctl" word, on purpose (`seed/host/MAPPING.md`: "no arbitrary syscall"). A list of allowed VFIO requests would have to be added to the compiler, the same way the NVIDIA and UVM lists were. | 15 | 3 | The ring memory must be a page-aligned block that the compiler can give to the kernel | The driver keeps its rings in an Omega `global` array. A global cannot be given to the kernel. | **Needs a change here** once item 2 exists: use a `mapnew` block and `mapread` / `mapwrite` for the descriptors. | 16 17 Until 1 and 2 exist, taking the card away from the stock driver would leave it with nothing to talk to. So `takeover` is 18 **switched off** in this release, and the installer says so. 19 20 ## Why I did not fake it 21 22 The Omega rule is: if the compiler cannot say something, do not write it in C or shell and call it Omega. So the driver core is Omega, 23 the tests are Omega, and the gaps above are written down instead of hidden. The installer is a shell script because installing is 24 copying and checking files; it contains no driver logic. 25 26 ## What the proposal to Omega looks like (for whoever picks it up) 27 28 - `mapget` / `mapset` with `width` 1 and 2, one load or store each, bracketed like the 4 and 8 byte forms. 29 - `devctl` allow-list entries for the VFIO requests above, with their exact payload sizes, the same style as the UVM list. 30 - A way to learn the bus address of a mapped block (for VFIO this is the address the program chose in `VFIO_IOMMU_MAP_DMA`, 31 so the program already knows it). 32 - A gate that runs them against a fake device file (as `seed/host/tests/mapping.om` does) and refuses everything else. 33 34 ## Other things that are not done 35 36 - Interrupts. The core is polled; interrupts stay masked. 37 - Offloads, jumbo frames, more than one queue, power management, Wake-on-LAN, the vendor's firmware patches (PHY micro-code, PCIe tuning). 38 The C driver this was ported from relies on the state the machine firmware leaves, and so does this. 39 - Everything about the **real chip** is UNKNOWN. See the README.