soc/amd/picasso/soc_util: use cpuid_match
commitb6969db5c2313b60dcfe0c318c06e5b97780e880
authorFelix Held <felix-coreboot@felixheld.de>
Mon, 6 Feb 2023 18:47:11 +0000 (6 19:47 +0100)
committerFelix Held <felix-coreboot@felixheld.de>
Wed, 8 Feb 2023 15:49:48 +0000 (8 15:49 +0000)
treef11c6db6a4a38617fc3b39630b64b75abbc0707e
parente1a84db3e0aa2cd77a299bd86ba23dd0e3e9c038
soc/amd/picasso/soc_util: use cpuid_match

Now that there is a cpuid_match function, we can use it instead of doing
basically the same thing manually. In the functions is_fam17_1x and
is_fam17_2x both the stepping number and the lower nibble of the model
number are masked out. To avoid having magic constants in the code,
introduce the CPUID_ALL_STEPPINGS_AND_BASE_MODELS_MASK definition.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I758f9564c08c62c747cc4f93a8d6b540a1834a62
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72860
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
src/arch/x86/include/arch/cpu.h
src/soc/amd/picasso/soc_util.c