diff options
author | Paul Burton <paul.burton@mips.com> | 2018-11-20 20:41:05 +0000 |
---|---|---|
committer | Paul Burton <paul.burton@mips.com> | 2018-11-20 21:05:39 -0800 |
commit | 3cd640832894b85b5929d5bda74505452c800421 (patch) | |
tree | bce9c017f2e705f2b6ea2e83bafecb1a287901bf /include | |
parent | bec0de4cfad21bd284dbddee016ed1767a5d2823 (diff) | |
download | linux-stable-3cd640832894b85b5929d5bda74505452c800421.tar.gz linux-stable-3cd640832894b85b5929d5bda74505452c800421.tar.bz2 linux-stable-3cd640832894b85b5929d5bda74505452c800421.zip |
MIPS: ptrace: introduce NT_MIPS_MSA regset
The current methods for obtaining FP context via ptrace only provide
either 32 or 64 bits per data register. With MSA, where vector registers
are aliased with scalar FP data registers, those registers are 128 bits
wide. Thus a new mechanism is required for userland to access those
registers via ptrace. This patch introduces an NT_MIPS_MSA regset which
provides, in this order:
- The full 128 bits value of each vector register, in native
endianness saved as though elements are doubles. That is, the format
of each vector register is as would be obtained by saving it to
memory using an st.d instruction.
- The 32 bit scalar FP implementation register (FIR).
- The 32 bit scalar FP control & status register (FCSR).
- The 32 bit MSA implementation register (MSAIR).
- The 32 bit MSA control & status register (MSACSR).
The provision of the FIR & FCSR registers in addition to the MSA
equivalents allows scalar FP context to be retrieved as a subset of
the context available via this regset. Along with the MSA equivalents
they also nicely form the final 128 bit "register" of the regset.
Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21180/
Cc: linux-mips@linux-mips.org
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/linux/elf.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/uapi/linux/elf.h b/include/uapi/linux/elf.h index c5358e0ae7c5..d1b093f931e3 100644 --- a/include/uapi/linux/elf.h +++ b/include/uapi/linux/elf.h @@ -424,6 +424,7 @@ typedef struct elf64_shdr { #define NT_VMCOREDD 0x700 /* Vmcore Device Dump Note */ #define NT_MIPS_DSP 0x800 /* MIPS DSP ASE registers */ #define NT_MIPS_FP_MODE 0x801 /* MIPS floating-point mode */ +#define NT_MIPS_MSA 0x802 /* MIPS SIMD registers */ /* Note header in a PT_NOTE section */ typedef struct elf32_note { |