| 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
| Question | Evidence 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.
- Capture this result and
0x8028002Cat the first code-specific return boundary. - Decode the result state: raw command and response bytes, command ordinal, structure tags and the relevant TPM state.
- Run the result controlled comparison once and preserve both binary transcripts.
- Verify the expected this result output or state transition instead of relying on absence of a UI message.
Codes that answer different questions
| Comparison code | Built-in distinction |
|---|---|
TPM_E_BAD_PRESENCE | Either the physicalPresence or physicalPresenceLock bits have the wrong value — a separate checkpoint when compared with it. |
TPM_E_BAD_DATASIZE | The 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_VERSION | The 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
- TCG: TPM 1.2 Main Specification — source for the checkpoint.
- TCG: TPM 1.2 Part 2 — Structures — source for the checkpoint.
- TCG: TPM 1.2 Part 3 — Commands — source for the checkpoint.
- Microsoft: TPM Base Services portal — source for the checkpoint.
Looking for a different code? Search another status or error code.