1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 3 #ifndef _APOLLOLAKE_CSE_H_ 4 #define _APOLLOLAKE_CSE_H_ 5 6 /* CSE Host Firmware Status register 1 */ 7 union cse_fwsts1 { 8 uint32_t data; 9 struct { 10 uint32_t working_state: 4; 11 uint32_t mfg_mode: 1; 12 uint32_t fpt_bad: 1; 13 uint32_t operation_state: 3; 14 uint32_t fw_init_complete: 1; 15 uint32_t ft_bup_ld_flr: 1; 16 uint32_t update_in_progress: 1; 17 uint32_t error_code: 4; 18 uint32_t operation_mode: 4; 19 uint32_t reserved: 4; 20 uint32_t boot_options_present: 1; 21 uint32_t ack_data: 3; 22 uint32_t bios_message_ack: 4; 23 } __packed fields; 24 }; 25 26 /* General Status Shadow Register 1 */ 27 union cse_fwsts2 { 28 uint32_t data; 29 struct { 30 uint32_t bist_in_progress: 1; 31 uint32_t icc_prog_sts: 2; 32 uint32_t invoke_mebx: 1; 33 uint32_t cpu_replaced_sts: 1; 34 uint32_t mbp_ready: 1; 35 uint32_t mfs_failure: 1; 36 uint32_t warm_rst_req_for_df: 1; 37 uint32_t cpu_replaced_valid: 1; 38 uint32_t reserved1: 2; 39 uint32_t fw_upd_ipu: 1; 40 uint32_t reserved2: 1; 41 uint32_t mbp_cleared: 1; 42 uint32_t reserved3: 2; 43 uint32_t ext_stat_code1: 8; 44 uint32_t ext_stat_code2: 4; 45 uint32_t infra_phase_code: 4; 46 } __packed fields; 47 }; 48 49 /* General Status Shadow Register 2 */ 50 union cse_fwsts3 { 51 uint32_t data; 52 struct { 53 uint32_t chunk_0: 1; 54 uint32_t chunk_1: 1; 55 uint32_t chunk_2: 1; 56 uint32_t chunk_3: 1; 57 uint32_t reserved1: 5; 58 uint32_t ibb_verif_result: 1; 59 uint32_t ibb_verif_done: 1; 60 uint32_t reserved2: 3; 61 uint32_t ibb_size: 14; 62 uint32_t no_of_chunks: 2; 63 uint32_t reserved: 2; 64 } __packed fields; 65 }; 66 67 /* General Status Shadow Register 3 */ 68 union cse_fwsts4 { 69 uint32_t data; 70 struct { 71 uint32_t reserved1: 10; 72 uint32_t reserved2: 1; 73 uint32_t reserved3: 1; 74 uint32_t tpm_disconnected: 1; 75 uint32_t reserved4: 1; 76 uint32_t txe_veri_boot_valid: 1; 77 uint32_t txe_veri_boot_test: 1; 78 uint32_t reserved5: 16; 79 } __packed fields; 80 }; 81 82 /* General Status Shadow Register 4 */ 83 union cse_fwsts5 { 84 uint32_t data; 85 struct { 86 uint32_t reserved1: 3; 87 uint32_t error_status_code: 5; 88 uint32_t reserved2: 24; 89 } __packed fields; 90 }; 91 92 /* General Status Shadow Register 5 */ 93 union cse_fwsts6 { 94 uint32_t data; 95 struct { 96 uint32_t reserved1: 30; 97 uint32_t fpf_commited: 1; 98 uint32_t reserved2: 1; 99 } __packed fields; 100 }; 101 102 /* Miscellaneous Shadow Register 1 */ 103 union cse_fwsts7 { 104 uint32_t data; 105 struct { 106 uint32_t cse_uma_size: 6; 107 uint32_t reserved1: 8; 108 uint32_t reserved2: 2; 109 uint32_t cse_uma_size_valid: 1; 110 uint32_t reserved3: 8; 111 uint32_t reserved4: 6; 112 uint32_t misc_shadow_valid: 1; 113 } __packed fields; 114 }; 115 116 #endif /* _APOLLOLAKE_CSE_H_ */ 117