What does HRESULT 0x8028002C (TPM_E_BAD_MODE) mean?

 
Previous Next
TPM_E_BAD_DATASIZE TPM_E_BAD_PRESENCE

TPM_E_BAD_MODE

Locate the first producer

TPM_E_BAD_MODE (0x8028002C) belongs to TPM 1.2 command processing. This result means a mode selector is outside the legal values for the specific TPM 1.2 command and sub-operation.

Data to retain

QuestionEvidence
What exact state was rejected?a mode selector is outside the legal values for the specific TPM 1.2 command and sub-operation
Which layer owns the result?The TPM 1.2 command decoder and state machine.
What must be correlated?command ordinal, mode field, capability area or subcap, physical-presence option, migration type, and the caller enum value before serialization
Controlled comparisonreplace only the mode selector with a documented value for the same command and device version

A useful trace links three code-specific timelines: the application call, the local TBS/provider or firmware event, and the raw command/response exchange. The timestamps should describe one attempt; combining data from separate retries is particularly misleading for authorization sessions, context counters, DAA stages and lockout state.

Verification sequence

The one-variable check is to replace only the mode selector with a documented value for the same command and device version. Record the before/after state that the command is allowed to change. If the operation can have side effects, use a disposable key, session, counter or NV index rather than production material.

  1. Capture this result and 0x8028002C at the first code-specific return boundary.
  2. Decode the relevant state: raw command and response bytes, command ordinal, structure tags and the relevant TPM state.
  3. Run the controlled comparison once and preserve both binary transcripts.
  4. Verify the expected output or state transition instead of relying on absence of a UI message.

Codes that answer different questions

Comparison codeBuilt-in distinction
TPM_E_BAD_PRESENCEEither the physicalPresence or physicalPresenceLock bits have the wrong value.
TPM_E_BAD_DATASIZEThe size of the data (or blob) parameter is bad or inconsistent with the referenced key.
TPM_E_BAD_VERSIONThe TPM cannot perform this version of the capability.

It specifically answers whether a mode selector is outside the legal values for the specific TPM 1.2 command and sub-operation. In contrast, TPM_E_BAD_VERSION rejects a capability version; it rejects a mode or selector value.

Exit condition for the incident

To remediate it, use the mode enumeration defined for that exact command rather than reusing a similarly named flag from another structure. Do not clear ownership, delete keys or reset PCR-related state merely to see whether the message disappears; those actions can destroy the evidence and protected material while leaving serialization or command-order defects unchanged.

Authoritative references


Looking for a different code? Search another status or error code.