diff options
author | peter <peter@FreeBSD.org> | 1998-10-18 07:40:29 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1998-10-18 07:40:29 +0000 |
commit | a49ba650812f28ba863e5eddcdffb49ffb35a85d (patch) | |
tree | 7a1f8791622b491f1b9088fa7da6ccf1a8704fdf /sys | |
parent | 2b6c28f287528c14f9d614f398e75f297d8ff6c3 (diff) | |
download | FreeBSD-src-a49ba650812f28ba863e5eddcdffb49ffb35a85d.zip FreeBSD-src-a49ba650812f28ba863e5eddcdffb49ffb35a85d.tar.gz |
Print a message if bootverbose that the emulator is present in the kernel.
Move the initialization before isa_configure() and npx, in case npx does
something to initialize the state of the emulator somehow.
I do not have any machines without a FPU so that I can test this with -
except an old 386sx motherboard in a box somewhere that might work...
Diffstat (limited to 'sys')
-rw-r--r-- | sys/i386/i386/math_emulate.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sys/i386/i386/math_emulate.c b/sys/i386/i386/math_emulate.c index df44b5f..743442b 100644 --- a/sys/i386/i386/math_emulate.c +++ b/sys/i386/i386/math_emulate.c @@ -6,7 +6,7 @@ * [expediant "port" of linux 8087 emulator to 386BSD, with apologies -wfj] * * from: 386BSD 0.1 - * $Id: math_emulate.c,v 1.27 1998/07/15 09:01:18 bde Exp $ + * $Id: math_emulate.c,v 1.28 1998/10/16 03:54:59 peter Exp $ */ /* @@ -1576,10 +1576,13 @@ fpu_modevent(module_t mod, modeventtype_t type, void *unused) { switch (type) { case MOD_LOAD: - if (pmath_emulate) + if (pmath_emulate) { printf("Another Math emulator already present\n"); - else - pmath_emulate = math_emulate; + return EBUSY; + } + pmath_emulate = math_emulate; + if (bootverbose) + printf("Math emulator present\n"); break; case MOD_UNLOAD: if (pmath_emulate != math_emulate) { @@ -1587,6 +1590,9 @@ fpu_modevent(module_t mod, modeventtype_t type, void *unused) return EACCES; } pmath_emulate = 0; + if (bootverbose) + printf("Math emulator unloaded\n"); + break; default: break; } @@ -1597,6 +1603,6 @@ moduledata_t fpumod = { fpu_modevent, 0 }; -DECLARE_MODULE(fpu, fpumod, SI_SUB_PSEUDO, SI_ORDER_ANY); +DECLARE_MODULE(fpu, fpumod, SI_SUB_DRIVERS, SI_ORDER_ANY); #endif /* LKM */ |