You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RedstoneShell edited this page Oct 10, 2026
·
1 revision
DREG_H
Linking by #include <dreg.h>, compiling with dreg.o.
dkernel_registry
Structure with one task, mark for KERNEL, where find a first driver structure, for start drivers.
typedefstructdkernel_registry {
u32pattern; // Fill by init, magic of struct (DKES)u32version; // Fill by init, Kernel ABI veru64first_driver; // Pointer to first driver structure in Virtual Memory
} dkernel_registry_t
dreg_init(void): void
Write to memory Registry, with empty first_driver, he fill later.
dreg_register_driver(*drv: ddriver_t): int
Register driver in reg, he fill next field in drv by first_driver, and refill first_driver by drv pointer.
Returns 0 at success, -1 at error.
dreg_first_driver(void): *ddriver_t
Returns a pointer to first_driver, or zero-pointer if first_driver is zero.
dreg_get(void): dkernel_registry_t
Returns dkernel_registry.
Variables
#defineDKES_PATTERN 0x53454B44u // Magic `DKES`
#defineDKES_VERSION 0x00010000u // Kernel ABI Ver
#defineDREG_ADDR 0x1300000ULL // Address of `dkernel_registry`