Re: [PATCH] x86/Kconfig: Transmeta Crusoe is cpu family 5, not 6
From: H. Peter Anvin
Date:  Mon Jan 08 2024 - 14:58:50 EST
On January 7, 2024 11:47:16 AM PST, Borislav Petkov <bp@xxxxxxxxx> 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 <hpa@xxxxxxxxx>