From 1ba6d59f2bbfbb7d7780b9d09a1f60c8c012ea1c Mon Sep 17 00:00:00 2001 From: Zoltan HERPAI Date: Sat, 10 Feb 2018 19:16:37 +0100 Subject: x86: add preinit hook to reload microcode Signed-off-by: Zoltan HERPAI --- target/linux/x86/base-files/lib/preinit/02_load_x86_ucode | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 target/linux/x86/base-files/lib/preinit/02_load_x86_ucode (limited to 'target/linux') 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 -- cgit v1.2.3