3.2 KiB
Nightloader Driver Structure
This documentation file explains the format of a native driver slot for the Nightloader on the i386 architecture.
Offset | Length | Name of Field |
---|---|---|
0 | 8 | Driver Identifier |
8 | 2 | Format Version |
10 | 2 | Driver Version |
12 | 2 | Number of Functionalities |
16 | 4 | Functionality Table Offset |
-
Driver Identifier
The driver identifier is used to uniquely identify a driver. It can be chosen by a driver's developer, but should suggest what kind of driver is contained in that slot, for the sake of clarity. -
Format Version
The version of the driver slot's standardized structures such as the rest of the header, the functionality table and others that the future might bring.
The first byte of this structure tells the major version, the second one tells the minor version. No version patches are needed. -
Driver Version
Version of the driver, as seen by the driver's developer.
The first byte of this structure should be the major version, the second one the minor version. No version patches are needed. -
Number of Functionalities
How many entries the functionality table contains. The table of functionalities contains functions with standardized arguments, actions and return types for interfacing with the driver. -
Functionality Table Offset
Offset from the start of the driver slot to the functionality table. It may be wise to keep this a bit further away from the header to prevent the need for more changes if the header structure changes in a future version.
Functionality Structure
Functionalities in the functionality table have a structure defined in the following table:
Offset | Length | Name of Field |
---|---|---|
0 | 2 | Function Category |
2 | 2 | Exact Function |
4 | 4 | Function Pointer |
The functionality table as it is found in any correct driver is a tightly packed array of those structures with as many elements as were promised in the corresponding header field.
Driver Functionality Categories
The table below contains links to the driver functionality categories:
Id | Category |
---|---|
0x1 | Basic Text |
0x2 | Text Window |
0x3 | Logger |
0x4 | Pixel Graphics |
0x5 | Pixel Fonts |
0x10 | PCI |
0x11 | PCIe |
0x12 | NVMe |
0x20 | USB |
0x30 | Storage |
0x40 | Filesystem |