aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorZoltan HERPAI <wigyori@uid0.hu>2018-02-10 19:16:37 +0100
committerZoltan HERPAI <wigyori@uid0.hu>2018-02-11 14:39:24 +0100
commit1ba6d59f2bbfbb7d7780b9d09a1f60c8c012ea1c (patch)
tree3870c3dda5127012fc3d2c57bed194a3e946807f /target
parent01020bc74d91a9e02adb6c0cc7bf71d7c446b60f (diff)
downloadupstream-1ba6d59f2bbfbb7d7780b9d09a1f60c8c012ea1c.tar.gz
upstream-1ba6d59f2bbfbb7d7780b9d09a1f60c8c012ea1c.tar.bz2
upstream-1ba6d59f2bbfbb7d7780b9d09a1f60c8c012ea1c.zip
x86: add preinit hook to reload microcode
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
Diffstat (limited to 'target')
-rw-r--r--target/linux/x86/base-files/lib/preinit/02_load_x86_ucode10
1 files changed, 10 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..fb309c75c1
--- /dev/null
+++ b/target/linux/x86/base-files/lib/preinit/02_load_x86_ucode
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Copyright (C) 2018 OpenWrt.org
+
+do_load_x86_ucode() {
+ if [ -e "/sys/devices/system/cpu/microcode/reload" ]; then
+ echo 1 > /sys/devices/system/cpu/microcode/reload
+ fi
+}
+
+boot_hook_add preinit_main do_load_x86_ucode