Skip to content

Commits

Permalink
pouze-microbit
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Commits on Jan 2, 2019

  1. fixup! hw/timer/nrf51_timer: Add nRF51 Timer peripheral

    Stefan Hajnoczi committed Jan 2, 2019
    Copy the full SHA
    d3b12b9 View commit details
    Browse the repository at this point in the history

Commits on Dec 26, 2018

  1. Dirty hacks to make TWI work.

    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    f1d5391 View commit details
    Browse the repository at this point in the history
  2. microbit: make -kernel optional

    ARMv7M machine types support -kernel for ELF and raw image files.
    Microbit programs are typically in Intel HEX (.hex) format.  The generic
    loader supports .hex files but it doesn't work as expected:
    
      $ qemu-system-arm -M microbit -device loader,file=microbit.hex
      Guest image must be specified (using -kernel)
    
    This error comes from armv7m_load_kernel() but we don't have -kernel in
    this case.
    
    This patch makes -kernel optional since most of the time we'll want to
    use -device loader instead.
    
    Note that we need to register the reset handler that
    armv7m_load_kernel() used to register for us.
    
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    8f48663 View commit details
    Browse the repository at this point in the history
  3. fixup! hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories

    Fix missing whitespace at end of comment.
    
    Reported-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    cf01af3 View commit details
    Browse the repository at this point in the history
  4. fixup! hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories

    Tighten the assertions (they have an off-by-one error).
    
    Reported-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    296dcc6 View commit details
    Browse the repository at this point in the history
  5. fixup! hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories

    tests/device-introspect-test -p
    /arm/device/introspect/concrete/defaults/none segfaults because the FICR
    and UICR memory regions aren't owned by the NVM parent object.
    
    Pass in the owner object instead of NULL.
    
    Reported-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    9da9c46 View commit details
    Browse the repository at this point in the history
  6. arm: Add Clock peripheral stub to NRF51 SOC

    This stubs enables the microbit-micropython firmware to run
    on the microbit machine.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    0a4b170 View commit details
    Browse the repository at this point in the history
  7. tests/microbit-test: Add Tests for nRF51 Timer

    Basic tests for nRF51 Timer Peripheral.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    75d445a View commit details
    Browse the repository at this point in the history
  8. arm: Instantiate NRF51 Timers

    Instantiates TIMER0 - TIMER2
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    83b5f41 View commit details
    Browse the repository at this point in the history
  9. hw/timer/nrf51_timer: Add nRF51 Timer peripheral

    This patch adds the model for the nRF51 timer peripheral.
    Currently, only the TIMER mode is implemented.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    59c6109 View commit details
    Browse the repository at this point in the history
  10. tests/microbit-test: Add Tests for nRF51 GPIO

    The test suite for the nRF51 GPIO peripheral for now
    only tests initial state. Additionally a set of
    tests testing an implementation detail of the model
    are included.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    5a004b1 View commit details
    Browse the repository at this point in the history
  11. arm: Instantiate NRF51 general purpose I/O

    Instantiates GPIO peripheral model
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    197fcea View commit details
    Browse the repository at this point in the history
  12. hw/gpio/nrf51_gpio: Add nRF51 GPIO peripheral

    This adds a model of the nRF51 GPIO peripheral.
    
    Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf
    
    The nRF51 series microcontrollers support up to 32 GPIO pins in various configurations.
    The pins can be used as input pins with pull-ups or pull-down.
    Furthermore, three different output driver modes per level are
    available (disconnected, standard, high-current).
    
    The GPIO-Peripheral has a mechanism for detecting level changes which is
    not featured in this model.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    80a218f View commit details
    Browse the repository at this point in the history
  13. tests: Add bbc:microbit / nRF51 test suite

    The microbit-test includes tests for the nRF51 NVMC
    peripheral and will host future nRF51 peripheral tests
    and board-level bbc:microbit tests.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    7281910 View commit details
    Browse the repository at this point in the history
  14. arm: Instantiate NRF51 special NVM's and NVMC

    Instantiates UICR, FICR, FLASH and NVMC in nRF51 SOC.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    3ee504c View commit details
    Browse the repository at this point in the history
  15. hw/nvram/nrf51_nvm: Add nRF51 non-volatile memories

    The nRF51 contains three regions of non-volatile memory (NVM):
    - CODE (R/W): contains code
    - FICR (R): Factory information like code size, chip id etc.
    - UICR (R/W): Changeable configuration data. Lock bits, Code
      protection configuration, Bootloader address, Nordic SoftRadio
      configuration, Firmware configuration.
    
    Read and write access to the memories is managed by the
    Non-volatile memory controller.
    
    Memory schema:
     [ CPU ] -+- [ NVM, either FICR, UICR or CODE ]
              |      |
              \- [ NVMC ]
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    dea9ca1 View commit details
    Browse the repository at this point in the history
  16. arm: Instantiate NRF51 random number generator

    Use RNG in SOC.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    ea47c3a View commit details
    Browse the repository at this point in the history
  17. hw/misc/nrf51_rng: Add NRF51 random number generator peripheral

    Add a model of the NRF51 random number generator peripheral.
    This is a simple random generator that continuously generates
    new random values after startup.
    
    Reference Manual: http://infocenter.nordicsemi.com/pdf/nRF51_RM_v3.0.pdf
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    59b023d View commit details
    Browse the repository at this point in the history
  18. arm: Add header to host common definition for nRF51 SOC peripherals

    Adds a header that provides definitions that are used
    across nRF51 peripherals
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    26d2e5a View commit details
    Browse the repository at this point in the history
  19. qtest: Add set_irq_in command to set IRQ/GPIO level

    Adds a new qtest command "set_irq_in" which allows
    to set qemu gpio lines to a given level.
    
    Based on https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02363.html
    which never got merged.
    
    Signed-off-by: Steffen Görtz <contrib@steffen-goertz.de>
    Originally-by: Matthew Ogilvie <mmogilvi_qemu@miniinfo.net>
    Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: Thomas Huth <thuth@redhat.com>
    Reviewed-by: Laurent Vivier <lvivier@redhat.com>
    Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
    douzepouze authored and Stefan Hajnoczi committed Dec 26, 2018
    Copy the full SHA
    e8cc558 View commit details
    Browse the repository at this point in the history

