This adds basic support for ACPI. It splits out the nexus driver to
two new drivers, one for fdt, one for acpi. It then uses this to decide
if it will use fdt or acpi.
When using acpi a small driver is added to handle the MADT and GTDT. The
former is used to attach the gicv2 driver, the latter the generic timer.
This is needed because both of these need devices to attach to.
A few x86 specific places have been marked as such, and pci support is
missing.
Did you looked at the code generated ? Compiler might spill 'generation' into memory and then reload it after invpcid, not keeping the intermediary in a register. I expect it more from clang and less from gcc, the later usually generates better code.
And such single-use variable deserves a comment, since my first action when looking at making any changes to such code, is to remove the once-used aliases.
It sounds as if you want to rewrite the handlers back into assembler.