[openwrt/openwrt] x86: add preinit hook to reload microcode

LEDE Commits lede-commits at lists.infradead.org
Sun Feb 11 05:39:43 PST 2018


wigyori pushed a commit to openwrt/openwrt.git, branch master:
https://git.lede-project.org/1ba6d59f2bbfbb7d7780b9d09a1f60c8c012ea1c

commit 1ba6d59f2bbfbb7d7780b9d09a1f60c8c012ea1c
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sat Feb 10 19:16:37 2018 +0100

    x86: add preinit hook to reload microcode
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/x86/base-files/lib/preinit/02_load_x86_ucode | 10 ++++++++++
 1 file changed, 10 insertions(+)

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 0000000..fb309c7
--- /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



More information about the lede-commits mailing list