1226603Sdas
2226603Sdas/*
3226603Sdas * Licensed Materials - Property of IBM
4226603Sdas *
5226603Sdas * trousers - An open source TCG Software Stack
6226603Sdas *
7226603Sdas * (C) Copyright International Business Machines Corp. 2004
8226603Sdas *
9226603Sdas */
10226603Sdas
11#ifndef _MEMMGR_H_
12#define _MEMMGR_H_
13
14/*
15 * For each TSP context, there is one memTable, which holds a list of memEntry's,
16 * each of which holds a pointer to some malloc'd memory that's been returned to
17 * the user. The memTable also can point to other memTable's which would be
18 * created if multiple TSP contexts were opened.
19 *
20 */
21
22struct memEntry {
23	void *memPointer;
24	struct memEntry *nextEntry;
25};
26
27struct memTable {
28	TSS_HCONTEXT tspContext;
29	struct memEntry *entries;
30	struct memTable *nextTable;
31};
32
33MUTEX_DECLARE_INIT(memtable_lock);
34
35struct memTable *SpiMemoryTable = NULL;
36
37#endif
38