Commits on Dec 22, 2018

  1. Merge remote-tracking branch 'remotes/marcel/tags/rdma-pull-request' …

    …into staging
    
    RDMA queue
     * Add support for RDMA MAD
     * Various fixes for the pvrdma backend
    
    # gpg: Signature made Sat 22 Dec 2018 09:36:36 GMT
    # gpg:                using RSA key 36D4C0F0CF2FE46D
    # gpg: Good signature from "Marcel Apfelbaum <marcel.apfelbaum@zoho.com>"
    # gpg:                 aka "Marcel Apfelbaum <marcel@redhat.com>"
    # gpg:                 aka "Marcel Apfelbaum <marcel.apfelbaum@gmail.com>"
    # gpg: WARNING: This key is not certified with sufficiently trusted signatures!
    # gpg:          It is not certain that the signature belongs to the owner.
    # Primary key fingerprint: B1C6 3A57 F92E 08F2 640F  31F5 36D4 C0F0 CF2F E46D
    
    * remotes/marcel/tags/rdma-pull-request: (31 commits)
      pvrdma: check return value from pvrdma_idx_ring_has_ routines
      rdma: remove unused VENDOR_ERR_NO_SGE macro
      pvrdma: release ring object in case of an error
      pvrdma: check number of pages when creating rings
      pvrdma: add uar_read routine
      rdma: check num_sge does not exceed MAX_SGE
      pvrdma: release device resources in case of an error
      docs: Update pvrdma device documentation
      hw/rdma: Do not call rdma_backend_del_gid on an empty gid
      hw/rdma: Do not use bitmap_zero_extend to free bitmap
      hw/pvrdma: Clean device's resource when system is shutdown
      vl: Introduce shutdown_notifiers
      hw/rdma: Remove unneeded code that handles more that one port
      hw/pvrdma: Fill error code in command's response
      hw/pvrdma: Fill all CQE fields
      hw/pvrdma: Make device state depend on Ethernet function state
      hw/rdma: Initialize node_guid from vmxnet3 mac address
      hw/pvrdma: Make sure PCI function 0 is vmxnet3
      vmxnet3: Move some definitions to header file
      hw/pvrdma: Add support to allow guest to configure GID table
      ...
    
    Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
    pm215 committed Dec 22, 2018
    Copy the full SHA
    9b2e891 View commit details
    Browse the repository at this point in the history
  2. pvrdma: check return value from pvrdma_idx_ring_has_ routines

    pvrdma_idx_ring_has_[data/space] routines also return invalid
    index PVRDMA_INVALID_IDX[=-1], if ring has no data/space. Check
    return value from these routines to avoid plausible infinite loops.
    
    Reported-by: Li Qiang <liq3ea@163.com>
    Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
    Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Prasad J Pandit authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    f1e2e38 View commit details
    Browse the repository at this point in the history
  3. rdma: remove unused VENDOR_ERR_NO_SGE macro

    With commit 4481985c (rdma: check num_sge does not exceed MAX_SGE)
    macro VENDOR_ERR_NO_SGE is no longer in use - delete it.
    
    Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
    Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Prasad J Pandit authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    7be3a21 View commit details
    Browse the repository at this point in the history
  4. pvrdma: release ring object in case of an error

    create_cq and create_qp routines allocate ring object, but it's
    not released in case of an error, leading to memory leakage.
    
    Reported-by: Li Qiang <liq3ea@163.com>
    Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
    Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Prasad J Pandit authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    509f57c View commit details
    Browse the repository at this point in the history
  5. pvrdma: check number of pages when creating rings

    When creating CQ/QP rings, an object can have up to
    PVRDMA_MAX_FAST_REG_PAGES 8 pages. Check 'npages' parameter
    to avoid excessive memory allocation or a null dereference.
    
    Reported-by: Li Qiang <liq3ea@163.com>
    Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
    Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Prasad J Pandit authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    2c858ce View commit details
    Browse the repository at this point in the history
  6. pvrdma: add uar_read routine

    Define skeleton 'uar_read' routine. Avoid NULL dereference.
    
    Reported-by: Li Qiang <liq3ea@163.com>
    Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
    Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Prasad J Pandit authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    2aa8645 View commit details
    Browse the repository at this point in the history
  7. rdma: check num_sge does not exceed MAX_SGE

    rdma back-end has scatter/gather array ibv_sge[MAX_SGE=4] set
    to have 4 elements. A guest could send a 'PvrdmaSqWqe' ring element
    with 'num_sge' set to > MAX_SGE, which may lead to OOB access issue.
    Add check to avoid it.
    
    Reported-by: Saar Amar <saaramar5@gmail.com>
    Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
    Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Prasad J Pandit authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    0e68373 View commit details
    Browse the repository at this point in the history
  8. pvrdma: release device resources in case of an error

    If during pvrdma device initialisation an error occurs,
    pvrdma_realize() does not release memory resources, leading
    to memory leakage.
    
    Reported-by: Li Qiang <liq3ea@163.com>
    Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
    Message-Id: <20181212175817.815-1-ppandit@redhat.com>
    Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Prasad J Pandit authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    cce6486 View commit details
    Browse the repository at this point in the history
  9. docs: Update pvrdma device documentation

    Interface with the device is changed with the addition of support for
    MAD packets.
    Adjust documentation accordingly.
    
    While there fix a minor mistake which may lead to think that there is a
    relation between using RXE on host and the compatibility with bare-metal
    peers.
    
    Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
    Reviewed-by: Marcel Apfelbaum<marcel.apfelbaum@gmail.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Yuval Shaia authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    46b69a8 View commit details
    Browse the repository at this point in the history
  10. hw/rdma: Do not call rdma_backend_del_gid on an empty gid

    When device goes down the function fini_ports loops over all entries in
    gid table regardless of the fact whether entry is valid or not. In case
    that entry is not valid we'd like to skip from any further processing in
    backend device.
    
    Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
    Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Yuval Shaia authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    305fd2b View commit details
    Browse the repository at this point in the history
  11. hw/rdma: Do not use bitmap_zero_extend to free bitmap

    bitmap_zero_extend is designed to work for extending, not for
    shrinking.
    Using g_free instead.
    
    Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
    Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Yuval Shaia authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    9a3053d View commit details
    Browse the repository at this point in the history
  12. hw/pvrdma: Clean device's resource when system is shutdown

    In order to clean some external resources such as GIDs, QPs etc,
    register to receive notification when VM is shutdown.
    
    Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
    Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Yuval Shaia authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    ffa65d9 View commit details
    Browse the repository at this point in the history
  13. vl: Introduce shutdown_notifiers

    Notifier will be used for signaling shutdown event to inform system is
    shutdown. This will allow devices and other component to run some
    cleanup code needed before VM is shutdown.
    
    Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
    Reviewed-by: Cornelia Huck <cohuck@redhat.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Yuval Shaia authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    2dadd75 View commit details
    Browse the repository at this point in the history
  14. hw/rdma: Remove unneeded code that handles more that one port

    Device supports only one port, let's remove a dead code that handles
    more than one port.
    
    Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
    Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Yuval Shaia authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    14c74f7 View commit details
    Browse the repository at this point in the history
  15. hw/pvrdma: Fill error code in command's response

    Driver checks error code let's set it.
    In addition, for code simplification purposes, set response's fields
    ack, response and err outside of the scope of command handlers.
    
    Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
    Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
    Yuval Shaia authored and marcel-apf committed Dec 22, 2018
    Copy the full SHA
    0917821 View commit details
    Browse the repository at this point in the history
Older