1
0
mirror of https://github.com/speed47/spectre-meltdown-checker synced 2024-06-01 10:55:21 +02:00

Compare commits

...

2 Commits

Author SHA1 Message Date
Stéphane Lesimple
c8cdfd54da chore: fwdb: update to v165.20201021+i20200616 2020-11-08 21:25:18 +01:00
Stéphane Lesimple
f0c33c7a32 fix: fwdb: use the commit date as the intel fwdb version
fixes #379
2020-11-08 21:25:18 +01:00

View File

@ -888,6 +888,8 @@ update_fwdb()
echo ERROR "downloaded file seems invalid"
return 1
fi
sqlite3 "$mcedb_tmp" "alter table Intel add column origin text"
sqlite3 "$mcedb_tmp" "update Intel set origin='mce'"
echo OK "MCExtractor database revision $mcedb_revision dated $mcedb_date"
@ -925,10 +927,17 @@ update_fwdb()
_version=$(echo "$_line" | awk '{print $8}')
_version=$(( _version ))
_version=$(printf "0x%08X" "$_version")
_sqlstm="$(printf "INSERT INTO Intel (cpuid,version,yyyymmdd) VALUES (\"%s\",\"%s\",\"%s\");" "$(printf "%08X" "$_cpuid")" "$(printf "%08X" "$_version")" "$_date")"
_sqlstm="$(printf "INSERT INTO Intel (origin,cpuid,version,yyyymmdd) VALUES (\"%s\",\"%s\",\"%s\",\"%s\");" "intel" "$(printf "%08X" "$_cpuid")" "$(printf "%08X" "$_version")" "$_date")"
sqlite3 "$mcedb_tmp" "$_sqlstm"
done
_intel_latest_date=$(sqlite3 "$mcedb_tmp" "SELECT yyyymmdd from Intel ORDER BY yyyymmdd DESC LIMIT 1;")
_intel_timestamp=$(stat -c %Y "$intel_tmp/Intel-Linux-Processor-Microcode-Data-Files-main/license" 2>/dev/null)
if [ -n "$_intel_timestamp" ]; then
# use this date, it matches the last commit date
_intel_latest_date=$(date +%Y%m%d -d @"$_intel_timestamp")
else
echo "Falling back to the latest microcode date"
_intel_latest_date=$(sqlite3 "$mcedb_tmp" "SELECT yyyymmdd from Intel WHERE origin = 'intel' ORDER BY yyyymmdd DESC LIMIT 1;")
fi
echo DONE "(version $_intel_latest_date)"
dbdate=$(echo "$mcedb_date" | tr -d '/')
@ -5553,7 +5562,7 @@ exit 0 # ok
# The builtin version follows, but the user can download an up-to-date copy (to be stored in his $HOME) by using --update-fwdb
# To update the builtin version itself (by *modifying* this very file), use --update-builtin-fwdb
# %%% MCEDB v163.20200930+i20200904
# %%% MCEDB v165.20201021+i20200616
# I,0x00000611,0x00000B27,19961218
# I,0x00000612,0x000000C6,19961210
# I,0x00000616,0x000000C6,19961210
@ -5827,12 +5836,12 @@ exit 0 # ok
# I,0x000706E2,0x00000042,20190420
# I,0x000706E3,0x81000008,20181002
# I,0x000706E4,0x00000046,20190905
# I,0x000706E5,0x0000009E,20200722
# I,0x000706E5,0x000000A0,20200730
# I,0x00080650,0x00000018,20180108
# I,0x000806A0,0x00000010,20190507
# I,0x000806A1,0x00000027,20200612
# I,0x000806A1,0x00000028,20200626
# I,0x000806C0,0x00000068,20200402
# I,0x000806C1,0x00000060,20200904
# I,0x000806C1,0x00000066,20200925
# I,0x000806D0,0x0000002E,20200709
# I,0x000806E9,0x000000DE,20200527
# I,0x000806EA,0x000000E0,20200617
@ -5846,12 +5855,12 @@ exit 0 # ok
# I,0x000906ED,0x000000DE,20200524
# I,0x000A0650,0x000000BE,20191010
# I,0x000A0651,0x000000C2,20191113
# I,0x000A0652,0x000000DE,20200607
# I,0x000A0653,0x000000DE,20200607
# I,0x000A0652,0x000000E0,20200708
# I,0x000A0653,0x000000E0,20200708
# I,0x000A0654,0x000000C6,20200123
# I,0x000A0655,0x000000DE,20200607
# I,0x000A0660,0x000000DE,20200607
# I,0x000A0661,0x000000DE,20200607
# I,0x000A0655,0x000000E2,20200914
# I,0x000A0660,0x000000E0,20200708
# I,0x000A0661,0x000000E0,20200702
# I,0x000A0670,0x00000002,20200304
# I,0x000A0680,0x80000002,20200121
# A,0x00000F00,0x02000008,20070614
@ -5943,4 +5952,4 @@ exit 0 # ok
# A,0x00A00F10,0x0A00100F,20200624
# A,0x00A20F00,0x0A200025,20200121
# A,0x00A20F10,0x0A201009,20200821
# A,0x00A50F00,0x0A500008,20200710
# A,0x00A50F00,0x0A50000B,20200821