TianoCore EDK2 master
Loading...
Searching...
No Matches
Csr.h File Reference
#include <Base.h>

Go to the source code of this file.

Macros

#define LOONGARCH_CSR_CRMD   0x0
 
#define LOONGARCH_CSR_PRMD   0x1
 
#define LOONGARCH_CSR_EUEN   0x2
 
#define CSR_EUEN_LBTEN_SHIFT   3
 
#define CSR_EUEN_LBTEN   (0x1ULL << CSR_EUEN_LBTEN_SHIFT)
 
#define CSR_EUEN_LASXEN_SHIFT   2
 
#define CSR_EUEN_LASXEN   (0x1ULL << CSR_EUEN_LASXEN_SHIFT)
 
#define CSR_EUEN_LSXEN_SHIFT   1
 
#define CSR_EUEN_LSXEN   (0x1ULL << CSR_EUEN_LSXEN_SHIFT)
 
#define CSR_EUEN_FPEN_SHIFT   0
 
#define CSR_EUEN_FPEN   (0x1ULL << CSR_EUEN_FPEN_SHIFT)
 
#define LOONGARCH_CSR_MISC   0x3
 
#define LOONGARCH_CSR_ECFG   0x4
 
#define LOONGARCH_CSR_ESTAT   0x5
 
#define CSR_ESTAT_ESUBCODE_SHIFT   22
 
#define CSR_ESTAT_ESUBCODE_WIDTH   9
 
#define CSR_ESTAT_ESUBCODE   (0x1ffULL << CSR_ESTAT_ESUBCODE_SHIFT)
 
#define CSR_ESTAT_EXC_SHIFT   16
 
#define CSR_ESTAT_EXC_WIDTH   6
 
#define CSR_ESTAT_EXC   (0x3FULL << CSR_ESTAT_EXC_SHIFT)
 
#define CSR_ESTAT_IS_SHIFT   0
 
#define CSR_ESTAT_IS_WIDTH   15
 
#define CSR_ESTAT_IS   (0x7FFFULL << CSR_ESTAT_IS_SHIFT)
 
#define LOONGARCH_CSR_ERA   0x6
 
#define LOONGARCH_CSR_BADV   0x7
 
#define LOONGARCH_CSR_BADI   0x8
 
#define LOONGARCH_CSR_EBASE   0xC
 
#define LOONGARCH_CSR_TLBIDX   0x10
 
#define LOONGARCH_CSR_TLBEHI   0x11
 
#define LOONGARCH_CSR_TLBELO0   0x12
 
#define LOONGARCH_CSR_TLBELO1   0x13
 
#define LOONGARCH_CSR_ASID   0x18
 
#define LOONGARCH_CSR_PGDL   0x19
 
#define LOONGARCH_CSR_PGDH   0x1A
 
#define LOONGARCH_CSR_PGD   0x1B
 
#define LOONGARCH_CSR_PWCTL0   0x1C
 
#define LOONGARCH_CSR_PWCTL1   0x1D
 
#define LOONGARCH_CSR_STLBPGSIZE   0x1E
 
#define LOONGARCH_CSR_RVACFG   0x1F
 
#define PAGE_VALID_SHIFT   0
 
#define PAGE_DIRTY_SHIFT   1
 
#define PAGE_PLV_SHIFT   2
 
#define CACHE_SHIFT   4
 
#define PAGE_GLOBAL_SHIFT   6
 
#define PAGE_HUGE_SHIFT   6
 
#define PAGE_HGLOBAL_SHIFT   12
 
#define PAGE_PFN_SHIFT   12
 
#define PAGE_PFN_END_SHIFT   48
 
#define PAGE_NO_READ_SHIFT   61
 
#define PAGE_NO_EXEC_SHIFT   62
 
#define PAGE_RPLV_SHIFT   63
 
#define PAGE_VALID   ((UINTN)(1) << PAGE_VALID_SHIFT)
 
#define PAGE_DIRTY   ((UINTN)(1) << PAGE_DIRTY_SHIFT)
 
#define PAGE_PLV   ((UINTN)(3) << PAGE_PLV_SHIFT)
 
#define PAGE_GLOBAL   ((UINTN)(1) << PAGE_GLOBAL_SHIFT)
 
#define PAGE_HUGE   ((UINTN)(1) << PAGE_HUGE_SHIFT)
 
#define PAGE_HGLOBAL   ((UINTN)(1) << PAGE_HGLOBAL_SHIFT)
 
#define PAGE_NO_READ   ((UINTN)(1) << PAGE_NO_READ_SHIFT)
 
#define PAGE_NO_EXEC   ((UINTN)(1) << PAGE_NO_EXEC_SHIFT)
 
#define PAGE_RPLV   ((UINTN)(1) << PAGE_RPLV_SHIFT)
 
#define CACHE_MASK   ((UINTN)(3) << CACHE_SHIFT)
 
#define PFN_SHIFT   (EFI_PAGE_SHIFT - 12 + PAGE_PFN_SHIFT)
 
