Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

habanalabs/gaudi2: find decode error root cause

When a decode error happens, we often don't know the exact root
cause (the erroneous address that was accessed) and the exact engine
that created the erroneous transaction.

To find out, we need to go over all the relevant register blocks
in the ASIC. Once we find the relevant engine, we print its details
and the offending address.

This helps tremendously when debugging an error that was created
by running a user workload.

Signed-off-by: Koby Elbaz <kelbaz@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>

authored by

Koby Elbaz and committed by
Oded Gabbay
f7d67c1c ce582bea

+695 -1
+10
drivers/accel/habanalabs/common/habanalabs.h
··· 29 29 #include <linux/coresight.h> 30 30 #include <linux/dma-buf.h> 31 31 32 + #include "security.h" 33 + 32 34 #define HL_NAME "habanalabs" 33 35 34 36 struct hl_device; ··· 548 546 /** 549 547 * struct asic_fixed_properties - ASIC specific immutable properties. 550 548 * @hw_queues_props: H/W queues properties. 549 + * @special_blocks: points to an array containing special blocks info. 550 + * @skip_special_blocks_cfg: special blocks skip configs. 551 551 * @cpucp_info: received various information from CPU-CP regarding the H/W, e.g. 552 552 * available sensors. 553 553 * @uboot_ver: F/W U-boot version. ··· 649 645 * (i.e. the DRAM supports multiple page sizes), otherwise 650 646 * it will shall be equal to dram_page_size. 651 647 * @num_engine_cores: number of engine cpu cores 648 + * @num_of_special_blocks: special_blocks array size. 649 + * @glbl_err_cause_num: global err cause number. 652 650 * @hbw_flush_reg: register to read to generate HBW flush. value of 0 means HBW flush is 653 651 * not supported. 654 652 * @collective_first_sob: first sync object available for collective use ··· 701 695 */ 702 696 struct asic_fixed_properties { 703 697 struct hw_queue_properties *hw_queues_props; 698 + struct hl_special_block_info *special_blocks; 699 + struct hl_skip_blocks_cfg skip_special_blocks_cfg; 704 700 struct cpucp_info cpucp_info; 705 701 char uboot_ver[VERSION_MAX_LEN]; 706 702 char preboot_ver[VERSION_MAX_LEN]; ··· 775 767 u32 xbar_edge_enabled_mask; 776 768 u32 device_mem_alloc_default_page_size; 777 769 u32 num_engine_cores; 770 + u32 num_of_special_blocks; 771 + u32 glbl_err_cause_num; 778 772 u32 hbw_flush_reg; 779 773 u16 collective_first_sob; 780 774 u16 collective_first_mon;
+174
drivers/accel/habanalabs/common/security.c
··· 7 7 8 8 #include "habanalabs.h" 9 9 10 + static const char * const hl_glbl_error_cause[HL_MAX_NUM_OF_GLBL_ERR_CAUSE] = { 11 + "Error due to un-priv read", 12 + "Error due to un-secure read", 13 + "Error due to read from unmapped reg", 14 + "Error due to un-priv write", 15 + "Error due to un-secure write", 16 + "Error due to write to unmapped reg", 17 + "External I/F write sec violation", 18 + "External I/F write to un-mapped reg", 19 + "Read to write only", 20 + "Write to read only" 21 + }; 22 + 10 23 /** 11 24 * hl_get_pb_block - return the relevant block within the block array 12 25 * ··· 610 597 dcore_offset + i * instance_offset, 611 598 blocks_array_size); 612 599 600 + } 601 + 602 + static u32 hl_automated_get_block_base_addr(struct hl_device *hdev, 603 + struct hl_special_block_info *block_info, 604 + u32 major, u32 minor, u32 sub_minor) 605 + { 606 + u32 fw_block_base_address = block_info->base_addr + 607 + major * block_info->major_offset + 608 + minor * block_info->minor_offset + 609 + sub_minor * block_info->sub_minor_offset; 610 + struct asic_fixed_properties *prop = &hdev->asic_prop; 611 + 612 + /* Calculation above returns an address for FW use, and therefore should 613 + * be casted for driver use. 614 + */ 615 + return (fw_block_base_address - lower_32_bits(prop->cfg_base_address)); 616 + } 617 + 618 + static bool hl_check_block_type_exclusion(struct hl_skip_blocks_cfg *skip_blocks_cfg, 619 + int block_type) 620 + { 621 + int i; 622 + 623 + /* Check if block type is listed in the exclusion list of block types */ 624 + for (i = 0 ; i < skip_blocks_cfg->block_types_len ; i++) 625 + if (block_type == skip_blocks_cfg->block_types[i]) 626 + return true; 627 + 628 + return false; 629 + } 630 + 631 + static bool hl_check_block_range_exclusion(struct hl_device *hdev, 632 + struct hl_skip_blocks_cfg *skip_blocks_cfg, 633 + struct hl_special_block_info *block_info, 634 + u32 major, u32 minor, u32 sub_minor) 635 + { 636 + u32 blocks_in_range, block_base_addr_in_range, block_base_addr; 637 + int i, j; 638 + 639 + block_base_addr = hl_automated_get_block_base_addr(hdev, block_info, 640 + major, minor, sub_minor); 641 + 642 + for (i = 0 ; i < skip_blocks_cfg->block_ranges_len ; i++) { 643 + blocks_in_range = (skip_blocks_cfg->block_ranges[i].end - 644 + skip_blocks_cfg->block_ranges[i].start) / 645 + HL_BLOCK_SIZE + 1; 646 + for (j = 0 ; j < blocks_in_range ; j++) { 647 + block_base_addr_in_range = skip_blocks_cfg->block_ranges[i].start + 648 + j * HL_BLOCK_SIZE; 649 + if (block_base_addr == block_base_addr_in_range) 650 + return true; 651 + } 652 + } 653 + 654 + return false; 655 + } 656 + 657 + static int hl_read_glbl_errors(struct hl_device *hdev, 658 + u32 blk_idx, u32 major, u32 minor, u32 sub_minor, void *data) 659 + { 660 + struct hl_special_block_info *special_blocks = hdev->asic_prop.special_blocks; 661 + struct hl_special_block_info *current_block = &special_blocks[blk_idx]; 662 + u32 glbl_err_addr, glbl_err_cause, addr_val, cause_val, block_base, 663 + base = current_block->base_addr - lower_32_bits(hdev->asic_prop.cfg_base_address); 664 + int i; 665 + 666 + block_base = base + major * current_block->major_offset + 667 + minor * current_block->minor_offset + 668 + sub_minor * current_block->sub_minor_offset; 669 + 670 + glbl_err_cause = block_base + HL_GLBL_ERR_CAUSE_OFFSET; 671 + cause_val = RREG32(glbl_err_cause); 672 + if (!cause_val) 673 + return 0; 674 + 675 + glbl_err_addr = block_base + HL_GLBL_ERR_ADDR_OFFSET; 676 + addr_val = RREG32(glbl_err_addr); 677 + 678 + for (i = 0 ; i < hdev->asic_prop.glbl_err_cause_num ; i++) { 679 + if (cause_val & BIT(i)) 680 + dev_err_ratelimited(hdev->dev, 681 + "%s, addr %#llx\n", 682 + hl_glbl_error_cause[i], 683 + hdev->asic_prop.cfg_base_address + block_base + 684 + FIELD_GET(HL_GLBL_ERR_ADDRESS_MASK, addr_val)); 685 + } 686 + 687 + WREG32(glbl_err_cause, cause_val); 688 + 689 + return 0; 690 + } 691 + 692 + void hl_check_for_glbl_errors(struct hl_device *hdev) 693 + { 694 + struct asic_fixed_properties *prop = &hdev->asic_prop; 695 + struct hl_special_blocks_cfg special_blocks_cfg; 696 + struct iterate_special_ctx glbl_err_iter; 697 + int rc; 698 + 699 + memset(&special_blocks_cfg, 0, sizeof(special_blocks_cfg)); 700 + special_blocks_cfg.skip_blocks_cfg = &prop->skip_special_blocks_cfg; 701 + 702 + glbl_err_iter.fn = &hl_read_glbl_errors; 703 + glbl_err_iter.data = &special_blocks_cfg; 704 + 705 + rc = hl_iterate_special_blocks(hdev, &glbl_err_iter); 706 + if (rc) 707 + dev_err_ratelimited(hdev->dev, 708 + "Could not iterate special blocks, glbl error check failed\n"); 709 + } 710 + 711 + int hl_iterate_special_blocks(struct hl_device *hdev, struct iterate_special_ctx *ctx) 712 + { 713 + struct hl_special_blocks_cfg *special_blocks_cfg = 714 + (struct hl_special_blocks_cfg *)ctx->data; 715 + struct hl_skip_blocks_cfg *skip_blocks_cfg = 716 + special_blocks_cfg->skip_blocks_cfg; 717 + u32 major, minor, sub_minor, blk_idx, num_blocks; 718 + struct hl_special_block_info *block_info_arr; 719 + int rc; 720 + 721 + block_info_arr = hdev->asic_prop.special_blocks; 722 + if (!block_info_arr) 723 + return -EINVAL; 724 + 725 + num_blocks = hdev->asic_prop.num_of_special_blocks; 726 + 727 + for (blk_idx = 0 ; blk_idx < num_blocks ; blk_idx++, block_info_arr++) { 728 + if (hl_check_block_type_exclusion(skip_blocks_cfg, block_info_arr->block_type)) 729 + continue; 730 + 731 + for (major = 0 ; major < block_info_arr->major ; major++) { 732 + minor = 0; 733 + do { 734 + sub_minor = 0; 735 + do { 736 + if ((hl_check_block_range_exclusion(hdev, 737 + skip_blocks_cfg, block_info_arr, 738 + major, minor, sub_minor)) || 739 + (skip_blocks_cfg->skip_block_hook && 740 + skip_blocks_cfg->skip_block_hook(hdev, 741 + special_blocks_cfg, 742 + blk_idx, major, minor, sub_minor))) { 743 + sub_minor++; 744 + continue; 745 + } 746 + 747 + rc = ctx->fn(hdev, blk_idx, major, minor, 748 + sub_minor, ctx->data); 749 + if (rc) 750 + return rc; 751 + 752 + sub_minor++; 753 + } while (sub_minor < block_info_arr->sub_minor); 754 + 755 + minor++; 756 + } while (minor < block_info_arr->minor); 757 + } 758 + } 759 + 760 + return 0; 613 761 }
+163
drivers/accel/habanalabs/common/security.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 2 + * 3 + * Copyright 2016-2022 HabanaLabs, Ltd. 4 + * All Rights Reserved. 5 + * 6 + */ 7 + 8 + #ifndef SECURITY_H_ 9 + #define SECURITY_H_ 10 + 11 + #include <linux/io-64-nonatomic-lo-hi.h> 12 + 13 + extern struct hl_device *hdev; 14 + 15 + /* special blocks */ 16 + #define HL_MAX_NUM_OF_GLBL_ERR_CAUSE 10 17 + #define HL_GLBL_ERR_ADDRESS_MASK GENMASK(11, 0) 18 + /* GLBL_ERR_ADDR register offset from the start of the block */ 19 + #define HL_GLBL_ERR_ADDR_OFFSET 0xF44 20 + /* GLBL_ERR_CAUSE register offset from the start of the block */ 21 + #define HL_GLBL_ERR_CAUSE_OFFSET 0xF48 22 + 23 + /* 24 + * struct hl_special_block_info - stores address details of a particular type of 25 + * IP block which has a SPECIAL part. 26 + * 27 + * @block_type: block type as described in every ASIC's block_types enum. 28 + * @base_addr: base address of the first block of particular type, 29 + * e.g., address of NIC0_UMR0_0 of 'NIC_UMR' block. 30 + * @major: number of major blocks of particular type. 31 + * @minor: number of minor blocks of particular type. 32 + * @sub_minor: number of sub minor blocks of particular type. 33 + * @major_offset: address gap between 2 consecutive major blocks of particular type, 34 + * e.g., offset between NIC0_UMR0_0 and NIC1_UMR0_0 is 0x80000. 35 + * @minor_offset: address gap between 2 consecutive minor blocks of particular type, 36 + * e.g., offset between NIC0_UMR0_0 and NIC0_UMR1_0 is 0x20000. 37 + * @sub_minor_offset: address gap between 2 consecutive sub_minor blocks of particular 38 + * type, e.g., offset between NIC0_UMR0_0 and NIC0_UMR0_1 is 0x1000. 39 + * 40 + * e.g., in Gaudi2, NIC_UMR blocks can be interpreted as: 41 + * NIC<major>_UMR<minor>_<sub_minor> where major=12, minor=2, sub_minor=15. 42 + * In other words, for each of 12 major numbers (i.e 0 to 11) there are 43 + * 2 blocks with different minor numbers (i.e. 0 to 1). Again, for each minor 44 + * number there are 15 blocks with different sub_minor numbers (i.e. 0 to 14). 45 + * So different blocks are NIC0_UMR0_0, NIC0_UMR0_1, ..., NIC0_UMR1_0, ...., 46 + * NIC11_UMR1_14. 47 + * 48 + * Struct's formatted data is located in the SOL-based auto-generated protbits headers. 49 + */ 50 + struct hl_special_block_info { 51 + int block_type; 52 + u32 base_addr; 53 + u32 major; 54 + u32 minor; 55 + u32 sub_minor; 56 + u32 major_offset; 57 + u32 minor_offset; 58 + u32 sub_minor_offset; 59 + }; 60 + 61 + /* 62 + * struct hl_automated_pb_cfg - represents configurations of a particular type 63 + * of IP block which has protection bits. 64 + * 65 + * @addr: address details as described in hl_automation_pb_addr struct. 66 + * @prot_map: each bit corresponds to one among 32 protection configuration regs 67 + * (e.g., SPECIAL_GLBL_PRIV). '1' means 0xffffffff and '0' means 0x0 68 + * to be written into the corresponding protection configuration reg. 69 + * This bit is meaningful if same bit in data_map is 0, otherwise ignored. 70 + * @data_map: each bit corresponds to one among 32 protection configuration regs 71 + * (e.g., SPECIAL_GLBL_PRIV). '1' means corresponding protection 72 + * configuration reg is to be written with a value in array pointed 73 + * by 'data', otherwise the value is decided by 'prot_map'. 74 + * @data: pointer to data array which stores the config value(s) to be written 75 + * to corresponding protection configuration reg(s). 76 + * @data_size: size of the data array. 77 + * 78 + * Each bit of 'data_map' and 'prot_map' fields corresponds to one among 32 79 + * protection configuration registers e.g., SPECIAL GLBL PRIV regs (starting at 80 + * offset 0xE80). '1' in 'data_map' means protection configuration to be done 81 + * using configuration in data array. '0' in 'data_map" means protection 82 + * configuration to be done as per the value of corresponding bit in 'prot_map'. 83 + * '1' in 'prot_map' means the register to be programmed with 0xFFFFFFFF 84 + * (all non-protected). '0' in 'prot_map' means the register to be programmed 85 + * with 0x0 (all protected). 86 + * 87 + * e.g., prot_map = 0x00000001, data_map = 0xC0000000 , data = {0xff, 0x12} 88 + * SPECIAL_GLBL_PRIV[0] = 0xFFFFFFFF 89 + * SPECIAL_GLBL_PRIV[1..29] = 0x0 90 + * SPECIAL_GLBL_PRIV[30] = 0xFF 91 + * SPECIAL_GLBL_PRIV[31] = 0x12 92 + */ 93 + struct hl_automated_pb_cfg { 94 + struct hl_special_block_info addr; 95 + u32 prot_map; 96 + u32 data_map; 97 + const u32 *data; 98 + u8 data_size; 99 + }; 100 + 101 + /* struct hl_special_blocks_cfg - holds special blocks cfg data. 102 + * 103 + * @priv_automated_pb_cfg: points to the main privileged PB array. 104 + * @sec_automated_pb_cfg: points to the main secured PB array. 105 + * @skip_blocks_cfg: holds arrays of block types & block ranges to be excluded. 106 + * @priv_cfg_size: size of the main privileged PB array. 107 + * @sec_cfg_size: size of the main secured PB array. 108 + * @prot_lvl_priv: indication if it's a privileged/secured PB configurations. 109 + */ 110 + struct hl_special_blocks_cfg { 111 + struct hl_automated_pb_cfg *priv_automated_pb_cfg; 112 + struct hl_automated_pb_cfg *sec_automated_pb_cfg; 113 + struct hl_skip_blocks_cfg *skip_blocks_cfg; 114 + u32 priv_cfg_size; 115 + u32 sec_cfg_size; 116 + u8 prot_lvl_priv; 117 + }; 118 + 119 + /* Automated security */ 120 + 121 + /* struct hl_skip_blocks_cfg - holds arrays of block types & block ranges to be 122 + * excluded from special blocks configurations. 123 + * 124 + * @block_types: an array of block types NOT to be configured. 125 + * @block_types_len: len of an array of block types not to be configured. 126 + * @block_ranges: an array of block ranges not to be configured. 127 + * @block_ranges_len: len of an array of block ranges not to be configured. 128 + * @skip_block_hook: hook that will be called before initializing special blocks. 129 + */ 130 + struct hl_skip_blocks_cfg { 131 + int *block_types; 132 + size_t block_types_len; 133 + struct range *block_ranges; 134 + size_t block_ranges_len; 135 + bool (*skip_block_hook)(struct hl_device *hdev, 136 + struct hl_special_blocks_cfg *special_blocks_cfg, 137 + u32 blk_idx, u32 major, u32 minor, u32 sub_minor); 138 + }; 139 + 140 + /** 141 + * struct iterate_special_ctx - HW module special block iterator 142 + * @fn: function to apply to each HW module special block instance 143 + * @data: optional internal data to the function iterator 144 + */ 145 + struct iterate_special_ctx { 146 + /* 147 + * callback for the HW module special block iterator 148 + * @hdev: pointer to the habanalabs device structure 149 + * @block_id: block (ASIC specific definition can be dcore/hdcore) 150 + * @major: major block index within block_id 151 + * @minor: minor block index within the major block 152 + * @sub_minor: sub_minor block index within the minor block 153 + * @data: function specific data 154 + */ 155 + int (*fn)(struct hl_device *hdev, u32 block_id, u32 major, u32 minor, 156 + u32 sub_minor, void *data); 157 + void *data; 158 + }; 159 + 160 + int hl_iterate_special_blocks(struct hl_device *hdev, struct iterate_special_ctx *ctx); 161 + void hl_check_for_glbl_errors(struct hl_device *hdev); 162 + 163 + #endif /* SECURITY_H_ */
+154 -1
drivers/accel/habanalabs/gaudi2/gaudi2.c
··· 7 7 8 8 #include "gaudi2P.h" 9 9 #include "gaudi2_masks.h" 10 + #include "../include/gaudi2/gaudi2_special_blocks.h" 10 11 #include "../include/hw_ip/mmu/mmu_general.h" 11 12 #include "../include/hw_ip/mmu/mmu_v2_0.h" 12 13 #include "../include/gaudi2/gaudi2_packets.h" ··· 1684 1683 char cause[50]; 1685 1684 }; 1686 1685 1686 + static struct hl_special_block_info gaudi2_special_blocks[] = GAUDI2_SPECIAL_BLOCKS; 1687 + 1688 + /* Special blocks iterator is currently used to configure security protection bits, 1689 + * and read global errors. Most HW blocks are addressable and those who aren't (N/A)- 1690 + * must be skipped. Following configurations are commonly used for both PB config 1691 + * and global error reading, since currently they both share the same settings. 1692 + * Once it changes, we must remember to use separate configurations for either one. 1693 + */ 1694 + static int gaudi2_iterator_skip_block_types[] = { 1695 + GAUDI2_BLOCK_TYPE_PLL, 1696 + GAUDI2_BLOCK_TYPE_EU_BIST, 1697 + GAUDI2_BLOCK_TYPE_HBM, 1698 + GAUDI2_BLOCK_TYPE_XFT 1699 + }; 1700 + 1701 + static struct range gaudi2_iterator_skip_block_ranges[] = { 1702 + /* Skip all PSOC blocks except for PSOC_GLOBAL_CONF */ 1703 + {mmPSOC_I2C_M0_BASE, mmPSOC_EFUSE_BASE}, 1704 + {mmPSOC_BTL_BASE, mmPSOC_MSTR_IF_RR_SHRD_HBW_BASE}, 1705 + /* Skip all CPU blocks except for CPU_IF */ 1706 + {mmCPU_CA53_CFG_BASE, mmCPU_CA53_CFG_BASE}, 1707 + {mmCPU_TIMESTAMP_BASE, mmCPU_MSTR_IF_RR_SHRD_HBW_BASE} 1708 + }; 1709 + 1687 1710 static struct hbm_mc_error_causes hbm_mc_spi[GAUDI2_NUM_OF_HBM_MC_SPI_CAUSE] = { 1688 1711 {HBM_MC_SPI_TEMP_PIN_CHG_MASK, "temperature pins changed"}, 1689 1712 {HBM_MC_SPI_THR_ENG_MASK, "temperature-based throttling engaged"}, ··· 3022 2997 return rand ? rand : 1; 3023 2998 } 3024 2999 3000 + static void gaudi2_special_blocks_free(struct hl_device *hdev) 3001 + { 3002 + struct asic_fixed_properties *prop = &hdev->asic_prop; 3003 + struct hl_skip_blocks_cfg *skip_special_blocks_cfg = 3004 + &prop->skip_special_blocks_cfg; 3005 + 3006 + kfree(prop->special_blocks); 3007 + kfree(skip_special_blocks_cfg->block_types); 3008 + kfree(skip_special_blocks_cfg->block_ranges); 3009 + } 3010 + 3011 + static void gaudi2_special_blocks_iterator_free(struct hl_device *hdev) 3012 + { 3013 + gaudi2_special_blocks_free(hdev); 3014 + } 3015 + 3016 + static bool gaudi2_special_block_skip(struct hl_device *hdev, 3017 + struct hl_special_blocks_cfg *special_blocks_cfg, 3018 + u32 blk_idx, u32 major, u32 minor, u32 sub_minor) 3019 + { 3020 + return false; 3021 + } 3022 + 3023 + static int gaudi2_special_blocks_config(struct hl_device *hdev) 3024 + { 3025 + struct asic_fixed_properties *prop = &hdev->asic_prop; 3026 + int i, rc; 3027 + 3028 + /* Configure Special blocks */ 3029 + prop->glbl_err_cause_num = GAUDI2_NUM_OF_GLBL_ERR_CAUSE; 3030 + prop->num_of_special_blocks = ARRAY_SIZE(gaudi2_special_blocks); 3031 + prop->special_blocks = kmalloc_array(prop->num_of_special_blocks, 3032 + sizeof(*prop->special_blocks), GFP_KERNEL); 3033 + if (!prop->special_blocks) 3034 + return -ENOMEM; 3035 + 3036 + for (i = 0 ; i < prop->num_of_special_blocks ; i++) 3037 + memcpy(&prop->special_blocks[i], &gaudi2_special_blocks[i], 3038 + sizeof(*prop->special_blocks)); 3039 + 3040 + /* Configure when to skip Special blocks */ 3041 + memset(&prop->skip_special_blocks_cfg, 0, sizeof(prop->skip_special_blocks_cfg)); 3042 + prop->skip_special_blocks_cfg.skip_block_hook = gaudi2_special_block_skip; 3043 + 3044 + if (ARRAY_SIZE(gaudi2_iterator_skip_block_types)) { 3045 + prop->skip_special_blocks_cfg.block_types = 3046 + kmalloc_array(ARRAY_SIZE(gaudi2_iterator_skip_block_types), 3047 + sizeof(gaudi2_iterator_skip_block_types[0]), GFP_KERNEL); 3048 + if (!prop->skip_special_blocks_cfg.block_types) { 3049 + rc = -ENOMEM; 3050 + goto free_special_blocks; 3051 + } 3052 + 3053 + memcpy(prop->skip_special_blocks_cfg.block_types, gaudi2_iterator_skip_block_types, 3054 + sizeof(gaudi2_iterator_skip_block_types)); 3055 + 3056 + prop->skip_special_blocks_cfg.block_types_len = 3057 + ARRAY_SIZE(gaudi2_iterator_skip_block_types); 3058 + } 3059 + 3060 + if (ARRAY_SIZE(gaudi2_iterator_skip_block_ranges)) { 3061 + prop->skip_special_blocks_cfg.block_ranges = 3062 + kmalloc_array(ARRAY_SIZE(gaudi2_iterator_skip_block_ranges), 3063 + sizeof(gaudi2_iterator_skip_block_ranges[0]), GFP_KERNEL); 3064 + if (!prop->skip_special_blocks_cfg.block_ranges) { 3065 + rc = -ENOMEM; 3066 + goto free_skip_special_blocks_types; 3067 + } 3068 + 3069 + for (i = 0 ; i < ARRAY_SIZE(gaudi2_iterator_skip_block_ranges) ; i++) 3070 + memcpy(&prop->skip_special_blocks_cfg.block_ranges[i], 3071 + &gaudi2_iterator_skip_block_ranges[i], 3072 + sizeof(struct range)); 3073 + 3074 + prop->skip_special_blocks_cfg.block_ranges_len = 3075 + ARRAY_SIZE(gaudi2_iterator_skip_block_ranges); 3076 + } 3077 + 3078 + return 0; 3079 + 3080 + free_skip_special_blocks_types: 3081 + kfree(prop->skip_special_blocks_cfg.block_types); 3082 + free_special_blocks: 3083 + kfree(prop->special_blocks); 3084 + 3085 + return rc; 3086 + } 3087 + 3088 + static int gaudi2_special_blocks_iterator_config(struct hl_device *hdev) 3089 + { 3090 + return gaudi2_special_blocks_config(hdev); 3091 + } 3092 + 3025 3093 static int gaudi2_sw_init(struct hl_device *hdev) 3026 3094 { 3027 3095 struct asic_fixed_properties *prop = &hdev->asic_prop; ··· 3210 3092 3211 3093 hdev->asic_funcs->set_pci_memory_regions(hdev); 3212 3094 3095 + rc = gaudi2_special_blocks_iterator_config(hdev); 3096 + if (rc) 3097 + goto free_scratchpad_mem; 3098 + 3213 3099 return 0; 3214 3100 3101 + free_scratchpad_mem: 3102 + hl_asic_dma_pool_free(hdev, gaudi2->scratchpad_kernel_address, 3103 + gaudi2->scratchpad_bus_address); 3215 3104 free_virt_msix_db_mem: 3216 3105 hl_cpu_accessible_dma_pool_free(hdev, prop->pmmu.page_size, gaudi2->virt_msix_db_cpu_addr); 3217 3106 free_cpu_accessible_dma_pool: ··· 3237 3112 { 3238 3113 struct asic_fixed_properties *prop = &hdev->asic_prop; 3239 3114 struct gaudi2_device *gaudi2 = hdev->asic_specific; 3115 + 3116 + gaudi2_special_blocks_iterator_free(hdev); 3240 3117 3241 3118 hl_cpu_accessible_dma_pool_free(hdev, prop->pmmu.page_size, gaudi2->virt_msix_db_cpu_addr); 3242 3119 ··· 7963 7836 error_count += _gaudi2_handle_qm_sei_err(hdev, 7964 7837 qman_base + NIC_QM_OFFSET, event_type); 7965 7838 7966 - if (extended_err_check) 7839 + if (extended_err_check) { 7967 7840 /* check if RAZWI happened */ 7968 7841 gaudi2_ack_module_razwi_event_handler(hdev, module, 0, 0, event_mask); 7842 + hl_check_for_glbl_errors(hdev); 7843 + } 7969 7844 7970 7845 return error_count; 7971 7846 } ··· 8087 7958 gaudi2_ack_module_razwi_event_handler(hdev, RAZWI_EDMA, index, 0, event_mask); 8088 7959 } 8089 7960 7961 + hl_check_for_glbl_errors(hdev); 7962 + 8090 7963 return error_count; 8091 7964 } 8092 7965 ··· 8106 7975 error_count++; 8107 7976 } 8108 7977 } 7978 + 7979 + hl_check_for_glbl_errors(hdev); 8109 7980 8110 7981 WREG32(mmARC_FARM_ARC0_AUX_ARC_SEI_INTR_CLR, sts_clr_val); 8111 7982 ··· 8128 7995 error_count++; 8129 7996 } 8130 7997 } 7998 + 7999 + hl_check_for_glbl_errors(hdev); 8131 8000 8132 8001 WREG32(mmCPU_IF_CPU_SEI_INTR_CLR, sts_clr_val); 8133 8002 ··· 8153 8018 8154 8019 /* check if RAZWI happened */ 8155 8020 gaudi2_ack_module_razwi_event_handler(hdev, RAZWI_ROT, rot_index, 0, event_mask); 8021 + hl_check_for_glbl_errors(hdev); 8156 8022 8157 8023 return error_count; 8158 8024 } ··· 8175 8039 8176 8040 /* check if RAZWI happened */ 8177 8041 gaudi2_ack_module_razwi_event_handler(hdev, RAZWI_TPC, tpc_index, 0, event_mask); 8042 + hl_check_for_glbl_errors(hdev); 8178 8043 8179 8044 return error_count; 8180 8045 } ··· 8209 8072 8210 8073 /* check if RAZWI happened */ 8211 8074 gaudi2_ack_module_razwi_event_handler(hdev, RAZWI_DEC, dec_index, 0, event_mask); 8075 + hl_check_for_glbl_errors(hdev); 8212 8076 8213 8077 /* Write 1 clear errors */ 8214 8078 WREG32(sts_addr, sts_clr_val); ··· 8241 8103 for (i = MME_WRITE ; i < MME_INITIATORS_MAX ; i++) 8242 8104 gaudi2_ack_module_razwi_event_handler(hdev, RAZWI_MME, mme_index, i, event_mask); 8243 8105 8106 + hl_check_for_glbl_errors(hdev); 8107 + 8244 8108 WREG32(sts_clr_addr, sts_clr_val); 8245 8109 8246 8110 return error_count; ··· 8259 8119 "err cause: %s", guadi2_mme_sbte_error_cause[i]); 8260 8120 error_count++; 8261 8121 } 8122 + 8123 + hl_check_for_glbl_errors(hdev); 8262 8124 8263 8125 return error_count; 8264 8126 } ··· 8288 8146 /* check if RAZWI happened on WAP0/1 */ 8289 8147 gaudi2_ack_module_razwi_event_handler(hdev, RAZWI_MME, mme_index, MME_WAP0, event_mask); 8290 8148 gaudi2_ack_module_razwi_event_handler(hdev, RAZWI_MME, mme_index, MME_WAP1, event_mask); 8149 + hl_check_for_glbl_errors(hdev); 8291 8150 8292 8151 WREG32(sts_clr_addr, sts_clr_val); 8293 8152 ··· 8313 8170 error_count++; 8314 8171 } 8315 8172 8173 + hl_check_for_glbl_errors(hdev); 8174 + 8316 8175 return error_count; 8317 8176 } 8318 8177 ··· 8330 8185 "err cause: %s", gaudi2_dma_core_interrupts_cause[i]); 8331 8186 error_count++; 8332 8187 } 8188 + 8189 + hl_check_for_glbl_errors(hdev); 8333 8190 8334 8191 return error_count; 8335 8192 } ··· 8385 8238 8386 8239 switch (intr_cause_data & BIT_ULL(i)) { 8387 8240 case PCIE_WRAP_PCIE_IC_SEI_INTR_IND_AXI_LBW_ERR_INTR_MASK: 8241 + hl_check_for_glbl_errors(hdev); 8388 8242 break; 8389 8243 case PCIE_WRAP_PCIE_IC_SEI_INTR_IND_BAD_ACCESS_INTR_MASK: 8390 8244 gaudi2_print_pcie_mstr_rr_mstr_if_razwi_info(hdev, event_mask); ··· 8560 8412 WREG32(cq_intr_addr, 0); 8561 8413 } 8562 8414 8415 + hl_check_for_glbl_errors(hdev); 8416 + 8563 8417 return error_count; 8564 8418 } 8565 8419 ··· 8616 8466 8617 8467 error_count = gaudi2_handle_mmu_spi_sei_generic(hdev, event_type, mmu_base, 8618 8468 is_pmmu, event_mask); 8469 + hl_check_for_glbl_errors(hdev); 8619 8470 8620 8471 return error_count; 8621 8472 } ··· 8942 8791 error_count++; 8943 8792 } 8944 8793 } 8794 + 8795 + hl_check_for_glbl_errors(hdev); 8945 8796 8946 8797 return error_count; 8947 8798 }
+37
drivers/accel/habanalabs/gaudi2/gaudi2P.h
··· 240 240 #define GAUDI2_SOB_INCREMENT_BY_ONE (FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_SOB_OBJ_VAL_MASK, 1) | \ 241 241 FIELD_PREP(DCORE0_SYNC_MNGR_OBJS_SOB_OBJ_INC_MASK, 1)) 242 242 243 + #define GAUDI2_NUM_OF_GLBL_ERR_CAUSE 8 244 + 243 245 enum gaudi2_reserved_sob_id { 244 246 GAUDI2_RESERVED_SOB_CS_COMPLETION_FIRST, 245 247 GAUDI2_RESERVED_SOB_CS_COMPLETION_LAST = ··· 532 530 u32 events_stat[GAUDI2_EVENT_SIZE]; 533 531 u32 events_stat_aggregate[GAUDI2_EVENT_SIZE]; 534 532 u32 num_of_valid_hw_events; 533 + }; 534 + 535 + /* 536 + * Types of the Gaudi2 IP blocks, used by special blocks iterator. 537 + * Required for scenarios where only particular block types can be 538 + * addressed (e.g., special PLDM images). 539 + */ 540 + enum gaudi2_block_types { 541 + GAUDI2_BLOCK_TYPE_PLL, 542 + GAUDI2_BLOCK_TYPE_RTR, 543 + GAUDI2_BLOCK_TYPE_CPU, 544 + GAUDI2_BLOCK_TYPE_HIF, 545 + GAUDI2_BLOCK_TYPE_HBM, 546 + GAUDI2_BLOCK_TYPE_NIC, 547 + GAUDI2_BLOCK_TYPE_PCIE, 548 + GAUDI2_BLOCK_TYPE_PCIE_PMA, 549 + GAUDI2_BLOCK_TYPE_PDMA, 550 + GAUDI2_BLOCK_TYPE_EDMA, 551 + GAUDI2_BLOCK_TYPE_PMMU, 552 + GAUDI2_BLOCK_TYPE_PSOC, 553 + GAUDI2_BLOCK_TYPE_ROT, 554 + GAUDI2_BLOCK_TYPE_ARC_FARM, 555 + GAUDI2_BLOCK_TYPE_DEC, 556 + GAUDI2_BLOCK_TYPE_MME, 557 + GAUDI2_BLOCK_TYPE_EU_BIST, 558 + GAUDI2_BLOCK_TYPE_SYNC_MNGR, 559 + GAUDI2_BLOCK_TYPE_STLB, 560 + GAUDI2_BLOCK_TYPE_TPC, 561 + GAUDI2_BLOCK_TYPE_HMMU, 562 + GAUDI2_BLOCK_TYPE_SRAM, 563 + GAUDI2_BLOCK_TYPE_XBAR, 564 + GAUDI2_BLOCK_TYPE_KDMA, 565 + GAUDI2_BLOCK_TYPE_XDMA, 566 + GAUDI2_BLOCK_TYPE_XFT, 567 + GAUDI2_BLOCK_TYPE_MAX 535 568 }; 536 569 537 570 extern const u32 gaudi2_dma_core_blocks_bases[DMA_CORE_ID_SIZE];
+157
drivers/accel/habanalabs/include/gaudi2/gaudi2_special_blocks.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 2 + * 3 + * Copyright 2022 HabanaLabs, Ltd. 4 + * All Rights Reserved. 5 + */ 6 + 7 + /* 8 + * This file was generated automatically. 9 + * DON'T EDIT THIS FILE. 10 + */ 11 + 12 + #ifndef GAUDI2_SPECIAL_BLOCKS_H 13 + #define GAUDI2_SPECIAL_BLOCKS_H 14 + 15 + #define GAUDI2_SPECIAL_BLOCKS { \ 16 + { GAUDI2_BLOCK_TYPE_TPC, 0xfc008000, 4, 6, 0, 0x200000, 0x10000, 0x0 }, \ 17 + { GAUDI2_BLOCK_TYPE_TPC, 0xfc00a000, 4, 6, 0, 0x200000, 0x10000, 0x0 }, \ 18 + { GAUDI2_BLOCK_TYPE_TPC, 0xfc00b000, 4, 6, 0, 0x200000, 0x10000, 0x0 }, \ 19 + { GAUDI2_BLOCK_TYPE_TPC, 0xfc00c000, 4, 6, 0, 0x200000, 0x10000, 0x0 }, \ 20 + { GAUDI2_BLOCK_TYPE_HMMU, 0xfc080000, 4, 4, 0, 0x200000, 0x10000, 0x0 }, \ 21 + { GAUDI2_BLOCK_TYPE_HMMU, 0xfc081000, 4, 4, 0, 0x200000, 0x10000, 0x0 }, \ 22 + { GAUDI2_BLOCK_TYPE_HMMU, 0xfc083000, 4, 4, 0, 0x200000, 0x10000, 0x0 }, \ 23 + { GAUDI2_BLOCK_TYPE_HMMU, 0xfc084000, 4, 4, 0, 0x200000, 0x10000, 0x0 }, \ 24 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0c8000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 25 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0c9000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 26 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0ca000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 27 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0cb000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 28 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0cc000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 29 + { GAUDI2_BLOCK_TYPE_EU_BIST, 0xfc0cd000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 30 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0ce000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 31 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0cf000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 32 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0d0000, 4, 5, 0, 0x200000, 0x8000, 0x0 }, \ 33 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0d1000, 4, 5, 0, 0x200000, 0x8000, 0x0 }, \ 34 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0f8000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 35 + { GAUDI2_BLOCK_TYPE_MME, 0xfc0f9000, 4, 2, 0, 0x200000, 0x1000, 0x0 }, \ 36 + { GAUDI2_BLOCK_TYPE_SYNC_MNGR, 0xfc11e000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 37 + { GAUDI2_BLOCK_TYPE_SYNC_MNGR, 0xfc11f000, 4, 0, 0, 0x200000, 0x0, 0x0 }, \ 38 + { GAUDI2_BLOCK_TYPE_HIF, 0xfc120000, 4, 4, 0, 0x200000, 0x4000, 0x0 }, \ 39 + { GAUDI2_BLOCK_TYPE_RTR, 0xfc140000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 40 + { GAUDI2_BLOCK_TYPE_RTR, 0xfc141000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 41 + { GAUDI2_BLOCK_TYPE_RTR, 0xfc142000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 42 + { GAUDI2_BLOCK_TYPE_RTR, 0xfc143000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 43 + { GAUDI2_BLOCK_TYPE_RTR, 0xfc144000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 44 + { GAUDI2_BLOCK_TYPE_RTR, 0xfc145000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 45 + { GAUDI2_BLOCK_TYPE_SRAM, 0xfc180000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 46 + { GAUDI2_BLOCK_TYPE_RTR, 0xfc181000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 47 + { GAUDI2_BLOCK_TYPE_SRAM, 0xfc182000, 4, 8, 0, 0x200000, 0x8000, 0x0 }, \ 48 + { GAUDI2_BLOCK_TYPE_EDMA, 0xfc1c8000, 4, 2, 0, 0x200000, 0x10000, 0x0 }, \ 49 + { GAUDI2_BLOCK_TYPE_EDMA, 0xfc1ca000, 4, 2, 0, 0x200000, 0x10000, 0x0 }, \ 50 + { GAUDI2_BLOCK_TYPE_EDMA, 0xfc1cb000, 4, 2, 0, 0x200000, 0x10000, 0x0 }, \ 51 + { GAUDI2_BLOCK_TYPE_EDMA, 0xfc1cc000, 4, 2, 0, 0x200000, 0x10000, 0x0 }, \ 52 + { GAUDI2_BLOCK_TYPE_DEC, 0xfc1e3000, 4, 2, 0, 0x200000, 0x10000, 0x0 }, \ 53 + { GAUDI2_BLOCK_TYPE_DEC, 0xfc1e4000, 4, 2, 0, 0x200000, 0x10000, 0x0 }, \ 54 + { GAUDI2_BLOCK_TYPE_DEC, 0xfc1e5000, 4, 2, 0, 0x200000, 0x10000, 0x0 }, \ 55 + { GAUDI2_BLOCK_TYPE_PCIE, 0xfcc01000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 56 + { GAUDI2_BLOCK_TYPE_PCIE, 0xfcc04000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 57 + { GAUDI2_BLOCK_TYPE_PCIE, 0xfcc07000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 58 + { GAUDI2_BLOCK_TYPE_PCIE, 0xfcc10000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 59 + { GAUDI2_BLOCK_TYPE_PCIE, 0xfcc14000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 60 + { GAUDI2_BLOCK_TYPE_PCIE, 0xfcc15000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 61 + { GAUDI2_BLOCK_TYPE_PCIE, 0xfcc16000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 62 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc4a000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 63 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc4b000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 64 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc4e000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 65 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc4f000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 66 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc53000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 67 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc54000, 2, 0, 0, 0x1000, 0x0, 0x0 }, \ 68 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc58000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 69 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc59000, 2, 0, 0, 0x3000, 0x0, 0x0 }, \ 70 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc5a000, 2, 0, 0, 0x3000, 0x0, 0x0 }, \ 71 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc5b000, 2, 0, 0, 0x3000, 0x0, 0x0 }, \ 72 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc60000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 73 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc61000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 74 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc62000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 75 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc63000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 76 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc64000, 3, 0, 0, 0x1000, 0x0, 0x0 }, \ 77 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcc6c000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 78 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcc6d000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 79 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcc6e000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 80 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc74000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 81 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc76000, 3, 0, 0, 0x1000, 0x0, 0x0 }, \ 82 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc79000, 2, 0, 0, 0x1000, 0x0, 0x0 }, \ 83 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc7b000, 3, 0, 0, 0x1000, 0x0, 0x0 }, \ 84 + { GAUDI2_BLOCK_TYPE_PSOC, 0xfcc7f000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 85 + { GAUDI2_BLOCK_TYPE_PDMA, 0xfcc88000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 86 + { GAUDI2_BLOCK_TYPE_PDMA, 0xfcc8a000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 87 + { GAUDI2_BLOCK_TYPE_PDMA, 0xfcc8b000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 88 + { GAUDI2_BLOCK_TYPE_PDMA, 0xfcc8c000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 89 + { GAUDI2_BLOCK_TYPE_CPU, 0xfccc0000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 90 + { GAUDI2_BLOCK_TYPE_CPU, 0xfccc1000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 91 + { GAUDI2_BLOCK_TYPE_CPU, 0xfccc3000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 92 + { GAUDI2_BLOCK_TYPE_PMMU, 0xfcd00000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 93 + { GAUDI2_BLOCK_TYPE_PMMU, 0xfcd01000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 94 + { GAUDI2_BLOCK_TYPE_PMMU, 0xfcd02000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 95 + { GAUDI2_BLOCK_TYPE_PMMU, 0xfcd03000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 96 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd04000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 97 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd05000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 98 + { GAUDI2_BLOCK_TYPE_XBAR, 0xfcd40000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 99 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd41000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 100 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd42000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 101 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd43000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 102 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd44000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 103 + { GAUDI2_BLOCK_TYPE_XBAR, 0xfcd48000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 104 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd55000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 105 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd64000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 106 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd65000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 107 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcd74000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 108 + { GAUDI2_BLOCK_TYPE_ROT, 0xfce08000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 109 + { GAUDI2_BLOCK_TYPE_ROT, 0xfce0a000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 110 + { GAUDI2_BLOCK_TYPE_ROT, 0xfce0b000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 111 + { GAUDI2_BLOCK_TYPE_ROT, 0xfce0c000, 2, 0, 0, 0x10000, 0x0, 0x0 }, \ 112 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce40000, 4, 2, 0, 0x10000, 0x4000, 0x0 }, \ 113 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce41000, 4, 2, 0, 0x10000, 0x4000, 0x0 }, \ 114 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce42000, 4, 2, 0, 0x10000, 0x4000, 0x0 }, \ 115 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce43000, 4, 2, 0, 0x10000, 0x4000, 0x0 }, \ 116 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce48000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 117 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce49000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 118 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce4a000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 119 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce4b000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 120 + { GAUDI2_BLOCK_TYPE_RTR, 0xfce4c000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 121 + { GAUDI2_BLOCK_TYPE_ARC_FARM, 0xfce81000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 122 + { GAUDI2_BLOCK_TYPE_ARC_FARM, 0xfce82000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 123 + { GAUDI2_BLOCK_TYPE_ARC_FARM, 0xfce88000, 4, 0, 0, 0x20000, 0x0, 0x0 }, \ 124 + { GAUDI2_BLOCK_TYPE_ARC_FARM, 0xfce89000, 4, 0, 0, 0x20000, 0x0, 0x0 }, \ 125 + { GAUDI2_BLOCK_TYPE_ARC_FARM, 0xfce8b000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 126 + { GAUDI2_BLOCK_TYPE_ARC_FARM, 0xfce8c000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 127 + { GAUDI2_BLOCK_TYPE_ARC_FARM, 0xfce8f000, 4, 0, 0, 0x20000, 0x0, 0x0 }, \ 128 + { GAUDI2_BLOCK_TYPE_DEC, 0xfcf03000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 129 + { GAUDI2_BLOCK_TYPE_DEC, 0xfcf04000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 130 + { GAUDI2_BLOCK_TYPE_DEC, 0xfcf05000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 131 + { GAUDI2_BLOCK_TYPE_XFT, 0xfcf40000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 132 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcf41000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 133 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcf42000, 4, 0, 0, 0x10000, 0x0, 0x0 }, \ 134 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcf43000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 135 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcf53000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 136 + { GAUDI2_BLOCK_TYPE_PLL, 0xfcf73000, 1, 0, 0, 0x0, 0x0, 0x0 }, \ 137 + { GAUDI2_BLOCK_TYPE_HBM, 0xfd000000, 6, 2, 0, 0x80000, 0x20000, 0x0 }, \ 138 + { GAUDI2_BLOCK_TYPE_HBM, 0xfd001000, 6, 2, 8, 0x80000, 0x20000, 0x1000 }, \ 139 + { GAUDI2_BLOCK_TYPE_HBM, 0xfd009000, 6, 2, 0, 0x80000, 0x20000, 0x0 }, \ 140 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd400000, 12, 2, 15, 0x80000, 0x20000, 0x1000 }, \ 141 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd418000, 12, 2, 0, 0x80000, 0x20000, 0x0 }, \ 142 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd41a000, 12, 2, 0, 0x80000, 0x20000, 0x0 }, \ 143 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd41f000, 12, 2, 0, 0x80000, 0x20000, 0x0 }, \ 144 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd448000, 12, 0, 0, 0x80000, 0x0, 0x0 }, \ 145 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd449000, 12, 0, 0, 0x80000, 0x0, 0x0 }, \ 146 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd44a000, 12, 2, 0, 0x80000, 0x1000, 0x0 }, \ 147 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd44c000, 12, 2, 0, 0x80000, 0x1000, 0x0 }, \ 148 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd450000, 12, 2, 0, 0x80000, 0x1000, 0x0 }, \ 149 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd452000, 12, 2, 0, 0x80000, 0x1000, 0x0 }, \ 150 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd454000, 12, 0, 0, 0x80000, 0x0, 0x0 }, \ 151 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd455000, 12, 0, 0, 0x80000, 0x0, 0x0 }, \ 152 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd460000, 12, 0, 0, 0x80000, 0x0, 0x0 }, \ 153 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd468000, 12, 0, 0, 0x80000, 0x0, 0x0 }, \ 154 + { GAUDI2_BLOCK_TYPE_NIC, 0xfd469000, 12, 0, 0, 0x80000, 0x0, 0x0 }, \ 155 + } 156 + 157 + #endif