struct df4p5_denorm_ctx { /* Indicates the number of "lost" bits. This will be 1, 2, or 3. */
u8 perm_shift;
/* A mask indicating the bits that need to be rehashed. */
u16 rehash_vector;
/* * Represents the value that the high bits of the normalized address * are divided by during normalization. This value will be 3 for * interleave modes with a number of channels divisible by 3 or the * value will be 5 for interleave modes with a number of channels * divisible by 5. Power-of-two interleave modes are handled * separately.
*/
u8 mod_value;
/* * Represents the bits that can be directly pulled from the normalized * address. In each case, pass through bits [7:0] of the normalized * address. The other bits depend on the interleave bit position which * will be bit 10 for 1K interleave stripe cases and bit 11 for 2K * interleave stripe cases.
*/
u64 base_denorm_addr;
/* * Represents the high bits of the physical address that have been * divided by the mod_value.
*/
u64 div_addr;
/* * These masks operate on the 16-bit Coherent Station IDs, * e.g. Instance, Fabric, Destination, etc.
*/
u16 component_id_mask;
u16 die_id_mask;
u16 node_id_mask;
u16 socket_id_mask;
/* * Least-significant bit of Node ID portion of the * system-wide Coherent Station Fabric ID.
*/
u8 node_id_shift;
/* * Least-significant bit of Die portion of the Node ID. * Adjusted to include the Node ID shift in order to apply * to the Coherent Station Fabric ID.
*/
u8 die_id_shift;
/* * Least-significant bit of Socket portion of the Node ID. * Adjusted to include the Node ID shift in order to apply * to the Coherent Station Fabric ID.
*/
u8 socket_id_shift;
/* Number of DRAM Address maps visible in a Coherent Station. */
u8 num_coh_st_maps;
u32 dram_hole_base;
/* Global flags to handle special cases. */ struct df_flags flags;
};
externstruct df_config df_cfg;
struct dram_addr_map { /* * Each DRAM Address Map can operate independently * in different interleaving modes.
*/ enum intlv_modes intlv_mode;
/* System-wide number for this address map. */
u8 num;
/* * Logical to Physical Coherent Station Remapping array * * Index: Logical Coherent Station Instance ID * Value: Physical Coherent Station Instance ID * * phys_coh_st_inst_id = remap_array[log_coh_st_inst_id]
*/
u8 remap_array[MAX_COH_ST_CHANNELS];
/* * Number of bits covering DRAM Address map 0 * when interleaving is non-power-of-2. * * Used only for DF3_6CHAN.
*/
u8 np2_bits;
/* Position of the 'interleave bit'. */
u8 intlv_bit_pos; /* Number of channels interleaved in this map. */
u8 num_intlv_chan; /* Number of dies interleaved in this map. */
u8 num_intlv_dies; /* Number of sockets interleaved in this map. */
u8 num_intlv_sockets; /* * Total number of channels interleaved accounting * for die and socket interleaving.
*/
u8 total_intlv_chan; /* Total bits needed to cover 'total_intlv_chan'. */
u8 total_intlv_bits;
};
/* * Make a gap in @data that is @num_bits long starting at @bit_num. * e.g. data = 11111111'b * bit_num = 3 * num_bits = 2 * result = 1111100111'b
*/ staticinline u64 expand_bits(u8 bit_num, u8 num_bits, u64 data)
{
u64 temp1, temp2;
if (!num_bits) return data;
if (!bit_num) {
WARN_ON_ONCE(num_bits >= BITS_PER_LONG); return data << num_bits;
}
WARN_ON_ONCE(bit_num >= BITS_PER_LONG);
temp1 = data & GENMASK_ULL(bit_num - 1, 0);
temp2 = data & GENMASK_ULL(63, bit_num);
temp2 <<= num_bits;
return temp1 | temp2;
}
/* * Remove bits in @data between @low_bit and @high_bit inclusive. * e.g. data = XXXYYZZZ'b * low_bit = 3 * high_bit = 4 * result = XXXZZZ'b
*/ staticinline u64 remove_bits(u8 low_bit, u8 high_bit, u64 data)
{
u64 temp1, temp2;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.