#define PLV_KERNEL   0
 
#define PLV_USER   3
 
#define PAGE_USER   (PLV_USER << PAGE_PLV_SHIFT)
 
#define PAGE_KERNEL   (PLV_KERN << PAGE_PLV_SHIFT)
 
#define CACHE_SUC   (0 << CACHE_SHIFT)
 
#define CACHE_CC   (1 << CACHE_SHIFT)
 
#define CACHE_WUC   (2 << CACHE_SHIFT)
 
#define LOONGARCH_CSR_CPUID   0x20
 
#define LOONGARCH_CSR_PRCFG1   0x21
 
#define LOONGARCH_CSR_PRCFG2   0x22
 
#define LOONGARCH_CSR_PRCFG3   0x23
 
#define LOONGARCH_CSR_KS0   0x30
 
#define LOONGARCH_CSR_KS1   0x31
 
#define LOONGARCH_CSR_KS2   0x32
 
#define LOONGARCH_CSR_KS3   0x33
 
#define LOONGARCH_CSR_KS4   0x34
 
#define LOONGARCH_CSR_KS5   0x35
 
#define LOONGARCH_CSR_KS6   0x36
 
#define LOONGARCH_CSR_KS7   0x37
 
#define LOONGARCH_CSR_KS8   0x38
 
#define LOONGARCH_CSR_TMID   0x40
 
#define LOONGARCH_CSR_TMCFG   0x41
 
#define LOONGARCH_CSR_TMCFG_EN   (1ULL << 0)
 
#define LOONGARCH_CSR_TMCFG_PERIOD   (1ULL << 1)
 
#define LOONGARCH_CSR_TMCFG_TIMEVAL   (0x3FFFFFFFFFFFULL << 2)
 
#define LOONGARCH_CSR_TVAL   0x42
 
#define LOONGARCH_CSR_CNTC   0x43
 
#define LOONGARCH_CSR_TINTCLR   0x44
 
#define LOONGARCH_CSR_TLBREBASE   0x88
 
#define LOONGARCH_CSR_TLBRBADV   0x89
 
#define LOONGARCH_CSR_TLBRERA   0x8a
 
#define LOONGARCH_CSR_TLBRSAVE   0x8b
 
#define LOONGARCH_CSR_TLBRELO0   0x8c
 
#define LOONGARCH_CSR_TLBRELO1   0x8d
 
#define LOONGARCH_CSR_TLBREHI   0x8e
 
#define LOONGARCH_CSR_DMWIN0   0x180
 
#define LOONGARCH_CSR_DMWIN1   0x181
 
#define LOONGARCH_CSR_DMWIN2   0x182
 
#define LOONGARCH_CSR_DMWIN3   0x183
 
#define LOONGARCH_IOCSR_FEATURES   0x8
 
#define IOCSRF_TEMP   (1ULL << 0)
 
#define IOCSRF_NODECNT   (1ULL << 1)
 
#define IOCSRF_MSI   (1ULL << 2)
 
#define IOCSRF_EXTIOI   (1ULL << 3)
 
#define IOCSRF_CSRIPI   (1ULL << 4)
 
#define IOCSRF_FREQCSR   (1ULL << 5)
 
#define IOCSRF_FREQSCALE   (1ULL << 6)
 
#define IOCSRF_DVFSV1   (1ULL << 7)
 
#define IOCSRF_EXTIOI_DECODE   (1ULL << 9)
 
#define IOCSRF_FLATMODE   (1ULL << 10)
 
#define IOCSRF_VM   (1ULL << 11)
 
#define LOONGARCH_IOCSR_VENDOR   0x10
 
#define LOONGARCH_IOCSR_CPUNAME   0x20
 
#define LOONGARCH_IOCSR_NODECNT   0x408
 
#define LOONGARCH_IOCSR_MISC_FUNC   0x420
 
#define IOCSR_MISC_FUNC_TIMER_RESET   (1ULL << 21)
 
#define IOCSR_MISC_FUNC_EXT_IOI_EN   (1ULL << 48)
 
#define LOONGARCH_IOCSR_CPUTEMP   0x428
 
#define LOONGARCH_IOCSR_IPI_STATUS   0x1000
 
#define LOONGARCH_IOCSR_IPI_EN   0x1004
 
#define LOONGARCH_IOCSR_IPI_SET   0x1008
 
#define LOONGARCH_IOCSR_IPI_CLEAR   0x100c
 
#define LOONGARCH_IOCSR_MBUF0   0x1020
 
#define LOONGARCH_IOCSR_MBUF1   0x1028
 
#define LOONGARCH_IOCSR_MBUF2   0x1030
 
#define LOONGARCH_IOCSR_MBUF3   0x1038
 
#define LOONGARCH_IOCSR_IPI_SEND   0x1040
 
#define IOCSR_IPI_SEND_IP_SHIFT   0
 
#define IOCSR_IPI_SEND_CPU_SHIFT   16
 
#define IOCSR_IPI_SEND_BLOCKING   (1ULL << 31)
 
