1 /* $NetBSD: tpmif.h,v 1.3.28.1 2007/10/03 19:26:11 garbled Exp $ */
2 /******************************************************************************
5 * TPM I/O interface for Xen guest OSes.
7 * Permission is hereby granted, free of charge, to any person obtaining a copy
8 * of this software and associated documentation files (the "Software"), to
9 * deal in the Software without restriction, including without limitation the
10 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
11 * sell copies of the Software, and to permit persons to whom the Software is
12 * furnished to do so, subject to the following conditions:
14 * The above copyright notice and this permission notice shall be included in
15 * all copies or substantial portions of the Software.
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23 * DEALINGS IN THE SOFTWARE.
25 * Copyright (c) 2005, IBM Corporation
27 * Author: Stefan Berger, stefanb@us.ibm.com
28 * Grant table support: Mahadevan Gomathisankaran
30 * This code has been derived from tools/libxc/xen/io/netif.h
32 * Copyright (c) 2003-2004, Keir Fraser
35 #ifndef __XEN_PUBLIC_IO_TPMIF_H__
36 #define __XEN_PUBLIC_IO_TPMIF_H__
38 #include "../grant_table.h"
40 struct tpmif_tx_request
{
41 unsigned long addr
; /* Machine address of packet. */
42 grant_ref_t ref
; /* grant table access reference */
44 uint16_t size
; /* Packet size in bytes. */
46 typedef struct tpmif_tx_request tpmif_tx_request_t
;
49 * The TPMIF_TX_RING_SIZE defines the number of pages the
50 * front-end and backend can exchange (= size of array).
52 typedef uint32_t TPMIF_RING_IDX
;
54 #define TPMIF_TX_RING_SIZE 1
56 /* This structure must fit in a memory page. */
59 struct tpmif_tx_request req
;
61 typedef struct tpmif_ring tpmif_ring_t
;
63 struct tpmif_tx_interface
{
64 struct tpmif_ring ring
[TPMIF_TX_RING_SIZE
];
66 typedef struct tpmif_tx_interface tpmif_tx_interface_t
;
76 * indent-tabs-mode: nil