aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/x86/base-files
diff options
context:
space:
mode:
authorJohn Crispin <john@phrozen.org>2018-11-27 18:58:35 +0100
committerJohn Crispin <john@phrozen.org>2018-11-27 18:58:35 +0100
commit8ead5a735df6b999c8853f0bdad81164b1a0917b (patch)
treebb3e80c8d80362a7ef6915d7d1d4d81e8f29318f /target/linux/x86/base-files
parent30f30d3e11785efa23a2d4c61c0eb6f901c58ef3 (diff)
downloadupstream-8ead5a735df6b999c8853f0bdad81164b1a0917b.tar.gz
upstream-8ead5a735df6b999c8853f0bdad81164b1a0917b.tar.bz2
upstream-8ead5a735df6b999c8853f0bdad81164b1a0917b.zip
Revert "x86: add amd microcode entries to grub config"
This reverts commit a822283c7e56bb3b409712e0eb9af5a91aac247d. Signed-off-by: John Crispin <john@phrozen.org>
Diffstat (limited to 'target/linux/x86/base-files')
-rw-r--r--target/linux/x86/base-files/lib/preinit/02_load_x86_ucode12
1 files changed, 12 insertions, 0 deletions
diff --git a/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode
new file mode 100644
index 0000000000..d3a23e24b2
--- /dev/null
+++ b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode
@@ -0,0 +1,12 @@
+#!/bin/sh
+# Copyright (C) 2018 OpenWrt.org
+
+do_load_x86_ucode() {
+ if grep -q AuthenticAMD /proc/cpuinfo; then
+ if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then
+ echo 1 > /sys/devices/system/cpu/microcode/reload
+ fi
+ fi
+}
+
+boot_hook_add preinit_main do_load_x86_ucode