Projects like this Ring -1 Kernel Surgeon[1] might be worth looking into.
[1] https://github.com/alesha-pro/llm.asm/blob/main/04-ring1-ker...