139f66114c03639715cb88774255f066a2d942557Randall Spangler/* This file is automatically generated */ 239f66114c03639715cb88774255f066a2d942557Randall Spangler 389a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_extend_cmd{ 439f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[34]; 5553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t pcrNum; 6553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t inDigest; 739f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_extend_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x22, 0x0, 0x0, 0x0, 0x14, }, 8553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah10, 14, }; 939f66114c03639715cb88774255f066a2d942557Randall Spangler 10f0605cbdc36f58829a908a3333e438c565c8c7afKees Cookconst struct s_tpm_get_random_cmd{ 11f0605cbdc36f58829a908a3333e438c565c8c7afKees Cook uint8_t buffer[14]; 12f0605cbdc36f58829a908a3333e438c565c8c7afKees Cook uint16_t bytesRequested; 13f0605cbdc36f58829a908a3333e438c565c8c7afKees Cook} tpm_get_random_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x46, }, 14f0605cbdc36f58829a908a3333e438c565c8c7afKees Cook10, }; 15f0605cbdc36f58829a908a3333e438c565c8c7afKees Cook 168b6da26a6e5978a43233f7a43c7bab5889d3817aKees Cookconst struct s_tpm_getownership_cmd{ 178b6da26a6e5978a43233f7a43c7bab5889d3817aKees Cook uint8_t buffer[22]; 188b6da26a6e5978a43233f7a43c7bab5889d3817aKees Cook} tpm_getownership_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x5, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x11, }, 198b6da26a6e5978a43233f7a43c7bab5889d3817aKees Cook}; 208b6da26a6e5978a43233f7a43c7bab5889d3817aKees Cook 2189a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_getpermissions_cmd{ 2239f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[22]; 23553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t index; 2439f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_getpermissions_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x11, 0x0, 0x0, 0x0, 0x4, }, 25553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah18, }; 2639f66114c03639715cb88774255f066a2d942557Randall Spangler 2789a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_getstclearflags_cmd{ 285896b9664d088699e246de964a7c374af663a34eLuigi Semenzato uint8_t buffer[22]; 295896b9664d088699e246de964a7c374af663a34eLuigi Semenzato} tpm_getstclearflags_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x9, }, 305896b9664d088699e246de964a7c374af663a34eLuigi Semenzato}; 315896b9664d088699e246de964a7c374af663a34eLuigi Semenzato 3289a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_getflags_cmd{ 3339f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[22]; 3439f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_getflags_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0x1, 0x8, }, 3539f66114c03639715cb88774255f066a2d942557Randall Spangler}; 3639f66114c03639715cb88774255f066a2d942557Randall Spangler 3789a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_physicalsetdeactivated_cmd{ 3839f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[11]; 39553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t deactivated; 4039f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_physicalsetdeactivated_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xb, 0x0, 0x0, 0x0, 0x72, }, 41553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah10, }; 4239f66114c03639715cb88774255f066a2d942557Randall Spangler 4389a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_physicalenable_cmd{ 4439f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[10]; 4539f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_physicalenable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x6f, }, 4639f66114c03639715cb88774255f066a2d942557Randall Spangler}; 4739f66114c03639715cb88774255f066a2d942557Randall Spangler 4889a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_physicaldisable_cmd{ 4939f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[10]; 5039f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_physicaldisable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x70, }, 5139f66114c03639715cb88774255f066a2d942557Randall Spangler}; 5239f66114c03639715cb88774255f066a2d942557Randall Spangler 5389a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_forceclear_cmd{ 5439f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[10]; 5539f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_forceclear_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x5d, }, 5639f66114c03639715cb88774255f066a2d942557Randall Spangler}; 5739f66114c03639715cb88774255f066a2d942557Randall Spangler 5889a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_readpubek_cmd{ 5939f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[30]; 6039f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_readpubek_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x1e, 0x0, 0x0, 0x0, 0x7c, }, 6139f66114c03639715cb88774255f066a2d942557Randall Spangler}; 6239f66114c03639715cb88774255f066a2d942557Randall Spangler 6389a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_continueselftest_cmd{ 6439f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[10]; 6539f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_continueselftest_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x53, }, 6639f66114c03639715cb88774255f066a2d942557Randall Spangler}; 6739f66114c03639715cb88774255f066a2d942557Randall Spangler 6889a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_selftestfull_cmd{ 6939f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[10]; 7039f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_selftestfull_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x50, }, 7139f66114c03639715cb88774255f066a2d942557Randall Spangler}; 7239f66114c03639715cb88774255f066a2d942557Randall Spangler 7389a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_resume_cmd{ 743da063e3f7612464a41a4c9b2b31fb7eade57a13Luigi Semenzato uint8_t buffer[12]; 753da063e3f7612464a41a4c9b2b31fb7eade57a13Luigi Semenzato} tpm_resume_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x2, }, 763da063e3f7612464a41a4c9b2b31fb7eade57a13Luigi Semenzato}; 773da063e3f7612464a41a4c9b2b31fb7eade57a13Luigi Semenzato 78050785c31210176e0a6202e320a02afc21c2640bLuigi Semenzatoconst struct s_tpm_savestate_cmd{ 79050785c31210176e0a6202e320a02afc21c2640bLuigi Semenzato uint8_t buffer[10]; 80050785c31210176e0a6202e320a02afc21c2640bLuigi Semenzato} tpm_savestate_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xa, 0x0, 0x0, 0x0, 0x98, }, 81050785c31210176e0a6202e320a02afc21c2640bLuigi Semenzato}; 82050785c31210176e0a6202e320a02afc21c2640bLuigi Semenzato 8389a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_startup_cmd{ 8439f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[12]; 8539f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_startup_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x0, 0x0, 0x0, 0x99, 0x0, 0x1, }, 8639f66114c03639715cb88774255f066a2d942557Randall Spangler}; 8739f66114c03639715cb88774255f066a2d942557Randall Spangler 8889a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_finalizepp_cmd{ 89377557fcb260c9b41abc36ebba5759336436e59cLuigi Semenzato uint8_t buffer[12]; 90377557fcb260c9b41abc36ebba5759336436e59cLuigi Semenzato} tpm_finalizepp_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x2, 0xa0, }, 91377557fcb260c9b41abc36ebba5759336436e59cLuigi Semenzato}; 92377557fcb260c9b41abc36ebba5759336436e59cLuigi Semenzato 9389a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_pplock_cmd{ 9439f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[12]; 9539f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_pplock_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x4, }, 9639f66114c03639715cb88774255f066a2d942557Randall Spangler}; 9739f66114c03639715cb88774255f066a2d942557Randall Spangler 9889a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_ppenable_cmd{ 991d83dd1ba5b825407a8e17972c54577d14ba173dLuigi Semenzato uint8_t buffer[12]; 1001d83dd1ba5b825407a8e17972c54577d14ba173dLuigi Semenzato} tpm_ppenable_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x20, }, 1011d83dd1ba5b825407a8e17972c54577d14ba173dLuigi Semenzato}; 1021d83dd1ba5b825407a8e17972c54577d14ba173dLuigi Semenzato 10389a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_ppassert_cmd{ 10439f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[12]; 10539f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_ppassert_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xc, 0x40, 0x0, 0x0, 0xa, 0x0, 0x8, }, 10639f66114c03639715cb88774255f066a2d942557Randall Spangler}; 10739f66114c03639715cb88774255f066a2d942557Randall Spangler 108946370d012a809bba833ff9d37fe0ce86af09860Kees Cookconst struct s_tpm_pcr_read_cmd{ 109946370d012a809bba833ff9d37fe0ce86af09860Kees Cook uint8_t buffer[14]; 110946370d012a809bba833ff9d37fe0ce86af09860Kees Cook uint16_t pcrNum; 111946370d012a809bba833ff9d37fe0ce86af09860Kees Cook} tpm_pcr_read_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0xe, 0x0, 0x0, 0x0, 0x15, }, 112946370d012a809bba833ff9d37fe0ce86af09860Kees Cook10, }; 113946370d012a809bba833ff9d37fe0ce86af09860Kees Cook 11489a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_nv_read_cmd{ 11539f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[22]; 116553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t index; 117553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t length; 11839f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_nv_read_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x16, 0x0, 0x0, 0x0, 0xcf, }, 119553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah10, 18, }; 12039f66114c03639715cb88774255f066a2d942557Randall Spangler 12189a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_nv_write_cmd{ 12239f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[256]; 123553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t index; 124553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t length; 125553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t data; 12639f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_nv_write_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xcd, }, 127553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah10, 18, 22, }; 12839f66114c03639715cb88774255f066a2d942557Randall Spangler 12989a02c194f1b6da0de7f98784d85e6827c3a1aecLuigi Semenzatoconst struct s_tpm_nv_definespace_cmd{ 13039f66114c03639715cb88774255f066a2d942557Randall Spangler uint8_t buffer[101]; 131553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t index; 132553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t perm; 133553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah uint16_t size; 13439f66114c03639715cb88774255f066a2d942557Randall Spangler} tpm_nv_definespace_cmd = {{0x0, 0xc1, 0x0, 0x0, 0x0, 0x65, 0x0, 0x0, 0x0, 0xcc, 0x0, 0x18, 0, 0, 0, 0, 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x3, 0, 0, 0, 0x1f, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x0, 0x17, }, 135553d00ec86fed95888dcaff1b911ce8c444d03fdGaurav Shah12, 70, 77, }; 13639f66114c03639715cb88774255f066a2d942557Randall Spangler 13739f66114c03639715cb88774255f066a2d942557Randall Spanglerconst int kWriteInfoLength = 12; 13839f66114c03639715cb88774255f066a2d942557Randall Spanglerconst int kNvDataPublicPermissionsOffset = 60; 139