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

memc.h (550B)


      1/* SPDX-License-Identifier: GPL-2.0-only */
      2/*
      3 *  arch/arm/include/asm/hardware/memc.h
      4 *
      5 *  Copyright (C) Russell King.
      6 */
      7#define VDMA_ALIGNMENT	PAGE_SIZE
      8#define VDMA_XFERSIZE	16
      9#define VDMA_INIT	0
     10#define VDMA_START	1
     11#define VDMA_END	2
     12
     13#ifndef __ASSEMBLY__
     14extern void memc_write(unsigned int reg, unsigned long val);
     15
     16#define video_set_dma(start,end,offset)				\
     17do {								\
     18	memc_write (VDMA_START, (start >> 2));			\
     19	memc_write (VDMA_END, (end - VDMA_XFERSIZE) >> 2);	\
     20	memc_write (VDMA_INIT, (offset >> 2));			\
     21} while (0)
     22
     23#endif