Lines Matching +full:d +full:- +full:tlb +full:- +full:size
1 .. SPDX-License-Identifier: GPL-2.0
7 LoongArch is a new RISC ISA, which is a bit like MIPS or RISC-V. There are
8 currently 3 variants: a reduced 32-bit version (LA32R), a standard 32-bit
9 version (LA32S) and a 64-bit version (LA64). There are 4 privilege levels
22 ----
24 LoongArch has 32 GPRs ( ``$r0`` ~ ``$r31`` ); each one is 32-bit wide in LA32
25 and 64-bit wide in LA64. ``$r0`` is hard-wired to zero, and the other registers
26 are not architecturally special. (Except ``$r1``, which is hard-wired as the
30 the LoongArch ELF psABI spec, in :ref:`References <loongarch-references>`:
40 ``$r4``-``$r11`` ``$a0``-``$a7`` Argument registers No
41 ``$r4``-``$r5`` ``$v0``-``$v1`` Return value No
42 ``$r12``-``$r20`` ``$t0``-``$t8`` Temp registers No
45 ``$r23``-``$r31`` ``$s0``-``$s8`` Static registers Yes
56 ----
59 64-bit wide on the LA64 cores.
61 The floating-point register convention is the same as described in the
68 ``$f0``-``$f7`` ``$fa0``-``$fa7`` Argument registers No
69 ``$f0``-``$f1`` ``$fv0``-``$fv1`` Return value No
70 ``$f8``-``$f23`` ``$ft0``-``$ft15`` Temp registers No
71 ``$f24``-``$f31`` ``$fs0``-``$fs7`` Static registers Yes
79 ----
83 - LSX (Loongson SIMD eXtension) with 128-bit vectors,
84 - LASX (Loongson Advanced SIMD eXtension) with 256-bit vectors.
94 ----
102 0x1 Pre-exception Mode Information PRMD
111 0x10 TLB Index TLBIDX
112 0x11 TLB Entry High-order Bits TLBEHI
113 0x12 TLB Entry Low-order Bits 0 TLBELO0
114 0x13 TLB Entry Low-order Bits 1 TLBELO1
117 Lower-half Address Space
119 Higher-half Address Space
121 0x1C Page Walk Control for Lower- PWCL
123 0x1D Page Walk Control for Higher- PWCH
125 0x1E STLB Page Size STLBPS
138 0x80 Implementation-specific Control 1 IMPCTL1
139 0x81 Implementation-specific Control 2 IMPCTL2
140 0x88 TLB Refill Exception Entrypoint TLBRENTRY
142 0x89 TLB Refill Exception BAD (Faulting) TLBRBADV
144 0x8A TLB Refill Exception Return Address TLBRERA
145 0x8B TLB Refill Exception Saved Data TLBRSAVE
147 0x8C TLB Refill Exception Entry Low-order TLBRELO0
149 0x8D TLB Refill Exception Entry Low-order TLBRELO1
151 0x8E TLB Refill Exception Entry High-order TLBEHI
153 0x8F TLB Refill Exception Pre-exception TLBRPRMD
204 -------------------
230 --------------------
233 :ref:`References <loongarch-references>` for details.
238 ADD.W SUB.W ADDI.W ADD.D SUB.D ADDI.D
242 MUL.D MULH.D MULH.DU DIV.D DIV.DU MOD.D MOD.DU
244 LU12I.W LU32I.D LU52I.D ADDU16I.D
246 2. Bit-shift Instructions::
249 SLL.D SRL.D SRA.D ROTR.D SLLI.D SRLI.D SRAI.D ROTRI.D
251 3. Bit-manipulation Instructions::
253 EXT.W.B EXT.W.H CLO.W CLO.D SLZ.W CLZ.D CTO.W CTO.D CTZ.W CTZ.D
254 BYTEPICK.W BYTEPICK.D BSTRINS.W BSTRINS.D BSTRPICK.W BSTRPICK.D
255 REVB.2H REVB.4H REVB.2W REVB.D REVH.2W REVH.D BITREV.4B BITREV.8B BITREV.W BITREV.D
264 LD.B LD.BU LD.H LD.HU LD.W LD.WU LD.D ST.B ST.H ST.W ST.D
265 LDX.B LDX.BU LDX.H LDX.HU LDX.W LDX.WU LDX.D STX.B STX.H STX.W STX.D
266 LDPTR.W LDPTR.D STPTR.W STPTR.D
271 LL.W SC.W LL.D SC.D
272 AMSWAP.W AMSWAP.D AMADD.W AMADD.D AMAND.W AMAND.D AMOR.W AMOR.D AMXOR.W AMXOR.D
273 AMMAX.W AMMAX.D AMMIN.W AMMIN.D
281 SYSCALL BREAK CPUCFG NOP IDLE ERTN(ERET) DBCL(DBGCALL) RDTIMEL.W RDTIMEH.W RDTIME.D
282 ASRTLE.D ASRTGT.D
287 IOCSRRD.B IOCSRRD.H IOCSRRD.W IOCSRRD.D IOCSRWR.B IOCSRWR.H IOCSRWR.W IOCSRWR.D
293 LoongArch supports direct-mapped virtual memory and page-mapped virtual memory.
295 Direct-mapped virtual memory is configured by CSR.DMWn (n=0~3), it has a simple
300 Page-mapped virtual memory has arbitrary relationship between VA and PA, which
301 is recorded in TLB and page tables. LoongArch's TLB includes a fully-associative
302 MTLB (Multiple Page Size TLB) and set-associative STLB (Single Page Size TLB).
309 ``UVRANGE`` ``0x00000000 - 0x7FFFFFFF`` Page-mapped, Cached, PLV0~3
310 ``KPRANGE0`` ``0x80000000 - 0x9FFFFFFF`` Direct-mapped, Uncached, PLV0
311 ``KPRANGE1`` ``0xA0000000 - 0xBFFFFFFF`` Direct-mapped, Cached, PLV0
312 ``KVRANGE`` ``0xC0000000 - 0xFFFFFFFF`` Page-mapped, Cached, PLV0
315 User mode (PLV3) can only access UVRANGE. For direct-mapped KPRANGE0 and
317 direct-mapped VA of 0x00001000 is 0x80001000, and the cached direct-mapped
325 ``XUVRANGE`` ``0x0000000000000000 - Page-mapped, Cached, PLV0~3
327 ``XSPRANGE`` ``0x4000000000000000 - Direct-mapped, Cached / Uncached, PLV0
329 ``XKPRANGE`` ``0x8000000000000000 - Direct-mapped, Cached / Uncached, PLV0
331 ``XKVRANGE`` ``0xC000000000000000 - Page-mapped, Cached, PLV0
335 User mode (PLV3) can only access XUVRANGE. For direct-mapped XSPRANGE and
337 is configured by bits 60~61 in VA: 0 is for strongly-ordered uncached, 1 is
338 for coherent cached, and 2 is for weakly-ordered uncached.
342 To put this in action: the strongly-ordered uncached direct-mapped VA (in
344 direct-mapped VA (in XKPRANGE) of 0x00000000_00001000 is 0x90000000_00001000,
345 and the weakly-ordered uncached direct-mapped VA (in XKPRANGE) of 0x00000000
352 Loongson is a family of processors. Loongson includes 3 series: Loongson-1 is
353 the 32-bit processor series, Loongson-2 is the low-end 64-bit processor series,
354 and Loongson-3 is the high-end 64-bit processor series. Old Loongson is based on
355 MIPS, while New Loongson is based on LoongArch. Take Loongson-3 as an example:
356 Loongson-3A1000/3B1500/3A2000/3A3000/3A4000 are MIPS-compatible, while Loongson-
359 .. _loongarch-references:
374 https://loongson.github.io/LoongArch-Documentation/
378 …https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-Vol1-v1.02-…
380 …https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-Vol1-v1.02-…
384 …https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.…
386 …https://github.com/loongson/LoongArch-Documentation/releases/latest/download/LoongArch-ELF-ABI-v2.…
390 https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson.git