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

kcs_bmc_client.h (1321B)


      1/* SPDX-License-Identifier: GPL-2.0 */
      2/* Copyright (c) 2021, IBM Corp. */
      3
      4#ifndef __KCS_BMC_CONSUMER_H__
      5#define __KCS_BMC_CONSUMER_H__
      6
      7#include <linux/irqreturn.h>
      8
      9#include "kcs_bmc.h"
     10
     11struct kcs_bmc_driver_ops {
     12	int (*add_device)(struct kcs_bmc_device *kcs_bmc);
     13	int (*remove_device)(struct kcs_bmc_device *kcs_bmc);
     14};
     15
     16struct kcs_bmc_driver {
     17	struct list_head entry;
     18
     19	const struct kcs_bmc_driver_ops *ops;
     20};
     21
     22struct kcs_bmc_client_ops {
     23	irqreturn_t (*event)(struct kcs_bmc_client *client);
     24};
     25
     26struct kcs_bmc_client {
     27	const struct kcs_bmc_client_ops *ops;
     28
     29	struct kcs_bmc_device *dev;
     30};
     31
     32void kcs_bmc_register_driver(struct kcs_bmc_driver *drv);
     33void kcs_bmc_unregister_driver(struct kcs_bmc_driver *drv);
     34
     35int kcs_bmc_enable_device(struct kcs_bmc_device *kcs_bmc, struct kcs_bmc_client *client);
     36void kcs_bmc_disable_device(struct kcs_bmc_device *kcs_bmc, struct kcs_bmc_client *client);
     37
     38void kcs_bmc_update_event_mask(struct kcs_bmc_device *kcs_bmc, u8 mask, u8 events);
     39
     40u8 kcs_bmc_read_data(struct kcs_bmc_device *kcs_bmc);
     41void kcs_bmc_write_data(struct kcs_bmc_device *kcs_bmc, u8 data);
     42u8 kcs_bmc_read_status(struct kcs_bmc_device *kcs_bmc);
     43void kcs_bmc_write_status(struct kcs_bmc_device *kcs_bmc, u8 data);
     44void kcs_bmc_update_status(struct kcs_bmc_device *kcs_bmc, u8 mask, u8 val);
     45#endif