#define LOONGARCH_IOCSR_MBUF_SEND   0x1048
 
#define IOCSR_MBUF_SEND_BLOCKING   (1ULL << 31)
 
#define IOCSR_MBUF_SEND_BOX_SHIFT   2
 
#define IOCSR_MBUF_SEND_BOX_LO(box)   (box << 1)
 
#define IOCSR_MBUF_SEND_BOX_HI(box)   ((box << 1) + 1)
 
#define IOCSR_MBUF_SEND_CPU_SHIFT   16
 
#define IOCSR_MBUF_SEND_BUF_SHIFT   32
 
#define IOCSR_MBUF_SEND_H32_MASK   0xFFFFFFFF00000000ULL
 
#define LOONGARCH_IOCSR_ANY_SEND   0x1158
 
#define IOCSR_ANY_SEND_BLOCKING   (1ULL << 31)
 
#define IOCSR_ANY_SEND_CPU_SHIFT   16
 
#define IOCSR_ANY_SEND_MASK_SHIFT   27
 
#define IOCSR_ANY_SEND_BUF_SHIFT   32
 
#define IOCSR_ANY_SEND_H32_MASK   0xFFFFFFFF00000000ULL
 
#define LOONGARCH_IOCSR_TIMER_CFG   0x1060
 
#define LOONGARCH_IOCSR_TIMER_TICK   0x1070
 
#define IOCSR_TIMER_CFG_RESERVED   BIT63
 
#define IOCSR_TIMER_CFG_PERIODIC   BIT62
 
#define IOCSR_TIMER_CFG_EN   BIT61
 
#define IOCSR_TIMER_MASK   0x0FFFFFFFFFFFFULL
 
#define IOCSR_TIMER_INITVAL_RST   (0xFFFFULL << 48)
 
#define INVTLB_ADDR_GTRUE_OR_ASID   0x6
 
#define FPU_CSR_RM   0x300
 
#define FPU_CSR_RN   0x000
 
#define FPU_CSR_RZ   0x100
 
#define FPU_CSR_RU   0x200
 
#define FPU_CSR_RD   0x300
 
#define DEFAULT_PAGE_SIZE   0x0c
 
#define CSR_TLBIDX_SIZE_MASK   0x3f000000
 
#define CSR_TLBIDX_PS_SHIFT   24
 
#define CSR_TLBIDX_SIZE   CSR_TLBIDX_PS_SHIFT
 
#define CSR_TLBREHI_PS_SHIFT   0x0
 
#define CSR_TLBREHI_PS   0x3f
 

Detailed Description

Copyright (c) 2024 Loongson Technology Corporation Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Glossary:
  • EXC - Exception
  • CSR - CPU Status Register

Definition in file Csr.h.

Macro Definition Documentation

◆ CACHE_CC

#define CACHE_CC   (1 << CACHE_SHIFT)

Definition at line 109 of file Csr.h.

◆ CACHE_MASK

#define CACHE_MASK   ((UINTN)(3) << CACHE_SHIFT)

Definition at line 99 of file Csr.h.

◆ CACHE_SHIFT

#define CACHE_SHIFT   4

Definition at line 76 of file Csr.h.

◆ CACHE_SUC

#define CACHE_SUC   (0 << CACHE_SHIFT)

Definition at line 108 of file Csr.h.

◆ CACHE_WUC

#define CACHE_WUC   (2 << CACHE_SHIFT)

Definition at line 110 of file Csr.h.

◆ CSR_ESTAT_ESUBCODE

#define CSR_ESTAT_ESUBCODE   (0x1ffULL << CSR_ESTAT_ESUBCODE_SHIFT)

Definition at line 41 of file Csr.h.

◆ CSR_ESTAT_ESUBCODE_SHIFT

#define CSR_ESTAT_ESUBCODE_SHIFT   22

Definition at line 39 of file Csr.h.

◆ CSR_ESTAT_ESUBCODE_WIDTH

#define CSR_ESTAT_ESUBCODE_WIDTH   9

Definition at line 40 of file Csr.h.

◆ CSR_ESTAT_EXC

#define CSR_ESTAT_EXC   (0x3FULL << CSR_ESTAT_EXC_SHIFT)

Definition at line 44 of file Csr.h.

◆ CSR_ESTAT_EXC_SHIFT

#define CSR_ESTAT_EXC_SHIFT   16

Definition at line 42 of file Csr.h.

◆ CSR_ESTAT_EXC_WIDTH

#define CSR_ESTAT_EXC_WIDTH   6

Definition at line 43 of file Csr.h.

◆ CSR_ESTAT_IS

#define CSR_ESTAT_IS   (0x7FFFULL << CSR_ESTAT_IS_SHIFT)

Definition at line 47 of file Csr.h.

◆ CSR_ESTAT_IS_SHIFT

#define CSR_ESTAT_IS_SHIFT   0

Definition at line 45 of file Csr.h.

◆ CSR_ESTAT_IS_WIDTH

