cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

cobalt-omnitek.h (1372B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/*
      3 *  Omnitek Scatter-Gather DMA Controller
      4 *
      5 *  Copyright 2012-2015 Cisco Systems, Inc. and/or its affiliates.
      6 *  All rights reserved.
      7 */
      8
      9#ifndef COBALT_OMNITEK_H
     10#define COBALT_OMNITEK_H
     11
     12#include <linux/scatterlist.h>
     13#include "cobalt-driver.h"
     14
     15struct sg_dma_descriptor {
     16	u32 pci_l;
     17	u32 pci_h;
     18
     19	u32 local;
     20	u32 reserved0;
     21
     22	u32 next_l;
     23	u32 next_h;
     24
     25	u32 bytes;
     26	u32 reserved1;
     27};
     28
     29int omni_sg_dma_init(struct cobalt *cobalt);
     30void omni_sg_dma_abort_channel(struct cobalt_stream *s);
     31void omni_sg_dma_start(struct cobalt_stream *s, struct sg_dma_desc_info *desc);
     32bool is_dma_done(struct cobalt_stream *s);
     33
     34int descriptor_list_create(struct cobalt *cobalt,
     35	struct scatterlist *scatter_list, bool to_pci, unsigned sglen,
     36	unsigned size, unsigned width, unsigned stride,
     37	struct sg_dma_desc_info *desc);
     38
     39void descriptor_list_chain(struct sg_dma_desc_info *this,
     40			   struct sg_dma_desc_info *next);
     41void descriptor_list_loopback(struct sg_dma_desc_info *desc);
     42void descriptor_list_end_of_chain(struct sg_dma_desc_info *desc);
     43
     44void *descriptor_list_allocate(struct sg_dma_desc_info *desc, size_t bytes);
     45void descriptor_list_free(struct sg_dma_desc_info *desc);
     46
     47void descriptor_list_interrupt_enable(struct sg_dma_desc_info *desc);
     48void descriptor_list_interrupt_disable(struct sg_dma_desc_info *desc);
     49
     50#endif