A method is described for implementing a trusted computing environment
within a data processing system where the data processing system includes
a single hardware trusted platform module (TPM). Multiple logical
partitions are provided in the data processing system. A unique context
is generated for each one of the logical partitions. When one of the
logical partitions requires access to the hardware TPM, that partition's
context is required to be stored in the hardware TPM. The hardware TPM
includes a finite number of storage locations, called context slots, for
storing contexts. Each context slot can store one partition's context.
Each one of the partitions is associated with one of the limited number
of context storage slots in the hardware TPM. At least one of the context
slots is simultaneously associated with more than one of the logical
partitions. Contexts are swapped into and out of the hardware TPM during
runtime of the data processing system so that when ones of the partitions
require access to the hardware TPM, their required contexts are currently
stored in the hardware TPM.