Site icon EfmSoft

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. The base What Is page already shows the short Windows message; the additional diagnostic value is that this result marks a mode selector is outside the legal values for the specific TPM 1.2 command and sub-operation.

Data to retain

QuestionEvidence for this HRESULT
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
What is the controlled comparison?replace only the mode selector with a documented value for the same command and device version

A useful this result trace links three code-specific timelines: the application call, the local TBS/provider or firmware event, and the raw command/response exchange. The result 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 result 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 result state: raw command and response bytes, command ordinal, structure tags and the relevant TPM state.
  3. Run the result controlled comparison once and preserve both binary transcripts.
  4. Verify the expected this result 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 — a separate checkpoint when compared with it.
TPM_E_BAD_DATASIZEThe size of the data (or blob) parameter is bad or inconsistent with the referenced key — a separate checkpoint when compared with it.
TPM_E_BAD_VERSIONThe TPM cannot perform this version of the capability — a separate checkpoint when compared with it.

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.

After correcting it, start with a fresh caller context where the protocol requires one, replay the original intended operation, and confirm that hardware-backed policy remains enforced.

Authoritative references


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

Exit mobile version