#define CSR_ESTAT_IS_WIDTH   15

Definition at line 46 of file Csr.h.

◆ CSR_EUEN_FPEN

#define CSR_EUEN_FPEN   (0x1ULL << CSR_EUEN_FPEN_SHIFT)

Definition at line 34 of file Csr.h.

◆ CSR_EUEN_FPEN_SHIFT

#define CSR_EUEN_FPEN_SHIFT   0

Definition at line 33 of file Csr.h.

◆ CSR_EUEN_LASXEN

#define CSR_EUEN_LASXEN   (0x1ULL << CSR_EUEN_LASXEN_SHIFT)

Definition at line 30 of file Csr.h.

◆ CSR_EUEN_LASXEN_SHIFT

#define CSR_EUEN_LASXEN_SHIFT   2

Definition at line 29 of file Csr.h.

◆ CSR_EUEN_LBTEN

#define CSR_EUEN_LBTEN   (0x1ULL << CSR_EUEN_LBTEN_SHIFT)

Definition at line 28 of file Csr.h.

◆ CSR_EUEN_LBTEN_SHIFT

#define CSR_EUEN_LBTEN_SHIFT   3

Definition at line 27 of file Csr.h.

◆ CSR_EUEN_LSXEN

#define CSR_EUEN_LSXEN   (0x1ULL << CSR_EUEN_LSXEN_SHIFT)

Definition at line 32 of file Csr.h.

◆ CSR_EUEN_LSXEN_SHIFT

#define CSR_EUEN_LSXEN_SHIFT   1

Definition at line 31 of file Csr.h.

◆ CSR_TLBIDX_PS_SHIFT

#define CSR_TLBIDX_PS_SHIFT   24

Definition at line 258 of file Csr.h.

◆ CSR_TLBIDX_SIZE

#define CSR_TLBIDX_SIZE   CSR_TLBIDX_PS_SHIFT

Definition at line 259 of file Csr.h.

◆ CSR_TLBIDX_SIZE_MASK

#define CSR_TLBIDX_SIZE_MASK   0x3f000000

Definition at line 257 of file Csr.h.

◆ CSR_TLBREHI_PS

#define CSR_TLBREHI_PS   0x3f

Definition at line 261 of file Csr.h.

◆ CSR_TLBREHI_PS_SHIFT

#define CSR_TLBREHI_PS_SHIFT   0x0

Definition at line 260 of file Csr.h.

◆ DEFAULT_PAGE_SIZE

#define DEFAULT_PAGE_SIZE   0x0c

Definition at line 256 of file Csr.h.

◆ FPU_CSR_RD

#define FPU_CSR_RD   0x300

Definition at line 254 of file Csr.h.

◆ FPU_CSR_RM

#define FPU_CSR_RM   0x300

Definition at line 250 of file Csr.h.

◆ FPU_CSR_RN

#define FPU_CSR_RN   0x000

Definition at line 251 of file Csr.h.

◆ FPU_CSR_RU

#define FPU_CSR_RU   0x200

Definition at line 253 of file Csr.h.

◆ FPU_CSR_RZ

#define FPU_CSR_RZ   0x100

Definition at line 252 of file Csr.h.

◆ INVTLB_ADDR_GTRUE_OR_ASID

#define INVTLB_ADDR_GTRUE_OR_ASID   0x6

Definition at line 245 of file Csr.h.

◆ IOCSR_ANY_SEND_BLOCKING

#define IOCSR_ANY_SEND_BLOCKING   (1ULL << 31)

Definition at line 222 of file Csr.h.

◆ IOCSR_ANY_SEND_BUF_SHIFT

#define IOCSR_ANY_SEND_BUF_SHIFT   32

Definition at line 225 of file Csr.h.

◆ IOCSR_ANY_SEND_CPU_SHIFT

#define IOCSR_ANY_SEND_CPU_SHIFT   16

Definition at line 223 of file Csr.h.

◆ IOCSR_ANY_SEND_H32_MASK

#define IOCSR_ANY_SEND_H32_MASK   0xFFFFFFFF00000000ULL

Definition at line 226 of file Csr.h.

◆ IOCSR_ANY_SEND_MASK_SHIFT

#define IOCSR_ANY_SEND_MASK_SHIFT   27

Definition at line 224 of file Csr.h.

◆ IOCSR_IPI_SEND_BLOCKING

#define IOCSR_IPI_SEND_BLOCKING   (1ULL << 31)

Definition at line 210 of file Csr.h.

◆ IOCSR_IPI_SEND_CPU_SHIFT

#define IOCSR_IPI_SEND_CPU_SHIFT   16

Definition at line 209 of file Csr.h.

◆ IOCSR_IPI_SEND_IP_SHIFT

#define IOCSR_IPI_SEND_IP_SHIFT   0

Definition at line 208 of file Csr.h.

◆ IOCSR_MBUF_SEND_BLOCKING

#define IOCSR_MBUF_SEND_BLOCKING   (1ULL << 31)

Definition at line 213 of file Csr.h.

