Commit 2ec24af2 authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-october-2018-part1-v2' into staging



MIPS queue October 2018, part1, v2

# gpg: Signature made Thu 18 Oct 2018 19:39:00 BST
# gpg:                using RSA key D4972A8967F75A65
# gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65

* remotes/amarkovic/tags/mips-queue-october-2018-part1-v2: (28 commits)
  target/mips: Add opcodes for nanoMIPS EVA instructions
  target/mips: Fix misplaced 'break' in handling of NM_SHRA_R_PH
  target/mips: Fix emulation of microMIPS R6 <SELEQZ|SELNEZ>.<D|S>
  target/mips: Implement hardware page table walker for MIPS32
  target/mips: Add reset state for PWSize and PWField registers
  target/mips: Add CP0 PWCtl register
  target/mips: Add CP0 PWSize register
  target/mips: Add CP0 PWField register
  target/mips: Add CP0 PWBase register
  target/mips: Add CP0 Config2 to DisasContext
  target/mips: Improve DSP R2/R3-related naming
  target/mips: Add availability control for DSP R3 ASE
  target/mips: Add bit definitions for DSP R3 ASE
  target/mips: Reorganize bit definitions for insn_flags (ISAs/ASEs flags)
  target/mips: Increase 'supported ISAs/ASEs' flag holder size
  target/mips: Add opcode values of MXU ASE
  target/mips: Add organizational chart of MXU ASE
  target/mips: Add assembler mnemonics list for MXU ASE
  target/mips: Add basic description of MXU ASE
  target/mips: Add a comment before each CP0 register section in cpu.h
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
parents 77f7c747 0d30b3bb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -12,6 +12,7 @@ Fabrice Bellard <fabrice@bellard.org> bellard <bellard@c046a42c-6fe2-441c-8c8c-7
James Hogan <jhogan@kernel.org> <james.hogan@imgtec.com>
Jocelyn Mayer <l_indien@magic.fr> j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162>
Paul Brook <paul@codesourcery.com> pbrook <pbrook@c046a42c-6fe2-441c-8c8c-71466251a162>
Yongbok Kim <yongbok.kim@mips.com> <yongbok.kim@imgtec.com>
Aleksandar Markovic <amarkovic@wavecomp.com> <aleksandar.markovic@mips.com>
Aleksandar Markovic <amarkovic@wavecomp.com> <aleksandar.markovic@imgtec.com>
Paul Burton <pburton@wavecomp.com> <paul.burton@mips.com>
+31 −4
Original line number Diff line number Diff line
@@ -28,8 +28,11 @@ typedef int64_t Elf64_Sxword;
#define PT_PHDR    6
#define PT_LOPROC  0x70000000
#define PT_HIPROC  0x7fffffff

#define PT_MIPS_REGINFO   0x70000000
#define PT_MIPS_OPTIONS		0x70000001
#define PT_MIPS_RTPROC    0x70000001
#define PT_MIPS_OPTIONS   0x70000002
#define PT_MIPS_ABIFLAGS  0x70000003

/* Flags in the e_flags field of the header */
/* MIPS architecture level. */
@@ -76,14 +79,38 @@ typedef int64_t Elf64_Sxword;
#define EF_MIPS_MACH_OCTEON2  0x008d0000  /* Cavium Networks Octeon2         */
#define EF_MIPS_MACH_OCTEON3  0x008e0000  /* Cavium Networks Octeon3         */
#define EF_MIPS_MACH_5400     0x00910000  /* NEC VR5400                      */
#define EF_MIPS_MACH_5900     0x00920000  /* MIPS R5900                      */
#define EF_MIPS_MACH_5900     0x00920000  /* Toshiba/Sony R5900              */
#define EF_MIPS_MACH_5500     0x00980000  /* NEC VR5500                      */
#define EF_MIPS_MACH_9000     0x00990000  /* PMC-Sierra's RM9000             */
#define EF_MIPS_MACH_9000     0x00990000  /* PMC-Sierra RM9000               */
#define EF_MIPS_MACH_LS2E     0x00a00000  /* ST Microelectronics Loongson 2E */
#define EF_MIPS_MACH_LS2F     0x00a10000  /* ST Microelectronics Loongson 2F */
#define EF_MIPS_MACH_LS3A     0x00a20000  /* ST Microelectronics Loongson 3A */
#define EF_MIPS_MACH          0x00ff0000  /* EF_MIPS_MACH_xxx selection mask */

#define MIPS_ABI_FP_ANY       0x0         /* FP ABI doesn't matter           */
#define MIPS_ABI_FP_DOUBLE    0x1         /* -mdouble-float                  */
#define MIPS_ABI_FP_SINGLE    0x2         /* -msingle-float                  */
#define MIPS_ABI_FP_SOFT      0x3         /* -msoft-float                    */
#define MIPS_ABI_FP_OLD_64    0x4         /* -mips32r2 -mfp64                */
#define MIPS_ABI_FP_XX        0x5         /* -mfpxx                          */
#define MIPS_ABI_FP_64        0x6         /* -mips32r2 -mfp64                */
#define MIPS_ABI_FP_64A       0x7         /* -mips32r2 -mfp64 -mno-odd-spreg */

typedef struct mips_elf_abiflags_v0 {
  uint16_t version;           /* Version of flags structure                  */
  uint8_t isa_level;          /* The level of the ISA: 1-5, 32, 64           */
  uint8_t isa_rev;            /* The revision of ISA:                        */
                              /*   - 0 for MIPS V and below,                 */
                              /*   - 1-n otherwise.                          */
  uint8_t gpr_size;           /* The size of general purpose registers       */
  uint8_t cpr1_size;          /* The size of co-processor 1 registers        */
  uint8_t cpr2_size;          /* The size of co-processor 2 registers        */
  uint8_t fp_abi;             /* The floating-point ABI                      */
  uint32_t isa_ext;           /* Mask of processor-specific extensions       */
  uint32_t ases;              /* Mask of ASEs used                           */
  uint32_t flags1;            /* Mask of general flags                       */
  uint32_t flags2;
} Mips_elf_abiflags_v0;

/* These constants define the different elf file types */
#define ET_NONE   0
+4 −0
Original line number Diff line number Diff line
@@ -244,4 +244,8 @@ static inline abi_ulong target_shmlba(CPUMIPSState *env)
    return 0x40000;
}

/* MIPS-specific prctl() options */
#define TARGET_PR_SET_FP_MODE  45
#define TARGET_PR_GET_FP_MODE  46

#endif /* MIPS_TARGET_SYSCALL_H */
+4 −0
Original line number Diff line number Diff line
@@ -241,4 +241,8 @@ static inline abi_ulong target_shmlba(CPUMIPSState *env)
    return 0x40000;
}

/* MIPS-specific prctl() options */
#define TARGET_PR_SET_FP_MODE  45
#define TARGET_PR_GET_FP_MODE  46

#endif /* MIPS64_TARGET_SYSCALL_H */
+8 −0
Original line number Diff line number Diff line
@@ -9347,6 +9347,14 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
            return ret;
        }
#endif
#ifdef TARGET_MIPS
        case TARGET_PR_GET_FP_MODE:
            /* TODO: Implement TARGET_PR_SET_FP_MODE handling.*/
            return -TARGET_EINVAL;
        case TARGET_PR_SET_FP_MODE:
            /* TODO: Implement TARGET_PR_GET_FP_MODE handling.*/
            return -TARGET_EINVAL;
#endif /* MIPS */
#ifdef TARGET_AARCH64
        case TARGET_PR_SVE_SET_VL:
            /*
Loading