From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ED37832C950 for ; Mon, 15 Dec 2025 21:25:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765833933; cv=none; b=BQ0JbJ2gWPQNOWUf4XDnYmXzN3KB2qtoug7UvvzpHh9ybp9hAzw+9NsIBVZ2Q6J6G/ZtB97zpGWUjdPEPA9CCVfOk4QjVcdraH24k333zYYW5RVDu49ft8R2R/Wgx3bLtuzhoCEi7NwOfKyR5Qcfs9iENEE4B8EjccWlT/GjKV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1765833933; c=relaxed/simple; bh=DRJPcqv8vjBMlyMWzz+nmJcoXRCGYIVsQRvlXv4eClM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BhM3OGQW/1T5D5XMnep6YtCkpr3EULfLei6DbQYo6MQaqIfQ7GnfjqfspV0Vn0aLtfp+HfpCTCWuveGN6czQJ/RK17eDBbUnH6qHLFymSM+rOJIWlWLDX4Ykr72mt9NhIMkHVHas5Bv5SoEkQmOPI+U+nK2jXpcJavd9kpddXkU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=uEBQV4mq; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="uEBQV4mq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A3C3C116B1; Mon, 15 Dec 2025 21:25:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1765833932; bh=DRJPcqv8vjBMlyMWzz+nmJcoXRCGYIVsQRvlXv4eClM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=uEBQV4mqbV+uQmonNjwUitQtNK4mlh6d86Me7O/YJ377N3Zl88n2EfLYpWoMyAIuw RtytwTGQsYrlhKKOJYkFME18xl9ddBLScTLoDEnQSYscPCGFT1cIpqojSI2LtAoIaP jvwDRAXJhstSAb3t8gPzQ9vn65c1+BCBFCtbLoAPxIMcNV2gQjj/U/goXGne0iW78c LqObHdRK2rVa2GBFeTXZ6G5HiP8ZemlqoAVga+IVZtYHZ8O6QOYzBjBgEUMAtu+BrH Hl/tE6+JBEbI5hi4JY+RKN4Fv8JZr3Z/cP8FNq54HQBoJgxIrvwHHhsQnyK+9NCegD hI+fA+WphOpBA== Message-ID: <65cfc33d-cd8e-41d1-82b7-58a4fcb01207@kernel.org> Date: Mon, 15 Dec 2025 15:25:31 -0600 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 5/5] x86/amd_node: Output the AGESA version to the logs To: Yazen Ghannam Cc: "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Jean Delvare , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H . Peter Anvin" , linux-kernel@vger.kernel.org References: <20251214185309.152614-1-superm1@kernel.org> <20251214185309.152614-6-superm1@kernel.org> <20251215212338.GC355290@yaz-khff2.amd.com> Content-Language: en-US From: Mario Limonciello In-Reply-To: <20251215212338.GC355290@yaz-khff2.amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 12/15/25 3:23 PM, Yazen Ghannam wrote: > On Sun, Dec 14, 2025 at 12:53:09PM -0600, Mario Limonciello (AMD) wrote: >> On AMD Zen platforms that are running AGESA, there is sometimes >> DMI additional string for the AGESA version that can be helpful when >> debugging an issue. If this string is found output to kernel logs. >> >> Signed-off-by: Mario Limonciello (AMD) >> --- >> This is not strictly AMD node related; it was a proxy for a good location >> for the message late enough on boot and only run on AMD Zen machines. >> I'm open to other suggestions. > > Maybe do like print_s5_reset_status_mmio() with a late_initcall()? > > We could have an amd_zen_late_initcall() function in > arch/x86/kernel/cpu/amd.c that collects appropriate functions. > > We have two now: > - print_s5_reset_status_mmio() > - print_agesa_dmi_info() Good idea, that is a more logical location. Lemme try it out. > > Thanks, > Yazen > >> arch/x86/Kconfig | 1 + >> arch/x86/kernel/amd_node.c | 8 ++++++++ >> 2 files changed, 9 insertions(+) >> >> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig >> index 80527299f859a..eae139a91fb84 100644 >> --- a/arch/x86/Kconfig >> +++ b/arch/x86/Kconfig >> @@ -3116,6 +3116,7 @@ config AMD_NB >> config AMD_NODE >> def_bool y >> depends on CPU_SUP_AMD && PCI >> + select DMI >> >> endmenu >> >> diff --git a/arch/x86/kernel/amd_node.c b/arch/x86/kernel/amd_node.c >> index 3d0a4768d603c..575d727c5827e 100644 >> --- a/arch/x86/kernel/amd_node.c >> +++ b/arch/x86/kernel/amd_node.c >> @@ -9,6 +9,7 @@ >> */ >> >> #include >> +#include >> #include >> >> /* >> @@ -247,6 +248,7 @@ __setup("amd_smn_debugfs_enable", amd_smn_enable_dfs); >> static int __init amd_smn_init(void) >> { >> u16 count, num_roots, roots_per_node, node, num_nodes; >> + const struct dmi_device *dev = NULL; >> struct pci_dev *root; >> >> if (!cpu_feature_enabled(X86_FEATURE_ZEN)) >> @@ -310,6 +312,12 @@ static int __init amd_smn_init(void) >> >> smn_exclusive = true; >> >> + while ((dev = dmi_find_device(DMI_DEV_TYPE_ADDITIONAL, NULL, dev))) >> + if (!strncmp(dev->name, "AGESA", 5)) { >> + pr_info("%s\n", dev->name); >> + break; >> + } >> + >> return 0; >> } >> >> -- >> 2.43.0 >>