linux/drivers/ras/amd/atl/map.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * AMD Address Translation Library
 *
 * map.c : Functions to read and decode DRAM address maps
 *
 * Copyright (c) 2023, Advanced Micro Devices, Inc.
 * All Rights Reserved.
 *
 * Author: Yazen Ghannam <[email protected]>
 */

#include "internal.h"

static int df2_get_intlv_mode(struct addr_ctx *ctx)
{}

static int df3_get_intlv_mode(struct addr_ctx *ctx)
{}

static int df3p5_get_intlv_mode(struct addr_ctx *ctx)
{}

static int df4_get_intlv_mode(struct addr_ctx *ctx)
{}

static int df4p5_get_intlv_mode(struct addr_ctx *ctx)
{}

static int get_intlv_mode(struct addr_ctx *ctx)
{}

static u64 get_hi_addr_offset(u32 reg_dram_offset)
{}

/*
 * Returns:	0 if offset is disabled.
 *		1 if offset is enabled.
 *		-EINVAL on error.
 */
static int get_dram_offset(struct addr_ctx *ctx, u64 *norm_offset)
{}

static int df3_6ch_get_dram_addr_map(struct addr_ctx *ctx)
{}

static int df2_get_dram_addr_map(struct addr_ctx *ctx)
{}

static int df3_get_dram_addr_map(struct addr_ctx *ctx)
{}

static int df4_get_dram_addr_map(struct addr_ctx *ctx)
{}

static int df4p5_get_dram_addr_map(struct addr_ctx *ctx)
{}

static int get_dram_addr_map(struct addr_ctx *ctx)
{}

static int get_coh_st_fabric_id(struct addr_ctx *ctx)
{}

static int find_normalized_offset(struct addr_ctx *ctx, u64 *norm_offset)
{}

static bool valid_map(struct addr_ctx *ctx)
{}

static int get_address_map_common(struct addr_ctx *ctx)
{}

static u8 get_num_intlv_chan(struct addr_ctx *ctx)
{}

static void calculate_intlv_bits(struct addr_ctx *ctx)
{}

static u8 get_intlv_bit_pos(struct addr_ctx *ctx)
{}

static u8 get_num_intlv_dies(struct addr_ctx *ctx)
{}

static u8 get_num_intlv_sockets(struct addr_ctx *ctx)
{}

static int get_global_map_data(struct addr_ctx *ctx)
{}

/*
 * Verify the interleave bits are correct in the different interleaving
 * settings.
 *
 * If @num_intlv_dies and/or @num_intlv_sockets are 1, it means the
 * respective interleaving is disabled.
 */
static inline bool map_bits_valid(struct addr_ctx *ctx, u8 bit1, u8 bit2,
				  u8 num_intlv_dies, u8 num_intlv_sockets)
{}

static int validate_address_map(struct addr_ctx *ctx)
{}

static void dump_address_map(struct dram_addr_map *map)
{}

int get_address_map(struct addr_ctx *ctx)
{}