Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix AMD Microcode Check #285

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions perl/lib/NeedRestart/uCode.pm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ my $LOGPREF = '[ucode]';
sub compare_ucode_versions {
my ($debug, $processor, %vars) = @_;

print STDERR "$LOGPREF DEBUG: ", join(", ", map { "$_ => $vars{$_}" } keys %vars), "\n", if ($debug);

unless ( exists( $vars{CURRENT} ) && exists( $vars{AVAIL} ) ) {
print STDERR
"$LOGPREF #$processor did not get current microcode version\n"
Expand Down
4 changes: 4 additions & 0 deletions perl/lib/NeedRestart/uCode/AMD.pm
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ sub nr_ucode_check_real {
print STDERR "$LOGPREF #$info->{processor} found ucode $vars{AVAIL}\n" if ($debug);
}
}
elsif (keys %{ $_ucodes->{cpuid} } > 0) {
printf( STDERR "$LOGPREF Found microcode, but no matching cpuid for #$info->{processor} 0x%08x\n", $cpuid ) if ($debug);
$vars{AVAIL} = 0;
}

return %vars;
}
Expand Down