# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/linux/hotfix-i686-promotion.patch # Copyright (C) 2024 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- Promote 586 w/ all common 686 features: Transmeta Crusoe, AMD Geode LX (except long nop) to 686 for linux16 real-mode code path cpu feature validation. Just do not generate the later. Ironically, since a looong time, mainline upstream linux has NOPL disabled for all 32-bit builds anway, in kernel/cpu/common.c detect_nopl() and most users boot via the new, non linux16 boot protocol anway. static void detect_nopl(void) { #ifdef CONFIG_X86_32 setup_clear_cpu_cap(X86_FEATURE_NOPL); --- linux-6.8/arch/x86/boot/cpucheck.c.vanilla 2024-03-26 14:43:45.025312683 +0100 +++ linux-6.8/arch/x86/boot/cpucheck.c 2024-03-26 18:51:14.246564712 +0100 @@ -188,6 +190,16 @@ if (!err) err = check_knl_erratum(); + if (cpu.level < req_level) { +#define USER686 ((1 << X86_FEATURE_TSC)|\ + (1 << X86_FEATURE_CX8)|\ + (1 << X86_FEATURE_CMOV)) + + if (cpu.level == 5 && (cpu.flags[0] & USER686) == USER686) { + cpu.level = 6; + } + } + if (err_flags_ptr) *err_flags_ptr = err ? err_flags : NULL; if (cpu_level_ptr)