Page MenuHomeFreeBSD

Add initial support for the floating point implementation register.
ClosedPublic

Authored by jhb on May 5 2017, 7:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 1, 6:31 AM
Unknown Object (File)
Jan 14 2024, 6:39 AM
Unknown Object (File)
Dec 20 2023, 3:33 AM
Unknown Object (File)
Nov 11 2023, 10:39 AM
Unknown Object (File)
Nov 6 2023, 4:00 PM
Unknown Object (File)
Nov 6 2023, 6:41 AM
Unknown Object (File)
Oct 10 2023, 9:37 AM
Unknown Object (File)
Oct 5 2023, 2:57 PM
Subscribers
None

Details

Summary

Add initial support for the floating point implementation register.

  • Save the current FIR in the global 'cpuinfo' structure in a new 'fpu_id' member.
  • Decode flags in the FIR when displaying other CPU flags during boot.
  • Use the existing "dummy" slot in the floating point register structure to export the FIR in process core dumps and via ptrace().
Test Plan
  • booted under qemu which displayed the following output:

cpu0: MIPS Technologies processor v160.130

MMU: Standard TLB, 48 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes)
L1 i-cache: 4 ways of 256 sets, 32 bytes per line
L1 d-cache: 4 ways of 256 sets, 32 bytes per line
L2 cache: disabled
Config1=0xdea3519b<PerfCount,WatchRegs,EJTAG,FPU>
FPU ID=0xf8200<S,D,PS,3D,W>
Config2=0x80000000
  • with a patched gdb to pull 'fir' from current dummy slot in fpreg, was able to "see" value of fir for live process and from a core

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 9103
Build 9518: arc lint + arc unit

Event Timeline

Any reason why it has to be part of registers? It is not volatile

sys/mips/mips/swtch.S
534

Wrong name?

In D10617#220811, @kan wrote:

Any reason why it has to be part of registers? It is not volatile

This is how other OS's (Linux and NetBSD at least) export FIR. Creating a custom note in the core or a new ptrace op just to fetch FIR seems a bit much compared to this approach.

.. but please fix the wrong comment text pointed out by Warner

This revision is now accepted and ready to land.May 8 2017, 7:52 PM
jhb marked an inline comment as done.May 9 2017, 5:33 PM
jhb added inline comments.
sys/mips/mips/swtch.S
534

Will include fix in commit to svn.

This revision was automatically updated to reflect the committed changes.
jhb marked an inline comment as done.