◆ IOCSR_MBUF_SEND_BOX_HI

#define IOCSR_MBUF_SEND_BOX_HI (   box)    ((box << 1) + 1)

Definition at line 216 of file Csr.h.

◆ IOCSR_MBUF_SEND_BOX_LO

#define IOCSR_MBUF_SEND_BOX_LO (   box)    (box << 1)

Definition at line 215 of file Csr.h.

◆ IOCSR_MBUF_SEND_BOX_SHIFT

#define IOCSR_MBUF_SEND_BOX_SHIFT   2

Definition at line 214 of file Csr.h.

◆ IOCSR_MBUF_SEND_BUF_SHIFT

#define IOCSR_MBUF_SEND_BUF_SHIFT   32

Definition at line 218 of file Csr.h.

◆ IOCSR_MBUF_SEND_CPU_SHIFT

#define IOCSR_MBUF_SEND_CPU_SHIFT   16

Definition at line 217 of file Csr.h.

◆ IOCSR_MBUF_SEND_H32_MASK

#define IOCSR_MBUF_SEND_H32_MASK   0xFFFFFFFF00000000ULL

Definition at line 219 of file Csr.h.

◆ IOCSR_MISC_FUNC_EXT_IOI_EN

#define IOCSR_MISC_FUNC_EXT_IOI_EN   (1ULL << 48)

Definition at line 191 of file Csr.h.

◆ IOCSR_MISC_FUNC_TIMER_RESET

#define IOCSR_MISC_FUNC_TIMER_RESET   (1ULL << 21)

Definition at line 190 of file Csr.h.

◆ IOCSR_TIMER_CFG_EN

#define IOCSR_TIMER_CFG_EN   BIT61

Definition at line 235 of file Csr.h.

◆ IOCSR_TIMER_CFG_PERIODIC

#define IOCSR_TIMER_CFG_PERIODIC   BIT62

Definition at line 234 of file Csr.h.

◆ IOCSR_TIMER_CFG_RESERVED

#define IOCSR_TIMER_CFG_RESERVED   BIT63

Definition at line 233 of file Csr.h.

◆ IOCSR_TIMER_INITVAL_RST

#define IOCSR_TIMER_INITVAL_RST   (0xFFFFULL << 48)

Definition at line 237 of file Csr.h.

◆ IOCSR_TIMER_MASK

#define IOCSR_TIMER_MASK   0x0FFFFFFFFFFFFULL

Definition at line 236 of file Csr.h.

◆ IOCSRF_CSRIPI

#define IOCSRF_CSRIPI   (1ULL << 4)

Definition at line 175 of file Csr.h.

◆ IOCSRF_DVFSV1

#define IOCSRF_DVFSV1   (1ULL << 7)

Definition at line 178 of file Csr.h.

◆ IOCSRF_EXTIOI

#define IOCSRF_EXTIOI   (1ULL << 3)

Definition at line 174 of file Csr.h.

◆ IOCSRF_EXTIOI_DECODE

#define IOCSRF_EXTIOI_DECODE   (1ULL << 9)

Definition at line 179 of file Csr.h.

◆ IOCSRF_FLATMODE

#define IOCSRF_FLATMODE   (1ULL << 10)

Definition at line 180 of file Csr.h.

◆ IOCSRF_FREQCSR

#define IOCSRF_FREQCSR   (1ULL << 5)

Definition at line 176 of file Csr.h.

◆ IOCSRF_FREQSCALE

#define IOCSRF_FREQSCALE   (1ULL << 6)

Definition at line 177 of file Csr.h.

◆ IOCSRF_MSI

#define IOCSRF_MSI   (1ULL << 2)

Definition at line 173 of file Csr.h.

◆ IOCSRF_NODECNT

#define IOCSRF_NODECNT   (1ULL << 1)

Definition at line 172 of file Csr.h.

◆ IOCSRF_TEMP

#define IOCSRF_TEMP   (1ULL << 0)

Definition at line 171 of file Csr.h.

◆ IOCSRF_VM

#define IOCSRF_VM   (1ULL << 11)

Definition at line 181 of file Csr.h.

◆ LOONGARCH_CSR_ASID

#define LOONGARCH_CSR_ASID   0x18

Definition at line 61 of file Csr.h.

◆ LOONGARCH_CSR_BADI

#define LOONGARCH_CSR_BADI   0x8

Definition at line 51 of file Csr.h.

◆ LOONGARCH_CSR_BADV

#define LOONGARCH_CSR_BADV   0x7

Definition at line 50 of file Csr.h.

◆ LOONGARCH_CSR_CNTC

#define LOONGARCH_CSR_CNTC   0x43

Definition at line 142 of file Csr.h.

◆ LOONGARCH_CSR_CPUID

#define LOONGARCH_CSR_CPUID   0x20

Definition at line 115 of file Csr.h.

◆ LOONGARCH_CSR_CRMD

#define LOONGARCH_CSR_CRMD   0x0

Definition at line 24 of file Csr.h.

