0001
0002
0003
0004
0005 #ifndef __iwl_fw_uefi__
0006 #define __iwl_fw_uefi__
0007
0008 #define IWL_UEFI_OEM_PNVM_NAME L"UefiCnvWlanOemSignedPnvm"
0009 #define IWL_UEFI_REDUCED_POWER_NAME L"UefiCnvWlanReducedPower"
0010 #define IWL_UEFI_SGOM_NAME L"UefiCnvWlanSarGeoOffsetMapping"
0011
0012
0013
0014
0015
0016
0017
0018 #define IWL_HARDCODED_PNVM_SIZE 4096
0019 #define IWL_HARDCODED_REDUCE_POWER_SIZE 32768
0020 #define IWL_HARDCODED_SGOM_SIZE 339
0021
0022 struct pnvm_sku_package {
0023 u8 rev;
0024 u32 total_size;
0025 u8 n_skus;
0026 u32 reserved[2];
0027 u8 data[];
0028 } __packed;
0029
0030 struct uefi_cnv_wlan_sgom_data {
0031 u8 revision;
0032 u8 offset_map[IWL_HARDCODED_SGOM_SIZE - 1];
0033 } __packed;
0034
0035
0036
0037
0038
0039
0040 #ifdef CONFIG_EFI
0041 void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len);
0042 void *iwl_uefi_get_reduced_power(struct iwl_trans *trans, size_t *len);
0043 #else
0044 static inline
0045 void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len)
0046 {
0047 return ERR_PTR(-EOPNOTSUPP);
0048 }
0049
0050 static inline
0051 void *iwl_uefi_get_reduced_power(struct iwl_trans *trans, size_t *len)
0052 {
0053 return ERR_PTR(-EOPNOTSUPP);
0054 }
0055 #endif
0056
0057 #if defined(CONFIG_EFI) && defined(CONFIG_ACPI)
0058 void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt);
0059 #else
0060 static inline
0061 void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt)
0062 {
0063 }
0064 #endif
0065 #endif