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

dprtc-cmd.h (1490B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2/*
      3 * Copyright 2013-2016 Freescale Semiconductor Inc.
      4 * Copyright 2016-2018 NXP
      5 */
      6
      7#ifndef _FSL_DPRTC_CMD_H
      8#define _FSL_DPRTC_CMD_H
      9
     10/* Command versioning */
     11#define DPRTC_CMD_BASE_VERSION		1
     12#define DPRTC_CMD_VERSION_2		2
     13#define DPRTC_CMD_ID_OFFSET		4
     14
     15#define DPRTC_CMD(id)	(((id) << DPRTC_CMD_ID_OFFSET) | DPRTC_CMD_BASE_VERSION)
     16#define DPRTC_CMD_V2(id) (((id) << DPRTC_CMD_ID_OFFSET) | DPRTC_CMD_VERSION_2)
     17
     18/* Command IDs */
     19#define DPRTC_CMDID_CLOSE			DPRTC_CMD(0x800)
     20#define DPRTC_CMDID_OPEN			DPRTC_CMD(0x810)
     21
     22#define DPRTC_CMDID_SET_IRQ_ENABLE		DPRTC_CMD(0x012)
     23#define DPRTC_CMDID_GET_IRQ_ENABLE		DPRTC_CMD(0x013)
     24#define DPRTC_CMDID_SET_IRQ_MASK		DPRTC_CMD_V2(0x014)
     25#define DPRTC_CMDID_GET_IRQ_MASK		DPRTC_CMD(0x015)
     26#define DPRTC_CMDID_GET_IRQ_STATUS		DPRTC_CMD(0x016)
     27#define DPRTC_CMDID_CLEAR_IRQ_STATUS		DPRTC_CMD(0x017)
     28
     29#pragma pack(push, 1)
     30struct dprtc_cmd_open {
     31	__le32 dprtc_id;
     32};
     33
     34struct dprtc_cmd_get_irq {
     35	__le32 pad;
     36	u8 irq_index;
     37};
     38
     39struct dprtc_cmd_set_irq_enable {
     40	u8 en;
     41	u8 pad[3];
     42	u8 irq_index;
     43};
     44
     45struct dprtc_rsp_get_irq_enable {
     46	u8 en;
     47};
     48
     49struct dprtc_cmd_set_irq_mask {
     50	__le32 mask;
     51	u8 irq_index;
     52};
     53
     54struct dprtc_rsp_get_irq_mask {
     55	__le32 mask;
     56};
     57
     58struct dprtc_cmd_get_irq_status {
     59	__le32 status;
     60	u8 irq_index;
     61};
     62
     63struct dprtc_rsp_get_irq_status {
     64	__le32 status;
     65};
     66
     67struct dprtc_cmd_clear_irq_status {
     68	__le32 status;
     69	u8 irq_index;
     70};
     71
     72#pragma pack(pop)
     73
     74#endif /* _FSL_DPRTC_CMD_H */