// SPDX-License-Identifier: GPL-2.0-or-later /* * AMD Address Translation Library * * dehash.c : Functions to account for hashing bits * * Copyright (c) 2023, Advanced Micro Devices, Inc. * All Rights Reserved. * * Author: Yazen Ghannam <[email protected]> */ #include "internal.h" static int df2_dehash_addr(struct addr_ctx *ctx) { … } static int df3_dehash_addr(struct addr_ctx *ctx) { … } static int df3_6chan_dehash_addr(struct addr_ctx *ctx) { … } static int df4_dehash_addr(struct addr_ctx *ctx) { … } static int df4p5_dehash_addr(struct addr_ctx *ctx) { … } /* * MI300 hash bits * 4K 64K 2M 1G 1T 1T * COH_ST_Select[0] = XOR of addr{8, 12, 15, 22, 29, 36, 43} * COH_ST_Select[1] = XOR of addr{9, 13, 16, 23, 30, 37, 44} * COH_ST_Select[2] = XOR of addr{10, 14, 17, 24, 31, 38, 45} * COH_ST_Select[3] = XOR of addr{11, 18, 25, 32, 39, 46} * COH_ST_Select[4] = XOR of addr{14, 19, 26, 33, 40, 47} aka Stack * DieID[0] = XOR of addr{12, 20, 27, 34, 41 } * DieID[1] = XOR of addr{13, 21, 28, 35, 42 } */ static int mi300_dehash_addr(struct addr_ctx *ctx) { … } int dehash_address(struct addr_ctx *ctx) { … }