/* SPDX-License-Identifier: GPL-2.0 */ /* * cpu.h: Values of the PRID register used to match up * various LoongArch CPU types. * * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
*/ #ifndef _ASM_CPU_H #define _ASM_CPU_H
/* * As described in LoongArch specs from Loongson Technology, the PRID register * (CPUCFG.00) has the following layout: * * +---------------+----------------+------------+--------------------+ * | Reserved | Company ID | Series ID | Product ID | * +---------------+----------------+------------+--------------------+ * 31 24 23 16 15 12 11 0
*/
/* * Assigned Company values for bits 23:16 of the PRID register.
*/
#define PRID_COMP_MASK 0xff0000
#define PRID_COMP_LOONGSON 0x140000
/* * Assigned Series ID values for bits 15:12 of the PRID register. In order * to detect a certain CPU type exactly eventually additional registers may * need to be examined.
*/
/* * CPU Option encodings
*/ #define CPU_FEATURE_CPUCFG 0/* CPU has CPUCFG */ #define CPU_FEATURE_LAM 1/* CPU has Atomic instructions */ #define CPU_FEATURE_UAL 2/* CPU supports unaligned access */ #define CPU_FEATURE_FPU 3/* CPU has FPU */ #define CPU_FEATURE_LSX 4/* CPU has LSX (128-bit SIMD) */ #define CPU_FEATURE_LASX 5/* CPU has LASX (256-bit SIMD) */ #define CPU_FEATURE_CRC32 6/* CPU has CRC32 instructions */ #define CPU_FEATURE_COMPLEX 7/* CPU has Complex instructions */ #define CPU_FEATURE_CRYPTO 8/* CPU has Crypto instructions */ #define CPU_FEATURE_LVZ 9/* CPU has Virtualization extension */ #define CPU_FEATURE_LBT_X86 10/* CPU has X86 Binary Translation */ #define CPU_FEATURE_LBT_ARM 11/* CPU has ARM Binary Translation */ #define CPU_FEATURE_LBT_MIPS 12/* CPU has MIPS Binary Translation */ #define CPU_FEATURE_TLB 13/* CPU has TLB */ #define CPU_FEATURE_CSR 14/* CPU has CSR */ #define CPU_FEATURE_IOCSR 15/* CPU has IOCSR */ #define CPU_FEATURE_WATCH 16/* CPU has watchpoint registers */ #define CPU_FEATURE_VINT 17/* CPU has vectored interrupts */ #define CPU_FEATURE_CSRIPI 18/* CPU has CSR-IPI */ #define CPU_FEATURE_EXTIOI 19/* CPU has EXT-IOI */ #define CPU_FEATURE_PREFETCH 20/* CPU has prefetch instructions */ #define CPU_FEATURE_PMP 21/* CPU has perfermance counter */ #define CPU_FEATURE_SCALEFREQ 22/* CPU supports cpufreq scaling */ #define CPU_FEATURE_FLATMODE 23/* CPU has flat mode */ #define CPU_FEATURE_EIODECODE 24/* CPU has EXTIOI interrupt pin decode mode */ #define CPU_FEATURE_GUESTID 25/* CPU has GuestID feature */ #define CPU_FEATURE_HYPERVISOR 26/* CPU has hypervisor (running in VM) */ #define CPU_FEATURE_PTW 27/* CPU has hardware page table walker */ #define CPU_FEATURE_LSPW 28/* CPU has LSPW (lddir/ldpte instructions) */ #define CPU_FEATURE_AVECINT 29/* CPU has AVEC interrupt */
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.