Adding GAUDI NIC code to habanalabs driver
Subsystems (4)
v3 cover Adding GAUDI NIC code to habanalabs driver
Hello,
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201
Thanks,
Oded
Omer Shpigelman (14):
habanalabs/gaudi: add NIC H/W and registers definitions habanalabs/gaudi: add NIC firmware-related definitions habanalabs/gaudi: add NIC security configuration habanalabs/gaudi: add support for NIC QMANs habanalabs/gaudi: add NIC Ethernet support habanalabs/gaudi: add NIC PHY code
habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL habanalabs/gaudi: add a new IOCTL for NIC control operations habanalabs/gaudi: add CQ control operations habanalabs/gaudi: add WQ control operations habanalabs/gaudi: add QP error handling habanalabs/gaudi: Add ethtool support using coresight habanalabs/gaudi: support DCB protocol habanalabs/gaudi: add NIC init/fini calls from common code
drivers/misc/habanalabs/common/context.c | 1 + drivers/misc/habanalabs/common/device.c | 24 +- drivers/misc/habanalabs/common/firmware_if.c | 44 + drivers/misc/habanalabs/common/habanalabs.h | 33 +- .../misc/habanalabs/common/habanalabs_drv.c | 5 + .../misc/habanalabs/common/habanalabs_ioctl.c | 151 +- drivers/misc/habanalabs/common/pci.c | 1 + drivers/misc/habanalabs/gaudi/Makefile | 3 + drivers/misc/habanalabs/gaudi/gaudi.c | 957 +++- drivers/misc/habanalabs/gaudi/gaudiP.h | 331 +- .../misc/habanalabs/gaudi/gaudi_coresight.c | 144 + drivers/misc/habanalabs/gaudi/gaudi_nic.c | 4093 +++++++++++++++++ drivers/misc/habanalabs/gaudi/gaudi_nic.h | 353 ++ .../misc/habanalabs/gaudi/gaudi_nic_dcbnl.c | 108 + .../misc/habanalabs/gaudi/gaudi_nic_ethtool.c | 616 +++ drivers/misc/habanalabs/gaudi/gaudi_phy.c | 1276 +++++ .../misc/habanalabs/gaudi/gaudi_security.c | 3973 ++++++++++++++++ drivers/misc/habanalabs/goya/goya.c | 44 + .../misc/habanalabs/include/common/cpucp_if.h | 34 +- .../include/gaudi/asic_reg/gaudi_regs.h | 26 +- .../include/gaudi/asic_reg/nic0_qm0_masks.h | 800 ++++ .../include/gaudi/asic_reg/nic0_qm0_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic0_qm1_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic0_qpc0_masks.h | 500 ++ .../include/gaudi/asic_reg/nic0_qpc0_regs.h | 710 +++ .../include/gaudi/asic_reg/nic0_qpc1_regs.h | 710 +++ .../include/gaudi/asic_reg/nic0_rxb_regs.h | 508 ++ .../include/gaudi/asic_reg/nic0_rxe0_masks.h | 354 ++ .../include/gaudi/asic_reg/nic0_rxe0_regs.h | 158 + .../include/gaudi/asic_reg/nic0_rxe1_regs.h | 158 + .../include/gaudi/asic_reg/nic0_stat_regs.h | 518 +++ .../include/gaudi/asic_reg/nic0_tmr_regs.h | 184 + .../include/gaudi/asic_reg/nic0_txe0_masks.h | 336 ++ .../include/gaudi/asic_reg/nic0_txe0_regs.h | 264 ++ .../include/gaudi/asic_reg/nic0_txe1_regs.h | 264 ++ .../include/gaudi/asic_reg/nic0_txs0_masks.h | 336 ++ .../include/gaudi/asic_reg/nic0_txs0_regs.h | 214 + .../include/gaudi/asic_reg/nic0_txs1_regs.h | 214 + .../include/gaudi/asic_reg/nic1_qm0_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic1_qm1_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic2_qm0_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic2_qm1_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic3_qm0_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic3_qm1_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic4_qm0_regs.h | 834 ++++ .../include/gaudi/asic_reg/nic4_qm1_regs.h | 834 ++++ drivers/misc/habanalabs/include/gaudi/gaudi.h | 12 + .../habanalabs/include/gaudi/gaudi_fw_if.h | 24 + .../habanalabs/include/gaudi/gaudi_masks.h | 15 + .../include/hw_ip/nic/nic_general.h | 13 + include/uapi/misc/habanalabs.h | 296 +- 51 files changed, 27083 insertions(+), 62 deletions(-) create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.c create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.h create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic_dcbnl.c create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic_ethtool.c create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_phy.c create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxb_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_stat_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_tmr_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic1_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic1_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic2_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic2_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic3_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic3_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic4_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic4_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/hw_ip/nic/nic_general.h
Signature · 1 line
2.17.1
PATCH v3 1/14 habanalabs/gaudi: add NIC H/W and registers definitions
From: Omer Shpigelman <[email protected]>
Add auto-generated header files that describe the NIC registers used by the driver.
Add also NIC H/W definitions regarding the number of engines, number of ports, habanalabs MAC OUI, etc
--- .../include/gaudi/asic_reg/gaudi_regs.h | 26 +- .../include/gaudi/asic_reg/nic0_qm0_masks.h | 800 +++++++++++++++++ .../include/gaudi/asic_reg/nic0_qm0_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic0_qm1_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic0_qpc0_masks.h | 500 +++++++++++ .../include/gaudi/asic_reg/nic0_qpc0_regs.h | 710 +++++++++++++++ .../include/gaudi/asic_reg/nic0_qpc1_regs.h | 710 +++++++++++++++ .../include/gaudi/asic_reg/nic0_rxb_regs.h | 508 +++++++++++ .../include/gaudi/asic_reg/nic0_rxe0_masks.h | 354 ++++++++ .../include/gaudi/asic_reg/nic0_rxe0_regs.h | 158 ++++ .../include/gaudi/asic_reg/nic0_rxe1_regs.h | 158 ++++ .../include/gaudi/asic_reg/nic0_stat_regs.h | 518 +++++++++++ .../include/gaudi/asic_reg/nic0_tmr_regs.h | 184 ++++ .../include/gaudi/asic_reg/nic0_txe0_masks.h | 336 +++++++ .../include/gaudi/asic_reg/nic0_txe0_regs.h | 264 ++++++ .../include/gaudi/asic_reg/nic0_txe1_regs.h | 264 ++++++ .../include/gaudi/asic_reg/nic0_txs0_masks.h | 336 +++++++ .../include/gaudi/asic_reg/nic0_txs0_regs.h | 214 +++++ .../include/gaudi/asic_reg/nic0_txs1_regs.h | 214 +++++ .../include/gaudi/asic_reg/nic1_qm0_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic1_qm1_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic2_qm0_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic2_qm1_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic3_qm0_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic3_qm1_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic4_qm0_regs.h | 834 ++++++++++++++++++ .../include/gaudi/asic_reg/nic4_qm1_regs.h | 834 ++++++++++++++++++ drivers/misc/habanalabs/include/gaudi/gaudi.h | 12 + .../habanalabs/include/gaudi/gaudi_masks.h | 15 + .../include/hw_ip/nic/nic_general.h | 13 + 30 files changed, 14633 insertions(+), 1 deletion(-) create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxb_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_stat_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_tmr_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs0_masks.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic1_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic1_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic2_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic2_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic3_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic3_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic4_qm0_regs.h create mode 100644 drivers/misc/habanalabs/include/gaudi/asic_reg/nic4_qm1_regs.h create mode 100644 drivers/misc/habanalabs/include/hw_ip/nic/nic_general.h
drivers/misc/habanalabs/include/gaudi/asic_reg/gaudi_regs.h +25 -1
@@ -89,7 +89,31 @@#include "tpc0_cfg_masks.h" #include "psoc_global_conf_masks.h" -#include "psoc_pci_pll_regs.h" +#include "nic0_qm0_regs.h" +#include "nic1_qm0_regs.h" +#include "nic2_qm0_regs.h" +#include "nic3_qm0_regs.h" +#include "nic4_qm0_regs.h" +#include "nic0_qm1_regs.h" +#include "nic1_qm1_regs.h" +#include "nic2_qm1_regs.h" +#include "nic3_qm1_regs.h" +#include "nic4_qm1_regs.h" +#include "nic0_txs0_regs.h" +#include "nic0_txe0_regs.h" +#include "nic0_qpc0_regs.h" +#include "nic0_qpc1_regs.h" +#include "nic0_rxe0_regs.h" +#include "nic0_rxb_regs.h" +#include "nic0_tmr_regs.h" +#include "nic0_stat_regs.h" + +#include "nic0_qm0_masks.h" +#include "nic0_rxe0_masks.h" +#include "nic0_qpc0_masks.h" +#include "nic0_txs0_masks.h" +#include "nic0_txe0_masks.h" +#include "psoc_hbm_pll_regs.h" #include "psoc_cpu_pll_regs.h"
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm0_masks.h new file +800 -0
800 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm0_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qm1_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc0_masks.h new file +500 -0
500 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc0_regs.h new file +710 -0
710 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_qpc1_regs.h new file +710 -0
710 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxb_regs.h new file +508 -0
508 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe0_masks.h new file +354 -0
354 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe0_regs.h new file +158 -0
158 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_rxe1_regs.h new file +158 -0
158 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_stat_regs.h new file +518 -0
518 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_tmr_regs.h new file +184 -0
184 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe0_masks.h new file +336 -0
336 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe0_regs.h new file +264 -0
264 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txe1_regs.h new file +264 -0
264 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs0_masks.h new file +336 -0
336 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs0_regs.h new file +214 -0
214 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic0_txs1_regs.h new file +214 -0
214 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic1_qm0_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic1_qm1_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic2_qm0_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic2_qm1_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic3_qm0_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic3_qm1_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic4_qm0_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/asic_reg/nic4_qm1_regs.h new file +834 -0
834 lines not on this page · raw message
drivers/misc/habanalabs/include/gaudi/gaudi.h +12 -0
Lines of this file are not shown. View the raw message.
drivers/misc/habanalabs/include/gaudi/gaudi_masks.h +15 -0
Lines of this file are not shown. View the raw message.
drivers/misc/habanalabs/include/hw_ip/nic/nic_general.h new file +13 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH v3 2/14 habanalabs/gaudi: add NIC firmware-related definitions
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Add new structures and messages that the driver use to interact with the firmware to receive information and events (errors) about GAUDI's NIC.
--- .../misc/habanalabs/include/common/cpucp_if.h | 34 ++++++++++++++++--- .../habanalabs/include/gaudi/gaudi_fw_if.h | 24 +++++++++++++ 2 files changed, 54 insertions(+), 4 deletions(-)
drivers/misc/habanalabs/include/common/cpucp_if.h +30 -4
@@ -9,6 +9,7 @@#define CPUCP_IF_H #include <linux/types.h> +#include <linux/if_ether.h> /* * EVENT QUEUE
@@ -199,6 +200,11 @@ enum pq_init_status {* CpuCP to write to the structure, to prevent data corruption in case of * mismatched driver/FW versions. * +* CPUCP_PACKET_NIC_INFO_GET - +* Fetch information from the device regarding the NIC. the host's driver +* passes the max size it allows the CpuCP to write to the structure, to +* prevent data corruption in case of mismatched driver/FW versions. +* * CPUCP_PACKET_TEMPERATURE_SET - * Set the value of the offset property of a specified thermal sensor. * The packet's arguments specify the desired sensor and the field to
@@ -244,12 +250,12 @@ enum cpucp_packet_id {CPUCP_PACKET_MAX_POWER_GET ,/* sysfs */ CPUCP_PACKET_MAX_POWER_SET ,/* sysfs */ CPUCP_PACKET_EEPROM_DATA_GET ,/* sysfs */ -CPUCP_RESERVED , +CPUCP_PACKET_NIC_INFO_GET ,/* internal */ CPUCP_PACKET_TEMPERATURE_SET ,/* sysfs */ CPUCP_PACKET_VOLTAGE_SET ,/* sysfs */ CPUCP_PACKET_CURRENT_SET ,/* sysfs */ -CPUCP_PACKET_PCIE_THROUGHPUT_GET ,/* internal */ -CPUCP_PACKET_PCIE_REPLAY_CNT_GET ,/* internal */ +CPUCP_PACKET_PCIE_THROUGHPUT_GET ,/* internal */ +CPUCP_PACKET_PCIE_REPLAY_CNT_GET ,/* internal */ CPUCP_PACKET_TOTAL_ENERGY_GET ,/* internal */ CPUCP_PACKET_PLL_REG_GET, /* internal */ };
@@ -300,7 +306,7 @@ struct cpucp_packet {/* For led set */ __le32 led_index; -/* For get CpuCP info/EEPROM data */ +/* For get CpuCP info/EEPROM data/NIC info */ __le32 data_max_size; };
@@ -392,6 +398,12 @@ struct eq_generic_event {#define CARD_NAME_MAX_LEN 16#define VERSION_MAX_LEN 128#define CPUCP_MAX_SENSORS 128 +#define CPUCP_MAX_NICS 128 +#define CPUCP_LANES_PER_NIC 4 +#define CPUCP_NIC_QSFP_EEPROM_MAX_LEN 1024 +#define CPUCP_MAX_NIC_LANES (CPUCP_MAX_NICS * CPUCP_LANES_PER_NIC) +#define CPUCP_NIC_MASK_ARR_LEN ((CPUCP_MAX_NICS + 63) / 64) +#define CPUCP_NIC_POLARITY_ARR_LEN ((CPUCP_MAX_NIC_LANES + 63) / 64)struct cpucp_sensor {__le32 type;
@@ -440,4 +452,18 @@ struct cpucp_info { char card_name[CARD_NAME_MAX_LEN]; }; +struct cpucp_mac_addr { +__u8 mac_addr[ETH_ALEN ]; +}; + +struct cpucp_nic_info { +struct cpucp_mac_addr mac_addrs[CPUCP_MAX_NICS ]; +__le64 link_mask[CPUCP_NIC_MASK_ARR_LEN ]; +__le64 pol_tx_mask[CPUCP_NIC_POLARITY_ARR_LEN ]; +__le64 pol_rx_mask[CPUCP_NIC_POLARITY_ARR_LEN ]; +__le64 link_ext_mask[CPUCP_NIC_MASK_ARR_LEN ]; +__u8 qsfp_eeprom[CPUCP_NIC_QSFP_EEPROM_MAX_LEN ]; +__le64 auto_neg_mask[CPUCP_NIC_MASK_ARR_LEN ]; +}; +#endif /* CPUCP_IF_H */
drivers/misc/habanalabs/include/gaudi/gaudi_fw_if.h +24 -0
@@ -8,6 +8,8 @@#ifndef GAUDI_FW_IF_H #define GAUDI_FW_IF_H +#include <linux/types.h> +#define GAUDI_EVENT_QUEUE_MSI_IDX 8#define GAUDI_NIC_PORT1_MSI_IDX 10#define GAUDI_NIC_PORT3_MSI_IDX 12
@@ -31,6 +33,28 @@ enum gaudi_pll_index {IF_PLL }; +enum gaudi_nic_axi_error { +RXB , +RXE , +TXS , +TXE , +QPC_RESP , +NON_AXI_ERR , +}; + +/* +* struct eq_nic_sei_event - describes an AXI error cause. +* @axi_error_cause: one of the events defined in enum gaudi_nic_axi_error. +* @id: can be either 0 or 1, to further describe unit with interrupt cause +* (i.e. TXE0 or TXE1). +* @pad[6]: padding structure to 64bit. +*/ +struct eq_nic_sei_event { +__u8 axi_error_cause; +__u8 id; +__u8 pad[6 ]; +}; +#define GAUDI_PLL_FREQ_LOW 200000000/* 200 MHz */ #endif /* GAUDI_FW_IF_H */
Signature · 1 line
2.17.1
PATCH v3 3/14 habanalabs/gaudi: add NIC security configuration
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Configure the security properties of the NIC IP. This is to prevent the user process from doing something with the NIC that he shouldn't do. e.g. crash the server, steal data, etc.
--- .../misc/habanalabs/gaudi/gaudi_security.c | 3973 +++++++++++++++++ 1 file changed, 3973 insertions(+)
drivers/misc/habanalabs/gaudi/gaudi_security.c +3973 -0
@@ -5157,6 +5157,3977 @@ static void gaudi_init_dma_protection_bits(struct hl_device *hdev)WREG32 (pb_addr + word_offset, ~mask); } +static void gaudi_init_nic_protection_bits (struct hl_device *hdev) +{ +u32 pb_addr, mask; +u8 word_offset; + +WREG32 (mmNIC0_QM0_BASE -CFG_BASE +PROT_BITS_OFFS +0x7C ,0 ); +WREG32 (mmNIC0_QM1_BASE -CFG_BASE +PROT_BITS_OFFS +0x7C ,0 ); + + pb_addr = (mmNIC0_QM0_GLBL_CFG0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_GLBL_CFG0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_GLBL_CFG0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_CFG1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_PROT &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_ERR_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_NON_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_NON_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_NON_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_NON_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_NON_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_STS0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_STS1_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_MSG_EN_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_MSG_EN_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_MSG_EN_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_MSG_EN_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_MSG_EN_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_BASE_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_BASE_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_BASE_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_BASE_LO_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_PQ_BASE_HI_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_PQ_BASE_HI_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_PQ_BASE_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_BASE_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_BASE_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_BASE_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_SIZE_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_SIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_SIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_SIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_PI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_PI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_PI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_PI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CFG0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CFG0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CFG0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CFG0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CFG1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CFG1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CFG1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_CFG1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_STS0_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_PQ_STS1_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_PQ_STS1_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_PQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_PQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_STS0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_0 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_CQ_CTL_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_CQ_CTL_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_CQ_CTL_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_CTL_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_CTL_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_CTL_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_LO_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_PTR_HI_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_TSIZE_STS_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_CQ_CTL_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_CQ_CTL_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_CQ_CTL_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_CTL_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_CTL_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_CTL_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_CTL_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_IFIFO_CNT_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_IFIFO_CNT_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_IFIFO_CNT_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_IFIFO_CNT_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CQ_IFIFO_CNT_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE0_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE1_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_LO_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_CP_MSG_BASE2_ADDR_LO_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_LO_2 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE2_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_MSG_BASE3_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_TSIZE_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_TSIZE_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_TSIZE_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_TSIZE_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_TSIZE_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_DST_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_DST_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_DST_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_LDMA_DST_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_CP_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_CP_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_CP_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_CURRENT_INST_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_BARRIER_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_BARRIER_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_BARRIER_CFG_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_CP_BARRIER_CFG_3 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_CP_BARRIER_CFG_3 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_CP_BARRIER_CFG_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_BARRIER_CFG_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_DBG_0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_DBG_0_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_CP_DBG_0_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_CP_DBG_0_2 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_CP_DBG_0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_DBG_0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_DBG_0_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_ARUSER_31_11_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_AWUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_AWUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_AWUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_AWUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CP_AWUSER_31_11_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_ARB_CFG_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_ARB_CFG_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_ARB_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_19 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_23 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_ARB_MST_AVAIL_CRED_24 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_24 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_AVAIL_CRED_31 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_ARB_MST_CHOISE_PUSH_OFST_23 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_ARB_MST_CHOISE_PUSH_OFST_23 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_ARB_SLV_CHOISE_WDT &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MSG_MAX_INFLIGHT &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MSG_AWUSER_31_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MSG_AWUSER_SEC_PROP &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MSG_AWUSER_NON_SEC_PROP &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_ARB_STATE_STS & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_ARB_STATE_STS &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_ARB_STATE_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_CHOISE_FULLNESS_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MSG_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_SLV_CHOISE_Q_HEAD &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_ERR_CAUSE &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_ERR_MSG_EN &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_ERR_STS_DRP &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_19 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_ARB_MST_CRED_STS_20 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_ARB_MST_CRED_STS_20 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_23 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_ARB_MST_CRED_STS_31 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CGM_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CGM_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CGM_CFG1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_LOCAL_RANGE_BASE & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_LOCAL_RANGE_BASE &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_LOCAL_RANGE_BASE &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_LOCAL_RANGE_SIZE &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_CSMR_STRICT_PRIO_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_HBW_RD_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_LBW_WR_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_LBW_WR_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_HBW_RD_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_AXCACHE &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_IND_GW_APB_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_IND_GW_APB_WDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_IND_GW_APB_RDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_IND_GW_APB_STATUS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_ERR_ADDR_LO &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_ERR_ADDR_HI &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM0_GLBL_ERR_WDATA &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM0_GLBL_MEM_INIT_BUSY & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM0_GLBL_MEM_INIT_BUSY &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM0_GLBL_MEM_INIT_BUSY &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_GLBL_CFG0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_GLBL_CFG0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_GLBL_CFG0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_CFG1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_PROT &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_ERR_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_NON_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_NON_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_NON_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_NON_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_NON_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_STS0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_STS1_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_MSG_EN_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_MSG_EN_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_MSG_EN_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_MSG_EN_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_MSG_EN_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_BASE_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_BASE_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_BASE_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_BASE_LO_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_PQ_BASE_HI_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_PQ_BASE_HI_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_PQ_BASE_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_BASE_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_BASE_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_BASE_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_SIZE_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_SIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_SIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_SIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_PI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_PI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_PI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_PI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CFG0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CFG0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CFG0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CFG0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CFG1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CFG1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CFG1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_CFG1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_STS0_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_PQ_STS1_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_PQ_STS1_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_PQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_PQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_STS0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_0 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_CQ_CTL_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_CQ_CTL_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_CQ_CTL_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_CTL_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_CTL_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_CTL_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_LO_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_PTR_HI_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_TSIZE_STS_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_CQ_CTL_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_CQ_CTL_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_CQ_CTL_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_CTL_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_CTL_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_CTL_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_CTL_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_IFIFO_CNT_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_IFIFO_CNT_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_IFIFO_CNT_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_IFIFO_CNT_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CQ_IFIFO_CNT_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE0_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE1_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_LO_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_CP_MSG_BASE2_ADDR_LO_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_LO_2 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE2_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_MSG_BASE3_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_TSIZE_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_TSIZE_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_TSIZE_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_TSIZE_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_TSIZE_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_DST_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_DST_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_DST_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_LDMA_DST_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_CP_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_CP_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_CP_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_CURRENT_INST_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_BARRIER_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_BARRIER_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_BARRIER_CFG_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_CP_BARRIER_CFG_3 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_CP_BARRIER_CFG_3 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_CP_BARRIER_CFG_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_BARRIER_CFG_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_DBG_0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_DBG_0_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_CP_DBG_0_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_CP_DBG_0_2 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_CP_DBG_0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_DBG_0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_DBG_0_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_ARUSER_31_11_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_AWUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_AWUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_AWUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_AWUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CP_AWUSER_31_11_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_ARB_CFG_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_ARB_CFG_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_ARB_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_19 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_23 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_ARB_MST_AVAIL_CRED_24 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_24 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_AVAIL_CRED_31 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_ARB_MST_CHOISE_PUSH_OFST_23 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_ARB_MST_CHOISE_PUSH_OFST_23 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_ARB_SLV_CHOISE_WDT &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MSG_MAX_INFLIGHT &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MSG_AWUSER_31_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MSG_AWUSER_SEC_PROP &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MSG_AWUSER_NON_SEC_PROP &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_ARB_STATE_STS & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_ARB_STATE_STS &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_ARB_STATE_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_CHOISE_FULLNESS_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MSG_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_SLV_CHOISE_Q_HEAD &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_ERR_CAUSE &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_ERR_MSG_EN &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_ERR_STS_DRP &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_19 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_ARB_MST_CRED_STS_20 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_ARB_MST_CRED_STS_20 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_23 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_ARB_MST_CRED_STS_31 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CGM_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CGM_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CGM_CFG1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_LOCAL_RANGE_BASE & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_LOCAL_RANGE_BASE &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_LOCAL_RANGE_BASE &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_LOCAL_RANGE_SIZE &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_CSMR_STRICT_PRIO_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_HBW_RD_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_LBW_WR_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_LBW_WR_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_HBW_RD_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_AXCACHE &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_IND_GW_APB_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_IND_GW_APB_WDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_IND_GW_APB_RDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_IND_GW_APB_STATUS &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_ERR_ADDR_LO &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_ERR_ADDR_HI &0x7F ) >>2 ); + mask |=1U << ((mmNIC0_QM1_GLBL_ERR_WDATA &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC0_QM1_GLBL_MEM_INIT_BUSY & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC0_QM1_GLBL_MEM_INIT_BUSY &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC0_QM1_GLBL_MEM_INIT_BUSY &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + +WREG32 (mmNIC1_QM0_BASE -CFG_BASE +PROT_BITS_OFFS +0x7C ,0 ); +WREG32 (mmNIC1_QM1_BASE -CFG_BASE +PROT_BITS_OFFS +0x7C ,0 ); + + pb_addr = (mmNIC1_QM0_GLBL_CFG0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_GLBL_CFG0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_GLBL_CFG0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_CFG1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_PROT &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_ERR_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_NON_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_NON_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_NON_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_NON_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_NON_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_STS0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_STS1_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_MSG_EN_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_MSG_EN_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_MSG_EN_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_MSG_EN_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_MSG_EN_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_BASE_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_BASE_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_BASE_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_BASE_LO_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_PQ_BASE_HI_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_PQ_BASE_HI_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_PQ_BASE_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_BASE_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_BASE_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_BASE_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_SIZE_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_SIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_SIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_SIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_PI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_PI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_PI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_PI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CFG0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CFG0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CFG0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CFG0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CFG1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CFG1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CFG1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_CFG1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_STS0_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_PQ_STS1_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_PQ_STS1_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_PQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_PQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_STS0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_0 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_CQ_CTL_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_CQ_CTL_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_CQ_CTL_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_CTL_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_CTL_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_CTL_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_LO_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_PTR_HI_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_TSIZE_STS_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_CQ_CTL_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_CQ_CTL_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_CQ_CTL_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_CTL_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_CTL_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_CTL_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_CTL_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_IFIFO_CNT_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_IFIFO_CNT_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_IFIFO_CNT_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_IFIFO_CNT_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CQ_IFIFO_CNT_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE0_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE1_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_LO_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_CP_MSG_BASE2_ADDR_LO_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_LO_2 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE2_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_MSG_BASE3_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_TSIZE_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_TSIZE_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_TSIZE_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_TSIZE_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_TSIZE_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_DST_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_DST_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_DST_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_LDMA_DST_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_CP_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_CP_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_CP_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_CURRENT_INST_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_BARRIER_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_BARRIER_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_BARRIER_CFG_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_CP_BARRIER_CFG_3 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_CP_BARRIER_CFG_3 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_CP_BARRIER_CFG_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_BARRIER_CFG_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_DBG_0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_DBG_0_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_CP_DBG_0_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_CP_DBG_0_2 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_CP_DBG_0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_DBG_0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_DBG_0_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_ARUSER_31_11_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_AWUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_AWUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_AWUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_AWUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CP_AWUSER_31_11_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_ARB_CFG_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_ARB_CFG_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_ARB_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_19 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_23 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_ARB_MST_AVAIL_CRED_24 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_24 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_AVAIL_CRED_31 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_ARB_MST_CHOISE_PUSH_OFST_23 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_ARB_MST_CHOISE_PUSH_OFST_23 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_ARB_SLV_CHOISE_WDT &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MSG_MAX_INFLIGHT &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MSG_AWUSER_31_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MSG_AWUSER_SEC_PROP &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MSG_AWUSER_NON_SEC_PROP &0x7F ) >>2 ); +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_ARB_STATE_STS & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_ARB_STATE_STS &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_ARB_STATE_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_CHOISE_FULLNESS_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MSG_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_SLV_CHOISE_Q_HEAD &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_ERR_CAUSE &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_ERR_MSG_EN &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_ERR_STS_DRP &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_19 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_ARB_MST_CRED_STS_20 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_ARB_MST_CRED_STS_20 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_23 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_ARB_MST_CRED_STS_31 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CGM_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CGM_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CGM_CFG1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_LOCAL_RANGE_BASE & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_LOCAL_RANGE_BASE &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_LOCAL_RANGE_BASE &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_LOCAL_RANGE_SIZE &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_CSMR_STRICT_PRIO_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_HBW_RD_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_LBW_WR_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_LBW_WR_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_HBW_RD_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_AXCACHE &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_IND_GW_APB_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_IND_GW_APB_WDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_IND_GW_APB_RDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_IND_GW_APB_STATUS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_ERR_ADDR_LO &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_ERR_ADDR_HI &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM0_GLBL_ERR_WDATA &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM0_GLBL_MEM_INIT_BUSY & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM0_GLBL_MEM_INIT_BUSY &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM0_GLBL_MEM_INIT_BUSY &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_GLBL_CFG0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_GLBL_CFG0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_GLBL_CFG0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_CFG1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_PROT &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_ERR_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_NON_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_NON_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_NON_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_NON_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_NON_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_STS0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_STS1_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_MSG_EN_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_MSG_EN_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_MSG_EN_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_MSG_EN_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_MSG_EN_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_BASE_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_BASE_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_BASE_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_BASE_LO_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_PQ_BASE_HI_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_PQ_BASE_HI_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_PQ_BASE_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_BASE_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_BASE_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_BASE_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_SIZE_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_SIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_SIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_SIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_PI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_PI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_PI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_PI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CFG0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CFG0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CFG0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CFG0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CFG1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CFG1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CFG1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_CFG1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_STS0_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_PQ_STS1_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_PQ_STS1_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_PQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_PQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_STS0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_0 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_CQ_CTL_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_CQ_CTL_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_CQ_CTL_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_CTL_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_CTL_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_CTL_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_LO_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_PTR_HI_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_TSIZE_STS_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_CQ_CTL_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_CQ_CTL_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_CQ_CTL_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_CTL_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_CTL_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_CTL_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_CTL_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_IFIFO_CNT_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_IFIFO_CNT_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_IFIFO_CNT_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_IFIFO_CNT_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CQ_IFIFO_CNT_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE0_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE1_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_LO_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_CP_MSG_BASE2_ADDR_LO_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_LO_2 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE2_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_MSG_BASE3_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_TSIZE_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_TSIZE_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_TSIZE_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_TSIZE_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_TSIZE_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_DST_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_DST_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_DST_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_LDMA_DST_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_CP_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_CP_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_CP_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_CURRENT_INST_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_BARRIER_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_BARRIER_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_BARRIER_CFG_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_CP_BARRIER_CFG_3 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_CP_BARRIER_CFG_3 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_CP_BARRIER_CFG_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_BARRIER_CFG_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_DBG_0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_DBG_0_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_CP_DBG_0_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_CP_DBG_0_2 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_CP_DBG_0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_DBG_0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_DBG_0_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_ARUSER_31_11_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_AWUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_AWUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_AWUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_AWUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CP_AWUSER_31_11_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_ARB_CFG_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_ARB_CFG_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_ARB_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_19 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_23 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_ARB_MST_AVAIL_CRED_24 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_24 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_AVAIL_CRED_31 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_ARB_MST_CHOISE_PUSH_OFST_23 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_ARB_MST_CHOISE_PUSH_OFST_23 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_ARB_SLV_CHOISE_WDT &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MSG_MAX_INFLIGHT &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MSG_AWUSER_31_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MSG_AWUSER_SEC_PROP &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MSG_AWUSER_NON_SEC_PROP &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_ARB_STATE_STS & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_ARB_STATE_STS &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_ARB_STATE_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_CHOISE_FULLNESS_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MSG_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_SLV_CHOISE_Q_HEAD &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_ERR_CAUSE &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_ERR_MSG_EN &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_ERR_STS_DRP &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_19 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_ARB_MST_CRED_STS_20 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_ARB_MST_CRED_STS_20 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_23 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_ARB_MST_CRED_STS_31 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CGM_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CGM_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CGM_CFG1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_LOCAL_RANGE_BASE & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_LOCAL_RANGE_BASE &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_LOCAL_RANGE_BASE &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_LOCAL_RANGE_SIZE &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_CSMR_STRICT_PRIO_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_HBW_RD_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_LBW_WR_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_LBW_WR_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_HBW_RD_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_AXCACHE &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_IND_GW_APB_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_IND_GW_APB_WDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_IND_GW_APB_RDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_IND_GW_APB_STATUS &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_ERR_ADDR_LO &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_ERR_ADDR_HI &0x7F ) >>2 ); + mask |=1U << ((mmNIC1_QM1_GLBL_ERR_WDATA &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC1_QM1_GLBL_MEM_INIT_BUSY & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC1_QM1_GLBL_MEM_INIT_BUSY &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC1_QM1_GLBL_MEM_INIT_BUSY &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + +WREG32 (mmNIC2_QM0_BASE -CFG_BASE +PROT_BITS_OFFS +0x7C ,0 ); +WREG32 (mmNIC2_QM1_BASE -CFG_BASE +PROT_BITS_OFFS +0x7C ,0 ); + + pb_addr = (mmNIC2_QM0_GLBL_CFG0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_GLBL_CFG0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_GLBL_CFG0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_CFG1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_PROT &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_ERR_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_NON_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_NON_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_NON_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_NON_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_NON_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_STS0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_STS1_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_MSG_EN_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_MSG_EN_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_MSG_EN_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_MSG_EN_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_MSG_EN_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_BASE_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_BASE_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_BASE_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_BASE_LO_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_PQ_BASE_HI_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_PQ_BASE_HI_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_PQ_BASE_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_BASE_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_BASE_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_BASE_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_SIZE_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_SIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_SIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_SIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_PI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_PI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_PI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_PI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CFG0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CFG0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CFG0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CFG0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CFG1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CFG1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CFG1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_CFG1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_STS0_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_PQ_STS1_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_PQ_STS1_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_PQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_PQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_STS0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_0 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_CQ_CTL_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_CQ_CTL_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_CQ_CTL_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_CTL_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_CTL_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_CTL_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_LO_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_PTR_HI_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_TSIZE_STS_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_CQ_CTL_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_CQ_CTL_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_CQ_CTL_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_CTL_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_CTL_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_CTL_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_CTL_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_IFIFO_CNT_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_IFIFO_CNT_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_IFIFO_CNT_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_IFIFO_CNT_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CQ_IFIFO_CNT_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE0_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE1_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_LO_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_CP_MSG_BASE2_ADDR_LO_2 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_LO_2 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE2_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_MSG_BASE3_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_TSIZE_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_TSIZE_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_TSIZE_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_TSIZE_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_TSIZE_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_DST_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_DST_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_DST_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_LDMA_DST_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_CP_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_CP_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_CP_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_CURRENT_INST_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_BARRIER_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_BARRIER_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_BARRIER_CFG_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_CP_BARRIER_CFG_3 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_CP_BARRIER_CFG_3 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_CP_BARRIER_CFG_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_BARRIER_CFG_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_DBG_0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_DBG_0_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_CP_DBG_0_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_CP_DBG_0_2 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_CP_DBG_0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_DBG_0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_DBG_0_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_ARUSER_31_11_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_AWUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_AWUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_AWUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_AWUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CP_AWUSER_31_11_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_ARB_CFG_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_ARB_CFG_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_ARB_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_19 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_23 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_ARB_MST_AVAIL_CRED_24 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_24 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_AVAIL_CRED_31 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_ARB_MST_CHOISE_PUSH_OFST_23 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_ARB_MST_CHOISE_PUSH_OFST_23 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_ARB_SLV_CHOISE_WDT &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MSG_MAX_INFLIGHT &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MSG_AWUSER_31_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MSG_AWUSER_SEC_PROP &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MSG_AWUSER_NON_SEC_PROP &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_ARB_STATE_STS & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_ARB_STATE_STS &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_ARB_STATE_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_CHOISE_FULLNESS_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MSG_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_SLV_CHOISE_Q_HEAD &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_ERR_CAUSE &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_ERR_MSG_EN &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_ERR_STS_DRP &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_19 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_ARB_MST_CRED_STS_20 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_ARB_MST_CRED_STS_20 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_23 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_ARB_MST_CRED_STS_31 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CGM_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CGM_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CGM_CFG1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_LOCAL_RANGE_BASE & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_LOCAL_RANGE_BASE &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_LOCAL_RANGE_BASE &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_LOCAL_RANGE_SIZE &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_CSMR_STRICT_PRIO_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_HBW_RD_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_LBW_WR_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_LBW_WR_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_HBW_RD_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_AXCACHE &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_IND_GW_APB_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_IND_GW_APB_WDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_IND_GW_APB_RDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_IND_GW_APB_STATUS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_ERR_ADDR_LO &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_ERR_ADDR_HI &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM0_GLBL_ERR_WDATA &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM0_GLBL_MEM_INIT_BUSY & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM0_GLBL_MEM_INIT_BUSY &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM0_GLBL_MEM_INIT_BUSY &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_GLBL_CFG0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_GLBL_CFG0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_GLBL_CFG0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_CFG1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_PROT &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_ERR_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_NON_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_NON_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_NON_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_NON_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_NON_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_STS0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_STS1_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_MSG_EN_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_MSG_EN_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_MSG_EN_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_MSG_EN_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_MSG_EN_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_BASE_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_BASE_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_BASE_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_BASE_LO_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_PQ_BASE_HI_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_PQ_BASE_HI_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_PQ_BASE_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_BASE_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_BASE_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_BASE_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_SIZE_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_SIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_SIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_SIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_PI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_PI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_PI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_PI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CFG0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CFG0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CFG0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CFG0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CFG1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CFG1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CFG1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_CFG1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_STS0_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_PQ_STS1_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_PQ_STS1_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_PQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_PQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_STS0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_0 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_CQ_CTL_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_CQ_CTL_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_CQ_CTL_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_CTL_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_CTL_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_CTL_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_LO_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_PTR_HI_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_TSIZE_STS_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_CQ_CTL_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_CQ_CTL_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_CQ_CTL_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_CTL_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_CTL_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_CTL_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_CTL_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_IFIFO_CNT_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_IFIFO_CNT_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_IFIFO_CNT_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_IFIFO_CNT_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CQ_IFIFO_CNT_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE0_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE1_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_LO_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_CP_MSG_BASE2_ADDR_LO_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_LO_2 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE2_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_MSG_BASE3_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_TSIZE_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_TSIZE_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_TSIZE_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_TSIZE_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_TSIZE_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_DST_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_DST_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_DST_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_LDMA_DST_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_CP_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_CP_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_CP_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_CURRENT_INST_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_BARRIER_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_BARRIER_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_BARRIER_CFG_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_CP_BARRIER_CFG_3 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_CP_BARRIER_CFG_3 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_CP_BARRIER_CFG_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_BARRIER_CFG_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_DBG_0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_DBG_0_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_CP_DBG_0_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_CP_DBG_0_2 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_CP_DBG_0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_DBG_0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_DBG_0_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_ARUSER_31_11_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_AWUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_AWUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_AWUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_AWUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CP_AWUSER_31_11_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_ARB_CFG_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_ARB_CFG_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_ARB_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_19 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_23 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_ARB_MST_AVAIL_CRED_24 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_24 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_AVAIL_CRED_31 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_ARB_MST_CHOISE_PUSH_OFST_23 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_ARB_MST_CHOISE_PUSH_OFST_23 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_ARB_SLV_CHOISE_WDT &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MSG_MAX_INFLIGHT &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MSG_AWUSER_31_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MSG_AWUSER_SEC_PROP &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MSG_AWUSER_NON_SEC_PROP &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_ARB_STATE_STS & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_ARB_STATE_STS &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_ARB_STATE_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_CHOISE_FULLNESS_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MSG_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_SLV_CHOISE_Q_HEAD &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_ERR_CAUSE &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_ERR_MSG_EN &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_ERR_STS_DRP &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_19 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_ARB_MST_CRED_STS_20 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_ARB_MST_CRED_STS_20 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_23 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_ARB_MST_CRED_STS_31 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CGM_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CGM_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CGM_CFG1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_LOCAL_RANGE_BASE & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_LOCAL_RANGE_BASE &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_LOCAL_RANGE_BASE &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_LOCAL_RANGE_SIZE &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_CSMR_STRICT_PRIO_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_HBW_RD_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_LBW_WR_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_LBW_WR_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_HBW_RD_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_AXCACHE &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_IND_GW_APB_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_IND_GW_APB_WDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_IND_GW_APB_RDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_IND_GW_APB_STATUS &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_ERR_ADDR_LO &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_ERR_ADDR_HI &0x7F ) >>2 ); + mask |=1U << ((mmNIC2_QM1_GLBL_ERR_WDATA &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC2_QM1_GLBL_MEM_INIT_BUSY & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC2_QM1_GLBL_MEM_INIT_BUSY &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC2_QM1_GLBL_MEM_INIT_BUSY &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + +WREG32 (mmNIC3_QM0_BASE -CFG_BASE +PROT_BITS_OFFS +0x7C ,0 ); +WREG32 (mmNIC3_QM1_BASE -CFG_BASE +PROT_BITS_OFFS +0x7C ,0 ); + + pb_addr = (mmNIC3_QM0_GLBL_CFG0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_GLBL_CFG0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_GLBL_CFG0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_CFG1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_PROT &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_ERR_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_NON_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_NON_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_NON_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_NON_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_NON_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_STS0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_STS1_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_MSG_EN_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_MSG_EN_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_MSG_EN_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_MSG_EN_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_MSG_EN_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_BASE_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_BASE_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_BASE_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_BASE_LO_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_PQ_BASE_HI_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_PQ_BASE_HI_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_PQ_BASE_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_BASE_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_BASE_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_BASE_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_SIZE_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_SIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_SIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_SIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_PI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_PI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_PI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_PI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CFG0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CFG0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CFG0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CFG0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CFG1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CFG1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CFG1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_CFG1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_STS0_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_PQ_STS1_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_PQ_STS1_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_PQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_PQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_STS0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_0 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_CQ_CTL_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_CQ_CTL_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_CQ_CTL_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_CTL_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_CTL_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_CTL_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_LO_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_PTR_HI_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_TSIZE_STS_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_CQ_CTL_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_CQ_CTL_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_CQ_CTL_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_CTL_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_CTL_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_CTL_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_CTL_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_IFIFO_CNT_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_IFIFO_CNT_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_IFIFO_CNT_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_IFIFO_CNT_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CQ_IFIFO_CNT_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE0_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE1_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_LO_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_CP_MSG_BASE2_ADDR_LO_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_LO_2 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE2_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_MSG_BASE3_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_TSIZE_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_TSIZE_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_TSIZE_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_TSIZE_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_TSIZE_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_SRC_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_DST_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_DST_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_DST_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_CP_LDMA_DST_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_LDMA_DST_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_CP_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_CP_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_CP_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_CURRENT_INST_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_BARRIER_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_BARRIER_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_BARRIER_CFG_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_CP_BARRIER_CFG_3 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_CP_BARRIER_CFG_3 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_CP_BARRIER_CFG_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_BARRIER_CFG_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_DBG_0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_DBG_0_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_CP_DBG_0_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_CP_DBG_0_2 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_CP_DBG_0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_DBG_0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_DBG_0_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_ARUSER_31_11_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_AWUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_AWUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_AWUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_AWUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CP_AWUSER_31_11_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_ARB_CFG_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_ARB_CFG_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_ARB_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_19 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_23 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_ARB_MST_AVAIL_CRED_24 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_24 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_AVAIL_CRED_31 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_ARB_MST_CHOISE_PUSH_OFST_23 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_ARB_MST_CHOISE_PUSH_OFST_23 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_ARB_SLV_CHOISE_WDT &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MSG_MAX_INFLIGHT &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MSG_AWUSER_31_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MSG_AWUSER_SEC_PROP &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MSG_AWUSER_NON_SEC_PROP &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_ARB_STATE_STS & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_ARB_STATE_STS &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_ARB_STATE_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_CHOISE_FULLNESS_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MSG_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_SLV_CHOISE_Q_HEAD &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_ERR_CAUSE &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_ERR_MSG_EN &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_ERR_STS_DRP &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_5 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_6 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_7 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_8 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_9 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_10 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_11 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_12 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_13 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_14 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_15 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_16 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_17 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_18 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_19 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_ARB_MST_CRED_STS_20 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_ARB_MST_CRED_STS_20 &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_20 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_21 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_22 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_23 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_24 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_25 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_26 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_27 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_28 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_29 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_30 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_ARB_MST_CRED_STS_31 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CGM_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CGM_STS &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CGM_CFG1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_LOCAL_RANGE_BASE & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_LOCAL_RANGE_BASE &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_LOCAL_RANGE_BASE &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_LOCAL_RANGE_SIZE &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_CSMR_STRICT_PRIO_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_HBW_RD_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_LBW_WR_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_LBW_WR_RATE_LIM_CFG_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_HBW_RD_RATE_LIM_CFG_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_AXCACHE &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_IND_GW_APB_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_IND_GW_APB_WDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_IND_GW_APB_RDATA &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_IND_GW_APB_STATUS &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_ERR_ADDR_LO &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_ERR_ADDR_HI &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM0_GLBL_ERR_WDATA &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM0_GLBL_MEM_INIT_BUSY & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM0_GLBL_MEM_INIT_BUSY &PROT_BITS_OFFS ) + >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM0_GLBL_MEM_INIT_BUSY &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM1_GLBL_CFG0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM1_GLBL_CFG0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM1_GLBL_CFG0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_CFG1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_PROT &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_ERR_CFG &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_NON_SECURE_PROPS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_NON_SECURE_PROPS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_NON_SECURE_PROPS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_NON_SECURE_PROPS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_NON_SECURE_PROPS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_STS0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_STS1_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_MSG_EN_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_MSG_EN_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_MSG_EN_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_MSG_EN_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_GLBL_MSG_EN_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_BASE_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_BASE_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_BASE_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_BASE_LO_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM1_PQ_BASE_HI_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM1_PQ_BASE_HI_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM1_PQ_BASE_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_BASE_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_BASE_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_BASE_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_SIZE_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_SIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_SIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_SIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_PI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_PI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_PI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_PI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CFG0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CFG0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CFG0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CFG0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CFG1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CFG1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CFG1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_CFG1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_ARUSER_31_11_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_ARUSER_31_11_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_ARUSER_31_11_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_ARUSER_31_11_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_STS0_3 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM1_PQ_STS1_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM1_PQ_STS1_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM1_PQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_PQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_STS0_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_STS0_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_STS0_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_STS0_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_STS1_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_STS1_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_STS1_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_STS1_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_0 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM1_CQ_CTL_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM1_CQ_CTL_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM1_CQ_CTL_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_CTL_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_CTL_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_CTL_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_LO_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_PTR_HI_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_TSIZE_STS_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM1_CQ_CTL_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM1_CQ_CTL_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM1_CQ_CTL_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_CTL_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_CTL_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_CTL_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_CTL_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_IFIFO_CNT_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_IFIFO_CNT_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_IFIFO_CNT_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_IFIFO_CNT_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CQ_IFIFO_CNT_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE0_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE1_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_LO_1 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM1_CP_MSG_BASE2_ADDR_LO_2 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_LO_2 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE2_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_LO_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_LO_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_LO_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_LO_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_LO_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_HI_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_HI_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_HI_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_HI_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_MSG_BASE3_ADDR_HI_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_TSIZE_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_TSIZE_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_TSIZE_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_TSIZE_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_TSIZE_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_SRC_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_DST_BASE_LO_OFFSET_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_DST_BASE_LO_OFFSET_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_DST_BASE_LO_OFFSET_2 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 & ~0xFFF ) + +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 & +PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM1_CP_LDMA_DST_BASE_LO_OFFSET_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_LDMA_DST_BASE_LO_OFFSET_4 &0x7F ) >>2 ); + +WREG32 (pb_addr + word_offset, ~mask); + + pb_addr = (mmNIC3_QM1_CP_STS_0 & ~0xFFF ) +PROT_BITS_OFFS ; + word_offset = ((mmNIC3_QM1_CP_STS_0 &PROT_BITS_OFFS ) >>7 ) <<2 ; + mask =1U << ((mmNIC3_QM1_CP_STS_0 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_STS_1 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_STS_2 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_STS_3 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_STS_4 &0x7F ) >>2 ); + mask |=1U << ((mmNIC3_QM1_CP_CURRENT_INST_LO_0 &0x7F ) >>2 );
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH v3 4/14 habanalabs/gaudi: add support for NIC QMANs
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Initialize the QMANs that are responsible to submit doorbells to the NIC engines. Add support for stopping and disabling them, and reset them as part of the hard-reset procedure of GAUDI. This will allow the user to submit work to the NICs.
Add support for receiving events on QMAN errors from the firmware.
However, the nic_ports_mask is still initialized to 0. That means this code won't initialize the QMANs just yet. That will be in a later patch.
--- drivers/misc/habanalabs/common/habanalabs.h | 3 +- drivers/misc/habanalabs/gaudi/gaudi.c | 741 ++++++++++++++++++-- drivers/misc/habanalabs/gaudi/gaudiP.h | 32 + 3 files changed, 731 insertions(+), 45 deletions(-)
drivers/misc/habanalabs/common/habanalabs.h +1 -2
@@ -1574,8 +1574,6 @@ struct hl_mmu_funcs {* @pmmu_huge_range: is a different virtual addresses range used for PMMU with * huge pages. * @init_done: is the initialization of the device done. -* @mmu_enable: is MMU enabled. -* @mmu_huge_page_opt: is MMU huge pages optimization enabled. * @device_cpu_disabled: is the device CPU disabled (due to timeouts) * @dma_mask: the dma mask that was set for this device * @in_debug: is device under debug. This, together with fpriv_list, enforces
@@ -1691,6 +1689,7 @@ struct hl_device {u8 supports_cb_mapping;/* Parameters for bring-up */ +u64 nic_ports_mask;u8 mmu_enable;u8 mmu_huge_page_opt;u8 cpu_enable;
drivers/misc/habanalabs/gaudi/gaudi.c +698 -43
862 lines not on this page · raw message
drivers/misc/habanalabs/gaudi/gaudiP.h +32 -0
@@ -79,6 +79,7 @@#define TPC_QMAN_OFFSET (mmTPC1_QM_BASE - mmTPC0_QM_BASE)#define MME_QMAN_OFFSET (mmMME1_QM_BASE - mmMME0_QM_BASE)#define NIC_MACRO_QMAN_OFFSET (mmNIC1_QM0_BASE - mmNIC0_QM0_BASE) +#define NIC_ENGINE_QMAN_OFFSET (mmNIC0_QM1_BASE - mmNIC0_QM0_BASE)#define TPC_CFG_OFFSET (mmTPC1_CFG_BASE - mmTPC0_CFG_BASE)
@@ -132,6 +133,10 @@#define TPC_QMAN_LENGTH 1024#define TPC_QMAN_SIZE_IN_BYTES (TPC_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE) +#define NIC_QMAN_LENGTH 1024 +#define NIC_QMAN_SIZE_IN_BYTES (NIC_QMAN_LENGTH * QMAN_PQ_ENTRY_SIZE) + +#define SRAM_USER_BASE_OFFSET GAUDI_DRIVER_SRAM_RESERVED_SIZE_FROM_START/* Virtual address space */
@@ -153,6 +158,19 @@#define HW_CAP_SRAM_SCRAMBLER BIT(10)#define HW_CAP_HBM_SCRAMBLER BIT(11) +#define HW_CAP_NIC0 BIT(14) +#define HW_CAP_NIC1 BIT(15) +#define HW_CAP_NIC2 BIT(16) +#define HW_CAP_NIC3 BIT(17) +#define HW_CAP_NIC4 BIT(18) +#define HW_CAP_NIC5 BIT(19) +#define HW_CAP_NIC6 BIT(20) +#define HW_CAP_NIC7 BIT(21) +#define HW_CAP_NIC8 BIT(22) +#define HW_CAP_NIC9 BIT(23) +#define HW_CAP_NIC_MASK GENMASK(23, 14) +#define HW_CAP_NIC_SHIFT 14 +#define HW_CAP_TPC0 BIT(24)#define HW_CAP_TPC1 BIT(25)#define HW_CAP_TPC2 BIT(26)
@@ -200,6 +218,20 @@ enum gaudi_tpc_mask { GAUDI_TPC_MASK_ALL = 0xFF }; +enum gaudi_nic_mask { +GAUDI_NIC_MASK_NIC0 =0x01 , +GAUDI_NIC_MASK_NIC1 =0x02 , +GAUDI_NIC_MASK_NIC2 =0x04 , +GAUDI_NIC_MASK_NIC3 =0x08 , +GAUDI_NIC_MASK_NIC4 =0x10 , +GAUDI_NIC_MASK_NIC5 =0x20 , +GAUDI_NIC_MASK_NIC6 =0x40 , +GAUDI_NIC_MASK_NIC7 =0x80 , +GAUDI_NIC_MASK_NIC8 =0x100 , +GAUDI_NIC_MASK_NIC9 =0x200 , +GAUDI_NIC_MASK_ALL =0x3FF +}; +/** * struct gaudi_internal_qman_info - Internal QMAN information. * @pq_kernel_addr: Kernel address of the PQ memory area in the host.
Signature · 1 line
2.17.1
PATCH v3 5/14 habanalabs/gaudi: add NIC Ethernet support
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Basic NIC driver which handles Ethernet packet of several types like IPv4, IPv6, LLDP, VLAN and ARP.
The NIC HW is composed of 5 NIC macros, in each macro 2 NIC engines of 100GbE each. Each engine exposes a single port of 100GbE, so in total we have 10 ports per GAUDI device.
The driver gets the needed information for initialization from the firmware such as card type, available ports, Auto-negotiation support, polarity and Tx taps configuration.
Two card types are supported: standalone PCI and PCI Mezzanine Card (PMC) which is part of a server called HLS-1. Each type has its own unique configurations.
We define two types of port connectivity - internal and external. Internal port is connected to a port on another Gaudi card and external port is connected to a switch.
The Ethernet support is needed only for control flows e.g. get IP. Hence it is implemented in a very simple way - the packets are copied rather than using descriptors.
The Rx flow uses NAPI by default and polling mode is supported by a kernel module parameter.
Because we must not access the HW while doing hard reset to the device, a new stage of stopping all NIC activity is added at the beginning of the reset flow.
--- drivers/misc/habanalabs/common/context.c | 1 + drivers/misc/habanalabs/common/firmware_if.c | 44 + drivers/misc/habanalabs/common/habanalabs.h | 13 +- .../misc/habanalabs/common/habanalabs_drv.c | 4 + drivers/misc/habanalabs/gaudi/Makefile | 2 + drivers/misc/habanalabs/gaudi/gaudi.c | 176 +- drivers/misc/habanalabs/gaudi/gaudiP.h | 286 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 2327 +++++++++++++++++ drivers/misc/habanalabs/gaudi/gaudi_nic.h | 336 +++ drivers/misc/habanalabs/goya/goya.c | 6 + include/uapi/misc/habanalabs.h | 3 + 11 files changed, 3190 insertions(+), 8 deletions(-) create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.c create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic.h
drivers/misc/habanalabs/common/context.c +1 -0
@@ -37,6 +37,7 @@ static void hl_ctx_fini(struct hl_ctx *ctx)if ((hdev->in_debug) && (hdev->compute_ctx == ctx))hl_device_set_debug_mode (hdev, false); + hdev->asic_funcs->ctx_fini (ctx);hl_cb_va_pool_fini (ctx);hl_vm_ctx_fini (ctx);hl_asid_free (hdev, ctx->asid);
drivers/misc/habanalabs/common/firmware_if.c +44 -0
50 lines not on this page · raw message
drivers/misc/habanalabs/common/habanalabs.h +12 -1
@@ -270,6 +270,8 @@ struct hl_mmu_properties {* @hw_queues_props: H/W queues properties. * @cpucp_info: received various information from CPU-CP regarding the H/W, e.g. * available sensors. +* @cpucp_nic_info: received various information from CPU-CP regarding the NIC +* H/W, e.g. MAC addresses. * @uboot_ver: F/W U-boot version. * @preboot_ver: F/W Preboot version. * @dmmu: DRAM MMU address translation properties.
@@ -284,7 +286,7 @@ struct hl_mmu_properties {* @dram_user_base_address: DRAM physical start address for user access. * @dram_size: DRAM total size. * @dram_pci_bar_size: size of PCI bar towards DRAM. -* @max_power_default: max power of the device after reset +* @max_power_default: max power of the device after reset. * @dram_size_for_default_page_mapping: DRAM size needed to map to avoid page * fault. * @pcie_dbi_base_address: Base address of the PCIE_DBI block.
@@ -324,6 +326,7 @@ struct hl_mmu_properties {struct asic_fixed_properties {struct hw_queue_properties *hw_queues_props;struct cpucp_info cpucp_info; +struct cpucp_nic_info cpucp_nic_info;char uboot_ver[VERSION_MAX_LEN ];char preboot_ver[VERSION_MAX_LEN ];struct hl_mmu_properties dmmu;
@@ -697,6 +700,7 @@ enum div_select_defs {* @wreg: Write a register. Needed for simulator support. * @halt_coresight: stop the ETF and ETR traces. * @ctx_init: context dependent initialization. +* @ctx_fini: context dependent cleanup. * @get_clk_rate: Retrieve the ASIC current and maximum clock rate in MHz * @get_queue_id_for_cq: Get the H/W queue id related to the given CQ index. * @read_device_fw_version: read the device's firmware versions that are
@@ -799,6 +803,7 @@ struct hl_asic_funcs {void (*wreg)(struct hl_device *hdev,u32 reg,u32 val);void (*halt_coresight)(struct hl_device *hdev);int (*ctx_init)(struct hl_ctx *ctx); +void (*ctx_fini)(struct hl_ctx *ctx);int (*get_clk_rate)(struct hl_device *hdev,u32 *cur_clk,u32 *max_clk);u32 (*get_queue_id_for_cq)(struct hl_device *hdev,u32 cq_idx); void (*read_device_fw_version)(struct hl_device *hdev,
@@ -1586,6 +1591,7 @@ struct hl_mmu_funcs {* @sync_stream_queue_idx: helper index for sync stream queues initialization. * @supports_coresight: is CoreSight supported. * @supports_soft_reset: is soft reset supported. +* @nic_rx_poll: enable NIC Rx in polling mode rather than IRQ. * @supports_cb_mapping: is mapping a CB to the device's MMU supported. */ struct hl_device {
@@ -1686,10 +1692,13 @@ struct hl_device {u8 sync_stream_queue_idx;u8 supports_coresight;u8 supports_soft_reset; +u8 nic_rx_poll;u8 supports_cb_mapping;/* Parameters for bring-up */ u64 nic_ports_mask; +u64 nic_ports_ext_mask; +u64 nic_auto_neg_mask;u8 mmu_enable;u8 mmu_huge_page_opt;u8 cpu_enable;
@@ -1702,6 +1711,7 @@ struct hl_device {u8 dram_scrambler_enable;u8 hard_reset_on_fw_events;u8 bmc_enable; +u8 nic_load_fw;u8 rl_enable; };
@@ -1924,6 +1934,7 @@ void hl_fw_cpu_accessible_dma_pool_free(struct hl_device *hdev, size_t size,int hl_fw_send_heartbeat (struct hl_device *hdev);int hl_fw_cpucp_info_get (struct hl_device *hdev);int hl_fw_get_eeprom_data (struct hl_device *hdev,void *data,size_t max_size); +int hl_fw_cpucp_nic_info_get (struct hl_device *hdev);int hl_fw_cpucp_pci_counters_get (struct hl_device *hdev,struct hl_info_pci_counters *counters); int hl_fw_cpucp_total_energy_get(struct hl_device *hdev,
drivers/misc/habanalabs/common/habanalabs_drv.c +4 -0
@@ -241,6 +241,10 @@ static void set_driver_behavior_per_device(struct hl_device *hdev) hdev->dram_scrambler_enable =1 ; hdev->bmc_enable =1 ; hdev->hard_reset_on_fw_events =1 ; + hdev->card_type = cpucp_card_type_pci; + hdev->nic_ports_ext_mask =0x3FF ; + hdev->nic_auto_neg_mask =0x3FF ; + hdev->nic_load_fw =0 ; }/*
drivers/misc/habanalabs/gaudi/Makefile +2 -0
@@ -1,3 +1,5 @@ # SPDX-License-Identifier: GPL-2.0-only HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o \ gaudi/gaudi_coresight.o + +HL_GAUDI_FILES += gaudi/gaudi_nic.o
drivers/misc/habanalabs/gaudi/gaudi.c +174 -2
322 lines not on this page · raw message
drivers/misc/habanalabs/gaudi/gaudiP.h +281 -5
387 lines not on this page · raw message
drivers/misc/habanalabs/gaudi/gaudi_nic.c new file +2327 -0
2,148 lines not on this page · raw message
drivers/misc/habanalabs/gaudi/gaudi_nic.h new file +336 -0
336 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH v3 6/14 habanalabs/gaudi: add NIC PHY code
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Configure the NIC PHY (physical layer). The PHY is configured with the correct polarity and Tx taps depending on the card type.
After the initial configuration, the PHY flow contains the following:
- Auto-negotiation (if enabled)
- PHY F/W tuning
- Physical Coding Sublayer (PCS) link check
After acquiring the initial PCS link, it is checked periodically. Once we detect that there is no link, we fall to PHY F/W tuning or even Auto-negotiation to re-acquire the link.
Currently we use Auto-negotiation only because it is a prerequisite for link training (physical layer quality improvement) and not for setting the transmission parameters. As a result, the Auto-negotiation is currently supported only between Gaudi cards.
--- drivers/misc/habanalabs/gaudi/Makefile | 2 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 456 +++++++- drivers/misc/habanalabs/gaudi/gaudi_nic.h | 17 + drivers/misc/habanalabs/gaudi/gaudi_phy.c | 1276 +++++++++++++++++++++ 4 files changed, 1748 insertions(+), 3 deletions(-) create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_phy.c
drivers/misc/habanalabs/gaudi/Makefile +1 -1
@@ -2,4 +2,4 @@ HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o \ gaudi/gaudi_coresight.o -HL_GAUDI_FILES += gaudi/gaudi_nic.o +HL_GAUDI_FILES += gaudi/gaudi_nic.o gaudi/gaudi_phy.o
drivers/misc/habanalabs/gaudi/gaudi_nic.c +454 -2
514 lines not on this page · raw message
drivers/misc/habanalabs/gaudi/gaudi_nic.h +17 -0
@@ -332,5 +332,22 @@ int gaudi_nic_port_reset(struct gaudi_nic_device *gaudi_nic);bool disabled_or_in_reset (struct gaudi_nic_device *gaudi_nic);u64 gaudi_nic_read_mac_stat_counter (struct hl_device *hdev,u32 port,int idx,bool is_rx); +int gaudi_nic_phy_reset_macro (struct gaudi_nic_device *gaudi_nic); +int gaudi_nic_phy_power_up (struct gaudi_nic_device *gaudi_nic,int lane, +bool do_auto_neg); +int gaudi_nic_phy_has_fw (struct hl_device *hdev); +int gaudi_nic_phy_fw_tuning (struct gaudi_nic_device *gaudi_nic,int lane, +bool check_status); +int gaudi_nic_phy_fw_load_all (struct hl_device *hdev); +int gaudi_nic_phy_check_link_status (struct gaudi_nic_device *gaudi_nic, +int lane); +int gaudi_nic_phy_config_pam4_link_training (struct gaudi_nic_device *gaudi_nic, +int lane); +int gaudi_nic_phy_fw_config_auto_neg (struct gaudi_nic_device *gaudi_nic, +int lane); +u16 gaudi_nic_phy_get_crc (struct hl_device *hdev); +void gaudi_nic_phy_reset_tx (struct gaudi_nic_device *gaudi_nic,int lane); +void gaudi_nic_phy_start_stop (struct gaudi_nic_device *gaudi_nic,int lane, +bool is_start);#endif /* GAUDI_NIC_DRV_H_ */
drivers/misc/habanalabs/gaudi/gaudi_phy.c new file +1276 -0
1,276 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 7/14 habanalabs/gaudi: allow user to get MAC addresses in INFO IOCTL
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
The user needs this information when working in a distributed environment with master/slave configuration. All the slaves get their MAC addresses from the driver and send them to the master.
--- drivers/misc/habanalabs/common/habanalabs.h | 5 +++ .../misc/habanalabs/common/habanalabs_ioctl.c | 31 +++++++++++++++++++ drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/gaudi/gaudiP.h | 2 ++ drivers/misc/habanalabs/gaudi/gaudi_nic.c | 27 ++++++++++++++++ drivers/misc/habanalabs/goya/goya.c | 9 ++++++ include/uapi/misc/habanalabs.h | 20 +++++++++++- 7 files changed, 94 insertions(+), 1 deletion(-)
drivers/misc/habanalabs/common/habanalabs.h +5 -0
@@ -619,6 +619,8 @@ enum div_select_defs { DIV_SEL_DIVIDED_PLL = 3, }; +struct hl_info_mac_addr ; +/** * struct hl_asic_funcs - ASIC specific functions that are can be called from * common code.
@@ -696,6 +698,7 @@ enum div_select_defs {* @get_hw_state: retrieve the H/W state * @pci_bars_map: Map PCI BARs. * @init_iatu: Initialize the iATU unit inside the PCI controller. +* @get_mac_addr: Get list of MAC addresses. * @rreg: Read a register. Needed for simulator support. * @wreg: Write a register. Needed for simulator support. * @halt_coresight: stop the ETF and ETR traces.
@@ -799,6 +802,8 @@ struct hl_asic_funcs {enum hl_device_hw_state (*get_hw_state)(struct hl_device *hdev);int (*pci_bars_map)(struct hl_device *hdev);int (*init_iatu)(struct hl_device *hdev); +int (*get_mac_addr)(struct hl_device *hdev, +struct hl_info_mac_addr *mac_addr);u32 (*rreg)(struct hl_device *hdev,u32 reg);void (*wreg)(struct hl_device *hdev,u32 reg,u32 val);void (*halt_coresight)(struct hl_device *hdev);
drivers/misc/habanalabs/common/habanalabs_ioctl.c +31 -0
@@ -203,6 +203,33 @@ static int debug_coresight(struct hl_device *hdev, struct hl_debug_args *args)return rc; } +static int mac_addr_info (struct hl_device *hdev,struct hl_info_args *args) +{ +void __user *out = (void __user *) (uintptr_t ) args->return_pointer; +struct hl_info_mac_addr *mac_addr; +u32 max_size = args->return_size; +int rc; + +if (!max_size || !out) +return -EINVAL ; + + mac_addr =kzalloc (sizeof (struct hl_info_mac_addr ),GFP_KERNEL ); +if (!mac_addr) +return -ENOMEM ; + + rc = hdev->asic_funcs->get_mac_addr (hdev, mac_addr); +if (rc) + goto out; + + rc =copy_to_user (out, mac_addr, +min ((size_t ) max_size,sizeof (struct hl_info_mac_addr ))) ? + -EFAULT :0 ; + +out: +kfree (mac_addr); +return rc; +} +static int device_utilization (struct hl_device *hdev,struct hl_info_args *args) {struct hl_info_device_utilization device_util = {0 };
@@ -423,6 +450,10 @@ static int _hl_info_ioctl(struct hl_fpriv *hpriv, void *data, rc =hw_idle (hdev, args);break ; +case HL_INFO_MAC_ADDR : + rc =mac_addr_info (hdev, args); +break ; +case HL_INFO_DEVICE_UTILIZATION : rc =device_utilization (hdev, args);break ;
drivers/misc/habanalabs/gaudi/gaudi.c +1 -0
@@ -7472,6 +7472,7 @@ static const struct hl_asic_funcs gaudi_funcs = { .get_hw_state = gaudi_get_hw_state, .pci_bars_map = gaudi_pci_bars_map, .init_iatu = gaudi_init_iatu, + .get_mac_addr = gaudi_nic_get_mac_addr, .rreg = hl_rreg, .wreg = hl_wreg, .halt_coresight = gaudi_halt_coresight,
drivers/misc/habanalabs/gaudi/gaudiP.h +2 -0
@@ -564,6 +564,8 @@ void gaudi_nic_ports_fini(struct hl_device *hdev);int gaudi_nic_hard_reset_prepare (struct hl_device *hdev);void gaudi_nic_stop (struct hl_device *hdev);void gaudi_nic_ports_reopen (struct hl_device *hdev); +int gaudi_nic_get_mac_addr (struct hl_device *hdev, +struct hl_info_mac_addr *mac_addr);void gaudi_nic_ctx_fini (struct hl_ctx *ctx);irqreturn_t gaudi_nic_rx_irq_handler (int irq,void *arg);irqreturn_t gaudi_nic_cq_irq_handler (int irq,void *arg);
drivers/misc/habanalabs/gaudi/gaudi_nic.c +27 -0
@@ -2774,6 +2774,33 @@ void gaudi_nic_ports_reopen(struct hl_device *hdev) gaudi->hw_cap_initialized |=HW_CAP_NIC_DRV ; } +int gaudi_nic_get_mac_addr (struct hl_device *hdev, +struct hl_info_mac_addr *mac_addr) +{ +struct gaudi_device *gaudi = hdev->asic_specific; +struct net_device *ndev; +int i, number_of_ports; + +if (!(gaudi->hw_cap_initialized &HW_CAP_NIC_DRV )) + goto out; + + number_of_ports =min_t (int,NIC_NUMBER_OF_PORTS , +HL_INFO_MAC_ADDR_MAX_NUM ); + +for (i =0 ; i < number_of_ports ; i++) { +if (!(hdev->nic_ports_mask &BIT (i))) +continue ; + + ndev = gaudi->nic_devices[i].ndev; +if (!ndev) +continue ; + +ether_addr_copy (mac_addr->array[i].addr, ndev->dev_addr); + mac_addr->mask[i /64 ] |=BIT_ULL (i %64 ); + } +out: +return 0 ; +}void gaudi_nic_ctx_fini (struct hl_ctx *ctx) { }
drivers/misc/habanalabs/goya/goya.c +9 -0
@@ -5269,6 +5269,14 @@ static enum hl_device_hw_state goya_get_hw_state(struct hl_device *hdev)return RREG32 (mmHW_STATE); } +static int goya_get_mac_addr (struct hl_device *hdev, +struct hl_info_mac_addr *mac_addr) +{ +dev_err_ratelimited (hdev->dev, +"No MAC addresses are assigned to Goya\n" ); +return -ENXIO ; +} +static int goya_ctx_init (struct hl_ctx *ctx) {return 0 ;
@@ -5388,6 +5396,7 @@ static const struct hl_asic_funcs goya_funcs = { .get_hw_state = goya_get_hw_state, .pci_bars_map = goya_pci_bars_map, .init_iatu = goya_init_iatu, + .get_mac_addr = goya_get_mac_addr, .rreg = hl_rreg, .wreg = hl_wreg, .halt_coresight = goya_halt_coresight,
include/uapi/misc/habanalabs.h +19 -1
@@ -10,6 +10,7 @@#include <linux/types.h> #include <linux/ioctl.h> +#include <linux/if_ether.h> /* * Defines that are asic-specific but constitutes as ABI between kernel driver
@@ -248,6 +249,8 @@ enum hl_device_status {* internal engine. * HL_INFO_DEVICE_STATUS - Retrieve the device's status. This opcode doesn't * require an open context. +* HL_INFO_MAC_ADDR - Retrieve the list of MAC addresses of the device's +* network ports, if the device has network ports. * HL_INFO_DEVICE_UTILIZATION - Retrieve the total utilization of the device * over the last period specified by the user. * The period can be between 100ms to 1s, in
@@ -274,6 +277,7 @@ enum hl_device_status {#define HL_INFO_DRAM_USAGE 2#define HL_INFO_HW_IDLE 3#define HL_INFO_DEVICE_STATUS 4 +#define HL_INFO_MAC_ADDR 5#define HL_INFO_DEVICE_UTILIZATION 6#define HL_INFO_HW_EVENTS_AGGREGATE 7#define HL_INFO_CLK_RATE 8
@@ -285,9 +289,11 @@ enum hl_device_status {#define HL_INFO_SYNC_MANAGER 14#define HL_INFO_TOTAL_ENERGY 15 -#define HL_INFO_VERSION_MAX_LEN 128 +#define HL_INFO_VERSION_MAX_LEN 128#define HL_INFO_CARD_NAME_MAX_LEN 16 +#define HL_INFO_MAC_ADDR_MAX_NUM 128 +struct hl_info_hw_ip_info {__u64 sram_base_address;__u64 dram_base_address;
@@ -334,6 +340,18 @@ struct hl_info_device_status {__u32 pad; }; +struct hl_mac_addr { +__u8 addr[ETH_ALEN ]; +__u8 pad[2 ]; +}; + +struct hl_info_mac_addr { +/* MAC address at index N is of the corresponding PORT ID */ +struct hl_mac_addr array[HL_INFO_MAC_ADDR_MAX_NUM ]; +/* Mask of valid entries at the MAC addresses array */ +__u64 mask[2 ]; +}; +struct hl_info_device_utilization {__u32 utilization;__u32 pad;
Signature · 1 line
2.17.1
PATCH v3 8/14 habanalabs/gaudi: add a new IOCTL for NIC control operations
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Add Queue Pair (QP) opcodes to the NIC ioctl.
A QP represents a connection between two Gaudi ports. Each port currently supports 1024 QPs where QP 0 is reserved for the driver for Ethernet. User-space process needs to create a QP in order to communicate with other Gaudis.
QP can have two contexts: requester (sender) and responder (receiver). Both have unique parameters as well as shared ones.
The QP numbers are not recycled immediately but only after wraparound. This to avoid cases where a QP was closed and reopened and got data of the "old" QP.
The added opcodes are:
- Create a QP
- Set requester context
- Set responder context
- Destroy a QP
--- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 98 ++++- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/gaudi/gaudiP.h | 2 + drivers/misc/habanalabs/gaudi/gaudi_nic.c | 406 ++++++++++++++++++ drivers/misc/habanalabs/goya/goya.c | 9 + include/uapi/misc/habanalabs.h | 129 +++++- 7 files changed, 646 insertions(+), 2 deletions(-)
drivers/misc/habanalabs/common/habanalabs.h +3 -0
@@ -696,6 +696,7 @@ struct hl_info_mac_addr;* then the timeout is the default timeout for the specific * ASIC * @get_hw_state: retrieve the H/W state +* @nic_control: Perform NIC related operations. * @pci_bars_map: Map PCI BARs. * @init_iatu: Initialize the iATU unit inside the PCI controller. * @get_mac_addr: Get list of MAC addresses.
@@ -800,6 +801,8 @@ struct hl_asic_funcs {int (*send_cpu_message)(struct hl_device *hdev,u32 *msg,u16 len,u32 timeout,long *result);enum hl_device_hw_state (*get_hw_state)(struct hl_device *hdev); +int (*nic_control)(struct hl_device *hdev,u32 op,void *input, +void *output);int (*pci_bars_map)(struct hl_device *hdev);int (*init_iatu)(struct hl_device *hdev); int (*get_mac_addr)(struct hl_device *hdev,
drivers/misc/habanalabs/common/habanalabs_ioctl.c +97 -1
116 lines not on this page · raw message
drivers/misc/habanalabs/gaudi/gaudi.c +1 -0
@@ -7470,6 +7470,7 @@ static const struct hl_asic_funcs gaudi_funcs = { .get_eeprom_data = gaudi_get_eeprom_data, .send_cpu_message = gaudi_send_cpu_message, .get_hw_state = gaudi_get_hw_state, + .nic_control = gaudi_nic_control, .pci_bars_map = gaudi_pci_bars_map, .init_iatu = gaudi_init_iatu, .get_mac_addr = gaudi_nic_get_mac_addr,
drivers/misc/habanalabs/gaudi/gaudiP.h +2 -0
@@ -566,6 +566,8 @@ void gaudi_nic_stop(struct hl_device *hdev);void gaudi_nic_ports_reopen (struct hl_device *hdev);int gaudi_nic_get_mac_addr (struct hl_device *hdev,struct hl_info_mac_addr *mac_addr); +int gaudi_nic_control (struct hl_device *hdev,u32 op,void *input, +void *output);void gaudi_nic_ctx_fini (struct hl_ctx *ctx);irqreturn_t gaudi_nic_rx_irq_handler (int irq,void *arg);irqreturn_t gaudi_nic_cq_irq_handler (int irq,void *arg);
drivers/misc/habanalabs/gaudi/gaudi_nic.c +406 -0
424 lines not on this page · raw message
drivers/misc/habanalabs/goya/goya.c +9 -0
@@ -5269,6 +5269,14 @@ static enum hl_device_hw_state goya_get_hw_state(struct hl_device *hdev)return RREG32 (mmHW_STATE); } +static int goya_nic_control (struct hl_device *hdev,u32 op,void *input, +void *output) +{ +dev_err_ratelimited (hdev->dev, +"NIC operations cannot be performed on Goya\n" ); +return -ENXIO ; +} +static int goya_get_mac_addr (struct hl_device *hdev,struct hl_info_mac_addr *mac_addr) {
@@ -5394,6 +5402,7 @@ static const struct hl_asic_funcs goya_funcs = { .get_eeprom_data = goya_get_eeprom_data, .send_cpu_message = goya_send_cpu_message, .get_hw_state = goya_get_hw_state, + .nic_control = goya_nic_control, .pci_bars_map = goya_pci_bars_map, .init_iatu = goya_init_iatu, .get_mac_addr = goya_get_mac_addr,
include/uapi/misc/habanalabs.h +128 -1
141 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 9/14 habanalabs/gaudi: add CQ control operations
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Add NIC Completion Queue (CQ) opcodes to NIC ioctl. The CQ is used by the user-space process to get notification of a completed work.
A CQ entry (CQE) has three types: requester (sender), responder (receiver) and error. Each type has unique fields as well as shared ones.
Currently only a single user CQ is supported but it may be extended in the future, hence proper locking was added as well. In addition, an error interrupt was added to identify CQ overrun.
The added opcodes are:
- Create CQ
- Destroy CQ
- Wait on CQ: sleeps until CQEs are available in the buffer.
- Poll CQ: check if there are available CQEs in the buffer. It is a non-blocking function.
- Update consumed CQEs: The user informs the driver regarding processed CQEs so these can be overridden by the driver.
--- drivers/misc/habanalabs/common/device.c | 6 +- drivers/misc/habanalabs/common/habanalabs.h | 3 + .../misc/habanalabs/common/habanalabs_ioctl.c | 20 +- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/gaudi/gaudiP.h | 1 + drivers/misc/habanalabs/gaudi/gaudi_nic.c | 594 ++++++++++++++++++ drivers/misc/habanalabs/goya/goya.c | 8 + include/uapi/misc/habanalabs.h | 111 ++++ 8 files changed, 741 insertions(+), 3 deletions(-)
drivers/misc/habanalabs/common/device.c +5 -1
@@ -117,12 +117,13 @@ static int hl_device_release_ctrl(struct inode *inode, struct file *filp)* @*filp: pointer to file structure * @*vma: pointer to vm_area_struct of the process * -* Called when process does an mmap on habanalabs device. Call the device's mmap +* Called when process does an mmap on habanalabs device. Call the relevant mmap * function at the end of the common code. */ static int hl_mmap (struct file *filp,struct vm_area_struct *vma) {struct hl_fpriv *hpriv = filp->private_data; +struct hl_device *hdev = hpriv->hdev;unsigned long vm_pgoff; vm_pgoff = vma->vm_pgoff;
@@ -131,6 +132,9 @@ static int hl_mmap(struct file *filp, struct vm_area_struct *vma)switch (vm_pgoff &HL_MMAP_TYPE_MASK ) {case HL_MMAP_TYPE_CB :return hl_cb_mmap (hpriv, vma); + +case HL_MMAP_TYPE_NIC_CQ : +return hdev->asic_funcs->nic_cq_mmap (hdev, vma); }return -EINVAL ;
drivers/misc/habanalabs/common/habanalabs.h +3 -0
@@ -32,6 +32,7 @@#define HL_MMAP_TYPE_SHIFT (62 - PAGE_SHIFT)#define HL_MMAP_TYPE_MASK (0x3ull << HL_MMAP_TYPE_SHIFT)#define HL_MMAP_TYPE_CB (0x2ull << HL_MMAP_TYPE_SHIFT) +#define HL_MMAP_TYPE_NIC_CQ (0x1ull << HL_MMAP_TYPE_SHIFT)#define HL_MMAP_OFFSET_VALUE_MASK (0x3FFFFFFFFFFFull >> PAGE_SHIFT)#define HL_MMAP_OFFSET_VALUE_GET (off) (off & HL_MMAP_OFFSET_VALUE_MASK)
@@ -697,6 +698,7 @@ struct hl_info_mac_addr;* ASIC * @get_hw_state: retrieve the H/W state * @nic_control: Perform NIC related operations. +* @nic_cq_mmap: map the NIC CQ buffer. * @pci_bars_map: Map PCI BARs. * @init_iatu: Initialize the iATU unit inside the PCI controller. * @get_mac_addr: Get list of MAC addresses.
@@ -803,6 +805,7 @@ struct hl_asic_funcs {enum hl_device_hw_state (*get_hw_state)(struct hl_device *hdev);int (*nic_control)(struct hl_device *hdev,u32 op,void *input,void *output); +int (*nic_cq_mmap)(struct hl_device *hdev,struct vm_area_struct *vma);int (*pci_bars_map)(struct hl_device *hdev);int (*init_iatu)(struct hl_device *hdev); int (*get_mac_addr)(struct hl_device *hdev,
drivers/misc/habanalabs/common/habanalabs_ioctl.c +18 -2
@@ -24,18 +24,29 @@ static u32 hl_debug_struct_size[HL_DEBUG_OP_TIMESTAMP + 1] = { }; -static u32 hl_nic_input_size[HL_NIC_OP_DESTROY_CONN +1 ] = { +static u32 hl_nic_input_size[HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES +1 ] = { [HL_NIC_OP_ALLOC_CONN ] =sizeof (struct hl_nic_alloc_conn_in ), [HL_NIC_OP_SET_REQ_CONN_CTX ] =sizeof (struct hl_nic_req_conn_ctx_in ), [HL_NIC_OP_SET_RES_CONN_CTX ] =sizeof (struct hl_nic_res_conn_ctx_in ), [HL_NIC_OP_DESTROY_CONN ] =sizeof (struct hl_nic_destroy_conn_in ), + [HL_NIC_OP_CQ_CREATE ] =sizeof (struct hl_nic_cq_create_in ), + [HL_NIC_OP_CQ_DESTROY ] =sizeof (struct hl_nic_cq_destroy_in ), + [HL_NIC_OP_CQ_WAIT ] =sizeof (struct hl_nic_cq_poll_wait_in ), + [HL_NIC_OP_CQ_POLL ] =sizeof (struct hl_nic_cq_poll_wait_in ), + [HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES ] = +sizeof (struct hl_nic_cq_update_consumed_cqes_in ), }; -static u32 hl_nic_output_size[HL_NIC_OP_DESTROY_CONN +1 ] = { +static u32 hl_nic_output_size[HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES +1 ] = { [HL_NIC_OP_ALLOC_CONN ] =sizeof (struct hl_nic_alloc_conn_out ), [HL_NIC_OP_SET_REQ_CONN_CTX ] =0 , [HL_NIC_OP_SET_RES_CONN_CTX ] =0 , [HL_NIC_OP_DESTROY_CONN ] =0 , + [HL_NIC_OP_CQ_CREATE ] =sizeof (struct hl_nic_cq_create_out ), + [HL_NIC_OP_CQ_DESTROY ] =0 , + [HL_NIC_OP_CQ_WAIT ] =sizeof (struct hl_nic_cq_poll_wait_out ), + [HL_NIC_OP_CQ_POLL ] =sizeof (struct hl_nic_cq_poll_wait_out ), + [HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES ] =0 , };static int device_status_info (struct hl_device *hdev,struct hl_info_args *args)
@@ -625,6 +636,11 @@ static int hl_nic_ioctl(struct hl_fpriv *hpriv, void *data)case HL_NIC_OP_SET_REQ_CONN_CTX :case HL_NIC_OP_SET_RES_CONN_CTX :case HL_NIC_OP_DESTROY_CONN : +case HL_NIC_OP_CQ_CREATE : +case HL_NIC_OP_CQ_DESTROY : +case HL_NIC_OP_CQ_WAIT : +case HL_NIC_OP_CQ_POLL : +case HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES : args->input_size =min (args->input_size, hl_nic_input_size[args->op]); args->output_size =
drivers/misc/habanalabs/gaudi/gaudi.c +1 -0
@@ -7471,6 +7471,7 @@ static const struct hl_asic_funcs gaudi_funcs = { .send_cpu_message = gaudi_send_cpu_message, .get_hw_state = gaudi_get_hw_state, .nic_control = gaudi_nic_control, + .nic_cq_mmap = gaudi_nic_cq_mmap, .pci_bars_map = gaudi_pci_bars_map, .init_iatu = gaudi_init_iatu, .get_mac_addr = gaudi_nic_get_mac_addr,
drivers/misc/habanalabs/gaudi/gaudiP.h +1 -0
@@ -569,6 +569,7 @@ int gaudi_nic_get_mac_addr(struct hl_device *hdev,int gaudi_nic_control (struct hl_device *hdev,u32 op,void *input,void *output);void gaudi_nic_ctx_fini (struct hl_ctx *ctx); +int gaudi_nic_cq_mmap (struct hl_device *hdev,struct vm_area_struct *vma);irqreturn_t gaudi_nic_rx_irq_handler (int irq,void *arg);irqreturn_t gaudi_nic_cq_irq_handler (int irq,void *arg); netdev_tx_t gaudi_nic_handle_tx_pkt(struct gaudi_nic_device *gaudi_nic,
drivers/misc/habanalabs/gaudi/gaudi_nic.c +594 -0
640 lines not on this page · raw message
drivers/misc/habanalabs/goya/goya.c +8 -0
@@ -5277,6 +5277,13 @@ static int goya_nic_control(struct hl_device *hdev, u32 op, void *input,return -ENXIO ; } +static int goya_nic_mmap (struct hl_device *hdev,struct vm_area_struct *vma) +{ +dev_err_ratelimited (hdev->dev, +"NIC mmap operations cannot be performed on Goya\n" ); +return -ENXIO ; +} +static int goya_get_mac_addr (struct hl_device *hdev,struct hl_info_mac_addr *mac_addr) {
@@ -5403,6 +5410,7 @@ static const struct hl_asic_funcs goya_funcs = { .send_cpu_message = goya_send_cpu_message, .get_hw_state = goya_get_hw_state, .nic_control = goya_nic_control, + .nic_cq_mmap = goya_nic_mmap, .pci_bars_map = goya_pci_bars_map, .init_iatu = goya_init_iatu, .get_mac_addr = goya_get_mac_addr,
include/uapi/misc/habanalabs.h +111 -0
139 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 10/14 habanalabs/gaudi: add WQ control operations
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Add Work Queue (WQ) opcodes to NIC ioctl. A WQ contains entries (WQEs) where each WQE represents a packet that should be sent or received.
Each WQ has two types: requester (sender) and responder (receiver).
The added opcodes are:
- Set WQ: set the WQ configuration in the HW. The user should provide the device virtual address of the WQ.
- Unset WQ: reset the WQ configuration in the HW.
--- .../misc/habanalabs/common/habanalabs_ioctl.c | 10 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 184 ++++++++++++++++++ include/uapi/misc/habanalabs.h | 33 ++++ 3 files changed, 225 insertions(+), 2 deletions(-)
drivers/misc/habanalabs/common/habanalabs_ioctl.c +8 -2
@@ -24,7 +24,7 @@ static u32 hl_debug_struct_size[HL_DEBUG_OP_TIMESTAMP + 1] = { }; -static u32 hl_nic_input_size[HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES +1 ] = { +static u32 hl_nic_input_size[HL_NIC_OP_USER_WQ_UNSET +1 ] = { [HL_NIC_OP_ALLOC_CONN ] =sizeof (struct hl_nic_alloc_conn_in ), [HL_NIC_OP_SET_REQ_CONN_CTX ] =sizeof (struct hl_nic_req_conn_ctx_in ), [HL_NIC_OP_SET_RES_CONN_CTX ] =sizeof (struct hl_nic_res_conn_ctx_in ),
@@ -35,9 +35,11 @@ static u32 hl_nic_input_size[HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES + 1] = { [HL_NIC_OP_CQ_POLL] = sizeof(struct hl_nic_cq_poll_wait_in), [HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES ] = sizeof(struct hl_nic_cq_update_consumed_cqes_in), + [HL_NIC_OP_USER_WQ_SET] = sizeof(struct hl_nic_user_wq_arr_set_in), + [HL_NIC_OP_USER_WQ_UNSET ] =sizeof (struct hl_nic_user_wq_arr_unset_in ) }; -static u32 hl_nic_output_size[HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES +1 ] = { +static u32 hl_nic_output_size[HL_NIC_OP_USER_WQ_UNSET +1 ] = { [HL_NIC_OP_ALLOC_CONN ] =sizeof (struct hl_nic_alloc_conn_out ), [HL_NIC_OP_SET_REQ_CONN_CTX ] =0 , [HL_NIC_OP_SET_RES_CONN_CTX ] =0 ,
@@ -47,6 +49,8 @@ static u32 hl_nic_output_size[HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES + 1] = { [HL_NIC_OP_CQ_WAIT] = sizeof(struct hl_nic_cq_poll_wait_out), [HL_NIC_OP_CQ_POLL] = sizeof(struct hl_nic_cq_poll_wait_out), [HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES] = 0, + [HL_NIC_OP_USER_WQ_SET] = 0, + [HL_NIC_OP_USER_WQ_UNSET] = 0 };static int device_status_info (struct hl_device *hdev,struct hl_info_args *args)
@@ -641,6 +645,8 @@ static int hl_nic_ioctl(struct hl_fpriv *hpriv, void *data)case HL_NIC_OP_CQ_WAIT :case HL_NIC_OP_CQ_POLL :case HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES : +case HL_NIC_OP_USER_WQ_SET : +case HL_NIC_OP_USER_WQ_UNSET : args->input_size =min (args->input_size, hl_nic_input_size[args->op]); args->output_size =
drivers/misc/habanalabs/gaudi/gaudi_nic.c +184 -0
208 lines not on this page · raw message
include/uapi/misc/habanalabs.h +33 -0
@@ -1025,6 +1025,31 @@ struct hl_nic_cq_poll_wait_out {__u32 pad; }; +/* Send user WQ array type */ +#define HL_NIC_USER_WQ_SEND 0 +/* Receive user WQ array type */ +#define HL_NIC_USER_WQ_RECV 1 + +struct hl_nic_user_wq_arr_set_in { +/* WQ array address */ +__u64 addr; +/* NIC port ID */ +__u32 port; +/* Number of user WQs */ +__u32 num_of_wqs; +/* Number of entries per user WQ */ +__u32 num_of_wq_entries; +/* Type of user WQ array */ +__u32 type; +}; + +struct hl_nic_user_wq_arr_unset_in { +/* NIC port ID */ +__u32 port; +/* Type of user WQ array */ +__u32 type; +}; +/* Opcode to allocate connection ID */ #define HL_NIC_OP_ALLOC_CONN 0/* Opcode to set up a requester connection context */
@@ -1043,6 +1068,10 @@ struct hl_nic_cq_poll_wait_out {#define HL_NIC_OP_CQ_POLL 7/* Opcode to update the number of consumed CQ entries */ #define HL_NIC_OP_CQ_UPDATE_CONSUMED_CQES 8 +/* Opcode to set a user WQ array */ +#define HL_NIC_OP_USER_WQ_SET 9 +/* Opcode to unset a user WQ array */ +#define HL_NIC_OP_USER_WQ_UNSET 10struct hl_nic_args {/* Pointer to user input structure (relevant to specific opcodes) */
@@ -1238,6 +1267,8 @@ struct hl_nic_args {* - Wait on completion queue * - Poll a completion queue * - Update consumed completion queue entries +* - Set a work queue +* - Unset a work queue * * For all operations, the user should provide a pointer to an input structure * with the context parameters. Some of the operations also require a pointer to
@@ -1251,6 +1282,8 @@ struct hl_nic_args {* driver regarding how many of the available CQEs were actually * processed/consumed. Only then the driver will override them with newer * entries. +* The set WQ operation should provide the device virtual address of the WQ with +* a matching size for the number of WQs and entries per WQ. * */ #define HL_IOCTL_NIC _IOWR('H', 0x07, struct hl_nic_args)
Signature · 1 line
2.17.1
PATCH v3 11/14 habanalabs/gaudi: add QP error handling
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Add Queue Pair (QP) error notification to the user e.g. security violation, too many retransmissions, invalid QP etc.
Whenever a QP caused an error, the firmware will send an event to the driver which will push the error as an error entry to the Completion Queue (if exists).
--- drivers/misc/habanalabs/gaudi/gaudi.c | 13 ++++ drivers/misc/habanalabs/gaudi/gaudiP.h | 1 + drivers/misc/habanalabs/gaudi/gaudi_nic.c | 95 +++++++++++++++++++++++ 3 files changed, 109 insertions(+)
drivers/misc/habanalabs/gaudi/gaudi.c +13 -0
@@ -6660,6 +6660,19 @@ static void gaudi_handle_eqe(struct hl_device *hdev,hl_fw_unmask_irq (hdev, event_type);break ; +case GAUDI_EVENT_NIC0_QP0 : +case GAUDI_EVENT_NIC0_QP1 : +case GAUDI_EVENT_NIC1_QP0 : +case GAUDI_EVENT_NIC1_QP1 : +case GAUDI_EVENT_NIC2_QP0 : +case GAUDI_EVENT_NIC2_QP1 : +case GAUDI_EVENT_NIC3_QP0 : +case GAUDI_EVENT_NIC3_QP1 : +case GAUDI_EVENT_NIC4_QP0 : +case GAUDI_EVENT_NIC4_QP1 : +gaudi_nic_handle_qp_err (hdev, event_type); +break ; +case GAUDI_EVENT_PSOC_GPIO_U16_0 : cause =le64_to_cpu (eq_entry->data[0 ]) &0xFF ; dev_err(hdev->dev,
drivers/misc/habanalabs/gaudi/gaudiP.h +1 -0
@@ -576,5 +576,6 @@ netdev_tx_t gaudi_nic_handle_tx_pkt(struct gaudi_nic_device *gaudi_nic, struct sk_buff *skb);int gaudi_nic_sw_init (struct hl_device *hdev);void gaudi_nic_sw_fini (struct hl_device *hdev); +void gaudi_nic_handle_qp_err (struct hl_device *hdev,u16 event_type);#endif /* GAUDIP_H_ */
drivers/misc/habanalabs/gaudi/gaudi_nic.c +95 -0
98 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 12/14 habanalabs/gaudi: Add ethtool support using coresight
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
The driver supports ethtool callbacks and provides statistics using the device's profiling infrastructure (coresight).
We support the basic ethtool functionality and counters, as far as our H/W provides support.
A summary of the supported callbacks:
- get_drvinfo: fill some basic information regarding the driver
- get_link_ksettings: get basic settings like speed, duplex, Auto-negotiation and link modes.
- set_link_ksettings: only speed and Auto-negotiation setting is supported.
- get_link: returns link indication.
- get_strings: get counters strings.
- get_sset_count: get counters number.
- get_ethtool_stats: get counters values.
- get_module_info: get EEPROM type and length.
- get_module_eeprom: get EEPROM (supported in raw mode only).
---
Changes in v3:
- verify the offset and length before copying the eeprom dump to the user to prevent kernel memroy leakage
- Remove the Tx/Rx counters titles from ethtool statistics
drivers/misc/habanalabs/gaudi/Makefile | 3 +- drivers/misc/habanalabs/gaudi/gaudi.c | 1 + drivers/misc/habanalabs/gaudi/gaudiP.h | 7 + .../misc/habanalabs/gaudi/gaudi_coresight.c | 144 ++++ drivers/misc/habanalabs/gaudi/gaudi_nic.c | 5 + .../misc/habanalabs/gaudi/gaudi_nic_ethtool.c | 616 ++++++++++++++++++ 6 files changed, 775 insertions(+), 1 deletion(-) create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic_ethtool.c
drivers/misc/habanalabs/gaudi/Makefile +2 -1
@@ -2,4 +2,5 @@ HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o \ gaudi/gaudi_coresight.o -HL_GAUDI_FILES += gaudi/gaudi_nic.o gaudi/gaudi_phy.o +HL_GAUDI_FILES += gaudi/gaudi_nic.o gaudi/gaudi_phy.o \ + gaudi/gaudi_nic_ethtool.o
drivers/misc/habanalabs/gaudi/gaudi.c +1 -0
@@ -1044,6 +1044,7 @@ static int gaudi_sw_init(struct hl_device *hdev) gaudi->cpucp_info_get = gaudi_cpucp_info_get; gaudi->nic_handle_rx = gaudi_nic_handle_rx; gaudi->nic_handle_tx = gaudi_nic_handle_tx; + gaudi->nic_spmu_init = gaudi_nic_spmu_init; gaudi->max_freq_value =GAUDI_MAX_CLK_FREQ ;
drivers/misc/habanalabs/gaudi/gaudiP.h +7 -0
@@ -438,6 +438,7 @@ struct gaudi_internal_qman_info {* @cpucp_info_get: get information on device from CPU-CP * @nic_handle_rx: NIC handler for incoming packet. * @nic_handle_tx: NIC handler for outgoing packet. +* @nic_spmu_init: initialize NIC CoreSight spmu counters. * @nic_devices: array that holds all NIC ports manage structures. * @nic_macros: array that holds all NIC macros manage structures. * @nic_pam4_tx_taps: array that holds all PAM4 Tx taps of all NIC lanes.
@@ -501,6 +502,7 @@ struct gaudi_device {int (*cpucp_info_get)(struct hl_device *hdev);void (*nic_handle_rx)(struct gaudi_nic_device *gaudi_nic);int (*nic_handle_tx)(struct gaudi_nic_device *gaudi_nic,void *data); +void (*nic_spmu_init)(struct hl_device *hdev,int port);struct gaudi_nic_device nic_devices[NIC_NUMBER_OF_PORTS ];struct gaudi_nic_macro nic_macros[NIC_NUMBER_OF_MACROS ];struct gaudi_nic_tx_taps nic_pam4_tx_taps[NIC_MAX_NUM_OF_LANES ];
@@ -574,8 +576,13 @@ irqreturn_t gaudi_nic_rx_irq_handler(int irq, void *arg);irqreturn_t gaudi_nic_cq_irq_handler (int irq,void *arg);netdev_tx_t gaudi_nic_handle_tx_pkt (struct gaudi_nic_device *gaudi_nic,struct sk_buff *skb); +void gaudi_nic_spmu_init (struct hl_device *hdev,int port);int gaudi_nic_sw_init (struct hl_device *hdev);void gaudi_nic_sw_fini (struct hl_device *hdev);void gaudi_nic_handle_qp_err (struct hl_device *hdev,u16 event_type); +int gaudi_config_spmu_nic (struct hl_device *hdev,u32 port, +u32 num_event_types,u32 event_types[]); +int gaudi_sample_spmu_nic (struct hl_device *hdev,u32 port, +u32 num_out_data,u64 out_data[]);#endif /* GAUDIP_H_ */
drivers/misc/habanalabs/gaudi/gaudi_coresight.c +144 -0
168 lines not on this page · raw message
drivers/misc/habanalabs/gaudi/gaudi_nic.c +5 -0
@@ -2778,6 +2778,7 @@ static int port_register(struct hl_device *hdev, int port) ndev->dev_port = port; ndev->netdev_ops = &gaudi_nic_netdev_ops; + ndev->ethtool_ops = &gaudi_nic_ethtool_ops; ndev->watchdog_timeo =NIC_TX_TIMEOUT ; ndev->min_mtu =ETH_MIN_MTU ; ndev->max_mtu =NIC_MAX_MTU ;
@@ -2801,6 +2802,8 @@ static int port_register(struct hl_device *hdev, int port) port); } + gaudi->nic_spmu_init (hdev, port); +if (register_netdev (ndev)) {dev_err (hdev->dev,"Could not register netdevice, port: %d\n" , port);
@@ -3265,6 +3268,8 @@ void gaudi_nic_ports_reopen(struct hl_device *hdev)continue ; } + gaudi->nic_spmu_init (hdev, port); +schedule_delayed_work (&gaudi_nic->port_open_work,msecs_to_jiffies (1 )); }
drivers/misc/habanalabs/gaudi/gaudi_nic_ethtool.c new file +616 -0
616 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 13/14 habanalabs/gaudi: support DCB protocol
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Add DCB support to configure the NIC's Priority Flow Control (PFC). The added support is minimal because a full support is not currently required.
A summary of the supported callbacks:
- ieee_getpfc: get the current PFC configuration. PFC is enabled by default.
- ieee_setpfc: set PFC configuration. Only 0 or all 4 priorities can be enabled, no subset is allowed.
- getdcbx: get DCBX capability.
- setdcbx: set DCBX capability. Only host LLDP agent and IEEE protocol flavors are supported.
--- drivers/misc/habanalabs/gaudi/Makefile | 2 +- drivers/misc/habanalabs/gaudi/gaudi_nic.c | 3 + .../misc/habanalabs/gaudi/gaudi_nic_dcbnl.c | 108 ++++++++++++++++++ 3 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 drivers/misc/habanalabs/gaudi/gaudi_nic_dcbnl.c
drivers/misc/habanalabs/gaudi/Makefile +1 -1
@@ -3,4 +3,4 @@ HL_GAUDI_FILES := gaudi/gaudi.o gaudi/gaudi_hwmgr.o gaudi/gaudi_security.o \ gaudi/gaudi_coresight.o HL_GAUDI_FILES += gaudi/gaudi_nic.o gaudi/gaudi_phy.o \ - gaudi/gaudi_nic_ethtool.o + gaudi/gaudi_nic_ethtool.o gaudi/gaudi_nic_dcbnl.o
drivers/misc/habanalabs/gaudi/gaudi_nic.c +3 -0
@@ -2779,6 +2779,9 @@ static int port_register(struct hl_device *hdev, int port) ndev->netdev_ops = &gaudi_nic_netdev_ops; ndev->ethtool_ops = &gaudi_nic_ethtool_ops; +#ifdef CONFIG_DCB + ndev->dcbnl_ops = &gaudi_nic_dcbnl_ops; +#endif ndev->watchdog_timeo =NIC_TX_TIMEOUT ; ndev->min_mtu =ETH_MIN_MTU ; ndev->max_mtu =NIC_MAX_MTU ;
drivers/misc/habanalabs/gaudi/gaudi_nic_dcbnl.c new file +108 -0
108 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v3 14/14 habanalabs/gaudi: add NIC init/fini calls from common code
In reply to Oded GabbayFrom: Omer Shpigelman <[email protected]>
Finally, enable the NIC engines. Initialize the NIC ports mask variable with full mask so all ports will be initialized.
Call the NIC init/fini from the common code.
--- drivers/misc/habanalabs/common/device.c | 18 +++++++++++++++ drivers/misc/habanalabs/common/habanalabs.h | 6 +++++ .../misc/habanalabs/common/habanalabs_drv.c | 1 + drivers/misc/habanalabs/common/pci.c | 1 + drivers/misc/habanalabs/gaudi/gaudi.c | 23 +++++++++++++++++++ drivers/misc/habanalabs/goya/goya.c | 12 ++++++++++ 6 files changed, 61 insertions(+)
drivers/misc/habanalabs/common/device.c +18 -0
@@ -1083,6 +1083,12 @@ int hl_device_reset(struct hl_device *hdev, bool hard_reset, goto out_err; } + rc = hdev->asic_funcs->nic_init (hdev); +if (rc) { +dev_err (hdev->dev,"Failed to init NIC driver\n" ); + goto out_err; + } +hl_set_max_power (hdev); }else { rc = hdev->asic_funcs->soft_reset_late_init (hdev);
@@ -1318,6 +1324,13 @@ int hl_device_init(struct hl_device *hdev, struct class *hclass) goto out_disabled; } + rc = hdev->asic_funcs->nic_init (hdev); +if (rc) { +dev_err (hdev->dev,"Failed to init NIC driver\n" ); + rc =0 ; + goto out_disabled; + } +/* * Expose devices and sysfs nodes to user. * From here there is no need to add char devices and create sysfs nodes
@@ -1469,6 +1482,11 @@ void hl_device_fini(struct hl_device *hdev)hl_cb_pool_fini (hdev); +/* the NIC uses the kernel context for MMU mappings, therefore must be +* cleaned before it +*/ + hdev->asic_funcs->nic_fini (hdev); +/* Release kernel context */ if ((hdev->kernel_ctx) && (hl_ctx_put (hdev->kernel_ctx) !=1 ))dev_err (hdev->dev,"kernel ctx is still alive\n" );
drivers/misc/habanalabs/common/habanalabs.h +6 -0
@@ -697,6 +697,10 @@ struct hl_info_mac_addr;* then the timeout is the default timeout for the specific * ASIC * @get_hw_state: retrieve the H/W state +* @nic_init: init the NIC H/W and I/F. This should be called in the final satge +* of the init flow, as we must not have anything that might fail +* during its initialization after the NIC init. +* @nic_fini: perform NIC cleanup. * @nic_control: Perform NIC related operations. * @nic_cq_mmap: map the NIC CQ buffer. * @pci_bars_map: Map PCI BARs.
@@ -803,6 +807,8 @@ struct hl_asic_funcs {int (*send_cpu_message)(struct hl_device *hdev,u32 *msg,u16 len,u32 timeout,long *result);enum hl_device_hw_state (*get_hw_state)(struct hl_device *hdev); +int (*nic_init)(struct hl_device *hdev); +void (*nic_fini)(struct hl_device *hdev);int (*nic_control)(struct hl_device *hdev,u32 op,void *input,void *output);int (*nic_cq_mmap)(struct hl_device *hdev,struct vm_area_struct *vma);
drivers/misc/habanalabs/common/habanalabs_drv.c +1 -0
@@ -242,6 +242,7 @@ static void set_driver_behavior_per_device(struct hl_device *hdev) hdev->bmc_enable =1 ; hdev->hard_reset_on_fw_events =1 ; hdev->card_type = cpucp_card_type_pci; + hdev->nic_ports_mask =0x3FF ; hdev->nic_ports_ext_mask =0x3FF ; hdev->nic_auto_neg_mask =0x3FF ; hdev->nic_load_fw =0 ;
drivers/misc/habanalabs/common/pci.c +1 -0
@@ -230,6 +230,7 @@ int hl_pci_set_inbound_region(struct hl_device *hdev, u8 region, lower_32_bits(pci_region->addr)); rc |=hl_pci_iatu_write (hdev, offset +0x18 ,upper_32_bits (pci_region->addr)); +/* Set bar type as memory */ rc |=hl_pci_iatu_write (hdev, offset +0x0 ,0 );/* Enable + bar/address match + match enable + bar number */
drivers/misc/habanalabs/gaudi/gaudi.c +23 -0
@@ -883,6 +883,27 @@ static void gaudi_late_fini(struct hl_device *hdev) hdev->hl_chip_info->info =NULL ; } +static int gaudi_nic_init (struct hl_device *hdev) +{ +/* +* In init flow we initialize the NIC ports from scratch. In hard reset +* flow, we get here after the NIC ports were halted, hence we only +* need to reopen them. +*/ +if (atomic_read (&hdev->in_reset)) { +gaudi_nic_ports_reopen (hdev); +return 0 ; + } + +return gaudi_nic_ports_init (hdev); +} + +static void gaudi_nic_fini (struct hl_device *hdev) +{ +/* must be called after MSI was disabled */ +gaudi_nic_ports_fini (hdev); +} +static void gaudi_nic_handle_rx (struct gaudi_nic_device *gaudi_nic) {/* at this point, interrupts were disabled by the H/W */
@@ -7484,6 +7505,8 @@ static const struct hl_asic_funcs gaudi_funcs = { .get_eeprom_data = gaudi_get_eeprom_data, .send_cpu_message = gaudi_send_cpu_message, .get_hw_state = gaudi_get_hw_state, + .nic_init = gaudi_nic_init, + .nic_fini = gaudi_nic_fini, .nic_control = gaudi_nic_control, .nic_cq_mmap = gaudi_nic_cq_mmap, .pci_bars_map = gaudi_pci_bars_map,
drivers/misc/habanalabs/goya/goya.c +12 -0
@@ -5269,6 +5269,16 @@ static enum hl_device_hw_state goya_get_hw_state(struct hl_device *hdev)return RREG32 (mmHW_STATE); } +static int goya_nic_init (struct hl_device *hdev) +{ +return 0 ; +} + +static void goya_nic_fini (struct hl_device *hdev) +{ + +} +static int goya_nic_control (struct hl_device *hdev,u32 op,void *input,void *output) {
@@ -5409,6 +5419,8 @@ static const struct hl_asic_funcs goya_funcs = { .get_eeprom_data = goya_get_eeprom_data, .send_cpu_message = goya_send_cpu_message, .get_hw_state = goya_get_hw_state, + .nic_init = goya_nic_init, + .nic_fini = goya_nic_fini, .nic_control = goya_nic_control, .nic_cq_mmap = goya_nic_mmap, .pci_bars_map = goya_pci_bars_map,
Signature · 1 line
2.17.1
David Miller
maintainerFrom: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300
Quoted 8 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201
I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed. And because of the RDMA'ness of it, the RDMA folks have to be CC:'d and have a chance to review this.
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.
In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.
Thanks,
Oded
Greg Kroah-Hartman
maintainerQuoted 24 lines · Oded Gabbay
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 8 lines
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.
Ok, to do this "right" it needs to be split up into separate drivers, hopefully using the "virtual bus" code that some day Intel will resubmit again that will solve this issue.
That will allow you to put the network driver portion in drivers/net/ and split the code up into the proper different pieces easier.
I recommend grabbing the virtual bus code from the archives and looking at that for how this can be done. Now that you are part of Intel, I'm sure that the internal-Intel-Linux-kernel-review-process can kick in and those developers can help you out. If not, let me know, so I can go kick them :)
As for the RDMA stuff, yeah, you should look at the current RDMA interfaces and verify that those really do not work for you here, and then document why that is in your patch submission.
thanks,
greg k-h
Quoted 35 lines · Greg Kroah-Hartman
Quoted 24 lines · Oded Gabbay
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 8 lines
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.
Quoted 3 lines
Ok, to do this "right" it needs to be split up into separate drivers, hopefully using the "virtual bus" code that some day Intel will resubmit again that will solve this issue.
Hi Greg,
Can I suggest an alternative for the short/medium term ?
In an earlier email, Jakub said:
"Is it not possible to move the files and still build them into a single module?"
I thought maybe that's a good way to progress here ? First, split the content to Ethernet and RDMA.
Then move the Ethernet part to drivers/net but build it as part of habanalabs.ko.
Regarding the RDMA code, upstream/review it in a different patch-set (maybe they will want me to put the files elsewhere).
What do you think ?
Quoted 10 lines
That will allow you to put the network driver portion in
drivers/net/and split the code up into the proper different pieces easier.I recommend grabbing the virtual bus code from the archives and looking at that for how this can be done. Now that you are part of Intel, I'm sure that the internal-Intel-Linux-kernel-review-process can kick in and those developers can help you out. If not, let me know, so I can go kick them :)
Quoted 3 lines
As for the RDMA stuff, yeah, you should look at the current RDMA interfaces and verify that those really do not work for you here, and then document why that is in your patch submission.
ok, will do that.
Thanks,
Oded
Quoted 4 lines
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 40 lines · Oded Gabbay
Quoted 35 lines · Greg Kroah-Hartman
Quoted 24 lines · Oded Gabbay
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 8 lines
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.Quoted 3 lines
Ok, to do this "right" it needs to be split up into separate drivers, hopefully using the "virtual bus" code that some day Intel will resubmit again that will solve this issue.
Quoted 8 lines
Hi Greg,
Can I suggest an alternative for the short/medium term ?In an earlier email, Jakub said:
"Is it not possible to move the files and still build them into a single module?"I thought maybe that's a good way to progress here ?
Cross-directory builds of a single module are crazy. Yes, they work, but really, that's a mess, and would never suggest doing that.
Quoted 7 lines
First, split the content to Ethernet and RDMA.
Then move the Ethernet part todrivers/netbut build it as part of habanalabs.ko.
Regarding the RDMA code, upstream/review it in a different patch-set (maybe they will want me to put the files elsewhere).What do you think ?
I think you are asking for more work there than just splitting out into separate modules :)
thanks,
greg k-h
Quoted 60 lines · Greg Kroah-Hartman
Quoted 40 lines · Oded Gabbay
Quoted 35 lines · Greg Kroah-Hartman
Quoted 24 lines · Oded Gabbay
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 8 lines
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.Quoted 3 lines
Ok, to do this "right" it needs to be split up into separate drivers, hopefully using the "virtual bus" code that some day Intel will resubmit again that will solve this issue.
Quoted 8 lines
Hi Greg,
Can I suggest an alternative for the short/medium term ?In an earlier email, Jakub said:
"Is it not possible to move the files and still build them into a single module?"I thought maybe that's a good way to progress here ?
Cross-directory builds of a single module are crazy. Yes, they work, but really, that's a mess, and would never suggest doing that.
Quoted 6 lines
First, split the content to Ethernet and RDMA.
Then move the Ethernet part todrivers/netbut build it as part of habanalabs.ko.
Regarding the RDMA code, upstream/review it in a different patch-set (maybe they will want me to put the files elsewhere).
Quoted 8 lines
Quoted 1 line
What do you think ?
I think you are asking for more work there than just splitting out into separate modules :)
thanks,
greg k-h
Hi Greg,
If cross-directory building is out of the question, what about splitting into separate modules ? And use cross-module notifiers/calls ? I did that with amdkfd and amdgpu/radeon a couple of years back. It worked (that's the best thing I can say about it).
The main problem with this "virtual bus" thing is that I'm not familiar with it at all and from my experience I imagine it would take a considerable time and effort to upstream this infrastructure work. This could delay the NIC code for a couple of years, which by then this won't be relevant at all.
So I'm trying to find some middle ground here on how to proceed.
Thanks,
Oded
Greg Kroah-Hartman
maintainerQuoted 69 lines · Oded Gabbay
Quoted 67 lines · Greg Kroah-Hartman
Quoted 40 lines · Oded Gabbay
Quoted 35 lines · Greg Kroah-Hartman
Quoted 24 lines · Oded Gabbay
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 8 lines
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.Quoted 3 lines
Ok, to do this "right" it needs to be split up into separate drivers, hopefully using the "virtual bus" code that some day Intel will resubmit again that will solve this issue.
Quoted 8 lines
Hi Greg,
Can I suggest an alternative for the short/medium term ?In an earlier email, Jakub said:
"Is it not possible to move the files and still build them into a single module?"I thought maybe that's a good way to progress here ?
Cross-directory builds of a single module are crazy. Yes, they work, but really, that's a mess, and would never suggest doing that.
Quoted 7 lines
First, split the content to Ethernet and RDMA.
Then move the Ethernet part todrivers/netbut build it as part of habanalabs.ko.
Regarding the RDMA code, upstream/review it in a different patch-set (maybe they will want me to put the files elsewhere).What do you think ?
I think you are asking for more work there than just splitting out into separate modules :)
thanks,
Quoted 7 lines
Quoted 1 line
greg k-h
Hi Greg,
If cross-directory building is out of the question, what about splitting into separate modules ? And use cross-module notifiers/calls ? I did that with amdkfd and amdgpu/radeon a couple of years back. It worked (that's the best thing I can say about it).
That's fine with me.
Quoted 3 lines
The main problem with this "virtual bus" thing is that I'm not familiar with it at all and from my experience I imagine it would take a considerable time and effort to upstream this infrastructure work.
It shouldn't be taking that long, but for some unknown reason, the original author of that code is sitting on it and not resending it. Go poke them through internal Intel channels to find out what the problem is, as I have no clue why a 200-300 line bus module is taking so long to get "right" :(
I'm _ALMOST_ at the point where I would just do that work myself, but due to my current status with Intel, I'll let them do it as I have enough other things on my plate...
Quoted 2 lines
This could delay the NIC code for a couple of years, which by then this won't be relevant at all.
Why wouldn't this code be relevant in a year? It's going to be 2+ years before any of this shows up in an "enterprise distro" based on their release cycles anyway :)
thanks,
greg k-h
Quoted 98 lines · Greg Kroah-Hartman
Quoted 69 lines · Oded Gabbay
Quoted 67 lines · Greg Kroah-Hartman
Quoted 40 lines · Oded Gabbay
Quoted 35 lines · Greg Kroah-Hartman
Quoted 24 lines · Oded Gabbay
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 8 lines
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.Quoted 3 lines
Ok, to do this "right" it needs to be split up into separate drivers, hopefully using the "virtual bus" code that some day Intel will resubmit again that will solve this issue.
Quoted 8 lines
Hi Greg,
Can I suggest an alternative for the short/medium term ?In an earlier email, Jakub said:
"Is it not possible to move the files and still build them into a single module?"I thought maybe that's a good way to progress here ?
Cross-directory builds of a single module are crazy. Yes, they work, but really, that's a mess, and would never suggest doing that.
Quoted 7 lines
First, split the content to Ethernet and RDMA.
Then move the Ethernet part todrivers/netbut build it as part of habanalabs.ko.
Regarding the RDMA code, upstream/review it in a different patch-set (maybe they will want me to put the files elsewhere).What do you think ?
I think you are asking for more work there than just splitting out into separate modules :)
thanks,
Quoted 7 lines
Quoted 1 line
greg k-h
Hi Greg,
If cross-directory building is out of the question, what about splitting into separate modules ? And use cross-module notifiers/calls ? I did that with amdkfd and amdgpu/radeon a couple of years back. It worked (that's the best thing I can say about it).
That's fine with me.
Quoted 3 lines
The main problem with this "virtual bus" thing is that I'm not familiar with it at all and from my experience I imagine it would take a considerable time and effort to upstream this infrastructure work.
It shouldn't be taking that long, but for some unknown reason, the original author of that code is sitting on it and not resending it. Go poke them through internal Intel channels to find out what the problem is, as I have no clue why a 200-300 line bus module is taking so long to get "right" :(
I'm _ALMOST_ at the point where I would just do that work myself, but due to my current status with Intel, I'll let them do it as I have enough other things on my plate...
Quoted 2 lines
This could delay the NIC code for a couple of years, which by then this won't be relevant at all.
Quoted 7 lines
Why wouldn't this code be relevant in a year? It's going to be 2+ years before any of this shows up in an "enterprise distro" based on their release cycles anyway :)
thanks,
greg k-h
Hi Greg,
ok, I'll take a look. Do you happen to have the name of the patch-set / author ?
Regarding the RDMA stuff, I'll do some work internally to separate it from the Ethernet code and then will send that code only to RDMA people with more detailed explanations.
Thanks,
Oded
Greg Kroah-Hartman
maintainerQuoted 104 lines · Oded Gabbay
Quoted 102 lines · Greg Kroah-Hartman
Quoted 69 lines · Oded Gabbay
Quoted 67 lines · Greg Kroah-Hartman
Quoted 40 lines · Oded Gabbay
Quoted 35 lines · Greg Kroah-Hartman
Quoted 24 lines · Oded Gabbay
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 8 lines
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.Quoted 3 lines
Ok, to do this "right" it needs to be split up into separate drivers, hopefully using the "virtual bus" code that some day Intel will resubmit again that will solve this issue.
Quoted 8 lines
Hi Greg,
Can I suggest an alternative for the short/medium term ?In an earlier email, Jakub said:
"Is it not possible to move the files and still build them into a single module?"I thought maybe that's a good way to progress here ?
Cross-directory builds of a single module are crazy. Yes, they work, but really, that's a mess, and would never suggest doing that.
Quoted 7 lines
First, split the content to Ethernet and RDMA.
Then move the Ethernet part todrivers/netbut build it as part of habanalabs.ko.
Regarding the RDMA code, upstream/review it in a different patch-set (maybe they will want me to put the files elsewhere).What do you think ?
I think you are asking for more work there than just splitting out into separate modules :)
thanks,
Quoted 7 lines
Quoted 1 line
greg k-h
Hi Greg,
If cross-directory building is out of the question, what about splitting into separate modules ? And use cross-module notifiers/calls ? I did that with amdkfd and amdgpu/radeon a couple of years back. It worked (that's the best thing I can say about it).
That's fine with me.
Quoted 3 lines
The main problem with this "virtual bus" thing is that I'm not familiar with it at all and from my experience I imagine it would take a considerable time and effort to upstream this infrastructure work.
It shouldn't be taking that long, but for some unknown reason, the original author of that code is sitting on it and not resending it. Go poke them through internal Intel channels to find out what the problem is, as I have no clue why a 200-300 line bus module is taking so long to get "right" :(
I'm _ALMOST_ at the point where I would just do that work myself, but due to my current status with Intel, I'll let them do it as I have enough other things on my plate...
Quoted 2 lines
This could delay the NIC code for a couple of years, which by then this won't be relevant at all.
Why wouldn't this code be relevant in a year? It's going to be 2+ years before any of this shows up in an "enterprise distro" based on their release cycles anyway :)
Quoted 6 lines
Quoted 3 lines
thanks,
greg k-h
Hi Greg,
ok, I'll take a look. Do you happen to have the name of the patch-set / author ?
Here's at least one copy:
https://lore.kernel.org/linux-rdma/[email protected]/
there might have been a newer one, can't remember, sorry.
thanks,
greg k-h
Quoted 109 lines · Greg Kroah-Hartman
Quoted 108 lines · Oded Gabbay
Quoted 105 lines · Greg Kroah-Hartman
Quoted 69 lines · Oded Gabbay
Quoted 67 lines · Greg Kroah-Hartman
Quoted 40 lines · Oded Gabbay
Quoted 35 lines · Greg Kroah-Hartman
Quoted 24 lines · Oded Gabbay
Quoted 7 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +0300Quoted 3 lines
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
Quoted 8 lines
Quoted 5 lines
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently structured and designed.
Why is that ?
Can you please point to the things that bother you or not working correctly? I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why we designed this driver as is.
And because of the RDMA'ness of it, the RDMA
Quoted 8 lines
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
As I said to Jakub, the driver doesn't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have
Therefore, I don't see why we need to CC linux-rdma.
I understood why Greg asked me to CC you because we do connect to the netdev and standard eth infrastructure, but regarding the RDMA, it's not really the same.Quoted 3 lines
Ok, to do this "right" it needs to be split up into separate drivers, hopefully using the "virtual bus" code that some day Intel will resubmit again that will solve this issue.
Quoted 8 lines
Hi Greg,
Can I suggest an alternative for the short/medium term ?In an earlier email, Jakub said:
"Is it not possible to move the files and still build them into a single module?"I thought maybe that's a good way to progress here ?
Cross-directory builds of a single module are crazy. Yes, they work, but really, that's a mess, and would never suggest doing that.
Quoted 7 lines
First, split the content to Ethernet and RDMA.
Then move the Ethernet part todrivers/netbut build it as part of habanalabs.ko.
Regarding the RDMA code, upstream/review it in a different patch-set (maybe they will want me to put the files elsewhere).What do you think ?
I think you are asking for more work there than just splitting out into separate modules :)
thanks,
Quoted 7 lines
Quoted 1 line
greg k-h
Hi Greg,
If cross-directory building is out of the question, what about splitting into separate modules ? And use cross-module notifiers/calls ? I did that with amdkfd and amdgpu/radeon a couple of years back. It worked (that's the best thing I can say about it).
That's fine with me.
Quoted 3 lines
The main problem with this "virtual bus" thing is that I'm not familiar with it at all and from my experience I imagine it would take a considerable time and effort to upstream this infrastructure work.
It shouldn't be taking that long, but for some unknown reason, the original author of that code is sitting on it and not resending it. Go poke them through internal Intel channels to find out what the problem is, as I have no clue why a 200-300 line bus module is taking so long to get "right" :(
I'm _ALMOST_ at the point where I would just do that work myself, but due to my current status with Intel, I'll let them do it as I have enough other things on my plate...
Quoted 2 lines
This could delay the NIC code for a couple of years, which by then this won't be relevant at all.
Why wouldn't this code be relevant in a year? It's going to be 2+ years before any of this shows up in an "enterprise distro" based on their release cycles anyway :)
thanks,
greg k-h
Quoted 7 lines
Quoted 2 lines
Hi Greg,
ok, I'll take a look. Do you happen to have the name of the patch-set / author ?Here's at least one copy:
https://lore.kernel.org/linux-rdma/[email protected]/there might have been a newer one, can't remember, sorry.
Maybe I'm missing something or maybe the in-tree code we have already should be refactored to use more buses and drivers, but drivers/base/component.c is made for this. We use this to glue all kinds of things across all kinds of subsystems already.
Of course it really should be only used for one-off problems, as soon as you have a standard interface/interaction there should be some kind of standard lookup way to get at your thing (and the driver behind it), e.g. in drivers/gpu we're now building up drm_bridge and trying to get away from componenent.c for these things.
Cheers, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 102 lines · Greg Kroah-Hartman
Quoted 84 lines · Oded Gabbay
Quoted 75 lines · Greg Kroah-Hartman
Quoted 53 lines · Oded Gabbay
Quoted 43 lines · Greg Kroah-Hartman
Quoted 30 lines · Oded Gabbay
Quoted 11 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Tue, 15 Sep 2020 20:10:08 +-0300Quoted 8 lines
This is the second version of the patch-set to upstream the GAUDI NIC code
into the habanalabs driver.The only modification from v2 is in the ethtool patch (patch 12). Details
are in that patch's commit message.Quoted 6 lines
Quoted 2 lines
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201I agree with Jakub, this driver definitely can't go-in as it is currently
structured and designed.Why is that ?
Can you please point to the things that bother you or not working correctly?
I can't really fix the driver if I don't know what's wrong.In addition, please read my reply to Jakub with the explanation of why
we designed this driver as is.And because of the RDMA'ness of it, the RDMA
Quoted 1 line
folks have to be CC:'d and have a chance to review this.
Quoted 11 lines
As I said to Jakub, the driver doesn't use the RDMA infrastructure in
the kernel and we can't connect to it due to the lack of H/W support
we have
Therefore, I don't see why we need to CC linux-rdma. I understood why Greg asked me to CC you because we do connect to the
netdev and standard eth infrastructure, but regarding the RDMA, it's
not really the same.Quoted 5 lines
Ok, to do this "right" it needs to be split up into separate drivers,
hopefully using the "virtual bus" code that some day Intel will resubmit
again that will solve this issue.Hi Greg,
Can I suggest an alternative for the short/medium term ?Quoted 6 lines
In an earlier email, Jakub said:
"Is it not possible to move the files and still build them into a single
module?"I thought maybe that's a good way to progress here ?
Cross-directory builds of a single module are crazy. Yes, they work,
but really, that's a mess, and would never suggest doing that.Quoted 9 lines
First, split the content to Ethernet and RDMA.
Then move the Ethernet part todrivers/netbut build it as part of
habanalabs.ko.
Regarding the RDMA code, upstream/review it in a different patch-set
(maybe they will want me to put the files elsewhere).What do you think ?
Quoted 7 lines
I think you are asking for more work there than just splitting out into
separate modules :)thanks,
greg k-h
Quoted 8 lines
Hi Greg,
If cross-directory building is out of the question, what about splitting into separate modules ? And use cross-module notifiers/calls
? I did that with amdkfd and amdgpu/radeon a couple of years back. It
worked (that's the best thing I can say about it).That's fine with me.
Quoted 5 lines
The main problem with this "virtual bus" thing is that I'm not familiar with it at all and from my experience I imagine it would take
a considerable time and effort to upstream this infrastructure work.
Quoted 8 lines
It shouldn't be taking that long, but for some unknown reason, the original author of that code is sitting on it and not resending it. Go
poke them through internal Intel channels to find out what the problem
is, as I have no clue why a 200-300 line bus module is taking so long to
get "right" :(
It turns out that they were caught between being deeply respectful of your request to get another senior kernel developer to look at it before sending it out, and deeply respectful of not disclosing that I was out on bonding leave.
It just happened that I left before they could
get the latest version over to review.
Quoted 3 lines
I'm _ALMOST_ at the point where I would just do that work myself, but due to my current status with Intel, I'll let them do it as I have enough other things on my plate...
I'm back now, let's get this thing moving. /me goes to review.
Jakub Kicinski
maintainerQuoted 7 lines · On Tue, 15 Sep 2020 20:10:08 +0300 Oded Gabbay wrote:
Hello,
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
You keep reposting this, yet this SDK shim^W^W driver is still living in drivers/misc. If you want to make it look like a NIC, the code belongs where NIC drivers are.
Then again, is it a NIC? Why do you have those custom IOCTLs? That's far from normal.
Please make sure to CC linux-rdma. You clearly stated that the device does RDMA-like transfers.
Quoted 10 lines · Jakub Kicinski
Quoted 7 lines · On Tue, 15 Sep 2020 20:10:08 +0300 Oded Gabbay wrote:
Hello,
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Quoted 6 lines
You keep reposting this, yet this SDK shim^W^W driver is still living in
drivers/misc. If you want to make it look like a NIC, the code belongs where NIC drivers are.Then again, is it a NIC? Why do you have those custom IOCTLs? That's far from normal.
Hi Jakub,
I'm sorry but from your question it seems as if you didn't read my cover letter at all, as I took great lengths in explaining exactly what our device is and why we use custom IOCTLs.
TL;DR
We have an accelerator for deep learning (GAUDI) which uses RDMA as infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel. We wanted to do it but when we analyzed it, we saw we wouldn't be able to support basic stuff and therefore we had to revert to our IOCTLs. To sum it up, because our NIC is used for intra-communication, we don't expose nor intend users to use it as a NIC per-se. However, to be able to get statistics and manage them in a standard way, and support control plane over Ethernet, we do register each port to the net subsystem (i.e. create netdev per port).
I hope this short summary explains this better.
As per your request that this code lives in the net subsystem, I think that will make it only more complicated and hard to upstream and maintain.
I see there are other examples (e.g. sgi-xp) that contain networking driver code in misc so I don't understand this objection.
Quoted 3 lines
Please make sure to CC linux-rdma. You clearly stated that the device does RDMA-like transfers.
We don't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have so I don't see why we need to CC linux-rdma.
Oded
Jakub Kicinski
maintainerQuoted 35 lines · On Tue, 15 Sep 2020 23:46:58 +0300 Oded Gabbay wrote:
Quoted 9 lines · Jakub Kicinski
Quoted 7 lines · On Tue, 15 Sep 2020 20:10:08 +0300 Oded Gabbay wrote:
Hello,
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Quoted 6 lines
You keep reposting this, yet this SDK shim^W^W driver is still living in
drivers/misc. If you want to make it look like a NIC, the code belongs where NIC drivers are.Then again, is it a NIC? Why do you have those custom IOCTLs? That's far from normal.
I'm sorry but from your question it seems as if you didn't read my cover letter at all, as I took great lengths in explaining exactly what our device is and why we use custom IOCTLs.
TL;DR
We have an accelerator for deep learning (GAUDI) which uses RDMA as infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel. We wanted to do it but when we analyzed it, we saw we wouldn't be able to support basic stuff and therefore we had to revert to our IOCTLs. To sum it up, because our NIC is used for intra-communication, we don't expose nor intend users to use it as a NIC per-se. However, to be able to get statistics and manage them in a standard way, and support control plane over Ethernet, we do register each port to the net subsystem (i.e. create netdev per port).
Quoted 1 line
I hope this short summary explains this better.
I read your cover letter. Networking drivers don't get to define random IOCTLs as they please. You have to take that part out of the "NIC" driver.
Quoted 5 lines
As per your request that this code lives in the net subsystem, I think that will make it only more complicated and hard to upstream and maintain.
I see there are other examples (e.g. sgi-xp) that contain networking driver code in misc so I don't understand this objection.
The maintenance structure and CI systems for the kernel depend on the directory layout. If you don't understand that I don't know how to help you.
Quoted 6 lines
Quoted 2 lines
Please make sure to CC linux-rdma. You clearly stated that the device does RDMA-like transfers.
We don't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have so I don't see why we need to CC linux-rdma.
You have it backward. You don't get to pick and choose which parts of the infrastructure you use, and therefore who reviews your drivers. The device uses RDMA under the hood so Linux RDMA experts must very much be okay with it getting merged. That's how we ensure Linux interfaces are consistent and good quality.
Quoted 37 lines · Jakub Kicinski
Quoted 35 lines · On Tue, 15 Sep 2020 23:46:58 +0300 Oded Gabbay wrote:
Quoted 9 lines · Jakub Kicinski
Quoted 7 lines · On Tue, 15 Sep 2020 20:10:08 +0300 Oded Gabbay wrote:
Hello,
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Quoted 6 lines
You keep reposting this, yet this SDK shim^W^W driver is still living in
drivers/misc. If you want to make it look like a NIC, the code belongs where NIC drivers are.Then again, is it a NIC? Why do you have those custom IOCTLs? That's far from normal.
I'm sorry but from your question it seems as if you didn't read my cover letter at all, as I took great lengths in explaining exactly what our device is and why we use custom IOCTLs.
TL;DR
We have an accelerator for deep learning (GAUDI) which uses RDMA as infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel. We wanted to do it but when we analyzed it, we saw we wouldn't be able to support basic stuff and therefore we had to revert to our IOCTLs. To sum it up, because our NIC is used for intra-communication, we don't expose nor intend users to use it as a NIC per-se. However, to be able to get statistics and manage them in a standard way, and support control plane over Ethernet, we do register each port to the net subsystem (i.e. create netdev per port).
Quoted 5 lines
Quoted 1 line
I hope this short summary explains this better.
I read your cover letter. Networking drivers don't get to define random IOCTLs as they please. You have to take that part out of the "NIC" driver.
The IOCTLs are not for the Ethernet part. They are strictly for the RDMA operations. RDMA drivers also have IOCTLs as interfaces in the drivers/infiniband area, so I don't think I'm doing something different here.
And my driver is not networking. It is an accelerator which has some network ports.
btw, this is only a single new IOCTL call. The rest of the IOCTLs are already upstreamed and are for the rest of the ASIC's compute functionality. What I'm trying to say is that it's very common to define IOCTLs for accelerators.
Quoted 10 lines
Quoted 6 lines
As per your request that this code lives in the net subsystem, I think that will make it only more complicated and hard to upstream and maintain.
I see there are other examples (e.g. sgi-xp) that contain networking driver code in misc so I don't understand this objection.The maintenance structure and CI systems for the kernel depend on the directory layout. If you don't understand that I don't know how to help you.
I completely understand but you didn't answer my question. How come there are drivers which create netdev objects, and specifically sgi-xp in misc (but I also saw it in usb drivers) that live outside drivers/net ? Why doesn't your request apply to them as well ?
When we wrote the code, we saw those examples and therefore assumed it was fine.
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Please make sure to CC linux-rdma. You clearly stated that the device does RDMA-like transfers.
We don't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have so I don't see why we need to CC linux-rdma.
Quoted 5 lines
You have it backward. You don't get to pick and choose which parts of the infrastructure you use, and therefore who reviews your drivers. The device uses RDMA under the hood so Linux RDMA experts must very much be okay with it getting merged. That's how we ensure Linux interfaces are consistent and good quality.
I understand your point of view but If my H/W doesn't support the basic requirements of the RDMA infrastructure and interfaces, then really there is nothing I can do about it. I can't use them. I wish I was able to use that infrastructure but I can't. That's why we wrote the IOCTLs in our accelerator driver.
Thanks,
Oded
Quoted 5 lines
I completely understand but you didn't answer my question. How come there are drivers which create netdev objects, and specifically sgi-xp in misc (but I also saw it in usb drivers) that live outside
drivers/net? Why doesn't your request apply to them as well ?
When we wrote the code, we saw those examples and therefore assumed it was fine.
commit 45d9ca492e4bd1522d1b5bd125c2908f1cee3d4a
Author: Dean Nelson <[email protected]> Date: Tue Apr 22 14:46:56 2008 -0500
[IA64] move XP and XPC to drivers/misc/sgi-xp
Move XPC and XPNET from arch/ia64/sn/kernel to drivers/misc/sgi-xp.
It has been there a long time, and no networking person was involved in its move.
drivers/usb/gadget/function/f_ncm.c
commit 00a2430ff07d4e0e0e7e24e02fd8adede333b797
Author: Andrzej Pietrasiewicz <[email protected]> Date: Tue Jul 15 13:09:46 2014 +0200
usb: gadget: Gadget directory cleanup - group usb functions
The drivers/usb/gadget directory contains many files.
Files which are related can be distributed into separate directories. This patch moves the USB functions implementations into a separate directory.
Again, old.
Can you find an example of a network driver added in the last couple of years outside of drivers/met?
Quoted 13 lines
Quoted 7 lines
Quoted 6 lines
Quoted 2 lines
Please make sure to CC linux-rdma. You clearly stated that the device does RDMA-like transfers.
We don't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have so I don't see why we need to CC linux-rdma.
Quoted 5 lines
You have it backward. You don't get to pick and choose which parts of the infrastructure you use, and therefore who reviews your drivers. The device uses RDMA under the hood so Linux RDMA experts must very much be okay with it getting merged. That's how we ensure Linux interfaces are consistent and good quality.
Quoted 3 lines
I understand your point of view but If my H/W doesn't support the basic requirements of the RDMA infrastructure and interfaces, then really there is nothing I can do about it. I can't use them.
It is up to the RDMA people to say that. They might see how the RDMA core can be made to work for your hardware.
Andrew
Quoted 32 lines · Andrew Lunn
Quoted 6 lines
I completely understand but you didn't answer my question. How come there are drivers which create netdev objects, and specifically sgi-xp in misc (but I also saw it in usb drivers) that live outside
drivers/net? Why doesn't your request apply to them as well ?
When we wrote the code, we saw those examples and therefore assumed it was fine.commit
45d9ca492e4bd1522d1b5bd125c2908f1cee3d4aAuthor: Dean Nelson <[email protected]> Date: Tue Apr 22 14:46:56 2008 -0500[IA64] move XP and XPC to
drivers/misc/sgi-xpMove XPC and XPNET from
arch/ia64/sn/kerneltodrivers/misc/sgi-xp.Signed-off-by Dean Nelson <[email protected]>Signed-off-by Tony Luck <[email protected]>It has been there a long time, and no networking person was involved in its move.
drivers/usb/gadget/function/f_ncm.c
commit00a2430ff07d4e0e0e7e24e02fd8adede333b797Author: Andrzej Pietrasiewicz <[email protected]> Date: Tue Jul 15 13:09:46 2014 +0200usb: gadget: Gadget directory cleanup - group usb functions
The
drivers/usb/gadgetdirectory contains many files.
Files which are related can be distributed into separate directories. This patch moves the USB functions implementations into a separate directory.
Quoted 7 lines
Signed-off-by Andrzej Pietrasiewicz <[email protected]>Signed-off-by Felipe Balbi <[email protected]>Again, old.
Can you find an example of a network driver added in the last couple of years outside of
drivers/met?
I honestly don't know and I admit we didn't look at the dates of when these drivers were introduced.
Oded
Quoted 22 lines
Quoted 14 lines
Quoted 8 lines
Quoted 7 lines
Quoted 3 lines
Please make sure to CC linux-rdma. You clearly stated that the device does RDMA-like transfers.
We don't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have so I don't see why we need to CC linux-rdma.
Quoted 5 lines
You have it backward. You don't get to pick and choose which parts of the infrastructure you use, and therefore who reviews your drivers. The device uses RDMA under the hood so Linux RDMA experts must very much be okay with it getting merged. That's how we ensure Linux interfaces are consistent and good quality.
Quoted 3 lines
I understand your point of view but If my H/W doesn't support the basic requirements of the RDMA infrastructure and interfaces, then really there is nothing I can do about it. I can't use them.
It is up to the RDMA people to say that. They might see how the RDMA core can be made to work for your hardware.
Andrew
David Miller
maintainerFrom: Oded Gabbay <[email protected]>
Date: Wed, 16 Sep 2020 00:43:00 +0300
Quoted 2 lines
I honestly don't know and I admit we didn't look at the dates of when these drivers were introduced.
Please do research when you make claims in the future, thank you.
David Miller
maintainerFrom: Andrew Lunn <[email protected]>
Date: Tue, 15 Sep 2020 23:37:35 +0200
Quoted 6 lines
Quoted 3 lines
I understand your point of view but If my H/W doesn't support the basic requirements of the RDMA infrastructure and interfaces, then really there is nothing I can do about it. I can't use them.
It is up to the RDMA people to say that. They might see how the RDMA core can be made to work for your hardware.
+1
David Miller
maintainerFrom: Oded Gabbay <[email protected]>
Date: Wed, 16 Sep 2020 00:20:12 +0300
Quoted 4 lines
I completely understand but you didn't answer my question. How come there are drivers which create netdev objects, and specifically sgi-xp in misc (but I also saw it in usb drivers) that live outside
drivers/net? Why doesn't your request apply to them as well ?
Don't use examples of drivers doing the wrong thing as an excuse for you to repeat the mistake.
Ok?
That kind of argument doesn't work here.
Quoted 9 lines · David Miller
From: Oded Gabbay <[email protected]>
Date: Wed, 16 Sep 2020 00:20:12 +0300Quoted 4 lines
I completely understand but you didn't answer my question. How come there are drivers which create netdev objects, and specifically sgi-xp in misc (but I also saw it in usb drivers) that live outside
drivers/net? Why doesn't your request apply to them as well ?
Quoted 4 lines
Don't use examples of drivers doing the wrong thing as an excuse for you to repeat the mistake.
Ok?
Well, it's not like there is a big red warning near those drivers saying "this is wrong"...
How could I have known that in advance ?
Quoted 2 lines
That kind of argument doesn't work here.
I know that, I just didn't know those drivers did "the wrong thing"
Oded
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Quoted 2 lines
wanted to do it but when we analyzed it, we saw we wouldn't be able to support basic stuff and therefore we had to revert to our IOCTLs.
Try again. Ask for help.
Your patches add CQs, WQ, and other RDMA objects. This is very clearly not an appropriate functionality for netdev.
Quoted 5 lines
To sum it up, because our NIC is used for intra-communication, we don't expose nor intend users to use it as a NIC per-se. However, to be able to get statistics and manage them in a standard way, and support control plane over Ethernet, we do register each port to the net subsystem (i.e. create netdev per port).
Sure, the basic ethernet side is conceptually fine.
Quoted 6 lines
Quoted 2 lines
Please make sure to CC linux-rdma. You clearly stated that the device does RDMA-like transfers.
We don't use the RDMA infrastructure in the kernel and we can't connect to it due to the lack of H/W support we have so I don't see why we need to CC linux-rdma.
Because you can't put RDMA like concepts under net.
Jakub, NAK from me on this series.
Jason
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).
Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
Quoted 20 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
Quoted 7 lines
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
I want to remind you that rdma-core requirement came to make sure that anything exposed from the RDMA to the userspace is strict with proper UAPI header hygiene.
I doubt that Havana's ioctls are backed by anything like this.
Thanks
Quoted 30 lines · Leon Romanovsky
Quoted 20 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
Quoted 7 lines
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
Quoted 7 lines
I want to remind you that rdma-core requirement came to make sure that anything exposed from the RDMA to the userspace is strict with proper UAPI header hygiene.
I doubt that Havana's ioctls are backed by anything like this.
Thanks
Why do you doubt that ? Have you looked at our code ?
Our uapi and IOCTLs interface is based on drm subsystem uapi interface and it is very safe and protected.
Otherwise Greg would have never allowed me to go upstream in the first place.
We have a single function which is the entry point for all the IOCTLs of our drivers (only one IOCTL is RDMA related, all the others are compute related).
That function is almost 1:1 copy of the function in drm.
Thanks,
Oded
Quoted 35 lines · Oded Gabbay
Quoted 34 lines · Leon Romanovsky
Quoted 20 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
Quoted 7 lines
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
I want to remind you that rdma-core requirement came to make sure that anything exposed from the RDMA to the userspace is strict with proper UAPI header hygiene.
Quoted 7 lines
Quoted 3 lines
I doubt that Havana's ioctls are backed by anything like this.
Thanks
Why do you doubt that ? Have you looked at our code ?
Our uapi and IOCTLs interface is based on drm subsystem uapi interface and it is very safe and protected.
Yes, I looked and didn't find open-source users of your UAPI headers. It is not related to being safe or protected by to the common request to present userspace that relies on those exported interfaces.
Quoted 1 line
Otherwise Greg would have never allowed me to go upstream in the first place.
Nice, can we get a link?
Quoted 5 lines
We have a single function which is the entry point for all the IOCTLs of our drivers (only one IOCTL is RDMA related, all the others are compute related).
That function is almost 1:1 copy of the function in drm.
DRM has same rules as RDMA, no kernel code will be merged without seeing open-source userspace.
Thanks
Quoted 3 lines
Thanks,
Oded
Quoted 59 lines · Leon Romanovsky
Quoted 35 lines · Oded Gabbay
Quoted 34 lines · Leon Romanovsky
Quoted 20 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
Quoted 7 lines
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
I want to remind you that rdma-core requirement came to make sure that anything exposed from the RDMA to the userspace is strict with proper UAPI header hygiene.
Quoted 7 lines
Quoted 3 lines
I doubt that Havana's ioctls are backed by anything like this.
Thanks
Why do you doubt that ? Have you looked at our code ?
Our uapi and IOCTLs interface is based on drm subsystem uapi interface and it is very safe and protected.Yes, I looked and didn't find open-source users of your UAPI headers. It is not related to being safe or protected by to the common request to present userspace that relies on those exported interfaces.
Quoted 1 line
Otherwise Greg would have never allowed me to go upstream in the first place.
Nice, can we get a link?
Quoted 5 lines
We have a single function which is the entry point for all the IOCTLs of our drivers (only one IOCTL is RDMA related, all the others are compute related).
That function is almost 1:1 copy of the function in drm.
Quoted 8 lines
DRM has same rules as RDMA, no kernel code will be merged without seeing open-source userspace.
Thanks
Quoted 3 lines
Thanks,
Oded
So we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunk
That library also comes with a comprehensive suite of tests which shows how to use the accelerator and we have many NIC tests which show how to use the NIC.
All the rest of the user-space code in Habana is going through that library.
Currently, you won't find the NIC code there because we didn't upstream it as the driver code wasn't ready, but I'll push it there in a private branch if you want to take a look.
Thanks,
Oded
Quoted 66 lines · Oded Gabbay
Quoted 65 lines · Leon Romanovsky
Quoted 35 lines · Oded Gabbay
Quoted 34 lines · Leon Romanovsky
Quoted 20 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
Quoted 7 lines
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
I want to remind you that rdma-core requirement came to make sure that anything exposed from the RDMA to the userspace is strict with proper UAPI header hygiene.
Quoted 7 lines
Quoted 3 lines
I doubt that Havana's ioctls are backed by anything like this.
Thanks
Why do you doubt that ? Have you looked at our code ?
Our uapi and IOCTLs interface is based on drm subsystem uapi interface and it is very safe and protected.Yes, I looked and didn't find open-source users of your UAPI headers. It is not related to being safe or protected by to the common request to present userspace that relies on those exported interfaces.
Quoted 1 line
Otherwise Greg would have never allowed me to go upstream in the first place.
Nice, can we get a link?
Quoted 5 lines
We have a single function which is the entry point for all the IOCTLs of our drivers (only one IOCTL is RDMA related, all the others are compute related).
That function is almost 1:1 copy of the function in drm.DRM has same rules as RDMA, no kernel code will be merged without seeing open-source userspace.
Thanks
Quoted 1 line
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Thanks,
OdedSo we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunk
Are you kidding?
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
Thanks
Quoted 79 lines · Leon Romanovsky
Quoted 66 lines · Oded Gabbay
Quoted 65 lines · Leon Romanovsky
Quoted 35 lines · Oded Gabbay
Quoted 34 lines · Leon Romanovsky
Quoted 20 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
Quoted 7 lines
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
I want to remind you that rdma-core requirement came to make sure that anything exposed from the RDMA to the userspace is strict with proper UAPI header hygiene.
Quoted 7 lines
Quoted 3 lines
I doubt that Havana's ioctls are backed by anything like this.
Thanks
Why do you doubt that ? Have you looked at our code ?
Our uapi and IOCTLs interface is based on drm subsystem uapi interface and it is very safe and protected.Yes, I looked and didn't find open-source users of your UAPI headers. It is not related to being safe or protected by to the common request to present userspace that relies on those exported interfaces.
Quoted 1 line
Otherwise Greg would have never allowed me to go upstream in the first place.
Nice, can we get a link?
Quoted 5 lines
We have a single function which is the entry point for all the IOCTLs of our drivers (only one IOCTL is RDMA related, all the others are compute related).
That function is almost 1:1 copy of the function in drm.DRM has same rules as RDMA, no kernel code will be merged without seeing open-source userspace.
Thanks
Quoted 1 line
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Thanks,
OdedSo we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunkAre you kidding?
Quoted 8 lines
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
Thanks
Adding Olof here.
No, usually not.
But are you kidding ?
What did you exactly expect to find ? Is there an open-source project somewhere that encapsulates Deep-learning accelerators which I could connect to ?
AFAIK, the only thing remotely relevant is CUDA and that is closed-source (strange to hear lectures about open-source from NVIDIA people here...)
So we are trying to give to the community such an open source library, or at least an example. Hopefully one day, when more companies upstream their drivers for deep-learning accelerators we could do something like libdrm or rdma-core, but for now, it's just our driver.
I have been in this community since 2013 with AMD and then RedHat, and I come with good intentions and a desire to open source and upstream as much as I can. I don't think I deserve this kind of response.
The bottom line is that we had this discussion with Greg and Olof and DRM people almost 2 years ago and if there was some open-source project in user-space or some subsystem in the kernel we could connect to, we would have done that instead of what we did, but the fact of the matter there isn't such thing. Olof tried and is trying to create a h/w accelerator subsystem but it still hasn't got up from the ground yet.
Oded
Quoted 89 lines · Oded Gabbay
Quoted 79 lines · Leon Romanovsky
Quoted 66 lines · Oded Gabbay
Quoted 65 lines · Leon Romanovsky
Quoted 35 lines · Oded Gabbay
Quoted 34 lines · Leon Romanovsky
Quoted 20 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
Quoted 7 lines
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
I want to remind you that rdma-core requirement came to make sure that anything exposed from the RDMA to the userspace is strict with proper UAPI header hygiene.
Quoted 7 lines
Quoted 3 lines
I doubt that Havana's ioctls are backed by anything like this.
Thanks
Why do you doubt that ? Have you looked at our code ?
Our uapi and IOCTLs interface is based on drm subsystem uapi interface and it is very safe and protected.Yes, I looked and didn't find open-source users of your UAPI headers. It is not related to being safe or protected by to the common request to present userspace that relies on those exported interfaces.
Quoted 1 line
Otherwise Greg would have never allowed me to go upstream in the first place.
Nice, can we get a link?
Quoted 5 lines
We have a single function which is the entry point for all the IOCTLs of our drivers (only one IOCTL is RDMA related, all the others are compute related).
That function is almost 1:1 copy of the function in drm.DRM has same rules as RDMA, no kernel code will be merged without seeing open-source userspace.
Thanks
Quoted 1 line
Quoted 8 lines
Quoted 2 lines
Quoted 2 lines
Thanks,
OdedSo we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunkAre you kidding?
Quoted 8 lines
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
Thanks
Quoted 7 lines
Adding Olof here.
No, usually not.
But are you kidding ?
What did you exactly expect to find ? Is there an open-source project somewhere that encapsulates Deep-learning accelerators which I could connect to ?
I would expect certain level of code quality, collaboration and review that distros require for inclusion. It is not the case for the github repo you presented.
Quoted 3 lines
AFAIK, the only thing remotely relevant is CUDA and that is closed-source (strange to hear lectures about open-source from NVIDIA people here...)
Please check git log statistics to estimate Nvidia/Mellanox/Cumulus contributions to the Linux kernel and the open-source. You will be surprised.
Quoted 5 lines
So we are trying to give to the community such an open source library, or at least an example. Hopefully one day, when more companies upstream their drivers for deep-learning accelerators we could do something like libdrm or rdma-core, but for now, it's just our driver.
AFAIR, your driver is not unique, HiSilicon tried to submit something similar years ago (warpdrive) and they are not alone.
Quoted 4 lines
I have been in this community since 2013 with AMD and then RedHat, and I come with good intentions and a desire to open source and upstream as much as I can. I don't think I deserve this kind of response.
There is no need to take it personal. It was you who posted a link to the github repo. What did you expect?
Quoted 8 lines
The bottom line is that we had this discussion with Greg and Olof and DRM people almost 2 years ago and if there was some open-source project in user-space or some subsystem in the kernel we could connect to, we would have done that instead of what we did, but the fact of the matter there isn't such thing. Olof tried and is trying to create a h/w accelerator subsystem but it still hasn't got up from the ground yet.
Maybe it is a time to do it right.
Quoted 2 lines
Oded
Greg Kroah-Hartman
maintainerQuoted 6 lines · Leon Romanovsky
Quoted 5 lines
So we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunk
Quoted 8 lines
Are you kidding?
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
It is an open source library, as per the license and the code availability. What more is expected here?
No distro has to pick it up, that's not a requirement for kernel code, we have many kernel helper programs that are not in distros. Heck, udev took a long time to get into distros, does that mean the kernel side of that interface should never have been merged?
I don't understand your complaint here, it's not our place to judge the code quality of userspace libraries, otherwise we would never get any real-work done :)
thanks,
greg k-h
Quoted 13 lines · Greg Kroah-Hartman
Quoted 12 lines · Leon Romanovsky
Quoted 5 lines
So we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunkAre you kidding?
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
Quoted 5 lines
Quoted 2 lines
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
It is an open source library, as per the license and the code availability. What more is expected here?
So can I fork iproute2, add bunch of new custom netlink UAPIs and expect Dave to merge it after I throw it on github?
Quoted 9 lines
No distro has to pick it up, that's not a requirement for kernel code, we have many kernel helper programs that are not in distros. Heck, udev took a long time to get into distros, does that mean the kernel side of that interface should never have been merged?
I don't understand your complaint here, it's not our place to judge the code quality of userspace libraries, otherwise we would never get any real-work done :)
My main complaint is that you can't imagine merging code into large subsystems (netdev, RDMA, DRM? e.t.c) without being civil open-source citizen. It means use of existing user-space libraries/tools and/or providing new ones that will be usable for everyone.
In this case, we have some custom char device with library that is not usable for anyone else and this is why drivers/misc/ is right place.
While we are talking about real-work, it is our benefit to push companies to make investment into ecosystem and not letting them to find an excuse for not doing it.
Thanks
Quoted 4 lines
thanks,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 14 lines · Leon Romanovsky
Quoted 13 lines · Greg Kroah-Hartman
Quoted 12 lines · Leon Romanovsky
Quoted 5 lines
So we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunkAre you kidding?
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
It is an open source library, as per the license and the code availability. What more is expected here?
So can I fork iproute2, add bunch of new custom netlink UAPIs and expect Dave to merge it after I throw it on github?
Don't be silly, that's not the case here at all and you know that.
Quoted 5 lines
Quoted 5 lines
No distro has to pick it up, that's not a requirement for kernel code, we have many kernel helper programs that are not in distros. Heck, udev took a long time to get into distros, does that mean the kernel side of that interface should never have been merged?
Quoted 8 lines
Quoted 3 lines
I don't understand your complaint here, it's not our place to judge the code quality of userspace libraries, otherwise we would never get any real-work done :)
My main complaint is that you can't imagine merging code into large subsystems (netdev, RDMA, DRM?
e.t.c) without being civil open-source citizen. It means use of existing user-space libraries/tools and/or providing new ones that will be usable for everyone.
Agreed.
Quoted 2 lines
In this case, we have some custom char device with library that is not usable for anyone else and this is why
drivers/misc/is right place.
Also agreed.
Quoted 3 lines
While we are talking about real-work, it is our benefit to push companies to make investment into ecosystem and not letting them to find an excuse for not doing it.
So why are you complaining about a stand-alone driver that does not have any shared subsystems's userspace code to control that driver?
Yes, when integrating into other subsystems (i.e. networking and rdma), they should use those common subsystems interfaces, no one is arguing that at all.
totally lost,
greg k-h
Quoted 18 lines · Greg Kroah-Hartman
Quoted 17 lines · Leon Romanovsky
Quoted 16 lines · Greg Kroah-Hartman
Quoted 14 lines · Leon Romanovsky
Quoted 5 lines
So we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunkAre you kidding?
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
It is an open source library, as per the license and the code availability. What more is expected here?
So can I fork iproute2, add bunch of new custom netlink UAPIs and expect Dave to merge it after I throw it on github?
Don't be silly, that's not the case here at all and you know that.
It was far-fetched example.
Quoted 20 lines
Quoted 6 lines
Quoted 6 lines
No distro has to pick it up, that's not a requirement for kernel code, we have many kernel helper programs that are not in distros. Heck, udev took a long time to get into distros, does that mean the kernel side of that interface should never have been merged?
Quoted 8 lines
Quoted 3 lines
I don't understand your complaint here, it's not our place to judge the code quality of userspace libraries, otherwise we would never get any real-work done :)
My main complaint is that you can't imagine merging code into large subsystems (netdev, RDMA, DRM?
e.t.c) without being civil open-source citizen. It means use of existing user-space libraries/tools and/or providing new ones that will be usable for everyone.Agreed.
Quoted 2 lines
In this case, we have some custom char device with library that is not usable for anyone else and this is why
drivers/misc/is right place.
Quoted 8 lines
Also agreed.
Quoted 3 lines
While we are talking about real-work, it is our benefit to push companies to make investment into ecosystem and not letting them to find an excuse for not doing it.
So why are you complaining about a stand-alone driver that does not have any shared subsystems's userspace code to control that driver?
I didn't, everything started when I explained to Gal why RDMA subsystem requires rdma-core counterpart for any UAPI code.
https://lore.kernel.org/linux-rdma/CAFCwf12B4vCCwmfA7+VTUYUgJ9EHAtvg6F0bMYnsSCUBST+aWA@mail.gmail.com/T/#m17d52d61adadf54c12bfecf1af5db40f5d829ac3
And expressed my view on the quality of the library that was presented as open-source example.
https://lore.kernel.org/linux-rdma/CAFCwf12B4vCCwmfA7+VTUYUgJ9EHAtvg6F0bMYnsSCUBST+aWA@mail.gmail.com/T/#m9059c5a9405ba932d9ffb731195a43b27443d265
Quoted 6 lines
Yes, when integrating into other subsystems (i.e. networking and rdma), they should use those common subsystems interfaces, no one is arguing that at all.
totally lost,
And here comes my request to do it right
https://lore.kernel.org/linux-rdma/CAFCwf12B4vCCwmfA7+VTUYUgJ9EHAtvg6F0bMYnsSCUBST+aWA@mail.gmail.com/T/#ma1fa6fe63666f630674eb668f1c00e6a672db85b
All that I asked from Oded is to do UAPI/libraries right, while all the responses can be summarized to one sentence - "it is too hard, we don't want to do it."
Thanks
Quoted 2 lines
greg k-h
Quoted 52 lines · Greg Kroah-Hartman
Quoted 14 lines · Leon Romanovsky
Quoted 13 lines · Greg Kroah-Hartman
Quoted 12 lines · Leon Romanovsky
Quoted 5 lines
So we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunkAre you kidding?
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
It is an open source library, as per the license and the code availability. What more is expected here?
So can I fork iproute2, add bunch of new custom netlink UAPIs and expect Dave to merge it after I throw it on github?
Don't be silly, that's not the case here at all and you know that.
Quoted 5 lines
Quoted 5 lines
No distro has to pick it up, that's not a requirement for kernel code, we have many kernel helper programs that are not in distros. Heck, udev took a long time to get into distros, does that mean the kernel side of that interface should never have been merged?
Quoted 8 lines
Quoted 3 lines
I don't understand your complaint here, it's not our place to judge the code quality of userspace libraries, otherwise we would never get any real-work done :)
My main complaint is that you can't imagine merging code into large subsystems (netdev, RDMA, DRM?
e.t.c) without being civil open-source citizen. It means use of existing user-space libraries/tools and/or providing new ones that will be usable for everyone.Agreed.
Quoted 2 lines
In this case, we have some custom char device with library that is not usable for anyone else and this is why
drivers/misc/is right place.Also agreed.
Quoted 3 lines
While we are talking about real-work, it is our benefit to push companies to make investment into ecosystem and not letting them to find an excuse for not doing it.
Quoted 6 lines
So why are you complaining about a stand-alone driver that does not have any shared subsystems's userspace code to control that driver?
Yes, when integrating into other subsystems (i.e. networking and rdma), they should use those common subsystems interfaces, no one is arguing that at all.
Hi Greg,
It's probably heresy, but why do I need to integrate into the RDMA subsystem ? I understand your reasoning about networking (Ethernet) as the driver connects to the kernel networking stack (netdev), but with RDMA the driver doesn't use or connect to anything in that stack. If I were to support IBverbs and declare that I support it, then of course I would need to integrate to the RDMA subsystem and add my backend to rdma-core.
But we don't do that so why am I being forced to support IBverbs ? Forcing GAUDI to use the RDMA stack and IBverbs is like swatting flies with a sledgehammer.
I do hope that in future devices we will support it natively and of course then we will integrate as requested, but for GAUDI it is just a huge overkill IMHO.
Thanks,
Oded
Quoted 4 lines
totally lost,
greg k-h
Greg Kroah-Hartman
maintainerQuoted 60 lines · Oded Gabbay
Quoted 52 lines · Greg Kroah-Hartman
Quoted 14 lines · Leon Romanovsky
Quoted 13 lines · Greg Kroah-Hartman
Quoted 12 lines · Leon Romanovsky
Quoted 5 lines
So we do have an open-source library called hl-thunk, which uses our driver and indeed that was part of the requirement.
It is similar to libdrm.
Here is the link:
https://github.com/HabanaAI/hl-thunkAre you kidding?
This is mirror of some internal repository that looks like dumpster with ChangeId, internal bug tracker numbers, not part of major OS distributions.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
It is not open-source library and shows very clear why you chose to upstream your driver through driver/misc/ tree.
It is an open source library, as per the license and the code availability. What more is expected here?
So can I fork iproute2, add bunch of new custom netlink UAPIs and expect Dave to merge it after I throw it on github?
Don't be silly, that's not the case here at all and you know that.
Quoted 5 lines
Quoted 5 lines
No distro has to pick it up, that's not a requirement for kernel code, we have many kernel helper programs that are not in distros. Heck, udev took a long time to get into distros, does that mean the kernel side of that interface should never have been merged?
Quoted 8 lines
Quoted 3 lines
I don't understand your complaint here, it's not our place to judge the code quality of userspace libraries, otherwise we would never get any real-work done :)
My main complaint is that you can't imagine merging code into large subsystems (netdev, RDMA, DRM?
e.t.c) without being civil open-source citizen. It means use of existing user-space libraries/tools and/or providing new ones that will be usable for everyone.Agreed.
Quoted 2 lines
In this case, we have some custom char device with library that is not usable for anyone else and this is why
drivers/misc/is right place.Also agreed.
Quoted 3 lines
While we are talking about real-work, it is our benefit to push companies to make investment into ecosystem and not letting them to find an excuse for not doing it.
Quoted 6 lines
So why are you complaining about a stand-alone driver that does not have any shared subsystems's userspace code to control that driver?
Yes, when integrating into other subsystems (i.e. networking and rdma), they should use those common subsystems interfaces, no one is arguing that at all.
Quoted 8 lines
Hi Greg,
It's probably heresy, but why do I need to integrate into the RDMA subsystem ? I understand your reasoning about networking (Ethernet) as the driver connects to the kernel networking stack (netdev), but with RDMA the driver doesn't use or connect to anything in that stack. If I were to support IBverbs and declare that I support it, then of course I would need to integrate to the RDMA subsystem and add my backend to rdma-core.
IBverbs are horrid and I would not wish them on anyone. Seriously.
Quoted 1 line
But we don't do that so why am I being forced to support IBverbs ?
You shouldn't.
Quoted 5 lines
Forcing GAUDI to use the RDMA stack and IBverbs is like swatting flies with a sledgehammer.
I do hope that in future devices we will support it natively and of course then we will integrate as requested, but for GAUDI it is just a huge overkill IMHO.
I think the general rdma apis are the key here, not the userspace api.
Note, I do not know exactly what they are, but no, IBverbs are not ok.
Ick.
greg k-h
Quoted 9 lines · Greg Kroah-Hartman
Quoted 7 lines
It's probably heresy, but why do I need to integrate into the RDMA subsystem ? I understand your reasoning about networking (Ethernet) as the driver connects to the kernel networking stack (netdev), but with RDMA the driver doesn't use or connect to anything in that stack. If I were to support IBverbs and declare that I support it, then of course I would need to integrate to the RDMA subsystem and add my backend to rdma-core.
IBverbs are horrid and I would not wish them on anyone. Seriously.
I'm curious what drives this opinion? Did you have it since you reviewed the initial submission all those years ago?
Quoted 1 line
I think the general rdma apis are the key here, not the userspace api.
Are you proposing that habana should have uAPI in drivers/misc and present a standard rdma-core userspace for it? This is the only userspace programming interface for RoCE HW. I think that would be much more work.
If not, what open source userspace are you going to ask them to present to merge the kernel side into misc?
Quoted 1 line
Note, I do not know exactly what they are, but no, IBverbs are not ok.
Should we stop merging new drivers and abandon the RDMA subsystem? Is there something you'd like to see fixed?
Don't really understand your position, sorry.
Jason
Greg Kroah-Hartman
maintainerQuoted 9 lines · Jason Gunthorpe
Quoted 8 lines · Greg Kroah-Hartman
Quoted 7 lines
It's probably heresy, but why do I need to integrate into the RDMA subsystem ? I understand your reasoning about networking (Ethernet) as the driver connects to the kernel networking stack (netdev), but with RDMA the driver doesn't use or connect to anything in that stack. If I were to support IBverbs and declare that I support it, then of course I would need to integrate to the RDMA subsystem and add my backend to rdma-core.
Quoted 4 lines
Quoted 1 line
IBverbs are horrid and I would not wish them on anyone. Seriously.
I'm curious what drives this opinion? Did you have it since you reviewed the initial submission all those years ago?
As I learned more about that interface, yes, I like it less and less :)
But that's the userspace api you all are stuck with, for various reasons, my opinion doesn't matter here.
Quoted 9 lines
Quoted 1 line
I think the general rdma apis are the key here, not the userspace api.
Are you proposing that habana should have uAPI in
drivers/miscand present a standard rdma-core userspace for it? This is the only userspace programming interface for RoCE HW. I think that would be much more work.If not, what open source userspace are you going to ask them to present to merge the kernel side into misc?
I don't think that they have a userspace api to their rdma feature from what I understand, but I could be totally wrong as I do not know their hardware at all, so I'll let them answer this question.
Quoted 6 lines
Quoted 1 line
Note, I do not know exactly what they are, but no, IBverbs are not ok.
Should we stop merging new drivers and abandon the RDMA subsystem? Is there something you'd like to see fixed?
Don't really understand your position, sorry.
For anything that _has_ to have a userspace RMDA interface, sure ibverbs are the one we are stuck with, but I didn't think that was the issue here at all, which is why I wrote the above comments.
thanks,
greg k-h
Quoted 28 lines · Greg Kroah-Hartman
Quoted 9 lines · Jason Gunthorpe
Quoted 8 lines · Greg Kroah-Hartman
Quoted 7 lines
It's probably heresy, but why do I need to integrate into the RDMA subsystem ? I understand your reasoning about networking (Ethernet) as the driver connects to the kernel networking stack (netdev), but with RDMA the driver doesn't use or connect to anything in that stack. If I were to support IBverbs and declare that I support it, then of course I would need to integrate to the RDMA subsystem and add my backend to rdma-core.
Quoted 4 lines
Quoted 1 line
IBverbs are horrid and I would not wish them on anyone. Seriously.
I'm curious what drives this opinion? Did you have it since you reviewed the initial submission all those years ago?
As I learned more about that interface, yes, I like it less and less :)
But that's the userspace api you all are stuck with, for various reasons, my opinion doesn't matter here.
Quoted 7 lines
Quoted 1 line
I think the general rdma apis are the key here, not the userspace api.
Are you proposing that habana should have uAPI in
drivers/miscand present a standard rdma-core userspace for it? This is the only userspace programming interface for RoCE HW. I think that would be much more work.
Quoted 6 lines
Quoted 2 lines
If not, what open source userspace are you going to ask them to present to merge the kernel side into misc?
I don't think that they have a userspace api to their rdma feature from what I understand, but I could be totally wrong as I do not know their hardware at all, so I'll let them answer this question.
Hi Greg,
We do expose a new IOCTL to enable the user to configure connections between multiple GAUDI devices.
Having said that, we restrict this IOCTL to be used only by the same user who is doing the compute on our device, as opposed to a real RDMA device where any number of applications can send and receive. In addition, this IOCTL limits the user to connect ONLY to another GAUDI device and not to a 3rd party RDMA device.
It is true that GAUDI supports RDMA data movement but the data movement is NOT done by the user. It is done by our compute engines. i.e. the compute engines performs "send" and "receive" without going to the host (aka no support for ibv_postsend, ibv_postreceive). The only thing that is controlled by the user is to say which GAUDI is connected to which. After that, the command submission the user performs to operate our compute engines will cause them to send and receive RDMA packets.
Moreover, as opposed to smart NICs where the Networking is the main focus and the compute is only secondary, in our device the compute is our major focus and the networking is a slave for it.
The hl-thunk userspace library will have wrappers around this single IOCTL (like all our driver's IOCTLs) and also contain demos to show how to use it.
Quoted 11 lines
Quoted 7 lines
Quoted 2 lines
Note, I do not know exactly what they are, but no, IBverbs are not ok.
Should we stop merging new drivers and abandon the RDMA subsystem? Is there something you'd like to see fixed?
Don't really understand your position, sorry.
For anything that _has_ to have a userspace RMDA interface, sure ibverbs are the one we are stuck with, but I didn't think that was the issue here at all, which is why I wrote the above comments.
To emphasize again, we don't want to expose a userspace RDMA interface. We just want to allow our single compute user to configure a connection to another GAUDI.
Thanks,
Oded
Quoted 4 lines
thanks,
greg k-h
Quoted 33 lines · Oded Gabbay
Quoted 31 lines · Greg Kroah-Hartman
Quoted 9 lines · Jason Gunthorpe
Quoted 8 lines · Greg Kroah-Hartman
Quoted 7 lines
It's probably heresy, but why do I need to integrate into the RDMA subsystem ? I understand your reasoning about networking (Ethernet) as the driver connects to the kernel networking stack (netdev), but with RDMA the driver doesn't use or connect to anything in that stack. If I were to support IBverbs and declare that I support it, then of course I would need to integrate to the RDMA subsystem and add my backend to rdma-core.
Quoted 4 lines
Quoted 1 line
IBverbs are horrid and I would not wish them on anyone. Seriously.
I'm curious what drives this opinion? Did you have it since you reviewed the initial submission all those years ago?
As I learned more about that interface, yes, I like it less and less :)
But that's the userspace api you all are stuck with, for various reasons, my opinion doesn't matter here.
Quoted 9 lines
Quoted 1 line
I think the general rdma apis are the key here, not the userspace api.
Are you proposing that habana should have uAPI in
drivers/miscand present a standard rdma-core userspace for it? This is the only userspace programming interface for RoCE HW. I think that would be much more work.If not, what open source userspace are you going to ask them to present to merge the kernel side into misc?
Quoted 7 lines
Quoted 3 lines
I don't think that they have a userspace api to their rdma feature from what I understand, but I could be totally wrong as I do not know their hardware at all, so I'll let them answer this question.
Hi Greg,
We do expose a new IOCTL to enable the user to configure connections between multiple GAUDI devices.
How is it different from RDMA QP configuration?
Quoted 4 lines
Having said that, we restrict this IOCTL to be used only by the same user who is doing the compute on our device, as opposed to a real RDMA device where any number of applications can send and receive.
The ability to support multiple applications is not RDMA-requirement, but the implementation. For example MPI jobs are single user of RDMA device.
Quoted 2 lines
In addition, this IOCTL limits the user to connect ONLY to another GAUDI device and not to a 3rd party RDMA device.
I don't see how it is different from EFA with their SQD QP type or mlx5 devices with DC QPs that you can connect only to similar devices (no interoperability).
Thanks
Quoted 6 lines · Greg Kroah-Hartman
Quoted 2 lines
If not, what open source userspace are you going to ask them to present to merge the kernel side into misc?
I don't think that they have a userspace api to their rdma feature from what I understand, but I could be totally wrong as I do not know their hardware at all, so I'll let them answer this question.
I thought Oded was pretty clear, the goal of this series is to expose their RDMA HW to userspace. This problem space requires co-mingling networking and compute at extremely high speed/low overhead. This is all done in userspace.
We are specifically talking about this ininclude/uapi/misc/habanalabs.h:
/*
* NIC
*
* This IOCTL allows the user to manage and configure the device's NIC ports.
* The following operations are available:
* - Create a completion queue
* - Destroy a completion queue
* - Wait on completion queue
* - Poll a completion queue
* - Update consumed completion queue entries
* - Set a work queue
* - Unset a work queue
*
* For all operations, the user should provide a pointer to an input structure
* with the context parameters. Some of the operations also require a pointer to
* driver regarding how many of the available CQEs were actually
* processed/consumed. Only then the driver will override them with newer
* entries.
* The set WQ operation should provide the device virtual address of the WQ with
* a matching size for the number of WQs and entries per WQ.
*
*/
#define HL_IOCTL_NIC _IOWR('H', 0x07, struct hl_nic_args)
Which is ibv_create_qp, ibv_create_cq, ibv_poll_cq, etc, etc
Habana has repeatedly described their HW as having multiple 100G RoCE ports. RoCE is one of the common industry standards that ibverbs unambiguously is responsible for.
I would be much less annoyed if they were not actively marketing their product as RoCE RDMA.
Sure there is some argument that their RoCE isn't spec compliant, but I don't think it excuses the basic principle of our subsystem:
RDMA HW needs to demonstrate some basic functionality using the standard open source userspace software stack.
I don't like this idea of backdooring a bunch of proprietary closed source RDMA userspace through drivers/misc, and if you don't have a clear idea how to get something equal for drivers/misc you should not accept the H_IOCTL_NIC.
Plus RoCE is complicated, there is a bunch of interaction with netdev and rules related to that that really needs to be respected.
Quoted 3 lines
For anything that _has_ to have a userspace RMDA interface, sure ibverbs are the one we are stuck with, but I didn't think that was the issue here at all, which is why I wrote the above comments.
I think you should look at the patches #8 through 11:
https://lore.kernel.org/lkml/[email protected]/
Jason
Jakub Kicinski
maintainerQuoted 7 lines · On Mon, 21 Sep 2020 08:52:39 -0300 Jason Gunthorpe wrote:
I don't like this idea of backdooring a bunch of proprietary closed source RDMA userspace through
drivers/misc, and if you don't have a clear idea how to get something equal fordrivers/miscyou should not accept theH_IOCTL_NIC.Plus RoCE is complicated, there is a bunch of interaction with netdev and rules related to that that really needs to be respected.
+1
To me this code quite clearly fits the description of vendor SDK which runs proprietary stuff on top. It's such an vendor SDK thing to do to pick the parts of our infrastructure they like and "simplify the rest" with its own re-implementation.
I'd wager the only reason you expose the netdevs at all is for link settings, stats, packet capture and debug. You'd never run TCP traffic over those links. And you're fighting against using Linux APIs for the only real traffic that runs on those links - RDMA(ish) traffic.
Greg - I'm probably the least experience of the folks involved in this conversation - could you ELI5 what's the benefit to the community from merging this code?
Quoted 4 lines · Jakub Kicinski
I'd wager the only reason you expose the netdevs at all is for link settings, stats, packet capture and debug. You'd never run TCP traffic over those links. And you're fighting against using Linux APIs for the only real traffic that runs on those links - RDMA(ish) traffic.
The usual working flow is to use something like TCP to exchange connection information then pivot to RDMA for the actual data flow. This is why a driver like this could get away with such a low performance implementation for a 100G NIC, it is just application boot metadata being exchanged.
Sniffing probably won't work as typically the HW will capture the RoCE traffic before reaching Linux - and the Linux driver couldn't handle a 100G flow anyhow. Stats might not work either.
As far as the "usual rules" we do require that accelerator devices sharing a netdev are secure in the concept of netdev userspace security. They can access the assigned RoCEv2 UDP port but cannot do things like forge src IP/MAC addresses, violate VLANs, reach outside net namespaces, capature arbitary traffic, etc.
This stuff is tricky and generally requires HW support. Someone has to audit all of this and ensure it meets the netdev security requirements too, otherwise it will need CAP_NET_RAW to function. Obviously this requires seeing enough of a userspace implementation to understand how the design approaches verbs 'Address Handles' and so forth.
RDMA HW has had errors before and when discovered it was blocked with CAP_NET_RAW until new chip revs came out, this is something I take very seriously.
Jason
Quoted 1 line · Oded Gabbay
It's probably heresy, but why do I need to integrate into the RDMA subsystem ?
Hi Oded
I don't know the RDMA subsystem at all. So i will give a more generic answer. Are you reinventing things which a subsystem core already has? The subsystem core will be well tested, since lots of devices use it. Because of this, subsystem cores generally have a lower bug count per line of code than driver code. Using core code means drivers are smaller, and smaller code has less bugs by definition.
We as maintainers have to assume you are going to abandon the driver at some point, while the hardware still exists, and leave the community to maintain it. So a smaller driver, which makes heavy use of the core is much easier to maintain.
By making use of core code, you also get freebies. Somebody adds new functionality to the core, your driver automatically gets it.
Look at this from the opposite perspective. Say every driver implemented their own TCP/IP stack? Or DMA engine? SPI infrastructure? How big a nightmare would it be to maintain?
In your case, some parts of you hardware looks a bit like RDMA? So you ideally want to use the core code from the RDMA subsystem. Maybe you just need some of the lower layers? Maybe you need to refactor some of the RDMA core to make it a library you can pick and choice the bits useful to you? What you really want to avoid is re-implementing stuff in your driver which is already in the core.
Andrew
Quoted 17 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Quoted 7 lines
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).
That is more or less where we ended up, yes.
I'm most worried about this lack of PD and MR.
Kernel must provide security for apps doing user DMA, PD and MR do this. If the device doesn't have PD/MR then it is hard to see how a WQ could ever be exposed directly to userspace, regardless of subsystem.
Jason
Quoted 29 lines · Jason Gunthorpe
Quoted 17 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Quoted 7 lines
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).That is more or less where we ended up, yes.
Quoted 7 lines
I'm most worried about this lack of PD and MR.
Kernel must provide security for apps doing user DMA, PD and MR do this. If the device doesn't have PD/MR then it is hard to see how a WQ could ever be exposed directly to userspace, regardless of subsystem.
Jason
Hi Jason,
What you say here is very true and we handle that with different mechanisms. I will start working on a dedicated patch-set of the RDMA code in the next few weeks with MUCH MORE details in the commit messages. That will explain exactly how we expose stuff and protect.
For example, regarding isolating between applications, we only support a single application opening our file descriptor.
Another example is that the submission of WQ is done through our QMAN mechanism and is NOT mapped to userspace (due to the restrictions you mentioned above and other restrictions).
But again, I want to send something organized and with proper explanations. I hope to have something in a couple of weeks.
Thanks,
Oded
Quoted 36 lines · Oded Gabbay
Quoted 27 lines · Jason Gunthorpe
Quoted 17 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Quoted 7 lines
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Quoted 7 lines
That is more or less where we ended up, yes.
I'm most worried about this lack of PD and MR.
Kernel must provide security for apps doing user DMA, PD and MR do this. If the device doesn't have PD/MR then it is hard to see how a WQ could ever be exposed directly to userspace, regardless of subsystem.
Quoted 8 lines
Hi Jason,
What you say here is very true and we handle that with different mechanisms. I will start working on a dedicated patch-set of the RDMA code in the next few weeks with MUCH MORE details in the commit messages. That will explain exactly how we expose stuff and protect.For example, regarding isolating between applications, we only support a single application opening our file descriptor.
Then the driver has a special PD create that requires the misc file descriptor to authorize RDMA access to the resources in that security context.
Quoted 3 lines
Another example is that the submission of WQ is done through our QMAN mechanism and is NOT mapped to userspace (due to the restrictions you mentioned above and other restrictions).
Sure, other RDMA drivers also require a kernel ioctl for command execution.
In this model the MR can be a software construct, again representing a security authorization:
- A 'full process' MR, in which case the kernel command excution handles dma map and pinning at command execution time
- A 'normal' MR, in which case the DMA list is pre-created and the command execution just re-uses this data
The general requirement for RDMA is the same as DRM, you must provide enough code in rdma-core to show how the device works, and minimally test it. EFA uses ibv_ud_pingpong, and some pyverbs tests IIRC.
So you'll want to arrange something where the default MR and PD mechanisms do something workable on this device, like auto-open the misc FD when building the PD, and support the 'normal' MR flow for command execution.
Jason
Quoted 70 lines · Jason Gunthorpe
Quoted 36 lines · Oded Gabbay
Quoted 27 lines · Jason Gunthorpe
Quoted 17 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Quoted 7 lines
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Quoted 7 lines
That is more or less where we ended up, yes.
I'm most worried about this lack of PD and MR.
Kernel must provide security for apps doing user DMA, PD and MR do this. If the device doesn't have PD/MR then it is hard to see how a WQ could ever be exposed directly to userspace, regardless of subsystem.
Quoted 8 lines
Hi Jason,
What you say here is very true and we handle that with different mechanisms. I will start working on a dedicated patch-set of the RDMA code in the next few weeks with MUCH MORE details in the commit messages. That will explain exactly how we expose stuff and protect.For example, regarding isolating between applications, we only support a single application opening our file descriptor.
Then the driver has a special PD create that requires the misc file descriptor to authorize RDMA access to the resources in that security context.
Quoted 3 lines
Another example is that the submission of WQ is done through our QMAN mechanism and is NOT mapped to userspace (due to the restrictions you mentioned above and other restrictions).
Sure, other RDMA drivers also require a kernel ioctl for command execution.
In this model the MR can be a software construct, again representing a security authorization:
- A 'full process' MR, in which case the kernel command excution handles dma map and pinning at command execution time
- A 'normal' MR, in which case the DMA list is pre-created and the command execution just re-uses this dataThe general requirement for RDMA is the same as DRM, you must provide enough code in rdma-core to show how the device works, and minimally test it. EFA uses
ibv_ud_pingpong, and some pyverbs tests IIRC.
Quoted 6 lines
So you'll want to arrange something where the default MR and PD mechanisms do something workable on this device, like auto-open the misc FD when building the PD, and support the 'normal' MR flow for command execution.
Jason
I don't know how we can support MR because we can't support any virtual address on the host. Our internal MMU doesn't support 64-bits. We investigated in the past, very much wanted to use IBverbs but didn't figure out how to make it work.
I'm adding Itay here and he can also shed more details on that. Oded
Quoted 24 lines · Oded Gabbay
Quoted 15 lines
Quoted 3 lines
Another example is that the submission of WQ is done through our QMAN mechanism and is NOT mapped to userspace (due to the restrictions you mentioned above and other restrictions).
Sure, other RDMA drivers also require a kernel ioctl for command execution.
In this model the MR can be a software construct, again representing a security authorization:
- A 'full process' MR, in which case the kernel command excution handles dma map and pinning at command execution time
- A 'normal' MR, in which case the DMA list is pre-created and the command execution just re-uses this dataQuoted 8 lines
The general requirement for RDMA is the same as DRM, you must provide enough code in rdma-core to show how the device works, and minimally test it. EFA uses
ibv_ud_pingpong, and some pyverbs tests IIRC.So you'll want to arrange something where the default MR and PD mechanisms do something workable on this device, like auto-open the misc FD when building the PD, and support the 'normal' MR flow for command execution.
Quoted 5 lines
I don't know how we can support MR because we can't support any virtual address on the host. Our internal MMU doesn't support 64-bits. We investigated in the past, very much wanted to use IBverbs but didn't figure out how to make it work.
I'm adding Itay here and he can also shed more details on that.
I'm not sure what that means, if the driver intends to DMA from process memory then it certainly has a MR concept.
MRs can control the IOVA directly so if you say the HW needs a MR IOVA < 2**32 then that is still OK.
Jason
Quoted 32 lines · Jason Gunthorpe
Quoted 24 lines · Oded Gabbay
Quoted 15 lines
Quoted 3 lines
Another example is that the submission of WQ is done through our QMAN mechanism and is NOT mapped to userspace (due to the restrictions you mentioned above and other restrictions).
Sure, other RDMA drivers also require a kernel ioctl for command execution.
In this model the MR can be a software construct, again representing a security authorization:
- A 'full process' MR, in which case the kernel command excution handles dma map and pinning at command execution time
- A 'normal' MR, in which case the DMA list is pre-created and the command execution just re-uses this dataQuoted 8 lines
The general requirement for RDMA is the same as DRM, you must provide enough code in rdma-core to show how the device works, and minimally test it. EFA uses
ibv_ud_pingpong, and some pyverbs tests IIRC.So you'll want to arrange something where the default MR and PD mechanisms do something workable on this device, like auto-open the misc FD when building the PD, and support the 'normal' MR flow for command execution.
Quoted 5 lines
I don't know how we can support MR because we can't support any virtual address on the host. Our internal MMU doesn't support 64-bits. We investigated in the past, very much wanted to use IBverbs but didn't figure out how to make it work.
I'm adding Itay here and he can also shed more details on that.
Quoted 7 lines
I'm not sure what that means, if the driver intends to DMA from process memory then it certainly has a MR concept.
MRs can control the IOVA directly so if you say the HW needs a MR IOVA < 2**32 then that is still OK.
Jason
Hi Jason,
I'll try to explain but please bear with me because it requires some understanding of our H/W architecture.
Our ASIC has 32 GB of HBM memory (similar to GPUs). The problem is that HBM memory is accessed by our ASIC's engines (DMA, NIC, etc.) with physical addressing, which is mapped inside our device between 0x0 to 0x8_0000_0000.
Now, if a user performs malloc and then maps that memory to our device (using our memory MAP ioctl, similar to how GPU works), it will get a new virtual address, which is in the range of 0x80_0000_0000 - (2^50 -1). Then, he can use that new VA in our device with different engines (DMA, NIC, compute).
That way, addresses that represent the host memory do not overlap addresses that represent HBM memory.
The problem with MR is that the API doesn't let us return a new VA. It forces us to use the original VA that the Host OS allocated. What will we do if that VA is in the range of our HBM addresses ? The device won't be able to distinguish between them. The transaction that is generated by an engine inside our device will go to the HBM instead of going to the PCI controller and then to the host.
That's the crust of the problem and why we didn't use MR. If that's not clear, I'll be happy to explain more.
Thanks,
Oded
Quoted 2 lines · Oded Gabbay
The problem with MR is that the API doesn't let us return a new VA. It forces us to use the original VA that the Host OS allocated.
If using the common MR API you'd have to assign a unique linear range in the single device address map and record both the IOVA and the MMU VA in the kernel struct.
Then when submitting work using that MR lkey the kernel will adjust the work VA using the equation (WORK_VA - IOVA) + MMU_VA before forwarding to HW.
EFA doesn't support rkeys, so they are not required to be emulated. It would have to create rkeys using some guadidv_reg_mr_rkey()
It is important to understand that the usual way we support these non-RDMA devices is to insist that they use SW to construct a minimal standards based RDMA API, and then allow the device to have a 'dv' API to access a faster, highly device specific, SW bypass path.
So for instance you might have some guadidv_post_work(qp) that doesn't use lkeys and works directly on the MMU_VA. A guadidv_get_mmu_va(mr) would return the required HW VA from the kernel.
Usually the higher level communication library (UCX, MPI, etc) forms the dv primitives into something application usable.
Quoted 6 lines
we do if that VA is in the range of our HBM addresses ? The device won't be able to distinguish between them. The transaction that is generated by an engine inside our device will go to the HBM instead of going to the PCI controller and then to the host.
That's the crust of the problem and why we didn't use MR.
No, the problem with the device is that it doesn't have a lkey/rkey, so it is stuck with a single translation domain. RoCE compliant devices are required to have multiple translation domains - each lkey/rkey specifies a unique translation.
The MR concept is a region of process VA mapped into the device for device access, and this device *clearly* has that.
Jason
Quoted 6 lines · Jason Gunthorpe
Quoted 2 lines · Oded Gabbay
The problem with MR is that the API doesn't let us return a new VA. It forces us to use the original VA that the Host OS allocated.
Quoted 8 lines
If using the common MR API you'd have to assign a unique linear range in the single device address map and record both the IOVA and the MMU VA in the kernel struct.
Then when submitting work using that MR lkey the kernel will adjust the work VA using the equation (
WORK_VA- IOVA) +MMU_VAbefore forwarding to HW.
We can't do that. That will kill the performance. If for every submission I need to modify the packet's contents, the throughput will go downhill.
Also, submissions to our RDMA qmans are coupled with submissions to our DMA/Compute QMANs. We can't separate those to different API calls. That will also kill performance and in addition, will prevent us from synchronizing all the engines.
I also have to say, it troubles me that you keep referring to our device as an RDMA device. It is not an RDMA device. It is a deep-learning accelerator which uses RDMA as a way to interconnect multiple devices. We don't intend to replace General-Purpose RDMA devices. We know we don't support that.
Therefore, I still fail to see why we need to support all the above...
Our work submission is not to just "send/receive packets". Sending packets is part of a general recipe to do DMA, perform compute on data and send/receive data. All together, in a synchronized fashion.
The way you try to force me to go is to separate that into different functionality, as if I have different ASICs, which is very counter-productive in terms of performance and simplicity. i.e. have one method of submitting work to DMA/compute and another way to RDMA ports.
I know this is how the kernel is structured now - subsystems for devices that belong to a single domain (graphics, net, storage). But I fear that you will soon see this paradigm doesn't work with new devices in AI, which combine multiple domains into a single ASIC.
Greg, I would love to hear your opinion here. Am I totally wrong ? Is treating a single ASIC that belongs to multiple domains as if it were multiple ASICs a good thing ? Don't you think it will hurt the performance ?
Oded
Quoted 31 lines
EFA doesn't support rkeys, so they are not required to be emulated. It would have to create rkeys using some
guadidv_reg_mr_rkey()It is important to understand that the usual way we support these non-RDMA devices is to insist that they use SW to construct a minimal standards based RDMA API, and then allow the device to have a 'dv' API to access a faster, highly device specific, SW bypass path.
So for instance you might have some
guadidv_post_work(qp)that doesn't use lkeys and works directly on theMMU_VA. Aguadidv_get_mmu_va(mr)would return the required HW VA from the kernel.Usually the higher level communication library (UCX, MPI, etc) forms the dv primitives into something application usable.
Quoted 6 lines
we do if that VA is in the range of our HBM addresses ? The device won't be able to distinguish between them. The transaction that is generated by an engine inside our device will go to the HBM instead of going to the PCI controller and then to the host.
That's the crust of the problem and why we didn't use MR.
No, the problem with the device is that it doesn't have a lkey/rkey, so it is stuck with a single translation domain. RoCE compliant devices are required to have multiple translation domains - each lkey/rkey specifies a unique translation.
The MR concept is a region of process VA mapped into the device for device access, and this device *clearly* has that.
Jason
Quoted 11 lines · Oded Gabbay
Quoted 10 lines · Jason Gunthorpe
Quoted 2 lines · Oded Gabbay
The problem with MR is that the API doesn't let us return a new VA. It forces us to use the original VA that the Host OS allocated.
If using the common MR API you'd have to assign a unique linear range in the single device address map and record both the IOVA and the MMU VA in the kernel struct.
Quoted 7 lines
Quoted 4 lines
Then when submitting work using that MR lkey the kernel will adjust the work VA using the equation (
WORK_VA- IOVA) +MMU_VAbefore forwarding to HW.We can't do that. That will kill the performance. If for every submission I need to modify the packet's contents, the throughput will go downhill.
You clearly didn't read where I explained there is a fast path and slow path expectation.
Quoted 4 lines
Also, submissions to our RDMA qmans are coupled with submissions to our DMA/Compute QMANs. We can't separate those to different API calls. That will also kill performance and in addition, will prevent us from synchronizing all the engines.
Not sure I see why this is a problem. I already explained the fast device specific path.
As long as the kernel maintains proper security when it processes submissions the driver can allow objects to cross between the two domains.
Jason
Quoted 29 lines · Jason Gunthorpe
Quoted 11 lines · Oded Gabbay
Quoted 10 lines · Jason Gunthorpe
Quoted 2 lines · Oded Gabbay
The problem with MR is that the API doesn't let us return a new VA. It forces us to use the original VA that the Host OS allocated.
If using the common MR API you'd have to assign a unique linear range in the single device address map and record both the IOVA and the MMU VA in the kernel struct.
Quoted 7 lines
Quoted 4 lines
Then when submitting work using that MR lkey the kernel will adjust the work VA using the equation (
WORK_VA- IOVA) +MMU_VAbefore forwarding to HW.We can't do that. That will kill the performance. If for every submission I need to modify the packet's contents, the throughput will go downhill.
You clearly didn't read where I explained there is a fast path and slow path expectation.
Quoted 4 lines
Also, submissions to our RDMA qmans are coupled with submissions to our DMA/Compute QMANs. We can't separate those to different API calls. That will also kill performance and in addition, will prevent us from synchronizing all the engines.
Quoted 6 lines
Not sure I see why this is a problem. I already explained the fast device specific path.
As long as the kernel maintains proper security when it processes submissions the driver can allow objects to cross between the two domains.
Can you please explain what you mean by "two domains" ? You mean the RDMA and compute domains ? Or something else ?
What I was trying to say is that I don't want the application to split its submissions to different system calls.
Currently we perform submissions through the CS_IOCTL that is defined in our driver. It is a single IOCTL which allows the user to submit work to all queues, without regard to the underlying engine of each queue.
If I need to split that to different system calls it will have major implications. I don't even want to start thinking about all the synchronization at the host (userspace) level that I will need to do. That's what I meant by saying that you force me to treat my device as if it were multiple devices. The whole point of our ASIC is to combine multiple IPs on the same ASIC.
What will happen when we will add a third domain to our device (e.g. storage, video decoding, encryption engine, whatever). Will I then need to separate submissions to 3 different system calls ? In 3 different subsystems ? This doesn't scale. And I strongly say that it will kill the performance of the device. Not because of the driver. Because of the complications to the user-space.
Oded
Quoted 2 lines
Jason
Quoted 30 lines · Oded Gabbay
Quoted 29 lines · Jason Gunthorpe
Quoted 11 lines · Oded Gabbay
Quoted 10 lines · Jason Gunthorpe
Quoted 2 lines · Oded Gabbay
The problem with MR is that the API doesn't let us return a new VA. It forces us to use the original VA that the Host OS allocated.
If using the common MR API you'd have to assign a unique linear range in the single device address map and record both the IOVA and the MMU VA in the kernel struct.
Quoted 7 lines
Quoted 4 lines
Then when submitting work using that MR lkey the kernel will adjust the work VA using the equation (
WORK_VA- IOVA) +MMU_VAbefore forwarding to HW.We can't do that. That will kill the performance. If for every submission I need to modify the packet's contents, the throughput will go downhill.
You clearly didn't read where I explained there is a fast path and slow path expectation.
Quoted 4 lines
Also, submissions to our RDMA qmans are coupled with submissions to our DMA/Compute QMANs. We can't separate those to different API calls. That will also kill performance and in addition, will prevent us from synchronizing all the engines.
Quoted 8 lines
Quoted 6 lines
Not sure I see why this is a problem. I already explained the fast device specific path.
As long as the kernel maintains proper security when it processes submissions the driver can allow objects to cross between the two domains.
Can you please explain what you mean by "two domains" ? You mean the RDMA and compute domains ? Or something else ?
Yes
Quoted 2 lines
What I was trying to say is that I don't want the application to split its submissions to different system calls.
If you can manage the security then you can cross them. Eg since The RDMA PD would be created on top of the /dev/misc char dev then it is fine for the /dev/misc char dev to access the RDMA objects as a 'dv fast path'.
But now that you say everything is interconnected, I'm wondering, without HW security how do you keep netdev isolated from userspace?
Can I issue commands to /dev/misc and write to kernel memory (does the kernel put any pages into the single MMU?) or corrupt the netdev driver operations in any way?
Jason
Quoted 51 lines · Jason Gunthorpe
Quoted 30 lines · Oded Gabbay
Quoted 29 lines · Jason Gunthorpe
Quoted 11 lines · Oded Gabbay
Quoted 10 lines · Jason Gunthorpe
Quoted 2 lines · Oded Gabbay
The problem with MR is that the API doesn't let us return a new VA. It forces us to use the original VA that the Host OS allocated.
If using the common MR API you'd have to assign a unique linear range in the single device address map and record both the IOVA and the MMU VA in the kernel struct.
Quoted 7 lines
Quoted 4 lines
Then when submitting work using that MR lkey the kernel will adjust the work VA using the equation (
WORK_VA- IOVA) +MMU_VAbefore forwarding to HW.We can't do that. That will kill the performance. If for every submission I need to modify the packet's contents, the throughput will go downhill.
You clearly didn't read where I explained there is a fast path and slow path expectation.
Quoted 4 lines
Also, submissions to our RDMA qmans are coupled with submissions to our DMA/Compute QMANs. We can't separate those to different API calls. That will also kill performance and in addition, will prevent us from synchronizing all the engines.
Quoted 8 lines
Quoted 6 lines
Not sure I see why this is a problem. I already explained the fast device specific path.
As long as the kernel maintains proper security when it processes submissions the driver can allow objects to cross between the two domains.
Can you please explain what you mean by "two domains" ? You mean the RDMA and compute domains ? Or something else ?
Yes
Quoted 2 lines
What I was trying to say is that I don't want the application to split its submissions to different system calls.
If you can manage the security then you can cross them. Eg since The RDMA PD would be created on top of the
/dev/miscchar dev then it is fine for the/dev/miscchar dev to access the RDMA objects as a 'dv fast path'.
Quoted 8 lines
But now that you say everything is interconnected, I'm wondering, without HW security how do you keep netdev isolated from userspace?
Can I issue commands to
/dev/miscand write to kernel memory (does the kernel put any pages into the single MMU?) or corrupt the netdev driver operations in any way?Jason
No, no, no. Please give me more credit :) btw, our kernel interface was scrutinized when we upstreamed the driver and it was under review by the Intel security team.
To explain our security mechanism will require some time. It is detailed in the driver, but it is hard to understand without some background.
I wonder where to start...
First of all, we support open, close, mmap and IOCTLs to /dev/misc/hlX. We don't support read/write system calls. A user never gets direct access to kernel memory. Only through standard mmap. The only thing we allow to mmap is a command buffer (which is used to submit work to certain DMA queues on our device) and to a memory region we use for "CQ" for the RDMA. That's it.
Any access by the device's engines to the host memory is done via our device's MMU. Our MMU supports multiple ASIDs - Address Space IDs. The kernel driver is assigned ASID 0, while the user is assigned ASID 1. We can support up to 1024 ASIDs, but because we limit the user to have a single application, we only use ASID 0 and 1.
The above means a user can't program an engine (DMA, NIC, compute) to access memory he didn't first mapped into our device's MMU. The mapping is done via one of our IOCTLs and the kernel driver makes sure (using standard kernel internal APIs) the host memory truly belongs to the user process. All those mappings are done using ASID 1.
If the driver needs to map kernel pages into the device's MMU, then this is done using ASID 0. This is how we take care of separation between kernel memory and user memory.
Each transaction our engines create and is going to the host first passes through our MMU. The transaction comes with its ASID value. According to that, the MMU knows which page tables to do the walk on.
Specifically regarding RDMA, the user prepares a WQE on the host memory in an area which is mapped into our MMU using ASID 1. The user uses the NIC control IOCTL to give the kernel driver the virtual base address of the WQ and the driver programs it to the H/W. Then, the user can submit the WQE by submitting a command buffer to the NIC QMAN. The command buffer contains a message to the QMAN that tells it to ring the doorbell of the relevant NIC port. The user can't do it from userspace.
For regular Ethernet traffice, we don't have any IOCTLs of course. All Ethernet operations are done via the standard networking subsystem (sockets, etc.).
There are more details of course. I don't know how much you want me to go deeper. If you have specific questions I'll be happy to answer. Oded
Quoted 5 lines · Oded Gabbay
Any access by the device's engines to the host memory is done via our device's MMU. Our MMU supports multiple ASIDs - Address Space IDs. The kernel driver is assigned ASID 0, while the user is assigned ASID 1. We can support up to 1024 ASIDs, but because we limit the user to have a single application, we only use ASID 0 and 1.
If the QP/WQ/etc is HW bound to an ASID then that binding is called a PD and the ASID is acting in the PD role.
If the ASID is translating from on the wire IOVA to DMA PA, then it is acting in the MR role as well.
Bundling those two things together is not as flexible as standards based RDMA, but it is not as far away as you are making things out to be.
Jason
Quoted 12 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
Any access by the device's engines to the host memory is done via our device's MMU. Our MMU supports multiple ASIDs - Address Space IDs. The kernel driver is assigned ASID 0, while the user is assigned ASID 1. We can support up to 1024 ASIDs, but because we limit the user to have a single application, we only use ASID 0 and 1.
If the QP/WQ/etc is HW bound to an ASID then that binding is called a PD and the ASID is acting in the PD role.
Quoted 8 lines
If the ASID is translating from on the wire IOVA to DMA PA, then it is acting in the MR role as well.
Bundling those two things together is not as flexible as standards based RDMA, but it is not as far away as you are making things out to be.
Jason
But Jason, why do I need to use RDMA definitions in my common code ? RDMA is such a small part of our ASIC. We also have an ASIC called GOYA for inference, which is handled by the same driver, but doesn't have RDMA ports at all. Why would I need to use RDMA definitions for that ?
I'm sorry, but you won't be able to convince me here that I need to "enslave" my entire code to RDMA, just because my ASIC "also" has some RDMA ports.
On the same weight, the GPU people tried and failed to say that my device is a GPU. And I think the reasoning that we applied back then, and Greg and Olof agreed with it, applies here as well.
I want to play along, but it has to be something that won't make my entire device's driver into an RDMA driver. And it has to be something that doesn't hurt performance.
All other things can and will be changed according to your inputs.
Thanks,
Oded
Oded
Quoted 3 lines · Oded Gabbay
I'm sorry, but you won't be able to convince me here that I need to "enslave" my entire code to RDMA, just because my ASIC "also" has some RDMA ports.
You can't recreate common shared subsystems in a driver just because you don't want to work with the subsystem.
I don't care what else the ASIC has. In Linux the netdev part is exposed through netdev, the RDMA part through RDMA, the totally-not-a-GPU part through drivers/misc.
It is always been this way. Chelsio didn't get to rebuild the SCSI stack in their driver just because "storage is a small part of their device"
Drivers are not allowed to re-implement I2C/SPI/etc without re-using the comon code for that just because "I2C is a small part of their device"
Exposing to userspace the creation of RoCE QPs and their related objects are unambiguously a RDMA subsystem task. I don't even know how you think you can argue it is not. It is your company proudly claiming the device has 100G RoCE ports in all the marketing literature, after all.
It is too bad the device has a non-standards compliant implementation of RoCE so this will be a bit hard for you. Oh well.
Jason
Quoted 21 lines · Jason Gunthorpe
Quoted 3 lines · Oded Gabbay
I'm sorry, but you won't be able to convince me here that I need to "enslave" my entire code to RDMA, just because my ASIC "also" has some RDMA ports.
You can't recreate common shared subsystems in a driver just because you don't want to work with the subsystem.
I don't care what else the ASIC has. In Linux the netdev part is exposed through netdev, the RDMA part through RDMA, the totally-not-a-GPU part through
drivers/misc.It is always been this way. Chelsio didn't get to rebuild the SCSI stack in their driver just because "storage is a small part of their device"
Drivers are not allowed to re-implement I2C/SPI/etc without re-using the comon code for that just because "I2C is a small part of their device"
Quoted 8 lines
Exposing to userspace the creation of RoCE QPs and their related objects are unambiguously a RDMA subsystem task. I don't even know how you think you can argue it is not. It is your company proudly claiming the device has 100G RoCE ports in all the marketing literature, after all.
It is too bad the device has a non-standards compliant implementation of RoCE so this will be a bit hard for you. Oh well.
What is considered a RoCE port in this case if it's not compliant with RoCE? Sounds like it's an implementation of RDMA over ethernet, not RoCE. Does GAUDI support UD/RC/.. QPs? Is it using a proprietary wire protocol? (BTW, Oded claims it's similar to nvlink, how is nvlink's implementation exposed? Or is it closed source?)
Jason, how do you imagine GAUDI in the RDMA subsystem? Userspace control path verbs (used by hl-thunk?) and all data path verbs exposed as kverbs (used by habanalabs driver)?
So neither any userspace verbs apps could use it nor kernel ULPs?
Quoted 28 lines · Gal Pressman
Quoted 27 lines · Jason Gunthorpe
Quoted 3 lines · Oded Gabbay
I'm sorry, but you won't be able to convince me here that I need to "enslave" my entire code to RDMA, just because my ASIC "also" has some RDMA ports.
You can't recreate common shared subsystems in a driver just because you don't want to work with the subsystem.
I don't care what else the ASIC has. In Linux the netdev part is exposed through netdev, the RDMA part through RDMA, the totally-not-a-GPU part through
drivers/misc.It is always been this way. Chelsio didn't get to rebuild the SCSI stack in their driver just because "storage is a small part of their device"
Drivers are not allowed to re-implement I2C/SPI/etc without re-using the comon code for that just because "I2C is a small part of their device"
Exposing to userspace the creation of RoCE QPs and their related objects are unambiguously a RDMA subsystem task. I don't even know how you think you can argue it is not. It is your company proudly claiming the device has 100G RoCE ports in all the marketing literature, after all.
Quoted 4 lines
Quoted 2 lines
It is too bad the device has a non-standards compliant implementation of RoCE so this will be a bit hard for you. Oh well.
What is considered a RoCE port in this case if it's not compliant with RoCE?
They claim that it is RoCE v2.
https://www.hotchips.org/hc31/HC31_1.14_HabanaLabs.Eitan_Medina.v9.pdf
Thanks
Quoted 5 lines · Gal Pressman
What is considered a RoCE port in this case if it's not compliant with RoCE? Sounds like it's an implementation of RDMA over ethernet, not RoCE. Does GAUDI support UD/RC/.. QPs? Is it using a proprietary wire protocol? (BTW, Oded claims it's similar to nvlink, how is nvlink's implementation exposed? Or is it closed source?)
I think Oded was drawing a parallel to how nvlink is integral with the compute element. From Oded's descriptions I don't think it is much like nvlink at all.
Quoted 4 lines
Jason, how do you imagine GAUDI in the RDMA subsystem? Userspace control path verbs (used by hl-thunk?) and all data path verbs exposed as kverbs (used by habanalabs driver)?
So neither any userspace verbs apps could use it nor kernel ULPs?
Based on what Oded described it seems like a reasonable RDMA device with some limitations around MR IOVA.
Looks like the desire is to create a RDMA WR and CQ ring in userspace, and then co-mingle that with the compute side of the device.
So instead of doing the special IOCTL and mmap against the compute FD it would create a RDMA QP and RDMA CQ, use dv to access the raw internals, and the propritary stack would have exactly the same stuff it would have had with the misc ioctl.
But, completely separately, they'd also have to implement some of verbs which serves as the open source userspace showing how this HW works. What that is depends largely on what their HW can do, and if they want to connect to UCX/mpi/libfabric/etc
A bunch of ioctl stubs or a few tests is far below our standard in RDMA.
There may have been some argument that the compute side of this device has no industry standards so should be a drivers/misc, but HPC networking *does* have extensive standards and extensive open source software stacks. It is very hard for me to see how a device in this market could be competitive without integrating with that stuff.
Jason
Quoted 33 lines · Jason Gunthorpe
Quoted 5 lines · Gal Pressman
What is considered a RoCE port in this case if it's not compliant with RoCE? Sounds like it's an implementation of RDMA over ethernet, not RoCE. Does GAUDI support UD/RC/.. QPs? Is it using a proprietary wire protocol? (BTW, Oded claims it's similar to nvlink, how is nvlink's implementation exposed? Or is it closed source?)
I think Oded was drawing a parallel to how nvlink is integral with the compute element. From Oded's descriptions I don't think it is much like nvlink at all.
Quoted 4 lines
Jason, how do you imagine GAUDI in the RDMA subsystem? Userspace control path verbs (used by hl-thunk?) and all data path verbs exposed as kverbs (used by habanalabs driver)?
So neither any userspace verbs apps could use it nor kernel ULPs?Based on what Oded described it seems like a reasonable RDMA device with some limitations around MR IOVA.
Looks like the desire is to create a RDMA WR and CQ ring in userspace, and then co-mingle that with the compute side of the device.
So instead of doing the special IOCTL and mmap against the compute FD it would create a RDMA QP and RDMA CQ, use dv to access the raw internals, and the propritary stack would have exactly the same stuff it would have had with the misc ioctl.
But, completely separately, they'd also have to implement some of verbs which serves as the open source userspace showing how this HW works. What that is depends largely on what their HW can do, and if they want to connect to UCX/mpi/libfabric/etc
Quoted 8 lines
A bunch of ioctl stubs or a few tests is far below our standard in RDMA.
There may have been some argument that the compute side of this device has no industry standards so should be a
drivers/misc, but HPC networking *does* have extensive standards and extensive open source software stacks. It is very hard for me to see how a device in this market could be competitive without integrating with that stuff.
I agree, that makes sense.
But assuming Oded actually goes and implements all the needed verbs to get a basic functional libibverbs provider (assuming their HW can do it somehow), is it really useful if no one is going to use it?
It doesn't sound like habanalabs want people to use GAUDI as an RDMA adapter, and I'm assuming the only real world use case is going to be using the hl stack, which means we're left with a lot of dead code that's not used/tested by anyone.
Genuine question, wouldn't it be better if they only implement what's actually going to be used and tested by their customers?
Quoted 10 lines · Gal Pressman
I agree, that makes sense.
But assuming Oded actually goes and implements all the needed verbs to get a basic functional libibverbs provider (assuming their HW can do it somehow), is it really useful if no one is going to use it?
It doesn't sound like habanalabs want people to use GAUDI as an RDMA adapter, and I'm assuming the only real world use case is going to be using the hl stack, which means we're left with a lot of dead code that's not used/tested by anyone.Genuine question, wouldn't it be better if they only implement what's actually going to be used and tested by their customers?
The general standard for this 'accel' hardware, both in DRM and RDMA is to present an open source userspace. Companies are encouraged to use that as their main interface but I suppose are free to carry the cost of dual APIs, and the community's wrath if they want.
At least for RDMA this is guided by the founding event of Linux RDMA where all customers demanded the madness of every supplier having a unique software stack from the kernel down stop. Since then the low level stack has been cross vendor and uniform.
Jason
Quoted 10 lines · Jason Gunthorpe
Quoted 8 lines · Gal Pressman
I agree, that makes sense.
But assuming Oded actually goes and implements all the needed verbs to get a basic functional libibverbs provider (assuming their HW can do it somehow), is it really useful if no one is going to use it?
It doesn't sound like habanalabs want people to use GAUDI as an RDMA adapter, and I'm assuming the only real world use case is going to be using the hl stack, which means we're left with a lot of dead code that's not used/tested by anyone.
Quoted 7 lines
Quoted 2 lines
Genuine question, wouldn't it be better if they only implement what's actually going to be used and tested by their customers?
The general standard for this 'accel' hardware, both in DRM and RDMA is to present an open source userspace. Companies are encouraged to use that as their main interface but I suppose are free to carry the cost of dual APIs, and the community's wrath if they want.
I didn't mean they should maintain two interfaces.
The question is whether they should implement libibverbs support that covers the cases used by their stack, or should they implement all "mandatory" verbs so they could be able to run libibverbs' examples/perftest/pyverbs as well, even though these will likely be the only apps covering these verbs.
Quoted 19 lines · Gal Pressman
Quoted 10 lines · Jason Gunthorpe
Quoted 8 lines · Gal Pressman
I agree, that makes sense.
But assuming Oded actually goes and implements all the needed verbs to get a basic functional libibverbs provider (assuming their HW can do it somehow), is it really useful if no one is going to use it?
It doesn't sound like habanalabs want people to use GAUDI as an RDMA adapter, and I'm assuming the only real world use case is going to be using the hl stack, which means we're left with a lot of dead code that's not used/tested by anyone.Quoted 7 lines
Quoted 2 lines
Genuine question, wouldn't it be better if they only implement what's actually going to be used and tested by their customers?
The general standard for this 'accel' hardware, both in DRM and RDMA is to present an open source userspace. Companies are encouraged to use that as their main interface but I suppose are free to carry the cost of dual APIs, and the community's wrath if they want.
Quoted 5 lines
I didn't mean they should maintain two interfaces.
The question is whether they should implement libibverbs support that covers the cases used by their stack, or should they implement all "mandatory" verbs so they could be able to run libibverbs' examples/perftest/pyverbs as well, even though these will likely be the only apps covering these verbs.
As I said, the minimum standard is an open source user space that will operate the NIC. For EFA we decided that was ibv_ud_pingpong, and now parts of pyverbs. A similar decision would be needed here too. It is a conversation that should start with a propsal from Oded.
The *point* is to have the open userspace, so I really don't care what their proprietary universe does, and shrinking the opensource side becuase it is "redundant" is completely backwards to what we want to see.
Jason
Quoted 21 lines · Gal Pressman
Quoted 7 lines · Jason Gunthorpe
Quoted 5 lines · Oded Gabbay
infrastructure for communication between multiple accelerators. Same as Nvidia uses NVlink, we use RDMA that we have inside our ASIC. The RDMA implementation we did does NOT support some basic RDMA IBverbs (such as MR and PD) and therefore, we can't use the rdma-core library or to connect to the rdma infrastructure in the kernel.
Quoted 8 lines
You can't create a parallel RDMA subsystem in netdev, or in misc, and you can't add random device offloads as IOCTL to nedevs.
RDMA is the proper home for all the networking offloads that don't fit into netdev.
EFA was able to fit into rdma-core/etc and it isn't even RoCE at all. I'm sure this can too.
Well, EFA wasn't welcomed to the RDMA subsystem with open arms ;), initially it was suggested to go through the vfio subsystem instead.
Quoted 7 lines
I think this comes back to the discussion we had when EFA was upstreamed, which is what's the bar to get accepted to the RDMA subsystem.
IIRC, what we eventually agreed on is having a userspace rdma-core provider and ibv_{ud,rc}_pingpong working (or just supporting one of the IB spec's QP types?).Does GAUDI fit these requirements? If not, should it be in a different subsystem or should we open the "what qualifies as an RDMA device" question again?
Hi Itay,
Please see the above comments/questions.
Thanks,
Oded
Jason Gunthorpe
maintainerQuoted 11 lines · Oded Gabbay
Hello,
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201
Quoted 8 lines
1. The NIC functionality is NOT exposed as different PCI Physical Functions. There is a single PF which is used for compute and networking, as the main goal of the NIC ports is to be used as intra-communication and not as standard network interfaces. This implies we can't connect different drivers to handle the networking ports because it is the same device, from the kernel POV, as the compute. Therefore, we must integrate the networking code into the main habanalabs driver.
No, this means you need to use virtual bus/ancillary bus that your other Intel colleagues have been working on with Greg.
It is specificaly intended as the way to split a single PCI function across multiple subsystems. eg drivers/misc/habanalabs would be the pci_driver and drivers/net/ethernet/habanadalabs would be the 'virtual/ancillary' driver. Probably one per port.
Jasno
Quoted 26 lines · Jason Gunthorpe
Quoted 11 lines · Oded Gabbay
Hello,
This is the second version of the patch-set to upstream the GAUDI NIC code into the habanalabs driver.
The only modification from v2 is in the ethtool patch (patch 12). Details are in that patch's commit message.
Link to v2 cover letter:
https://lkml.org/lkml/2020/9/12/201Quoted 8 lines
1. The NIC functionality is NOT exposed as different PCI Physical Functions. There is a single PF which is used for compute and networking, as the main goal of the NIC ports is to be used as intra-communication and not as standard network interfaces. This implies we can't connect different drivers to handle the networking ports because it is the same device, from the kernel POV, as the compute. Therefore, we must integrate the networking code into the main habanalabs driver.
No, this means you need to use virtual bus/ancillary bus that your other Intel colleagues have been working on with Greg.
Quoted 6 lines
It is specificaly intended as the way to split a single PCI function across multiple subsystems. eg
drivers/misc/habanalabswould be thepci_driveranddrivers/net/ethernet/habanadalabswould be the 'virtual/ancillary' driver. Probably one per port.Jasno
Understood.
We are doing a refactor of the code according to those guidelines and will send an updated patch-set in a couple of weeks. Thanks,
Oded