From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9788D3D2FF7 for ; Wed, 1 Apr 2026 09:17:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775035030; cv=none; b=BwQ99xJoMYTH5IZhXYhdalZEBDuC8SYFZNMnoiXxSAMbQYf76sPREly1YcJnMfRxnRpTAH40NTuuMz+8lB/ssXF7r+9mbP+AzdJMkKcscxZmweJZPIgPXt6jHHgbkhIIJ+Vke2N0dyVDFnyJ6U3uSwKgukT/rGTcN8LZ/eggV80= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775035030; c=relaxed/simple; bh=CexU7c/fsIHxkOA+v6mhvVfQwMNC5SKpJ8twVWbQRV4=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BJ8yfxHJoAqqK3ELUE2ZGzT84mlxLYk2W2rF2Qb5HtFCIZ58djqTqQEfsWXEGE7WkFvfESTq+UUoeMPEcNxkPK7tk5a5mt1VMB1yVhuA4rF4WCWAydoXib0p8QleeZTAGGt2tkt+Wpg6HD4SCq2DYH6esX1OhYyIV2MrmYWQGqY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=HJ5Ah+5e; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=PRsrzLiG; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=MtkEwLSP; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=MgMbS4Zl; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="HJ5Ah+5e"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="PRsrzLiG"; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="MtkEwLSP"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="MgMbS4Zl" Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 274F15BD4E; Wed, 1 Apr 2026 09:17:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1775035024; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kaXpdIdM3YnJsN37+hOVhe1OjN4TttGhCeeoJeK+tAE=; b=HJ5Ah+5et7DKVWu8zhrxfj4LKDL92/V5FOfqLqcfE60rnxPmXnT6TaGRBqXOlP2csmxmeq EQvfis56kIxGjL3z5lCkxriLbz7WPaZqTDx8ADOZY1D70PyhKiHck/lnTYvv9NRWM1nIfa rHj6Y1NKGv1RN8GW6oasmPyT/zq+DR4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1775035024; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kaXpdIdM3YnJsN37+hOVhe1OjN4TttGhCeeoJeK+tAE=; b=PRsrzLiGbE2Em2sQA3HFqKhysUxEZyWbZCUmyZT+KZWqQNq2mzXE2R3fqGRZLt1AFT+0kF VHSvsLqPklYYsiAQ== Authentication-Results: smtp-out2.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=MtkEwLSP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=MgMbS4Zl DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1775035023; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kaXpdIdM3YnJsN37+hOVhe1OjN4TttGhCeeoJeK+tAE=; b=MtkEwLSPZSDuqTYDgNxtStNPJrTFbHp3C9bpzoWcmEp9IPigOJUYXGAQbLHU0PCbNTC0ae /TF3N+lMjiug2QZjRKrEkSHsPRG0BoUB6jcUGlQ855DgKO4dwoxZcS4Dj9vGppMx/46YLq d7a9gYVSwYLu5qP+y5croHfkPv8Of44= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1775035023; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kaXpdIdM3YnJsN37+hOVhe1OjN4TttGhCeeoJeK+tAE=; b=MgMbS4ZlllDpHCll5pA4djtTE8/zmGtu41QskF5B/m//8ux+j+cxW2VqoFhSLfux53KTVy qc18yN86Rlc4t7AQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id DC9414A0B0; Wed, 1 Apr 2026 09:17:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id ss3qM47izGmeOQAAD6G6ig (envelope-from ); Wed, 01 Apr 2026 09:17:02 +0000 Date: Wed, 1 Apr 2026 11:17:01 +0200 From: Jean Delvare To: "Mario Limonciello (AMD)" Cc: Yazen Ghannam , linux-kernel@vger.kernel.org, Borislav Petkov Subject: Re: [PATCH v6 5/5] x86/CPU/AMD: Print AGESA string from DMI additional information entry Message-ID: <20260401111701.536cfda1@endymion> In-Reply-To: <20260307141024.819807-6-superm1@kernel.org> References: <20260307141024.819807-1-superm1@kernel.org> <20260307141024.819807-6-superm1@kernel.org> Organization: SUSE Linux X-Mailer: Claws Mail 4.2.0 (GTK 3.24.43; x86_64-suse-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Action: no action X-Rspamd-Server: rspamd2.dmz-prg2.suse.org X-Spamd-Result: default: False [-4.01 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_NOT_FQDN(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:104:10:150:64:97:from]; MIME_TRACE(0.00)[0:+]; FUZZY_RATELIMITED(0.00)[rspamd.com]; TO_DN_SOME(0.00)[]; HAS_ORG_HEADER(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b281:104:10:150:64:97:from]; DNSWL_BLOCKED(0.00)[2a07:de40:b281:104:10:150:64:97:from,2a07:de40:b281:106:10:150:64:167:received]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b281:106:10:150:64:167:received]; RCPT_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[suse.de:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[amd.com:email,imap1.dmz-prg2.suse.org:helo,imap1.dmz-prg2.suse.org:rdns,suse.de:dkim,suse.de:email] X-Rspamd-Queue-Id: 274F15BD4E X-Spam-Flag: NO X-Spam-Score: -4.01 X-Spam-Level: On Sat, 7 Mar 2026 08:10:24 -0600, Mario Limonciello (AMD) wrote: > From: Yazen Ghannam > > Type 40 entries (Additional Information) are summarized in section 7.41 > as part of the SMBIOS specification. Generally, these entries aren't > interesting to save. > > However on some AMD Zen systems, the AGESA version is stored here. This > is useful to save to the kernel message logs for debugging. It can be > used to cross-reference issues. > > Implement an iterator for the Additional Information entries. Use this > to find and print the AGESA string. Do so in AMD code, since the use > case is AMD-specific. > > Signed-off-by: Yazen Ghannam > Co-developed-by: "Mario Limonciello (AMD)" > Signed-off-by: "Mario Limonciello (AMD)" Looks good to me. Reviewed-by: Jean Delvare I only have one question: > (...) > --- a/arch/x86/kernel/cpu/amd.c > +++ b/arch/x86/kernel/cpu/amd.c > (...) > +static void __init dmi_scan_additional(const struct dmi_header *d, void *p) > +{ > + struct dmi_a_info *info = (struct dmi_a_info *)d; > + void *next, *end; > + > + if (!IS_ENABLED(CONFIG_DMI)) > + return; > + > + if (info->header.type != DMI_ENTRY_ADDITIONAL || > + info->header.length < DMI_A_INFO_MIN_SIZE || > + info->count < 1) > + return; > + > + next = (void *)(info + 1); > + end = (void *)info + info->header.length; > + > + do { > + struct dmi_a_info_entry *entry; > + const char *string_ptr; > + > + entry = (struct dmi_a_info_entry *)next; > + > + /* > + * Not much can be done to validate data. At least the entry > + * length shouldn't be 0. > + */ > + if (!entry->length) > + return; > + > + string_ptr = dmi_string_nosave(&info->header, entry->str_num); > + > + /* Sample string: AGESA!V9 StrixKrackanPI-FP8 1.1.0.0c */ > + if (!strncmp(string_ptr, "AGESA!V9", 8) && strlen(string_ptr) > 9) { Isn't "V9" going to become "V10" at some point in the future, and then the AGESA string will no longer be displayed until the code is adjusted? Or will AMD move the information to a more appropriate place by then? Also, I know this was discussed before, but the current print strategy omits "V9". Is this not something we are going to regret once more versions are available and we may have to differentiate between them? > + pr_info("AGESA: %s\n", string_ptr + 9); > + break; > + } > + > + next += entry->length; > + } while (end - next >= DMI_A_INFO_ENT_MIN_SIZE); > +} -- Jean Delvare SUSE L3 Support