x86: add preinit hook to reload microcode

Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
lede-17.01
Zoltan HERPAI 2018-02-10 19:16:37 +01:00
parent 681aaaf719
commit 571d3def6b
1 changed files with 10 additions and 0 deletions

View File

@ -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