if (legacy_hole_en(&ctx) && !df_cfg.dram_hole_base) return -EINVAL;
if (determine_node_id(&ctx, socket_id, die_id)) return -EINVAL;
if (get_address_map(&ctx)) return -EINVAL;
if (denormalize_address(&ctx)) return -EINVAL;
if (!late_hole_remove(&ctx))
ctx.ret_addr = add_base_and_hole(&ctx, ctx.ret_addr);
if (dehash_address(&ctx)) return -EINVAL;
if (late_hole_remove(&ctx))
ctx.ret_addr = add_base_and_hole(&ctx, ctx.ret_addr);
if (addr_over_limit(&ctx)) return -EINVAL;
return ctx.ret_addr;
}
staticvoid check_for_legacy_df_access(void)
{ /* * All Zen-based systems before Family 19h use the legacy * DF Indirect Access (FICAA/FICAD) offsets.
*/ if (boot_cpu_data.x86 < 0x19) {
df_cfg.flags.legacy_ficaa = true; return;
}
/* All systems after Family 19h use the current offsets. */ if (boot_cpu_data.x86 > 0x19) return;
/* Some Family 19h systems use the legacy offsets. */ switch (boot_cpu_data.x86_model) { case 0x00 ... 0x0f: case 0x20 ... 0x5f:
df_cfg.flags.legacy_ficaa = true;
}
}
/* * This library provides functionality for AMD-based systems with a Data Fabric. * The set of systems with a Data Fabric is equivalent to the set of Zen-based systems * and the set of systems with the Scalable MCA feature at this time. However, these * are technically independent things. * * It's possible to match on the PCI IDs of the Data Fabric devices, but this will be * an ever expanding list. Instead, match on the SMCA and Zen features to cover all * relevant systems.
*/ staticconststruct x86_cpu_id amd_atl_cpuids[] = {
X86_MATCH_FEATURE(X86_FEATURE_SMCA, NULL),
X86_MATCH_FEATURE(X86_FEATURE_ZEN, NULL),
{ }
};
MODULE_DEVICE_TABLE(x86cpu, amd_atl_cpuids);
staticint __init amd_atl_init(void)
{ if (!x86_match_cpu(amd_atl_cpuids)) return -ENODEV;
if (!amd_nb_num()) return -ENODEV;
check_for_legacy_df_access();
if (get_df_system_info()) return -ENODEV;
/* Increment this module's recount so that it can't be easily unloaded. */
__module_get(THIS_MODULE);
amd_atl_register_decoder(convert_umc_mca_addr_to_sys_addr);
/* * Exit function is only needed for testing and debug. Module unload must be * forced to override refcount check.
*/ staticvoid __exit amd_atl_exit(void)
{
amd_atl_unregister_decoder();
}
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.