This commit was manufactured by cvs2svn to create branch 'vserver'.
[linux-2.6.git] / include / xen / interface / io / tpmif.h
1 /******************************************************************************
2  * tpmif.h
3  *
4  * TPM I/O interface for Xen guest OSes.
5  *
6  * Copyright (c) 2005, IBM Corporation
7  *
8  * Author: Stefan Berger, stefanb@us.ibm.com
9  * Grant table support: Mahadevan Gomathisankaran
10  *
11  * This code has been derived from tools/libxc/xen/io/netif.h
12  *
13  * Copyright (c) 2003-2004, Keir Fraser
14  */
15
16 #ifndef __XEN_PUBLIC_IO_TPMIF_H__
17 #define __XEN_PUBLIC_IO_TPMIF_H__
18
19 #include "../grant_table.h"
20
21 struct tpmif_tx_request {
22     unsigned long addr;   /* Machine address of packet.   */
23     grant_ref_t ref;      /* grant table access reference */
24     uint16_t unused;
25     uint16_t size;        /* Packet size in bytes.        */
26 };
27 typedef struct tpmif_tx_request tpmif_tx_request_t;
28
29 /*
30  * The TPMIF_TX_RING_SIZE defines the number of pages the
31  * front-end and backend can exchange (= size of array).
32  */
33 typedef uint32_t TPMIF_RING_IDX;
34
35 #define TPMIF_TX_RING_SIZE 10
36
37 /* This structure must fit in a memory page. */
38
39 struct tpmif_ring {
40     struct tpmif_tx_request req;
41 };
42 typedef struct tpmif_ring tpmif_ring_t;
43
44 struct tpmif_tx_interface {
45     struct tpmif_ring ring[TPMIF_TX_RING_SIZE];
46 };
47 typedef struct tpmif_tx_interface tpmif_tx_interface_t;
48
49 #endif
50
51 /*
52  * Local variables:
53  * mode: C
54  * c-set-style: "BSD"
55  * c-basic-offset: 4
56  * tab-width: 4
57  * indent-tabs-mode: nil
58  * End:
59  */