Page 1 of 1

Working on an alternative to UDI, EDI, and other such things

Posted: Sun Nov 15, 2026 8:18 pm
by AnotherIdiot
I am working on an alternative to UDI, EDI, and other such attempts to make drivers more portable, I want to find a balance between the complexity of UDI and the simplicity of EDI, I plan to write and release a few drivers, I am still working on the spec and the headers, I just want some advice on the idea, and anything you might add (I am going to add in more functions like PCI, ISA, and architecture specific tables within the ops table passed to the system), the idea is to make it have enough functions for most drivers to work easily, without having an ungodly amount of issues, I do plan to also add in driver_ops so that the drivers can expose their functions. You can get the spec (and link to the header) at https://stackunderflow.org/spec/usg-0002.html.

Summary of the whole thing:
- Each architecture is assigned an ABI so that things are compatible at a binary level (this can be ignored if you plan to compile every driver yourself, however).
- All drivers SHOULD be an ELF file that is relocatable and is not dynamically linked.
- The entry function should look like

Code: Select all

USG_RET entryfunc(struct ops_table* ops_tbl);
- The entry function should return USG_OK if it was able to register.
- Each OS SHOULD (you don't HAVE to, but its gonna save RAM anyways, and design time) have a single table, and assume that drivers do not attempt to modify it, if you really want to be safe you can write it, then remap it into read only memory so you can kill drivers which try to access it.
- The whole thing follows semver, the ops table and any major spec things will be fully backwards compatible unless on a higher major version.
- There is a function so you can get specific versions of the ops_table (say the kernel provides 1.15 but the driver needs 1.16, the driver can attempt to request 1.16 and see if the kernel hands it over).

This system is MEANT to load things into kernel space however in theory it is entirely possible that someone could write a kernel which loads drivers into userland, YMMV if you decide to do that. Also yes I do understand that this idea is a bit out there and it will be pretty hard to get support. I have not actually named the system yet other than its "spec name" of USG-0002, with USG-0001 defining USG spec language and USG-0003 is a spec for 6502 calling conventions (not really important unless you are writing an OS for a 6502 system, which I think only a few people here have done before).