◆ LOONGARCH_CSR_DMWIN0

#define LOONGARCH_CSR_DMWIN0   0x180

Definition at line 159 of file Csr.h.

◆ LOONGARCH_CSR_DMWIN1

#define LOONGARCH_CSR_DMWIN1   0x181

Definition at line 160 of file Csr.h.

◆ LOONGARCH_CSR_DMWIN2

#define LOONGARCH_CSR_DMWIN2   0x182

Definition at line 161 of file Csr.h.

◆ LOONGARCH_CSR_DMWIN3

#define LOONGARCH_CSR_DMWIN3   0x183

Definition at line 162 of file Csr.h.

◆ LOONGARCH_CSR_EBASE

#define LOONGARCH_CSR_EBASE   0xC

Definition at line 52 of file Csr.h.

◆ LOONGARCH_CSR_ECFG

#define LOONGARCH_CSR_ECFG   0x4

Definition at line 36 of file Csr.h.

◆ LOONGARCH_CSR_ERA

#define LOONGARCH_CSR_ERA   0x6

Definition at line 49 of file Csr.h.

◆ LOONGARCH_CSR_ESTAT

#define LOONGARCH_CSR_ESTAT   0x5

Definition at line 38 of file Csr.h.

◆ LOONGARCH_CSR_EUEN

#define LOONGARCH_CSR_EUEN   0x2

Definition at line 26 of file Csr.h.

◆ LOONGARCH_CSR_KS0

#define LOONGARCH_CSR_KS0   0x30

Definition at line 123 of file Csr.h.

◆ LOONGARCH_CSR_KS1

#define LOONGARCH_CSR_KS1   0x31

Definition at line 124 of file Csr.h.

◆ LOONGARCH_CSR_KS2

#define LOONGARCH_CSR_KS2   0x32

Definition at line 125 of file Csr.h.

◆ LOONGARCH_CSR_KS3

#define LOONGARCH_CSR_KS3   0x33

Definition at line 126 of file Csr.h.

◆ LOONGARCH_CSR_KS4

#define LOONGARCH_CSR_KS4   0x34

Definition at line 127 of file Csr.h.

◆ LOONGARCH_CSR_KS5

#define LOONGARCH_CSR_KS5   0x35

Definition at line 128 of file Csr.h.

◆ LOONGARCH_CSR_KS6

#define LOONGARCH_CSR_KS6   0x36

Definition at line 129 of file Csr.h.

◆ LOONGARCH_CSR_KS7

#define LOONGARCH_CSR_KS7   0x37

Definition at line 130 of file Csr.h.

◆ LOONGARCH_CSR_KS8

#define LOONGARCH_CSR_KS8   0x38

Definition at line 131 of file Csr.h.

◆ LOONGARCH_CSR_MISC

#define LOONGARCH_CSR_MISC   0x3

Definition at line 35 of file Csr.h.

◆ LOONGARCH_CSR_PGD

#define LOONGARCH_CSR_PGD   0x1B

Definition at line 64 of file Csr.h.

◆ LOONGARCH_CSR_PGDH

#define LOONGARCH_CSR_PGDH   0x1A

Definition at line 63 of file Csr.h.

◆ LOONGARCH_CSR_PGDL

#define LOONGARCH_CSR_PGDL   0x19

Definition at line 62 of file Csr.h.

◆ LOONGARCH_CSR_PRCFG1

#define LOONGARCH_CSR_PRCFG1   0x21

Definition at line 116 of file Csr.h.

◆ LOONGARCH_CSR_PRCFG2

#define LOONGARCH_CSR_PRCFG2   0x22

Definition at line 117 of file Csr.h.

◆ LOONGARCH_CSR_PRCFG3

#define LOONGARCH_CSR_PRCFG3   0x23

Definition at line 118 of file Csr.h.

◆ LOONGARCH_CSR_PRMD

#define LOONGARCH_CSR_PRMD   0x1

Definition at line 25 of file Csr.h.

◆ LOONGARCH_CSR_PWCTL0

#define LOONGARCH_CSR_PWCTL0   0x1C

Definition at line 65 of file Csr.h.

◆ LOONGARCH_CSR_PWCTL1

#define LOONGARCH_CSR_PWCTL1   0x1D

Definition at line 66 of file Csr.h.

◆ LOONGARCH_CSR_RVACFG

#define LOONGARCH_CSR_RVACFG   0x1F

Definition at line 68 of file Csr.h.

◆ LOONGARCH_CSR_STLBPGSIZE

#define LOONGARCH_CSR_STLBPGSIZE   0x1E

Definition at line 67 of file Csr.h.

◆ LOONGARCH_CSR_TINTCLR

#define LOONGARCH_CSR_TINTCLR   0x44

Definition at line 143 of file Csr.h.

◆ LOONGARCH_CSR_TLBEHI

#define LOONGARCH_CSR_TLBEHI   0x11

Definition at line 58 of file Csr.h.

◆ LOONGARCH_CSR_TLBELO0

#define LOONGARCH_CSR_TLBELO0   0x12

