Lines Matching full:spec
140 #define IS_PCR_HREG(spec) ((spec) & 0x20) argument
141 #define IS_FIX_HREG(spec) (((spec) & 0x38) == 0x08) argument
142 #define IS_VAR_HREG(spec) (((spec) & 0x38) == 0x10) argument
143 #define HREG_IDX(spec) ((spec) & (IS_PCR_HREG(spec) ? 0x1f : 0x7)) argument
450 * @param spec specification of a hash register
451 * @return pointer to hash register or NULL if @a spec does not qualify a
454 static struct h_reg *get_hreg(uint8_t spec) in get_hreg() argument
458 idx = HREG_IDX(spec); in get_hreg()
459 if (IS_FIX_HREG(spec)) { in get_hreg()
463 } else if (IS_PCR_HREG(spec)) { in get_hreg()
467 } else if (IS_VAR_HREG(spec)) { in get_hreg()
477 * @param spec specification of a hash register
481 * This func uses @a get_reg() to determine the hash register for a given spec.
486 static struct h_reg *access_hreg(struct udevice *tpm, uint8_t spec, in access_hreg() argument
491 result = get_hreg(spec); in access_hreg()
496 if (IS_FIX_HREG(spec)) { in access_hreg()
503 if (IS_PCR_HREG(spec)) { in access_hreg()
504 hre_tpm_err = tpm_pcr_read(tpm, HREG_IDX(spec), in access_hreg()
507 } else if (IS_FIX_HREG(spec)) { in access_hreg()
508 switch (HREG_IDX(spec)) { in access_hreg()