summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/mvm/fw-api.h
diff options
context:
space:
mode:
authorMatti Gottlieb <matti.gottlieb@intel.com>2015-07-15 16:19:29 +0300
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-08-04 21:29:37 +0300
commita6c4fb4441f4641609bbb3e40da438ed57629db0 (patch)
tree382f55674c2e9800246f7ebdb1e4f7d18abd6c07 /drivers/net/wireless/iwlwifi/mvm/fw-api.h
parent75118fdb63496e4611ab50380499ddd62b9de69f (diff)
downloadop-kernel-dev-a6c4fb4441f4641609bbb3e40da438ed57629db0.zip
op-kernel-dev-a6c4fb4441f4641609bbb3e40da438ed57629db0.tar.gz
iwlwifi: mvm: Add FW paging mechanism for the UMAC on PCI
Family 8000 products has 2 embedded processors, the first known as LMAC (lower MAC) and implements the functionality from previous products, the second one is known as UMAC (upper MAC) and is used mainly for driver offloads as well as new features. The UMAC is typically “less” real-time than the LMAC and is used for higher level controls. The UMAC's code/data size is estimated to be in the mega-byte arena, taking into account the code it needs to replace in the driver and the set of new features. In order to allow the UMAC to execute code that is bigger than its code memory, we allow the UMAC embedded processor to page out code pages on DRAM. When the device is master on the bus(PCI) the driver saves the UMAC's image pages in blocks of 32K in the DRAM and sends the layout of the pages to the FW. The FW can load / unload the pages on its own. The driver can support up to 1 MB of pages. Add paging mechanism for the UMAC on PCI in order to allow the program to use a larger virtual space while using less physical memory on the device. Signed-off-by: Eran Harary <eran.harary@intel.com> Signed-off-by: Matti Gottlieb <matti.gottlieb@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/fw-api.h')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/fw-api.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api.h b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
index 4e29c11..9c6b153 100644
--- a/drivers/net/wireless/iwlwifi/mvm/fw-api.h
+++ b/drivers/net/wireless/iwlwifi/mvm/fw-api.h
@@ -149,6 +149,9 @@ enum {
LQ_CMD = 0x4e,
+ /* paging block to FW cpu2 */
+ FW_PAGING_BLOCK_CMD = 0x4f,
+
/* Scan offload */
SCAN_OFFLOAD_REQUEST_CMD = 0x51,
SCAN_OFFLOAD_ABORT_CMD = 0x52,
@@ -370,6 +373,27 @@ struct iwl_nvm_access_cmd {
u8 data[];
} __packed; /* NVM_ACCESS_CMD_API_S_VER_2 */
+#define NUM_OF_FW_PAGING_BLOCKS 33 /* 32 for data and 1 block for CSS */
+
+/*
+ * struct iwl_fw_paging_cmd - paging layout
+ *
+ * (FW_PAGING_BLOCK_CMD = 0x4f)
+ *
+ * Send to FW the paging layout in the driver.
+ *
+ * @flags: various flags for the command
+ * @block_size: the block size in powers of 2
+ * @block_num: number of blocks specified in the command.
+ * @device_phy_addr: virtual addresses from device side
+*/
+struct iwl_fw_paging_cmd {
+ __le32 flags;
+ __le32 block_size;
+ __le32 block_num;
+ __le32 device_phy_addr[NUM_OF_FW_PAGING_BLOCKS];
+} __packed; /* FW_PAGING_BLOCK_CMD_API_S_VER_1 */
+
/**
* struct iwl_nvm_access_resp_ver2 - response to NVM_ACCESS_CMD
* @offset: offset in bytes into the section
OpenPOWER on IntegriCloud