Definition at line 59 of file Csr.h.

◆ LOONGARCH_CSR_TLBELO1

#define LOONGARCH_CSR_TLBELO1   0x13

Definition at line 60 of file Csr.h.

◆ LOONGARCH_CSR_TLBIDX

#define LOONGARCH_CSR_TLBIDX   0x10

Definition at line 57 of file Csr.h.

◆ LOONGARCH_CSR_TLBRBADV

#define LOONGARCH_CSR_TLBRBADV   0x89

Definition at line 149 of file Csr.h.

◆ LOONGARCH_CSR_TLBREBASE

#define LOONGARCH_CSR_TLBREBASE   0x88

Definition at line 148 of file Csr.h.

◆ LOONGARCH_CSR_TLBREHI

#define LOONGARCH_CSR_TLBREHI   0x8e

Definition at line 154 of file Csr.h.

◆ LOONGARCH_CSR_TLBRELO0

#define LOONGARCH_CSR_TLBRELO0   0x8c

Definition at line 152 of file Csr.h.

◆ LOONGARCH_CSR_TLBRELO1

#define LOONGARCH_CSR_TLBRELO1   0x8d

Definition at line 153 of file Csr.h.

◆ LOONGARCH_CSR_TLBRERA

#define LOONGARCH_CSR_TLBRERA   0x8a

Definition at line 150 of file Csr.h.

◆ LOONGARCH_CSR_TLBRSAVE

#define LOONGARCH_CSR_TLBRSAVE   0x8b

Definition at line 151 of file Csr.h.

◆ LOONGARCH_CSR_TMCFG

#define LOONGARCH_CSR_TMCFG   0x41

Definition at line 137 of file Csr.h.

◆ LOONGARCH_CSR_TMCFG_EN

#define LOONGARCH_CSR_TMCFG_EN   (1ULL << 0)

Definition at line 138 of file Csr.h.

◆ LOONGARCH_CSR_TMCFG_PERIOD

#define LOONGARCH_CSR_TMCFG_PERIOD   (1ULL << 1)

Definition at line 139 of file Csr.h.

◆ LOONGARCH_CSR_TMCFG_TIMEVAL

#define LOONGARCH_CSR_TMCFG_TIMEVAL   (0x3FFFFFFFFFFFULL << 2)

Definition at line 140 of file Csr.h.

◆ LOONGARCH_CSR_TMID

#define LOONGARCH_CSR_TMID   0x40

Definition at line 136 of file Csr.h.

◆ LOONGARCH_CSR_TVAL

#define LOONGARCH_CSR_TVAL   0x42

Definition at line 141 of file Csr.h.

◆ LOONGARCH_IOCSR_ANY_SEND

#define LOONGARCH_IOCSR_ANY_SEND   0x1158

Definition at line 221 of file Csr.h.

◆ LOONGARCH_IOCSR_CPUNAME

#define LOONGARCH_IOCSR_CPUNAME   0x20

Definition at line 185 of file Csr.h.

◆ LOONGARCH_IOCSR_CPUTEMP

#define LOONGARCH_IOCSR_CPUTEMP   0x428

Definition at line 193 of file Csr.h.

◆ LOONGARCH_IOCSR_FEATURES

#define LOONGARCH_IOCSR_FEATURES   0x8

Definition at line 170 of file Csr.h.

◆ LOONGARCH_IOCSR_IPI_CLEAR

#define LOONGARCH_IOCSR_IPI_CLEAR   0x100c

Definition at line 201 of file Csr.h.

◆ LOONGARCH_IOCSR_IPI_EN

#define LOONGARCH_IOCSR_IPI_EN   0x1004

Definition at line 199 of file Csr.h.

◆ LOONGARCH_IOCSR_IPI_SEND

#define LOONGARCH_IOCSR_IPI_SEND   0x1040

Definition at line 207 of file Csr.h.

◆ LOONGARCH_IOCSR_IPI_SET

#define LOONGARCH_IOCSR_IPI_SET   0x1008

Definition at line 200 of file Csr.h.

◆ LOONGARCH_IOCSR_IPI_STATUS

#define LOONGARCH_IOCSR_IPI_STATUS   0x1000

Definition at line 198 of file Csr.h.

◆ LOONGARCH_IOCSR_MBUF0

#define LOONGARCH_IOCSR_MBUF0   0x1020

Definition at line 202 of file Csr.h.

◆ LOONGARCH_IOCSR_MBUF1

#define LOONGARCH_IOCSR_MBUF1   0x1028

Definition at line 203 of file Csr.h.

◆ LOONGARCH_IOCSR_MBUF2

#define LOONGARCH_IOCSR_MBUF2   0x1030

Definition at line 204 of file Csr.h.

◆ LOONGARCH_IOCSR_MBUF3

#define LOONGARCH_IOCSR_MBUF3   0x1038

Definition at line 205 of file Csr.h.

◆ LOONGARCH_IOCSR_MBUF_SEND

