The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/dev/iwlwifi/fw/uefi.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
    2 /*
    3  * Copyright(c) 2021 Intel Corporation
    4  */
    5 #ifndef __iwl_fw_uefi__
    6 #define __iwl_fw_uefi__
    7 
    8 #define IWL_UEFI_OEM_PNVM_NAME          L"UefiCnvWlanOemSignedPnvm"
    9 #define IWL_UEFI_REDUCED_POWER_NAME     L"UefiCnvWlanReducedPower"
   10 #define IWL_UEFI_SGOM_NAME              L"UefiCnvWlanSarGeoOffsetMapping"
   11 
   12 /*
   13  * TODO: we have these hardcoded values that the caller must pass,
   14  * because reading from the UEFI is not working.  To implement this
   15  * properly, we have to change iwl_pnvm_get_from_uefi() to call
   16  * efivar_entry_size() and return the value to the caller instead.
   17  */
   18 #define IWL_HARDCODED_PNVM_SIZE         4096
   19 #define IWL_HARDCODED_REDUCE_POWER_SIZE 32768
   20 #define IWL_HARDCODED_SGOM_SIZE         339
   21 
   22 struct pnvm_sku_package {
   23         u8 rev;
   24         u32 total_size;
   25         u8 n_skus;
   26         u32 reserved[2];
   27         u8 data[];
   28 } __packed;
   29 
   30 struct uefi_cnv_wlan_sgom_data {
   31         u8 revision;
   32         u8 offset_map[IWL_HARDCODED_SGOM_SIZE - 1];
   33 } __packed;
   34 
   35 /*
   36  * This is known to be broken on v4.19 and to work on v5.4.  Until we
   37  * figure out why this is the case and how to make it work, simply
   38  * disable the feature in old kernels.
   39  */
   40 #ifdef CONFIG_EFI
   41 void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len);
   42 void *iwl_uefi_get_reduced_power(struct iwl_trans *trans, size_t *len);
   43 #else /* CONFIG_EFI */
   44 static inline
   45 void *iwl_uefi_get_pnvm(struct iwl_trans *trans, size_t *len)
   46 {
   47         return ERR_PTR(-EOPNOTSUPP);
   48 }
   49 
   50 static inline
   51 void *iwl_uefi_get_reduced_power(struct iwl_trans *trans, size_t *len)
   52 {
   53         return ERR_PTR(-EOPNOTSUPP);
   54 }
   55 #endif /* CONFIG_EFI */
   56 
   57 #if defined(CONFIG_EFI) && defined(CONFIG_ACPI)
   58 void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt);
   59 #else
   60 static inline
   61 void iwl_uefi_get_sgom_table(struct iwl_trans *trans, struct iwl_fw_runtime *fwrt)
   62 {
   63 }
   64 #endif
   65 #endif /* __iwl_fw_uefi__ */

Cache object: adf705488d4133b72c9655e36d2e1dbc


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.