Several i586-class cpus supporting this instruction are missing from
the X86_CMPXCHG64 config group.
Using a configuration with either M586TSC or M586MMX currently sets
X86_MINIMUM_CPU_FAMILY=4 instead of the correct value 5.
Booting on an i486 it will fail to generate the "This kernel
requires an i586 CPU, but only detected an i486 CPU" message and
intentional halt as expected. It will instead just silently hang
when it hits i586-specific instructions.
The M586 cpu is not in this list because at least the Cyrix 5x86
lacks this instruction, and perhaps others.
Signed-off-by: Matthew Whitehead <[email protected]>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index 65a9a47..ec64aa7 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -374,7 +374,7 @@ config X86_TSC
config X86_CMPXCHG64
def_bool y
- depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM
+ depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586TSC || M586MMX || MATOM || MGEODE_LX || MGEODEGX1 || MK6 || MK7 || MK8
# this should be set for all -march=.. options where the compiler
# generates cmov.
--
1.8.3.1
The X86_P6_NOP config class leaves out many i686-class cpus. Instead,
explicitly enumerate all these cpus.
Using a configuration with M686 currently sets X86_MINIMUM_CPU_FAMILY=5
instead of the correct value 6.
Booting on an i586 it will fail to generate the "This kernel
requires an i686 CPU, but only detected an i586 CPU" message and
intentional halt as expected. It will instead just silently hang
when it hits i686-specific instructions.
Signed-off-by: Matthew Whitehead <[email protected]>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index ec64aa7..8b8d229 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -385,7 +385,7 @@ config X86_CMOV
config X86_MINIMUM_CPU_FAMILY
int
default "64" if X86_64
- default "6" if X86_32 && X86_P6_NOP
+ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
default "5" if X86_32 && X86_CMPXCHG64
default "4"
--
1.8.3.1
i586-class machines also lack support for Physical Address Extension (PAE),
so add them to the exclusion list
Signed-off-by: Matthew Whitehead <[email protected]>
---
arch/x86/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 423e4b6..c45fe6d 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1359,7 +1359,7 @@ config HIGHMEM4G
config HIGHMEM64G
bool "64GB"
- depends on !M486
+ depends on !M486 && !M586 && !M586TSC && !M586MMX && !MGEODE_LX && !MGEODEGX1 && !MCYRIXIII && !MELAN && !MWINCHIPC6 && !WINCHIP3D && !MK6
select X86_PAE
---help---
Select this if you have a 32-bit processor and more than 4
--
1.8.3.1
I found out I am no longer able to boot kernel compiled with CONFIG_MCRUSOE=y on
my HP t5300 with CPU: Transmeta(tm) Crusoe(tm) Processor TM5500 (family: 0x5,
model: 0x4, stepping: 0x3). It says:
> This kernel requires an i686 CPU, but only detected an i586 CPU.
> Unable to boot - please use a kernel appropriate for your CPU.
It looks like this is caused by 25d76ac888216c369dea91768764728b83769799 which
started setting X86_MINIMUM_CPU_FAMILY=6 for MCRUSOE while CPUID gives family=5.
I was able to fix the problem with a patch included below. It just changes
X86_MINIMUM_CPU_FAMILY to 5. No other change was necessary (using -march=i686
seems fine).
/proc/cpuinfo:
processor : 0
vendor_id : GenuineTMx86
cpu family : 5
model : 4
model name : Transmeta(tm) Crusoe(tm) Processor TM5500
stepping : 3
cpu MHz : 532.091
cache size : 256 KB
fdiv_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr cx8 sep cmov mmx longrun lrti constant_tsc cpuid
bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown
bogomips : 1064.18
clflush size : 32
cache_alignment : 32
address sizes : 32 bits physical, 32 bits virtual
power management:
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -375,7 +375,7 @@
config X86_MINIMUM_CPU_FAMILY
int
default "64" if X86_64
- default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
+ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCORE2 || MK7 || MK8)
default "5" if X86_32 && X86_CMPXCHG64
default "4"
On Sun, Jan 07, 2024 at 02:16:57PM +0100, Aleksander Mazur wrote:
> I found out I am no longer able to boot kernel compiled with CONFIG_MCRUSOE=y on
> my HP t5300 with CPU: Transmeta(tm) Crusoe(tm) Processor TM5500 (family: 0x5,
> model: 0x4, stepping: 0x3). It says:
>
> > This kernel requires an i686 CPU, but only detected an i586 CPU.
> > Unable to boot - please use a kernel appropriate for your CPU.
>
> It looks like this is caused by 25d76ac888216c369dea91768764728b83769799 which
> started setting X86_MINIMUM_CPU_FAMILY=6 for MCRUSOE while CPUID gives family=5.
>
> I was able to fix the problem with a patch included below. It just changes
> X86_MINIMUM_CPU_FAMILY to 5
... for MCRUSOE.
> No other change was necessary (using -march=i686
> seems fine).
>
> /proc/cpuinfo:
> processor : 0
> vendor_id : GenuineTMx86
> cpu family : 5
> model : 4
> model name : Transmeta(tm) Crusoe(tm) Processor TM5500
> stepping : 3
> cpu MHz : 532.091
> cache size : 256 KB
> fdiv_bug : no
> f00f_bug : no
> coma_bug : no
> fpu : yes
> fpu_exception : yes
> cpuid level : 1
> wp : yes
> flags : fpu vme de pse tsc msr cx8 sep cmov mmx longrun lrti constant_tsc cpuid
> bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown
> bogomips : 1064.18
> clflush size : 32
> cache_alignment : 32
> address sizes : 32 bits physical, 32 bits virtual
> power management:
>
> --- a/arch/x86/Kconfig.cpu
> +++ b/arch/x86/Kconfig.cpu
> @@ -375,7 +375,7 @@
> config X86_MINIMUM_CPU_FAMILY
> int
> default "64" if X86_64
> - default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
> + default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCORE2 || MK7 || MK8)
> default "5" if X86_32 && X86_CMPXCHG64
> default "4"
Care to turn this into a proper patch with your SOB etc?
Thx.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
On January 7, 2024 11:47:16 AM PST, Borislav Petkov <[email protected]> wrote:
>On Sun, Jan 07, 2024 at 02:16:57PM +0100, Aleksander Mazur wrote:
>> I found out I am no longer able to boot kernel compiled with CONFIG_MCRUSOE=y on
>> my HP t5300 with CPU: Transmeta(tm) Crusoe(tm) Processor TM5500 (family: 0x5,
>> model: 0x4, stepping: 0x3). It says:
>>
>> > This kernel requires an i686 CPU, but only detected an i586 CPU.
>> > Unable to boot - please use a kernel appropriate for your CPU.
>>
>> It looks like this is caused by 25d76ac888216c369dea91768764728b83769799 which
>> started setting X86_MINIMUM_CPU_FAMILY=6 for MCRUSOE while CPUID gives family=5.
>>
>> I was able to fix the problem with a patch included below. It just changes
>> X86_MINIMUM_CPU_FAMILY to 5
>
>... for MCRUSOE.
>
>> No other change was necessary (using -march=i686
>> seems fine).
>>
>> /proc/cpuinfo:
>> processor : 0
>> vendor_id : GenuineTMx86
>> cpu family : 5
>> model : 4
>> model name : Transmeta(tm) Crusoe(tm) Processor TM5500
>> stepping : 3
>> cpu MHz : 532.091
>> cache size : 256 KB
>> fdiv_bug : no
>> f00f_bug : no
>> coma_bug : no
>> fpu : yes
>> fpu_exception : yes
>> cpuid level : 1
>> wp : yes
>> flags : fpu vme de pse tsc msr cx8 sep cmov mmx longrun lrti constant_tsc cpuid
>> bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit mmio_unknown
>> bogomips : 1064.18
>> clflush size : 32
>> cache_alignment : 32
>> address sizes : 32 bits physical, 32 bits virtual
>> power management:
>>
>> --- a/arch/x86/Kconfig.cpu
>> +++ b/arch/x86/Kconfig.cpu
>> @@ -375,7 +375,7 @@
>> config X86_MINIMUM_CPU_FAMILY
>> int
>> default "64" if X86_64
>> - default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
>> + default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCORE2 || MK7 || MK8)
>> default "5" if X86_32 && X86_CMPXCHG64
>> default "4"
>
>Care to turn this into a proper patch with your SOB etc?
>
>Thx.
>
This is correct; Crusoe (TM3xxx/5xxx) implemented a 686 user level ISA but a 586 system level ISA.
So please make a formal patch and add:
Acked-by: H. Peter Anvin <[email protected]>
The kernel built with MCRUSOE is unbootable on Transmeta Crusoe.
It shows following error message:
> This kernel requires an i686 CPU, but only detected an i586 CPU.
> Unable to boot - please use a kernel appropriate for your CPU.
Fix this by removing MCRUSOE from condition introduced in 25d76ac88821,
effectively changing X86_MINIMUM_CPU_FAMILY back to 5, what matches CPU
family given by CPUID.
Tested on HP t5300.
Fixes: 25d76ac88821 ("x86/Kconfig: Explicitly enumerate i686-class CPUs in Kconfig")
Acked-by: H. Peter Anvin <[email protected]>
Signed-off-by: Aleksander Mazur <[email protected]>
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index b9224cf2ee4d..2a7279d80460 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -379,7 +379,7 @@ config X86_CMOV
config X86_MINIMUM_CPU_FAMILY
int
default "64" if X86_64
- default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
+ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCORE2 || MK7 || MK8)
default "5" if X86_32 && X86_CMPXCHG64
default "4"
--
2.43.0
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: f6a1892585cd19e63c4ef2334e26cd536d5b678d
Gitweb: https://git.kernel.org/tip/f6a1892585cd19e63c4ef2334e26cd536d5b678d
Author: Aleksander Mazur <[email protected]>
AuthorDate: Tue, 23 Jan 2024 14:43:00 +01:00
Committer: Borislav Petkov (AMD) <[email protected]>
CommitterDate: Fri, 09 Feb 2024 16:28:19 +01:00
x86/Kconfig: Transmeta Crusoe is CPU family 5, not 6
The kernel built with MCRUSOE is unbootable on Transmeta Crusoe. It shows
the following error message:
This kernel requires an i686 CPU, but only detected an i586 CPU.
Unable to boot - please use a kernel appropriate for your CPU.
Remove MCRUSOE from the condition introduced in commit in Fixes, effectively
changing X86_MINIMUM_CPU_FAMILY back to 5 on that machine, which matches the
CPU family given by CPUID.
[ bp: Massage commit message. ]
Fixes: 25d76ac88821 ("x86/Kconfig: Explicitly enumerate i686-class CPUs in Kconfig")
Signed-off-by: Aleksander Mazur <[email protected]>
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Acked-by: H. Peter Anvin <[email protected]>
Cc: <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
arch/x86/Kconfig.cpu | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu
index b9224cf..2a7279d 100644
--- a/arch/x86/Kconfig.cpu
+++ b/arch/x86/Kconfig.cpu
@@ -379,7 +379,7 @@ config X86_CMOV
config X86_MINIMUM_CPU_FAMILY
int
default "64" if X86_64
- default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCRUSOE || MCORE2 || MK7 || MK8)
+ default "6" if X86_32 && (MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MEFFICEON || MATOM || MCORE2 || MK7 || MK8)
default "5" if X86_32 && X86_CMPXCHG64
default "4"