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

FPGA: Add CPU instruction address SPI access control #243

Closed
wants to merge 16 commits into from

Commits on Jul 4, 2024

  1. FPGA: Add CPU instruction address SPI access control

          Add logic that checks if the CPU is reading an instruction
          to execute from ROM or not. If instructions are read
          from ROM, access to the SPI from the API is granted, and
          signals between the SPI master and a slave are allowed.
    
          If instructions are not read from ROM, any API access
          is blocked. and between the SPI master and a
          slave are disabled.
    
    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks authored and dehanj committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    82c0c14 View commit details
    Browse the repository at this point in the history
  2. fpga: block control inputs to SPI-master, not external interface

    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks authored and dehanj committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    ac8bf9f View commit details
    Browse the repository at this point in the history
  3. Fix syntax error

    dehanj committed Jul 4, 2024
    Configuration menu
    Copy the full SHA
    771f588 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. fpga: Always allow access to SPI-master

    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    be14e88 View commit details
    Browse the repository at this point in the history
  2. fpga: Remove cpu_instr from SPI access control condition

    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    52a2e1b View commit details
    Browse the repository at this point in the history
  3. Remove cpu_valid from SPI access control condition

    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks committed Jul 8, 2024
    Configuration menu
    Copy the full SHA
    3a2d52d View commit details
    Browse the repository at this point in the history

Commits on Jul 9, 2024

  1. Configuration menu
    Copy the full SHA
    5442e90 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c6abfbc View commit details
    Browse the repository at this point in the history
  3. fpga: Add stateful access control

          Add access stateful control register that toggles if access to a
          resources is granted based on if code is excuted from ROM or RAM.
          The register is used to enable or block access to SPI but
          potentially other HW resources.
    
    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks authored and dehanj committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    fbd1620 View commit details
    Browse the repository at this point in the history
  4. fpga: Debug and lint nits

          Use the access_ok_reg, not obsolete spi_acces_ok wire
          Remove now obsolete ROM_PREFIX define
    
    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks authored and dehanj committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    15554ec View commit details
    Browse the repository at this point in the history
  5. fpga: Include SPI master during linting

    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks authored and dehanj committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    54b113a View commit details
    Browse the repository at this point in the history
  6. fpga: Apply access_ok_reg on API reads

    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks authored and dehanj committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    5ec1916 View commit details
    Browse the repository at this point in the history
  7. fpga: Add testcase for access control

    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks authored and dehanj committed Jul 9, 2024
    Configuration menu
    Copy the full SHA
    e0a32da View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2024

  1. fpga: Add API to enable and disable SPI access

    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks committed Jul 10, 2024
    Configuration menu
    Copy the full SHA
    bc9fcb7 View commit details
    Browse the repository at this point in the history

Commits on Jul 11, 2024

  1. fpga: Add new SPI access control logis

          New logic looks at instruction execution from a defined
          trampoline address to enable stateful SPI access.
    
          The access is disabled as soon as an instruction is executed
          from any address in RAM.
    
    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    7e26c74 View commit details
    Browse the repository at this point in the history
  2. fpga: Add testcase for SPI access control

          Add testcase that checks that access control
          is enabled and disabled as expected.
    
    Signed-off-by: Joachim Strömbergson <[email protected]>
    secworks committed Jul 11, 2024
    Configuration menu
    Copy the full SHA
    4233777 View commit details
    Browse the repository at this point in the history