/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (c) 2020 MediaTek Inc.
 */


#ifndef __APUSYS_REVISER_MSG_H__
#define __APUSYS_REVISER_MSG_H__


enum REVISER_MSG_CMD_TYPE {
	REVISER_CMD_DBG_LOGLEVEL = 0x0,
	REVISER_CMD_HANDSHAKE,
	REVISER_CMD_DBG_PLATFORM,
	REVISER_CMD_SYSTEM_RAM,
	REVISER_CMD_HW_BOUNDARY = 0x20,
	REVISER_CMD_HW_RMP_TABLE,
	REVISER_CMD_HW_CTX,
	REVISER_CMD_HW_DEFAULT_IOVA,
	REVISER_CMD_HW_EXCEPTION,
	REVISER_CMD_TABLE_CTX = 0x40,
	REVISER_CMD_TABLE_TCM,
	REVISER_CMD_TABLE_VLM,
	REVISER_CMD_DBG_OP = 0x80,
	REVISER_CMD_MAX,
};

enum REVISER_MSG_OPTION_TYPE {
	REVISER_OPTION_GET,
	REVISER_OPTION_SET,
	REVISER_OPTION_PRINT,
	REVISER_OPTION_MAX,
};

enum REVISER_MSG_MEM_TYPE {
	REVISER_MEM_NONE,
	REVISER_MEM_ALLOC,
	REVISER_MEM_FREE,
	REVISER_MEM_IMPORT,
	REVISER_MEM_UNIMPORT,
	REVISER_MEM_MAP,
	REVISER_MEM_UNMAP,
	REVISER_MEM_INFO,
	REVISER_MEM_MAX,
};

struct reviser_msg {
	uint32_t cmd;
	uint32_t option;
	uint32_t ack;
	uint32_t sn;
	uint32_t data[12];
} __packed;


#endif
