Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Earlgrey emulation based on qemu 8.0.2 #4

Merged
merged 129 commits into from
Jul 6, 2023

Commits on Jun 22, 2023

  1. FROMGIT: target/riscv: Update pmp_get_tlb_size()

    PMP entries before (including) the matched PMP entry may only cover partial
    of the TLB page, and this may split the page into regions with different
    permissions. Such as for PMP0 (0x80000008~0x8000000F, R) and PMP1 (0x80000000~
    0x80000FFF, RWX), write access to 0x80000000 will match PMP1. However we cannot
    cache the translation result in the TLB since this will make the write access
    to 0x80000008 bypass the check of PMP0. So we should check all of them instead
    of the matched PMP entry in pmp_get_tlb_size() and set the tlb_size to 1 in
    this case.
    Set tlb_size to TARGET_PAGE_SIZE if PMP is not support or there is no PMP rules.
    
    Signed-off-by: Weiwei Li <liweiwei@iscas.ac.cn>
    Signed-off-by: Junqiang Wang <wangjunqiang@iscas.ac.cn>
    Reviewed-by: LIU Zhiwei <zhiwei_liu@linux.alibaba.com>
    Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
    Message-Id: <20230517091519.34439-2-liweiwei@iscas.ac.cn>
    Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
    
    (cherry picked from commit dc7b599
    https://github.com/alistair23/qemu.git riscv-to-apply.next)
    Weiwei Li authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    73299b0 View commit details
    Browse the repository at this point in the history
  2. [ot] docs/devel: fix resettable API documentation function name

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    ce52526 View commit details
    Browse the repository at this point in the history
  3. [ot] net: fix warning on MacOS platforms

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    b8e227b View commit details
    Browse the repository at this point in the history
  4. [ot] ui: fix warning on MacOS platforms

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    f2b40bc View commit details
    Browse the repository at this point in the history
  5. [ot] meson.build: fix objc handling

    when `--without-default-features` is used and `--enable-cocoa` is not,
    configure script fails as meson does not search for objc compiler but
    later attempts to report objc information.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    9c2901a View commit details
    Browse the repository at this point in the history
  6. [ot] target/riscv: fix dscratch debug CSRs definitions

    There are two dscratch registers in current specifications (0.13.2 and 1.0.0)
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    7919489 View commit details
    Browse the repository at this point in the history
  7. [ot] disas: fix decode of dscratch CSRs

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    d7758e9 View commit details
    Browse the repository at this point in the history
  8. [ot] disas: decode tinfo trigger CSR

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    b4a56ff View commit details
    Browse the repository at this point in the history
  9. [ot] disas: fix invalid RISC-V pmpcfg CSR definitions

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    2566290 View commit details
    Browse the repository at this point in the history
  10. [ot] target/riscv: non-standard interrupts are valid without H extens…

    …ion.
    
    From RISC-V Privileged Architecture,
    
    3.1.9. Machine Interrupt Registers (mip and mie)
    
    "Bits 15:0 are allocated to standard interrupt causes only, while bits
    16 and above are designated for platform or custom use."
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    789133e View commit details
    Browse the repository at this point in the history
  11. [ot] target/riscv: do not handle semi hosting as a first-class citizen

    semihosting should only be handled as an exception, not as an interrupt
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    43405fb View commit details
    Browse the repository at this point in the history
  12. [ot] target/riscv: make mtvec a platform definition

    from riscv-privileged / 3.1.7 MTVEC Base-Address Register:
    
    "The mtvec register must always be implemented, but can contain a read-only value."
    
    i.e. there should be a way to configure mtvec w/o relying on a CSR write instruction.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    eb5af22 View commit details
    Browse the repository at this point in the history
  13. [ot] target/riscv: get_ticks should not use time conversion

    Warning: this change impacts all hpmcounters: mcycle, minstret, ...
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    53d3b0f View commit details
    Browse the repository at this point in the history
  14. [ot] exec: poison RISC-V target-specific definitions

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    dbab5c4 View commit details
    Browse the repository at this point in the history
  15. [ot] hw/intc: sifive_plic: fix handling of pending interrupts

    Fix issue when enabling an already pending interrupt: the interrupt would not be
    triggered properly.
    
    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    373ee46 View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. [ot] target/riscv: remove useless check in pmp_is_locked

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    f4abf86 View commit details
    Browse the repository at this point in the history
  2. [ot] target/riscv: move ePMP operation conversion into a function

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    57209c6 View commit details
    Browse the repository at this point in the history
  3. [ot] target/riscv: fix ePMP access control to pmpaddr/pmpcfg

    Fix several issues with ePMP checks on writes to pmpaddr/pmpcfg.
    
    For pmpaddr: Rule Locking Bypass (mseccfg.RLB) was not implemented for writes
    to locked entries/rules.
    
    For pmpcfg: with Machine Mode Lockdown (mseccfg.MML) set (and RLB not set),
    writes to pmpcfg would be allowed for the wrong cases of ePMP truth table.
    The existing code restricts writes like so:
    - L=1, X=1: cases 8, 10, 12, 14
    - L=0, RWX!=WX: cases 0-2, 4-6
    From the ePMP specification: "Adding a rule with executable privileges that
    either is M-mode-only or a locked Shared-Region is not possible (...)"
    This description matches cases 9-11, 13 of the truth table. This commit
    implements the check by using pmp_get_epmp_operation to convert between PMP
    configuration and ePMP truth table cases.
    
    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    9a70d68 View commit details
    Browse the repository at this point in the history
  4. [ot] target/riscv: add basic support for MSECCFGH CSR

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    2eb8847 View commit details
    Browse the repository at this point in the history
  5. [ot] target/riscv: add support for impl-defined initial PMP config

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    a050fce View commit details
    Browse the repository at this point in the history
  6. [ot] target/riscv: add experimental Zbr extension

    Although Zbr extension once part of bitmanip specification up to v0.94
    as not been ratified and even entirely removed from the final v1.0
    specification, it is nevertheless used by the lowrisc-ibex core as an
    optional ISA, which is enabled in the OpenTitan project.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    79a937a View commit details
    Browse the repository at this point in the history
  7. [ot] disas: add Zbr instruction disassembling

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    c27a36c View commit details
    Browse the repository at this point in the history
  8. [ot] target/riscv: rename ibex hart as lowrisc-ibex

    Follow vendor-device syntax used with other RISCV cores
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    bf3d4fb View commit details
    Browse the repository at this point in the history
  9. [ot] target/riscv: update lowrisc-ibex core initialization

    Define a generic version of lowrisc-ibex core that can be used in several machines:
    
     - leave MISA empty so that generic properties can be defined for this core
     - remove all arbitrary default properties but ISA I,C,U which are mandatory for ibex
     - define default mtvec which is only support vectored mode
     - update privilege version (1.12) according to the Ibex documentation
     - define ibex architecture identifier
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    d035ce7 View commit details
    Browse the repository at this point in the history
  10. [ot] hw/riscv: update legacy OpenTitan machine for generic Ibex core

     - remove hart array (mostly useless, its definition is incoherent and
       prevent from applying properties to CPU cores)
     - remove kernel filename option, as it doubles up with firmware option
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    343b018 View commit details
    Browse the repository at this point in the history
  11. [ot] hw/char: fix Ibex UART device definition

    Use a separate Kconfig symbol for Ibex UART device:
    having an Ibex CPU does not imply usage of this UART implementation.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    7a57aa7 View commit details
    Browse the repository at this point in the history
  12. [ot] hw/timer: fix Ibex Timer device definition

    Use a separate Kconfig symbol for Ibex Timer device:
    having an Ibex CPU does not imply usage of this Timer implementation.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    79adb5b View commit details
    Browse the repository at this point in the history
  13. [ot] hw/ssi: fix Ibex SPI Host device definition

    Use a separate Kconfig symbol for Ibex SPI Host device:
    having an Ibex CPU does not imply usage of this SPI Host implementation.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    c0edc63 View commit details
    Browse the repository at this point in the history
  14. [ot] configs: do not build legacy Opentitan machine to avoid confusion

    Legacy OpenTitan machine devices are no longer compatible with current OpenTitan HW.
    opentitan machine name is too generic, ot-earlgrey implements the standalone
    version for OpenTitan based on CW310 FPGA hardware description.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    0d09c5f View commit details
    Browse the repository at this point in the history
  15. [ot] meson: update to 0.63 (Rust support)

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    8e89e55 View commit details
    Browse the repository at this point in the history
  16. [ot] monitor: add general RISC-V registers

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    sifive-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    965f8ca View commit details
    Browse the repository at this point in the history
  17. [ot] subprojects: add libtomcrypt

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    30d7eec View commit details
    Browse the repository at this point in the history
  18. [ot] add clang-format config

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    9670ce4 View commit details
    Browse the repository at this point in the history
  19. [ot] hw/ssi: let SSI bus be a public type definition

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    7ac5c3f View commit details
    Browse the repository at this point in the history
  20. [ot] hw/intc: IRQ numbers should be sanity-checked

    As the static function is a callback, it should be considered as a public
    function whose arguments should be sanity-checked.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    5eed4d5 View commit details
    Browse the repository at this point in the history
  21. [ot] hw/riscv: add helper for Ibex platforms

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    96b67d3 View commit details
    Browse the repository at this point in the history
  22. [ot] hw/riscv: add helper function to retrieve current PC

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    28409c0 View commit details
    Browse the repository at this point in the history
  23. [ot] hw/riscv: add helper function to log the guest CPU registers

    (for debug only)
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    ec421a6 View commit details
    Browse the repository at this point in the history
  24. [ot] hw/loader: add a new function to only load symbols from ELF

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    e0738eb View commit details
    Browse the repository at this point in the history
  25. [ot] hw/riscv: add an IRQ wrapper

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    758c931 View commit details
    Browse the repository at this point in the history
  26. [ot] hw/riscv: add a monitor helper function to track CPU PC

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    3647188 View commit details
    Browse the repository at this point in the history
  27. [ot] hw/core: import rust_demangler feature from GNU libiberty

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    490fd8c View commit details
    Browse the repository at this point in the history
  28. [ot] hw/riscv: demangle RUST ELF symbols

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    8b23d68 View commit details
    Browse the repository at this point in the history
  29. [ot] target/riscv: implement custom LowRisc Ibex CSRs

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    21551e3 View commit details
    Browse the repository at this point in the history
  30. [ot] target/riscv: add custom mtvec CSR management

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    ecc603a View commit details
    Browse the repository at this point in the history
  31. [ot] hw/riscv: add basic LowRISC IbexDemo machine

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    4c7c0f2 View commit details
    Browse the repository at this point in the history
  32. [ot] hw/riscv: ibexdemo: add PWM dummy device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    bf9273c View commit details
    Browse the repository at this point in the history
  33. [ot] hw/ibexdemo: ibexdemo_uart: add IbexDemo UART implementation

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    44fe60c View commit details
    Browse the repository at this point in the history
  34. [ot] util: fifo8: add some functions

    Add two functions:
    - fifo8_peek_buf: same as fifo8_pop_buf but does not consume data from the
      FIFO
    - fifo8_consume_all: only consume data bytes from the FIFO
    
    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    c23319b View commit details
    Browse the repository at this point in the history
  35. [ot] hw/riscv: ibexdemo: add UART device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    8f61d77 View commit details
    Browse the repository at this point in the history
  36. [ot] hw/ibexdemo: ibexdemo_timer: add IbexDemo Timer implementation

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    728fd9a View commit details
    Browse the repository at this point in the history
  37. [ot] hw/riscv: ibexdemo: add Timer device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    6159492 View commit details
    Browse the repository at this point in the history
  38. [ot] hw/ibexdemo: ibexdemo_spi: add IbexDemo SPI host implementation

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    419f62e View commit details
    Browse the repository at this point in the history
  39. [ot] hw/riscv: ibexdemo: add SPI host device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    3fc5320 View commit details
    Browse the repository at this point in the history
  40. [ot] hw/ibexdemo: ibexdemo_gpio: add IbexDemo GPIO implementation

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    90a9a6e View commit details
    Browse the repository at this point in the history
  41. [ot] hw/riscv: ibexdemo: add GPIO device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    796538a View commit details
    Browse the repository at this point in the history
  42. [ot] hw/ibexdemo: ibexdemo_simctrl: add IbexDemo Sim controller imple…

    …mentation
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    237ed93 View commit details
    Browse the repository at this point in the history
  43. [ot] hw/riscv: ibexdemo: add Sim controller device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    554a06a View commit details
    Browse the repository at this point in the history
  44. [ot] hw/display: st7735: add ST7735 display controller implementation

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    241920c View commit details
    Browse the repository at this point in the history
  45. [ot] hw/riscv: ibexdemo: add ST7735 device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    ee9209f View commit details
    Browse the repository at this point in the history
  46. [ot] hw/riscv: add basic OpenTitan EarlGrey machine

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    ef7883d View commit details
    Browse the repository at this point in the history
  47. [ot] hw/opentitan: document which OpenTitan version is emulated

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    95e6541 View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. [ot] scripts/opentitan: add a script to check reg defs discrepancies

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    90006a0 View commit details
    Browse the repository at this point in the history
  2. [ot] scripts/opentitan: new simple script to cross-check dev registers

    This script extract io_read/write information from a QEMU log script and
    compare the device register values against the HW reset values and
    guest SW modified ones.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    e2960e9 View commit details
    Browse the repository at this point in the history
  3. [ot] hw/riscv: ot_earlgrey: add HW PMP configuration

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    f3766fc View commit details
    Browse the repository at this point in the history
  4. [ot] hw/riscv: ot_earlgrey: add property no_epmp_cfg

    Add property no_pmp_cfg on EarlGrey machine to disable default ePMP
    configuration.
    
    Usage:
      qemu-system-riscv32 -M ot-earlgrey,no-epmp-cfg=true [...]
    
    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    7dcb2c8 View commit details
    Browse the repository at this point in the history
  5. [ot] hw/opentitan: add OpenTitan shadow register helpers

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    1da0d43 View commit details
    Browse the repository at this point in the history
  6. [ot] hw/opentitan: ot_common: add multibit boolean values

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    a212895 View commit details
    Browse the repository at this point in the history
  7. [ot] hw/opentitan: add a 32-bit FIFO implementation

    pre-existing 32-bit FIFO implementation uses a 8-bit backend
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    b6afe2a View commit details
    Browse the repository at this point in the history
  8. [ot] hw/opentitan: add Opentitan Alert handler device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    7cbdc20 View commit details
    Browse the repository at this point in the history
  9. [ot] hw/riscv: ot_earlgrey: add Alert handler device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    fa900d3 View commit details
    Browse the repository at this point in the history
  10. [ot] hw/opentitan: add OpenTitan OTP implementation

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    49e2791 View commit details
    Browse the repository at this point in the history
  11. [ot] scripts/opentitan: add a new script to manage OTP content

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    ddf380f View commit details
    Browse the repository at this point in the history
  12. [ot] hw/riscv: ot_earlgrey: add OTP controller device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    4d2afc0 View commit details
    Browse the repository at this point in the history
  13. [ot] hw/opentitan: ot_ast: add OpenTitan Analog Sensor Top

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    c1b738a View commit details
    Browse the repository at this point in the history
  14. [ot] hw/riscv: ot_earlgrey: add Analog Top Sensor device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    1c5b181 View commit details
    Browse the repository at this point in the history
  15. [ot] hw/opentitan: ot_entropy: add OpenTitan Entropy Source device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    e19c829 View commit details
    Browse the repository at this point in the history
  16. [ot] hw/riscv: ot_earlgrey: add OpenTitan Entropy Source device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    9f0a6d3 View commit details
    Browse the repository at this point in the history
  17. [ot] hw/opentitan: ot_csrng: add OpenTitan Crypto Secure RNG

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    f0722ec View commit details
    Browse the repository at this point in the history
  18. [ot] hw/riscv: ot_earlgrey: add OpenTitan Crypto Secure RNG

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    cd05f62 View commit details
    Browse the repository at this point in the history
  19. [ot] hw/opentitan: ot_edn: add Entropy Distribution Network device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    aee8cbc View commit details
    Browse the repository at this point in the history
  20. [ot] hw/riscv: ot_earlgrey: add Entropy Distribution Network device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    90ef459 View commit details
    Browse the repository at this point in the history
  21. [ot] hw/opentitan: ot_alert: add EDN properties

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    2c209ae View commit details
    Browse the repository at this point in the history
  22. [ot] hw/riscv: ot_earlgrey: connect Alert Handler to EDN

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    3f28ec5 View commit details
    Browse the repository at this point in the history
  23. [ot] hw/opentitan: ot_otp: add EDN properties

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    8520294 View commit details
    Browse the repository at this point in the history
  24. [ot] hw/riscv: ot_earlgrey: connect OTP to EDN

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    9968996 View commit details
    Browse the repository at this point in the history
  25. [ot] hw/opentitan: ot_lifecycle: add OpenTitan Life Cycle controller

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    5da60ef View commit details
    Browse the repository at this point in the history
  26. [ot] hw/riscv: ot_earlgrey: add Lifecycle device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    fc1db17 View commit details
    Browse the repository at this point in the history
  27. [ot] hw/opentitan: ot_pwrmgr: add OpenTitan Power Manager

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    7f4728f View commit details
    Browse the repository at this point in the history
  28. [ot] hw/riscv: ot_earlgrey: add Power Manager device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    c85a9b5 View commit details
    Browse the repository at this point in the history
  29. [ot] hw/opentitan: ot_sensor: add OpenTitan Sensor controller

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    71e5ab4 View commit details
    Browse the repository at this point in the history
  30. [ot] hw/riscv: ot_earlgrey: add Sensor controller device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    c5b4edf View commit details
    Browse the repository at this point in the history
  31. [ot] hw/opentitan: ot_pinmux: add OpenTitan PinMux

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    d82953c View commit details
    Browse the repository at this point in the history
  32. [ot] hw/riscv: ot_earlgrey: add pinmux device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    6f766b3 View commit details
    Browse the repository at this point in the history
  33. [ot] hw/opentitan: ot_flash: add OpenTitan Flash controller

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    7d84f53 View commit details
    Browse the repository at this point in the history
  34. [ot] scripts/opentitan: create a script to generate int. flash content

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    8b09a1c View commit details
    Browse the repository at this point in the history
  35. [ot] hw/opentitan: ot_earlgrey: add Flash controller device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    f8777f0 View commit details
    Browse the repository at this point in the history
  36. [ot] hw/opentitan: ot_ibex_wrapper: implement basic device

    This basic device only supports RND registers for now.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    5070d2f View commit details
    Browse the repository at this point in the history
  37. [ot] hw/riscv: ot_earlgrey: add Ibex Wrapper device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    b836cb5 View commit details
    Browse the repository at this point in the history
  38. [ot] hw/opentitan: ot_ibex_wrapper: trigger VM abort on special SW FA…

    …TAL ERR
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    a9e060d View commit details
    Browse the repository at this point in the history
  39. [ot] hw/opentitan: ot_ibex_wrapper: add address translation support

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    4a93a73 View commit details
    Browse the repository at this point in the history
  40. [ot] hw/opentitan: ot_prng: add pseudo random number generator wrapper

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    6676c83 View commit details
    Browse the repository at this point in the history
  41. [ot] hw/opentitan: add OpenTitan Clock Manager device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    a190d76 View commit details
    Browse the repository at this point in the history
  42. [ot] hw/riscv: ot_earlgrey: add Clock Manager

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    fc2ad6a View commit details
    Browse the repository at this point in the history
  43. [ot] hw/opentitan: ot_aes: add OpenTitan AES emulator

    Use libtomcrypt as the crypto backend as a meson subproject.
    
    OpenTitan ECB pass, CTR, GCM tests pass ok.
    Tock CCM, ECB, CBC, CTR tests pass ok.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    c5ebf1e View commit details
    Browse the repository at this point in the history
  44. [ot] hw/riscv: ot_earlgrey: add AES device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    45f9713 View commit details
    Browse the repository at this point in the history
  45. [ot] hw/opentitan: ot_uart: add OpenTitan UART implementation

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    75320cb View commit details
    Browse the repository at this point in the history
  46. [ot] hw/riscv: ot_earlgrey: add UART devices

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    69796cf View commit details
    Browse the repository at this point in the history
  47. [ot] subprojects: add Rust dependencies for OTBN emulator

    * QEMU cannot use Cargo, however meson can build explicit Rust libraries
    * Use the meson wrap feature to download and build Rust dependencies
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    a0c8994 View commit details
    Browse the repository at this point in the history
  48. [ot] hw/opentitan: ot_otbn: add OpenTitan OTBN emulator

    * add a new QEMU device (ot_otbn)
    * add a proxy between the QEMU device (C) and the OTBN emulator (Rust)
    * import OTBN emulator based on G. Chadwick RSS (RISC-V simulator)
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    19f66f5 View commit details
    Browse the repository at this point in the history
  49. [ot] hw/riscv: ot_earlgrey: add OTBN device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    46654e2 View commit details
    Browse the repository at this point in the history
  50. [ot] hw/opentitan: ot_hmac: add OpenTitan HMAC emulator

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    571c837 View commit details
    Browse the repository at this point in the history
  51. [ot] hw/riscv: ot_earlgrey: add HMAC device

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    97a3937 View commit details
    Browse the repository at this point in the history
  52. [ot] hw/opentitan: ot_spi_host: add OpenTitan SPI host implementation

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    df7b6a0 View commit details
    Browse the repository at this point in the history
  53. [ot] hw/block: m25p80: add SFDP data block for data flash ISSI IS25WP128

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    1bdf939 View commit details
    Browse the repository at this point in the history
  54. [ot] hw/block: m25p80: fix dummy cycles for FASTREAD

    Dummy cycles should be expressed in bytes, not bits.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    8dbb157 View commit details
    Browse the repository at this point in the history
  55. [ot] hw/block: m25p80: write enable should be reset after each erase …

    …cmd. completion
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    b1cc629 View commit details
    Browse the repository at this point in the history
  56. [ot] hw/riscv: ot_earlgrey: add SPI_HOST device

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    51b41a1 View commit details
    Browse the repository at this point in the history
  57. [ot] hw/opentitan: ot_timer: add OpenTitan Timer emulator

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    486cc83 View commit details
    Browse the repository at this point in the history
  58. [ot] hw/riscv: ot_earlgrey: add Timer device

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    52cfd5f View commit details
    Browse the repository at this point in the history
  59. [ot] hw/opentitan: ot_aon_timer: add OpenTitan AON Timer implementation

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    fe41509 View commit details
    Browse the repository at this point in the history
  60. [ot] hw/riscv: ot_earlgrey: add AON Timer device

    Signed-off-by: Loïc Lefort <loic@rivosinc.com>
    loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    8f66f81 View commit details
    Browse the repository at this point in the history
  61. [ot] scripts/opentitan: add a script to boot ROM/ROM_EXT/BL0

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    1948fb2 View commit details
    Browse the repository at this point in the history
  62. [ot] scripts/opentitan: add new script to run test app w/ test ROM.

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    3e35060 View commit details
    Browse the repository at this point in the history
  63. [ot] scripts/opentitan: add a script to run OpenTitan unit tests

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    3bcca3a View commit details
    Browse the repository at this point in the history
  64. [ot] doc/opentitan: document Earlgrey platform

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    feb7af4 View commit details
    Browse the repository at this point in the history
  65. [ot] update README file to reflect QEMU fork content.

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    d346c07 View commit details
    Browse the repository at this point in the history
  66. [ot] hw/opentitan: ot_sram_ctrl: add SRAM controller

    For now, it is implemented as a dummy backend.
    
    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    6c38523 View commit details
    Browse the repository at this point in the history
  67. [ot] hw/riscv: ot_earlgrey: add SRAM controllers

    Signed-off-by: Emmanuel Blot <eblot@rivosinc.com>
    rivos-eblot authored and loiclefort committed Jul 5, 2023
    Configuration menu
    Copy the full SHA
    f03e907 View commit details
    Browse the repository at this point in the history