NPX(4)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’… NPX(4) β€” Numeric Processing Extension coprocessor πŸ’…

okay so bestie, this page is from the i386 Kernel Interfaces Manual, and we're talking about npx, the Numeric Processing Extension coprocessor ✨


πŸŽ€ NAME πŸŽ€

npx β€” Numeric Processing Extension coprocessor πŸ’–

✨ SYNOPSIS ✨

device npx
hint.npx.0.at="nexus"
hint.npx.0.port="0x0F0"
hint.npx.0.flags="0x0"
hint.npx.0.irq="13"

🌸 DESCRIPTION 🌸

The npx driver is the glow-up that lets your system actually use its Numeric Processing Extension coprocessor 🧚. Numeric processing extensions are present in systems with 486DX CPUs and in systems with 387 or 487SX coprocessors β€” periodt πŸ’…. The npx driver is required for proper system functioning; if there is no NPX in the system, the system will not boot. Not me being dramatic, it's literally in the man page 😭.

The flags for npx0 are:

  • 0x01 β€” do not use the NPX registers to optimize bcopy πŸ¦‹
  • 0x02 β€” do not use the NPX registers to optimize bzero πŸŽ€
  • 0x04 β€” do not use the NPX registers to optimize copyin or copyout πŸ’œ

The NPX registers are normally used to optimize copying and zeroing when all of the following conditions are satisfied:

  1. cpu I586_CPU is an option ⭐
  2. the CPU is an i586 (perhaps not a Pentium) πŸ‘‘
  3. the probe for npx0 succeeds πŸ”₯
  4. INT 16 exception handling works βœ…

Then copying and zeroing using the NPX registers is normally 30-100% faster β€” highkey iconic πŸš€.

The flags can be used to control cases where it does not work or is slower. Setting them at boot time using hints works correctly (the optimizations are not used until later in the bootstrap when npx0 is attached). This is the "set it early, bestie" situation 🫢.

πŸ’€ BUGS πŸ’€

There are lots of them, especially on old cheap motherboards 😬. In particular, some motherboards do not have the interrupt lines from the NPX to the CPU wired properly. So like... check your wiring, or at least know that's a thing 🫠.


xoxo, your Debian bestie πŸ’… β€” August 28, 1993 πŸŽ€

πŸ“¦ where this page comes from