#include <linux/errno.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/freezer.h>
#include <xen/xen.h>
#include <xen/events.h>
#include <xen/interface/io/tpmif.h>
#include <xen/grant_table.h>
#include <xen/xenbus.h>
#include <xen/page.h>
#include "tpm.h"
#include <xen/platform_pci.h>
struct tpm_private { … };
enum status_bits { … };
static bool wait_for_tpm_stat_cond(struct tpm_chip *chip, u8 mask,
bool check_cancel, bool *canceled)
{ … }
static int wait_for_tpm_stat(struct tpm_chip *chip, u8 mask,
unsigned long timeout, wait_queue_head_t *queue,
bool check_cancel)
{ … }
static u8 vtpm_status(struct tpm_chip *chip)
{ … }
static bool vtpm_req_canceled(struct tpm_chip *chip, u8 status)
{ … }
static void vtpm_cancel(struct tpm_chip *chip)
{ … }
static size_t shr_data_offset(struct vtpm_shared_page *shr)
{ … }
static int vtpm_send(struct tpm_chip *chip, u8 *buf, size_t count)
{ … }
static int vtpm_recv(struct tpm_chip *chip, u8 *buf, size_t count)
{ … }
static const struct tpm_class_ops tpm_vtpm = …;
static irqreturn_t tpmif_interrupt(int dummy, void *dev_id)
{ … }
static int setup_chip(struct device *dev, struct tpm_private *priv)
{ … }
static int setup_ring(struct xenbus_device *dev, struct tpm_private *priv)
{ … }
static void ring_free(struct tpm_private *priv)
{ … }
static int tpmfront_probe(struct xenbus_device *dev,
const struct xenbus_device_id *id)
{ … }
static void tpmfront_remove(struct xenbus_device *dev)
{ … }
static int tpmfront_resume(struct xenbus_device *dev)
{ … }
static void backend_changed(struct xenbus_device *dev,
enum xenbus_state backend_state)
{ … }
static const struct xenbus_device_id tpmfront_ids[] = …;
MODULE_ALIAS(…) …;
static struct xenbus_driver tpmfront_driver = …;
static int __init xen_tpmfront_init(void)
{ … }
module_init(…) …;
static void __exit xen_tpmfront_exit(void)
{ … }
module_exit(xen_tpmfront_exit);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;