efi/tpm: Remove unused functions and structures

Although the tpm_execute() series of functions are defined they are not
used anywhere. Several structures in the include/grub/efi/tpm.h header
file are not used too. There is even nonexistent grub_tpm_init()
declaration in this header. Delete all that unneeded stuff.

If somebody needs the functionality implemented in the dropped code then
he/she can re-add it later. Now it needlessly increases the GRUB
code/image size.

Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Tianjia Zhang 2020-07-29 21:31:14 +08:00 committed by Daniel Kiper
parent de094060ac
commit 6efd04f314
2 changed files with 0 additions and 138 deletions

View file

@ -34,47 +34,6 @@
#define EV_IPL 0x0d
/* TCG_PassThroughToTPM Input Parameter Block. */
typedef struct
{
grub_uint16_t IPBLength;
grub_uint16_t Reserved1;
grub_uint16_t OPBLength;
grub_uint16_t Reserved2;
grub_uint8_t TPMOperandIn[1];
} GRUB_PACKED PassThroughToTPM_InputParamBlock;
/* TCG_PassThroughToTPM Output Parameter Block. */
typedef struct
{
grub_uint16_t OPBLength;
grub_uint16_t Reserved;
grub_uint8_t TPMOperandOut[1];
} GRUB_PACKED PassThroughToTPM_OutputParamBlock;
typedef struct
{
grub_uint16_t tag;
grub_uint32_t paramSize;
grub_uint32_t ordinal;
grub_uint32_t pcrNum;
/* The 160 bit value representing the event to be recorded. */
grub_uint8_t inDigest[SHA1_DIGEST_SIZE];
} GRUB_PACKED ExtendIncoming;
/* TPM_Extend Outgoing Operand. */
typedef struct
{
grub_uint16_t tag;
grub_uint32_t paramSize;
grub_uint32_t returnCode;
/* The PCR value after execution of the command. */
grub_uint8_t outDigest[SHA1_DIGEST_SIZE];
} GRUB_PACKED ExtendOutgoing;
grub_err_t grub_tpm_measure (unsigned char *buf, grub_size_t size,
grub_uint8_t pcr, const char *description);
grub_err_t grub_tpm_init (void);
grub_err_t grub_tpm_execute (PassThroughToTPM_InputParamBlock *inbuf,
PassThroughToTPM_OutputParamBlock *outbuf);
#endif