This changes the trap10 and trap13 code to call directly into fpu.c,
removing all the code for T_ARITHTRAP, T_XMM and T_FPUNDA from i386/trap.c
Not all of the code thate appeared to handle fpu traps was ever called!
Most of the changes just replace the include of machine/npx.h with x86/fpu.h
(or remove it entirely).
instead of pulling the kernel definition of the fpu (etc) into
userspace programs.
I've included machine/fenv.h into x86/cpu.c to ensure the duplicated
definitions stay in step.
The default control words are now the hardware defaults.
XXX: Anyone care to explain the differences between the i386 and amd64
versions of this file?
Add arch/generic and move non-x86 files from rumpkern/ there. Also,
move files from arch/i386 to arch/x86, and make both i386 and x86_64
use those.
This clarifies the situation with what is MD vs. MI code.
renames:
rumpcpu_generic,kobj_stubs,pmap_stubs => arch/generic/rump_generic_$x
arch/i386/* => arch/x86/rump_x86_$x
(for those who forget, x86 requires MD code because rump kernels
use the same ABI as kernel modules)
Move the checks for fpu traps in kernel into x86/fpu.c.
Remove the code from amd64/trap.c related to fpu traps (they've not gone
there for ages - expect to panic in kernel mode).
In fpudna():
- Don't actually enable hardware interrupts unless we need to
allow in IPIs.
- There is no point in enabling them when they are blocked in software
(by splhigh()).
- Keep the splhigh() to avoid a load of the KASSERTS() firing.
- Move the majority of the common build definitions to the top-level
Makefile.inc and ensure this gets included everywhere.
- Move the bconfig.h file to the top-level directory.
- Add a statically-generated defs.h file instead of creating one
during the build. Easier to understand and less chances for things
to go wrong.
- Make sure all files using ATF_VERSION have the right dependency to
trigger a rebuild when the value changes.
- Clean up stale -I flags.
This is all mostly for simplicity reasons and to reduce the cognitive
load required to understand the build of the atf and kyua-* packages.
I have tested this with both MKKYUA=no/yes and non-clean/clean builds
so hopefully I got the details right. But if not, let me know please.