Skip to content

实现 Privileged ISA #9

@longfangsong

Description

@longfangsong

首先实现M级别的 Privileged ISA
需要实现的寄存器有:

CSR地址空间中:

  • misa
  • mvendorid(固定为0就好了)
  • marchid(暂时固定为0就好了)
  • mimpid
  • mhartid(单核下保持为0就好了)
  • mstatus & mstatush
  • mtvec
  • medeleg & mideleg 在没有其他特权级的情况下暂不需要
  • mip.MEIP
  • mip.MTIP
  • mip.MSIP
  • mie.MEIE
  • mie.MTIE
  • mie.MSIE
  • mcycle
  • minstret
  • mcounteren 在没有其他特权级的情况下暂不需要
  • mcountinhibit
  • mscratch
  • mepc
  • mcause
  • mtval

主地址空间中:

  • mtime(暂时数时钟周期数(=mcycle)就行,日后可能引入其他时钟源)
  • mtimecmp

需要实现的指令有:

  • ecall
  • ebreak
  • mret
  • wfi
  • csrrw
  • csrrs
  • csrrc
  • csrrwi
  • csrrsi
  • csrrci

需要实现的行为有:

  • CSR地址空间
  • 中断处理

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestA request for a certain featurehardThis issue is very hard to fixhelp wantedExtra attention is neededhigh priorityThis is very important now

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions