Attention is currently required from: Jason Glenesk, Matt DeVillier, Fred Reitberger.
Felix Held has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/72860 )
Change subject: soc/amd/picasso/soc_util: use cpuid_match ......................................................................
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.
Signed-off-by: Felix Held felix-coreboot@felixheld.de Change-Id: I758f9564c08c62c747cc4f93a8d6b540a1834a62 --- M src/soc/amd/picasso/soc_util.c 1 file changed, 18 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/60/72860/1
diff --git a/src/soc/amd/picasso/soc_util.c b/src/soc/amd/picasso/soc_util.c index bee42ac..41c2966 100644 --- a/src/soc/amd/picasso/soc_util.c +++ b/src/soc/amd/picasso/soc_util.c @@ -94,31 +94,28 @@ static bool is_fam17_1x(void) { /* mask lower model number nibble and stepping */ - return cpuid_eax(1) >> 8 == PICASSO_CPUID >> 8; + return cpuid_match(cpuid_eax(1), PICASSO_CPUID, 0xffffff00); }
static bool is_fam17_11(void) { - /* only mask stepping */ - return cpuid_eax(1) >> 4 == RAVEN1_CPUID >> 4; + return cpuid_match(cpuid_eax(1), RAVEN1_CPUID, CPUID_ALL_STEPPINGS_MASK); }
static bool is_fam17_18(void) { - /* only mask stepping */ - return cpuid_eax(1) >> 4 == PICASSO_CPUID >> 4; + return cpuid_match(cpuid_eax(1), PICASSO_CPUID, CPUID_ALL_STEPPINGS_MASK); }
static bool is_fam17_2x(void) { /* mask lower model number nibble and stepping */ - return cpuid_eax(1) >> 8 == RAVEN2_CPUID >> 8; + return cpuid_match(cpuid_eax(1), RAVEN2_CPUID, 0xffffff00); }
static bool is_fam17_20(void) { - /* only mask stepping */ - return cpuid_eax(1) >> 4 == RAVEN2_CPUID >> 4; + return cpuid_match(cpuid_eax(1), RAVEN2_CPUID, CPUID_ALL_STEPPINGS_MASK); }
enum silicon_type get_silicon_type(void)