1. 17 5月, 2019 1 次提交
    • O
      habanalabs: don't limit packet size for device CPU · cbb10f1e
      Oded Gabbay 提交于
      This patch removes a limitation on the maximum packet size that is read by
      the device CPU as that limitation is not needed.
      
      Therefore, the patch also removes an elaborate calculation that is based
      on this limitation which is also not needed now. Instead, use a fixed
      value for the memory pool size of the packets.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      cbb10f1e
  2. 13 5月, 2019 1 次提交
  3. 12 5月, 2019 1 次提交
  4. 09 5月, 2019 1 次提交
    • O
      habanalabs: change polling functions to macros · a08b51a9
      Oded Gabbay 提交于
      This patch changes two polling functions to macros, in order to make their
      API the same as the standard readl_poll_timeout so we would be able to
      define the "condition for exit" when calling these macros.
      
      This will simplify the code as it will eliminate the need to check both
      for timeout and for the (cond) in the calling function.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      a08b51a9
  5. 04 5月, 2019 1 次提交
    • O
      habanalabs: force user to set device debug mode · 19734970
      Oded Gabbay 提交于
      This patch adds the implementation of the HL_DEBUG_OP_SET_MODE opcode in
      the DEBUG IOCTL.
      
      It forces the user who wants to debug the device to set the device into
      debug mode before he can configure the debug engines. The patch also makes
      sure to disable debug mode upon user releasing FD, in case the user forgot
      to disable debug mode.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      19734970
  6. 05 5月, 2019 1 次提交
  7. 25 5月, 2019 1 次提交
    • O
      habanalabs: halt debug engines on user process close · 89225ce4
      Omer Shpigelman 提交于
      This patch fix a potential bug where a user's process has closed
      unexpectedly without disabling the debug engines. In that case, the debug
      engines might continue running but because the user's MMU mappings are
      going away, we will get page fault errors.
      
      This behavior is also opposed to the general rule where nothing runs on
      the device after the user process closes.
      
      The patch stops the debug H/W engines upon process termination and thus
      makes sure nothing runs on the device after the process goes away.
      Signed-off-by: NOmer Shpigelman <oshpigelman@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      89225ce4
  8. 30 4月, 2019 1 次提交
  9. 01 5月, 2019 3 次提交
  10. 29 4月, 2019 1 次提交
    • T
      habanalabs: Use single pool for CPU accessible host memory · 03d5f641
      Tomer Tayar 提交于
      The device's CPU accessible memory on host is managed in a dedicated
      pool, except for 2 regions - Primary Queue (PQ) and Event Queue (EQ) -
      which are allocated from generic DMA pools.
      Due to address length limitations of the CPU, the addresses of all these
      memory regions must have the same MSBs starting at bit 40.
      This patch modifies the allocation of the PQ and EQ to be also from the
      dedicated pool, to ensure compliance with the limitation.
      Signed-off-by: NTomer Tayar <ttayar@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      03d5f641
  11. 28 4月, 2019 1 次提交
    • O
      habanalabs: return old dram bar address upon change · a38693d7
      Oded Gabbay 提交于
      This patch changes the ASIC interface function that changes the DRAM bar
      window. The change is to return the old address that the DRAM bar pointed
      to instead of an error code.
      
      This simplifies the code that use this function (mainly in debugfs) to
      restore the bar to the old setting.
      
      This is also needed for easier support in future ASICs.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      a38693d7
  12. 26 4月, 2019 1 次提交
  13. 22 4月, 2019 1 次提交
    • O
      habanalabs: use ASIC functions interface for rreg/wreg · b2377e03
      Oded Gabbay 提交于
      This patch slightly changes the macros of RREG32 and WREG32, which are
      used when reading or writing from registers.
      
      Instead of directly calling a function in the common code from these
      macros, the new code calls a function from the ASIC functions interface.
      
      This change allows us to share much more code between real ASICs and
      simulators, which in turn reduces the maintenance burden and
      the chances for forgetting to port code between the ASIC files.
      
      The patch also implements the hl_poll_timeout macro, instead of calling
      the generic readl_poll_timeout macro. This is required to allow use of
      this macro in the simulator files.
      
      As a result from this change, more functions in goya.c are shared with the
      simulator and therefore, should not be defined as static.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      b2377e03
  14. 10 4月, 2019 1 次提交
  15. 04 4月, 2019 1 次提交
    • O
      habanalabs: ASIC_AUTO_DETECT enum value is redundant · 29593840
      Oded Gabbay 提交于
      This patch removes the enum value of ASIC_AUTO_DETECT because we can use
      the validity of the pdev variable to know whether we have a real device or
      a simulator. For a real device, we detect the asic type from the device ID
      while for a simulator, the simulator code calls create_hdev() with the
      specified ASIC type.
      
      Set ASIC_INVALID as the first option in the enum to make sure that no
      other enum value will receive the value 0 (which indicates a non-existing
      entry in the simulator array).
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      29593840
  16. 02 4月, 2019 2 次提交
    • O
      habanalabs: refactoring in goya.c · bedd1442
      Oded Gabbay 提交于
      This patch does some refactoring in goya.c to make code more reusable
      between goya code and the goya simulator code (which is not upstreamed).
      
      In addition, the patch removes some dead functions from goya.c which are
      not used by the current upstream code
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      bedd1442
    • O
      habanalabs: add new IOCTL for debug, tracing and profiling · 315bc055
      Omer Shpigelman 提交于
      Habanalabs ASICs use the ARM coresight infrastructure to support debug,
      tracing and profiling of neural networks topologies.
      
      Because the coresight is configured using register writes and reads, and
      some of the registers hold sensitive information (e.g. the address in
      the device's DRAM where the trace data is written to), the user must go
      through the kernel driver to configure this mechanism.
      
      This patch implements the common code of the IOCTL and calls the
      ASIC-specific function for the actual H/W configuration.
      
      The IOCTL supports configuration of seven coresight components:
      ETR, ETF, STM, FUNNEL, BMON, SPMU and TIMESTAMP
      
      The user specifies which component he wishes to configure and provides a
      pointer to a structure (located in its process space) that contains the
      relevant configuration.
      
      The common code copies the relevant data from the user-space to kernel
      space and then calls the ASIC-specific function to do the H/W
      configuration.
      
      After the configuration is done, which is usually composed
      of several IOCTL calls depending on what the user wanted to trace, the
      user can start executing the topology. The trace data will be written to
      the user's area in the device's DRAM.
      
      After the tracing operation is complete, and user will call the IOCTL
      again to disable the tracing operation. The user also need to read
      values from registers for some of the components (e.g. the size of the
      trace data in the device's DRAM). In that case, the user will provide a
      pointer to an "output" structure in user-space, which the IOCTL code will
      fill according the to selected component.
      Signed-off-by: NOmer Shpigelman <oshpigelman@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      315bc055
  17. 24 3月, 2019 1 次提交
  18. 08 3月, 2019 1 次提交
    • O
      habanalabs: keep track of the device's dma mask · d9973871
      Oded Gabbay 提交于
      This patch refactors the code that is responsible to set the DMA mask for
      the device.
      
      Upon each change of the dma mask, the driver will save the new value that
      was set. This is needed in order to make sure we don't try to increase the
      mask a second time, in case we failed in the first time. This is
      especially relevant for Power machines, as that may cause a change in
      configuration of the TVT which will break the device.
      
      Goya will first try to set the device's dma mask to 39 bits, so that the
      memory that is allocated on the host machine for communication with the
      device's cpu will be in a bus address which is lower then 39 bits. Later,
      Goya will try to increase that mask to 48 bits, but only if setting the
      mask to 39 bits was successful.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      d9973871
  19. 03 3月, 2019 1 次提交
    • O
      habanalabs: perform accounting for active CS · cbaa99ed
      Oded Gabbay 提交于
      This patch adds accounting for active CS. Active means that the CS was
      submitted to the H/W queues and was not completed yet.
      
      This is necessary to support suspend operation. Because the device will be
      reset upon suspend, we can only suspend after all active CS have been
      completed. Hence, we need to perform accounting on their number.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      cbaa99ed
  20. 05 3月, 2019 1 次提交
  21. 28 2月, 2019 2 次提交
  22. 27 2月, 2019 2 次提交
    • O
      habanalabs: make functions static or declare them · 5e6e0239
      Oded Gabbay 提交于
      This patch fixes the below sparse warnings by either making the functions
      static or by adding a declaration in the relevant header file.
      
      In addition, the patch removes goya_mmap completely as it doesn't add any
      additional benefit.
      
      Fixes the following sparse warnings:
      
      drivers/misc/habanalabs/habanalabs_drv.c:24:1: warning: symbol 'hl_devs_idr' was not declared. Should it be static?
      drivers/misc/habanalabs/habanalabs_drv.c:25:1: warning: symbol 'hl_devs_idr_lock' was not declared. Should it be static?
      drivers/misc/habanalabs/memory.c:1451:5: warning: symbol 'hl_vm_ctx_init_with_ranges' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:396:5: warning: symbol 'goya_send_pci_access_msg' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:417:5: warning: symbol 'goya_pci_bars_map' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:557:6: warning: symbol 'goya_reset_link_through_bridge' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:774:5: warning: symbol 'goya_early_fini' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:857:6: warning: symbol 'goya_late_fini' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:971:5: warning: symbol 'goya_sw_fini' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:1233:5: warning: symbol 'goya_init_cpu_queues' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2914:5: warning: symbol 'goya_suspend' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2939:5: warning: symbol 'goya_resume' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2952:5: warning: symbol 'goya_mmap' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2957:5: warning: symbol 'goya_cb_mmap' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:2973:6: warning: symbol 'goya_ring_doorbell' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3063:6: warning: symbol 'goya_flush_pq_write' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3068:6: warning: symbol 'goya_dma_alloc_coherent' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3074:6: warning: symbol 'goya_dma_free_coherent' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3080:6: warning: symbol 'goya_get_int_queue_base' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3138:5: warning: symbol 'goya_send_job_on_qman0' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3295:5: warning: symbol 'goya_test_queue' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3417:6: warning: symbol 'goya_dma_pool_zalloc' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3426:6: warning: symbol 'goya_dma_pool_free' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3432:6: warning: symbol 'goya_cpu_accessible_dma_pool_alloc' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3448:6: warning: symbol 'goya_cpu_accessible_dma_pool_free' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3458:5: warning: symbol 'goya_dma_map_sg' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3467:6: warning: symbol 'goya_dma_unmap_sg' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:3473:5: warning: symbol 'goya_get_dma_desc_list_size' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4210:5: warning: symbol 'goya_parse_cb_no_mmu' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4261:5: warning: symbol 'goya_parse_cb_no_ext_quque' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4294:5: warning: symbol 'goya_cs_parser' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4307:6: warning: symbol 'goya_add_end_of_cb_packets' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4334:5: warning: symbol 'goya_context_switch' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4426:6: warning: symbol 'goya_restore_phase_topology' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4460:5: warning: symbol 'goya_debugfs_read32' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4510:5: warning: symbol 'goya_debugfs_write32' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4738:6: warning: symbol 'goya_handle_eqe' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:4836:6: warning: symbol 'goya_get_events_stat' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:5075:5: warning: symbol 'goya_send_heartbeat' was not declared. Should it be static?
      drivers/misc/habanalabs/goya/goya.c:5253:5: warning: symbol 'goya_get_eeprom_data' was not declared. Should it be static?
      Reported-by: NYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      5e6e0239
    • O
      habanalabs: allow memory allocations larger than 4GB · 230afe74
      Oded Gabbay 提交于
      This patch increase the size field in the uapi structure of the Memory
      IOCTL from 32-bit to 64-bit. This is to allow the user to allocate and/or
      map memory in chunks that are larger then 4GB.
      
      Goya's device memory (DRAM) can be up to 16GB, and for certain
      topologies, the user may want an allocation that is larger than 4GB.
      
      This change doesn't break current user-space because there was a "pad"
      field in the uapi structure right after the size field. Changing the size
      field to be 64-bit and removing the pad field maintains compatibility with
      current user-space.
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      230afe74
  23. 24 2月, 2019 1 次提交
    • O
      habanalabs: add MMU shadow mapping · 66542c3b
      Omer Shpigelman 提交于
      This patch adds shadow mapping to the MMU module. The shadow mapping
      allows traversing the page table in host memory rather reading each PTE
      from the device memory.
      It brings better performance and avoids reading from invalid device
      address upon PCI errors.
      Only at the end of map/unmap flow, writings to the device are performed in
      order to sync the H/W page tables with the shadow ones.
      Signed-off-by: NOmer Shpigelman <oshpigelman@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      66542c3b
  24. 07 3月, 2019 1 次提交
  25. 05 3月, 2019 1 次提交
  26. 04 3月, 2019 1 次提交
  27. 18 2月, 2019 9 次提交
    • O
      habanalabs: add debugfs support · c2164773
      Oded Gabbay 提交于
      This patch adds debugfs support to the driver. It allows the user-space to
      display information that is contained in the internal structures of the
      driver, such as:
      - active command submissions
      - active user virtual memory mappings
      - number of allocated command buffers
      
      It also enables the user to perform reads and writes through Goya's PCI
      bars.
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c2164773
    • O
      habanalabs: implement INFO IOCTL · d8dd7b0a
      Oded Gabbay 提交于
      This patch implements the INFO IOCTL. That IOCTL is used by the user to
      query information that is relevant/needed by the user in order to submit
      deep learning jobs to Goya.
      
      The information is divided into several categories, such as H/W IP, Events
      that happened, DDR usage and more.
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d8dd7b0a
    • O
      habanalabs: add virtual memory and MMU modules · 0feaf86d
      Omer Shpigelman 提交于
      This patch adds the Virtual Memory and MMU modules.
      
      Goya has an internal MMU which provides process isolation on the internal
      DDR. The internal MMU also performs translations for transactions that go
      from Goya to the Host.
      
      The driver is responsible for allocating and freeing memory on the DDR
      upon user request. It also provides an interface to map and unmap DDR and
      Host memory to the device address space.
      
      The MMU in Goya supports 3-level and 4-level page tables. With 3-level, the
      size of each page is 2MB, while with 4-level the size of each page is 4KB.
      
      In the DDR, the physical pages are always 2MB.
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOmer Shpigelman <oshpigelman@habana.ai>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      0feaf86d
    • O
      habanalabs: add command submission module · eff6f4a0
      Oded Gabbay 提交于
      This patch adds the main flow for the user to submit work to the device.
      
      Each work is described by a command submission object (CS). The CS contains
      3 arrays of command buffers: One for execution, and two for context-switch
      (store and restore).
      
      For each CB, the user specifies on which queue to put that CB. In case of
      an internal queue, the entry doesn't contain a pointer to the CB but the
      address in the on-chip memory that the CB resides at.
      
      The driver parses some of the CBs to enforce security restrictions.
      
      The user receives a sequence number that represents the CS object. The user
      can then query the driver regarding the status of the CS, using that
      sequence number.
      
      In case the CS doesn't finish before the timeout expires, the driver will
      perform a soft-reset of the device.
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      eff6f4a0
    • O
      habanalabs: add device reset support · f8c8c7d5
      Oded Gabbay 提交于
      This patch adds support for doing various on-the-fly reset of Goya.
      
      The driver supports two types of resets:
      1. soft-reset
      2. hard-reset
      
      Soft-reset is done when the device detects a timeout of a command
      submission that was given to the device. The soft-reset process only resets
      the engines that are relevant for the submission of compute jobs, i.e. the
      DMA channels, the TPCs and the MME. The purpose is to bring the device as
      fast as possible to a working state.
      
      Hard-reset is done in several cases:
      1. After soft-reset is done but the device is not responding
      2. When fatal errors occur inside the device, e.g. ECC error
      3. When the driver is removed
      
      Hard-reset performs a reset of the entire chip except for the PCI
      controller and the PLLs. It is a much longer process then soft-reset but it
      helps to recover the device without the need to reboot the Host.
      
      After hard-reset, the driver will restore the max power attribute and in
      case of manual power management, the frequencies that were set.
      
      This patch also adds two entries to the sysfs, which allows the root user
      to initiate a soft or hard reset.
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f8c8c7d5
    • O
      habanalabs: add sysfs and hwmon support · d91389bc
      Oded Gabbay 提交于
      This patch add the sysfs and hwmon entries that are exposed by the driver.
      
      Goya has several sensors, from various categories such as temperature,
      voltage, current, etc. The driver exposes those sensors in the standard
      hwmon mechanism.
      
      In addition, the driver exposes a couple of interfaces in sysfs, both for
      configuration and for providing status of the device or driver.
      
      The configuration attributes is for Power Management:
      - Automatic or manual
      - Frequency value when moving to high frequency mode
      - Maximum power the device is allowed to consume
      
      The rest of the attributes are read-only and provide the following
      information:
      - Versions of the various firmwares running on the device
      - Contents of the device's EEPROM
      - The device type (currently only Goya is supported)
      - PCI address of the device (to allow user-space to connect between
        /dev/hlX to PCI address)
      - Status of the device (operational, malfunction, in_reset)
      - How many processes are open on the device's file
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d91389bc
    • O
      habanalabs: add event queue and interrupts · 1251f23a
      Oded Gabbay 提交于
      This patch adds support for receiving events from Goya's control CPU and
      for receiving MSI-X interrupts from Goya's DMA engines and CPU.
      
      Goya's PCI controller supports up to 8 MSI-X interrupts, which only 6 of
      them are currently used. The first 5 interrupts are dedicated for Goya's
      DMA engine queues. The 6th interrupt is dedicated for Goya's control CPU.
      
      The DMA queue will signal its MSI-X entry upon each completion of a command
      buffer that was placed on its primary queue. The driver will then mark that
      CB as completed and free the related resources. It will also update the
      command submission object which that CB belongs to.
      
      There is a dedicated event queue (EQ) between the driver and Goya's control
      CPU. The EQ is located on the Host memory. The control CPU writes a new
      entry to the EQ for various reasons, such as ECC error, MMU page fault, Hot
      temperature. After writing the new entry to the EQ, the control CPU will
      trigger its dedicated MSI-X entry to signal the driver that there is a new
      entry in the EQ. The driver will then read the entry and act accordingly.
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      1251f23a
    • O
      habanalabs: add h/w queues module · 9494a8dd
      Oded Gabbay 提交于
      This patch adds the H/W queues module and the code to initialize Goya's
      various compute and DMA engines and their queues.
      
      Goya has 5 DMA channels, 8 TPC engines and a single MME engine. For each
      channel/engine, there is a H/W queue logic which is used to pass commands
      from the user to the H/W. That logic is called QMAN.
      
      There are two types of QMANs: external and internal. The DMA QMANs are
      considered external while the TPC and MME QMANs are considered internal.
      For each external queue there is a completion queue, which is located on
      the Host memory.
      
      The differences between external and internal QMANs are:
      
      1. The location of the queue's memory. External QMANs are located on the
         Host memory while internal QMANs are located on the on-chip memory.
      
      2. The external QMAN write an entry to a completion queue and sends an
         MSI-X interrupt upon completion of a command buffer that was given to
         it. The internal QMAN doesn't do that.
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      9494a8dd
    • O
      habanalabs: add basic Goya h/w initialization · 839c4803
      Oded Gabbay 提交于
      This patch adds the basic part of Goya's H/W initialization. It adds code
      that initializes Goya's internal CPU, various registers that are related to
      internal routing, scrambling, workarounds for H/W bugs, etc.
      
      It also initializes Goya's security scheme that prevents the user from
      abusing Goya to steal data from the host, crash the host, change
      Goya's F/W, etc.
      Reviewed-by: NMike Rapoport <rppt@linux.ibm.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      839c4803