#define LOONGARCH_IOCSR_MBUF_SEND   0x1048

Definition at line 212 of file Csr.h.

◆ LOONGARCH_IOCSR_MISC_FUNC

#define LOONGARCH_IOCSR_MISC_FUNC   0x420

Definition at line 189 of file Csr.h.

◆ LOONGARCH_IOCSR_NODECNT

#define LOONGARCH_IOCSR_NODECNT   0x408

Definition at line 187 of file Csr.h.

◆ LOONGARCH_IOCSR_TIMER_CFG

#define LOONGARCH_IOCSR_TIMER_CFG   0x1060

Definition at line 231 of file Csr.h.

◆ LOONGARCH_IOCSR_TIMER_TICK

#define LOONGARCH_IOCSR_TIMER_TICK   0x1070

Definition at line 232 of file Csr.h.

◆ LOONGARCH_IOCSR_VENDOR

#define LOONGARCH_IOCSR_VENDOR   0x10

Definition at line 183 of file Csr.h.

◆ PAGE_DIRTY

#define PAGE_DIRTY   ((UINTN)(1) << PAGE_DIRTY_SHIFT)

Definition at line 91 of file Csr.h.

◆ PAGE_DIRTY_SHIFT

#define PAGE_DIRTY_SHIFT   1

Definition at line 74 of file Csr.h.

◆ PAGE_GLOBAL

#define PAGE_GLOBAL   ((UINTN)(1) << PAGE_GLOBAL_SHIFT)

Definition at line 93 of file Csr.h.

◆ PAGE_GLOBAL_SHIFT

#define PAGE_GLOBAL_SHIFT   6

Definition at line 77 of file Csr.h.

◆ PAGE_HGLOBAL

#define PAGE_HGLOBAL   ((UINTN)(1) << PAGE_HGLOBAL_SHIFT)

Definition at line 95 of file Csr.h.

◆ PAGE_HGLOBAL_SHIFT

#define PAGE_HGLOBAL_SHIFT   12

Definition at line 80 of file Csr.h.

◆ PAGE_HUGE

#define PAGE_HUGE   ((UINTN)(1) << PAGE_HUGE_SHIFT)

Definition at line 94 of file Csr.h.

◆ PAGE_HUGE_SHIFT

#define PAGE_HUGE_SHIFT   6

Definition at line 78 of file Csr.h.

◆ PAGE_KERNEL

#define PAGE_KERNEL   (PLV_KERN << PAGE_PLV_SHIFT)

Definition at line 106 of file Csr.h.

◆ PAGE_NO_EXEC

#define PAGE_NO_EXEC   ((UINTN)(1) << PAGE_NO_EXEC_SHIFT)

Definition at line 97 of file Csr.h.

◆ PAGE_NO_EXEC_SHIFT

#define PAGE_NO_EXEC_SHIFT   62

Definition at line 84 of file Csr.h.

◆ PAGE_NO_READ

#define PAGE_NO_READ   ((UINTN)(1) << PAGE_NO_READ_SHIFT)

Definition at line 96 of file Csr.h.

◆ PAGE_NO_READ_SHIFT

#define PAGE_NO_READ_SHIFT   61

Definition at line 83 of file Csr.h.

◆ PAGE_PFN_END_SHIFT

#define PAGE_PFN_END_SHIFT   48

Definition at line 82 of file Csr.h.

◆ PAGE_PFN_SHIFT

#define PAGE_PFN_SHIFT   12

Definition at line 81 of file Csr.h.

◆ PAGE_PLV

#define PAGE_PLV   ((UINTN)(3) << PAGE_PLV_SHIFT)

Definition at line 92 of file Csr.h.

◆ PAGE_PLV_SHIFT

#define PAGE_PLV_SHIFT   2

Definition at line 75 of file Csr.h.

◆ PAGE_RPLV

#define PAGE_RPLV   ((UINTN)(1) << PAGE_RPLV_SHIFT)

Definition at line 98 of file Csr.h.

◆ PAGE_RPLV_SHIFT

#define PAGE_RPLV_SHIFT   63

Definition at line 85 of file Csr.h.

◆ PAGE_USER

#define PAGE_USER   (PLV_USER << PAGE_PLV_SHIFT)

Definition at line 105 of file Csr.h.

◆ PAGE_VALID

#define PAGE_VALID   ((UINTN)(1) << PAGE_VALID_SHIFT)

Used by TLB hardware (placed in EntryLo*)

Definition at line 90 of file Csr.h.

◆ PAGE_VALID_SHIFT

#define PAGE_VALID_SHIFT   0

Page table property definitions

Definition at line 73 of file Csr.h.

◆ PFN_SHIFT

#define PFN_SHIFT   (EFI_PAGE_SHIFT - 12 + PAGE_PFN_SHIFT)

Definition at line 100 of file Csr.h.

◆ PLV_KERNEL

#define PLV_KERNEL   0

Definition at line 102 of file Csr.h.

◆ PLV_USER

#define PLV_USER   3

Definition at line 103 of file Csr.h.