Testers wanted: Atom netbooks with x86_64 disabled by BIOS
Hello,
There are some netbooks with Intel Atom processors that have 64-bit support disabled by BIOS. Theoretically, the processor supports 64-bit operation, but BIOS allows only 32-bit code to run.
I wonder whether the 64-bit mode is really disabled in the CPU or only hidden in the CPUID flags. If the latter, the computer could be made to run a 64-bit kernel.
Similarly, there are some Pentium M processors that support PAE (Physical Address Extensions), but do not show this in CPUID. They could be made to run distributions that require PAE with the "forcepae" kernel command line parameter.
I would like to ask people with such netbooks to try to run a 64-bit kernel with this patch applied.
When a patched 64-bit kernel is run in qemu-system-i386, the virtual machine restarts instantly. Without this patch in such a case a 64-bit kernel hangs indefinitely (inside .Lno_longmode in head_64.S).
--- arch/x86/boot/compressed/head_64.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/boot/compressed/head_64.S +1 -1
@@ -112,7 +112,7 @@ SYM_FUNC_START(startup_32) call verify_cpu testl %eax, %eax - jnz .Lno_longmode + #jnz .Lno_longmode /* * Compute the delta between where we were compiled to run at
Signature · 1 line
2.25.1
W dniu 27.03.2021 o 21:32, Mateusz Jończyk pisze:
Quoted 15 lines
Hello,
There are some netbooks with Intel Atom processors that have 64-bit support disabled by BIOS. Theoretically, the processor supports 64-bit operation, but BIOS allows only 32-bit code to run.
I wonder whether the 64-bit mode is really disabled in the CPU or only hidden in the CPUID flags. If the latter, the computer could be made to run a 64-bit kernel.
Similarly, there are some Pentium M processors that support PAE (Physical Address Extensions), but do not show this in CPUID. They could be made to run distributions that require PAE with the "forcepae" kernel command line parameter.
Quoted 6 lines
I would like to ask people with such netbooks to try to run a 64-bit kernel with this patch applied.
When a patched 64-bit kernel is run in
qemu-system-i386, the virtual machine restarts instantly. Without this patch in such a case a 64-bit kernel hangs indefinitely (inside .Lno_longmode inhead_64.S).
I have made two mistakes:
- I left commented out code,
- I have commented out lines with '#'. The code compiled though.
Attaching corrected patch, please excuse me.
Greetings,
Mateusz
--- arch/x86/boot/compressed/head_64.S | 2 -- 1 file changed, 2 deletions(-)
arch/x86/boot/compressed/head_64.S +0 -2
@@ -111,8 +111,6 @@ SYM_FUNC_START(startup_32) leal rva(boot_stack_end)(%ebp), %esp call verify_cpu - testl %eax, %eax - jnz .Lno_longmode /* * Compute the delta between where we were compiled to run at
Signature · 1 line
2.25.1
Hi,
Quoted 23 lines · Mateusz Jonczyk
W dniu 27.03.2021 o 21:32, Mateusz Jonczyk pisze:
Quoted 15 lines
Hello,
There are some netbooks with Intel Atom processors that have 64-bit support disabled by BIOS. Theoretically, the processor supports 64-bit operation, but BIOS allows only 32-bit code to run.
I wonder whether the 64-bit mode is really disabled in the CPU or only hidden in the CPUID flags. If the latter, the computer could be made to run a 64-bit kernel.
Similarly, there are some Pentium M processors that support PAE (Physical Address Extensions), but do not show this in CPUID. They could be made to run distributions that require PAE with the "forcepae" kernel command line parameter.
Quoted 6 lines
I would like to ask people with such netbooks to try to run a 64-bit kernel with this patch applied.
When a patched 64-bit kernel is run in
qemu-system-i386, the virtual machine restarts instantly. Without this patch in such a case a 64-bit kernel hangs indefinitely (inside .Lno_longmode inhead_64.S).
Quoted 5 lines
I have made two mistakes:
- I left commented out code,
- I have commented out lines with '#'. The code compiled though.Attaching corrected patch, please excuse me.
FWIW I tested on my ASUS 1025C which runs on an Atom N2600 forced to 32-bit. I had already tried in the past but wanted to give it a try again in case I'd have missed anything. Sadly it didn't work, I'm still getting the "requires an x86-64 CPU" message.
Given these machines were really cheap, I've always suspected that they employ cheaper, low-grade CPUs, possibly having been subject to reduced tests where x86_64-specific parts were not even verified and might be defective. This may explain why they forcefully disable long mode there, but that's just speculation.
Cheers,
Willy
Quoted 11 lines · Willy Tarreau
On Sat, Mar 27, 2021 at 10:13:22PM +0100, Mateusz Jonczyk wrote:
FWIW I tested on my ASUS 1025C which runs on an Atom N2600 forced to 32-bit. I had already tried in the past but wanted to give it a try again in case I'd have missed anything. Sadly it didn't work, I'm still getting the "requires an x86-64 CPU" message.Given these machines were really cheap, I've always suspected that they employ cheaper, low-grade CPUs, possibly having been subject to reduced tests where x86_64-specific parts were not even verified and might be defective. This may explain why they forcefully disable long mode there, but that's just speculation.
There are some of these '32bit only' CPUs out there in the wild which actually support long mode. Some of them even do not have the long mode CPUID bit fused out. But whether it works is a different story:
- If the CPUID bit is on, then the chance is high, but it runs out of spec (guarantee wise)
- If it's off is still might work by some definition of work as they might have fused off more or there are actual defects in some 64bit only area which are irrelevant when in 32bit mode.
Even if it could work perfectly fine, the BIOS/SMM/ucode can prevent switching to long mode.
It's a lost cause.
Thanks,
tglx
Hi Thomas,
Quoted 13 lines · Thomas Gleixner
Quoted 11 lines · Willy Tarreau
On Sat, Mar 27, 2021 at 10:13:22PM +0100, Mateusz Jonczyk wrote:
FWIW I tested on my ASUS 1025C which runs on an Atom N2600 forced to 32-bit. I had already tried in the past but wanted to give it a try again in case I'd have missed anything. Sadly it didn't work, I'm still getting the "requires an x86-64 CPU" message.Given these machines were really cheap, I've always suspected that they employ cheaper, low-grade CPUs, possibly having been subject to reduced tests where x86_64-specific parts were not even verified and might be defective. This may explain why they forcefully disable long mode there, but that's just speculation.
Quoted 3 lines
There are some of these '32bit only' CPUs out there in the wild which actually support long mode. Some of them even do not have the long mode CPUID bit fused out.
Yes, I'm aware of this as well. We might even have talked to the same "victim" :-)
Quoted 5 lines
But whether it works is a different story:
- If the CPUID bit is on, then the chance is high, but it runs out of spec (guarantee wise)
Quoted 8 lines
- If it's off is still might work by some definition of work as they might have fused off more or there are actual defects in some 64bit only area which are irrelevant when in 32bit mode.
Even if it could work perfectly fine, the BIOS/SMM/ucode can prevent switching to long mode.
It's a lost cause.
I agree. While I bought this netbook to have a 64-bit CPU and was extremely disappointed, after seeing that it was not just a matter of "oops we forgot to enable LM", I concluded that it was pointless to try to go further, as I would never trust it anyway.
Cheers,
Willy
A message that is not in the archive (sent off-list or not yet received): CAHp75Ve_Yhs3ib5yk=d-+bhb4vHpx-j6D4jGGBKuD2k1qv38Vg@mail.gmail.com
Quoted 38 lines · Andy Shevchenko
Quoted 36 lines · Willy Tarreau
Hi Thomas,
Quoted 11 lines · Thomas Gleixner
Quoted 10 lines · Willy Tarreau
On Sat, Mar 27, 2021 at 10:13:22PM +0100, Mateusz Jonczyk wrote:
FWIW I tested on my ASUS 1025C which runs on an Atom N2600 forced to 32-bit. I had already tried in the past but wanted to give it a try again in case I'd have missed anything. Sadly it didn't work, I'm still getting the "requires an x86-64 CPU" message.Given these machines were really cheap, I've always suspected that they employ cheaper, low-grade CPUs, possibly having been subject to reduced tests where x86_64-specific parts were not even verified and might be defective. This may explain why they forcefully disable long mode
there,
Quoted 5 lines
Quoted 1 line
but that's just speculation.
There are some of these '32bit only' CPUs out there in the wild which actually support long mode. Some of them even do not have the long mode CPUID bit fused out.
Yes, I'm aware of this as well. We might even have talked to the same "victim" :-)
Quoted 12 lines
But whether it works is a different story:
- If the CPUID bit is on, then the chance is high, but it runs out of spec (guarantee wise)
- If it's off is still might work by some definition of work as they might have fused off more or there are actual defects in some 64bit only area which are irrelevant when in 32bit mode.
Even if it could work perfectly fine, the BIOS/SMM/ucode can prevent switching to long mode.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
It's a lost cause.
I agree. While I bought this netbook to have a 64-bit CPU and was extremely disappointed,
Where did you get an idea that it had 64-bit SoC from?
It's an N2600, and I bought this laptop because N2600 supports 64-bit (and do have another mini-itx motherboard at work with the same CPU on it working pretty well in 64-bit):
Quoted 3 lines
Atom Based 64-bit ones are Bay Trail, Cherry Trail, Tangier (Merrifield), Anniedale (Moorefield) and all based on Skylake family (Apollo Lake, Broxton, Gemini Lake, ...).
Well, to be honest, I've never been able to remind (nor sort) all these totally crazy names. The day someone gives me a mnemotechnic hint to remind them and their ordering, that will make me reconsider them. For now they're all "something lake", and I find it particularly difficult to map them to SKUs.
Cheers,
Willy
Quoted 8 lines · Willy Tarreau
Quoted 1 line · Andy Shevchenko
Where did you get an idea that it had 64-bit SoC from?
It's an N2600, and I bought this laptop because N2600 supports 64-bit (and do have another mini-itx motherboard at work with the same CPU on it working pretty well in 64-bit):
https://ark.intel.com/content/www/us/en/ark/products/58916/intel-atom-processor-n2600-1m-cache-1-6-ghz.html
I bet that laptop is forced to 32bit via SMM or whatever because IIRC there was some issue with the graphics drivers for 64 bit windows when they were hot of the press 10 years ago.
Quoted 9 lines
Quoted 3 lines
Atom Based 64-bit ones are Bay Trail, Cherry Trail, Tangier (Merrifield), Anniedale (Moorefield) and all based on Skylake family (Apollo Lake, Broxton, Gemini Lake, ...).
Well, to be honest, I've never been able to remind (nor sort) all these totally crazy names. The day someone gives me a mnemotechnic hint to remind them and their ordering, that will make me reconsider them. For now they're all "something lake", and I find it particularly difficult to map them to SKUs.
It's more than 'lake'. You'd need also a mindmap for trail, ville and whatever magic endings they have. There is no mnemotechnic hint to map them into something which makes sense.
I gave up long ago and the only thing I ask for is to provide me the family/model number instead of the random code name of the day.
Thanks,
tglx
Quoted 46 lines · Willy Tarreau
Quoted 44 lines · Andy Shevchenko
Quoted 40 lines · Willy Tarreau
Hi Thomas,
Quoted 11 lines · Thomas Gleixner
Quoted 10 lines · Willy Tarreau
On Sat, Mar 27, 2021 at 10:13:22PM +0100, Mateusz Jonczyk wrote:
FWIW I tested on my ASUS 1025C which runs on an Atom N2600 forced to 32-bit. I had already tried in the past but wanted to give it a try again in case I'd have missed anything. Sadly it didn't work, I'm still getting the "requires an x86-64 CPU" message.Given these machines were really cheap, I've always suspected that they employ cheaper, low-grade CPUs, possibly having been subject to reduced tests where x86_64-specific parts were not even verified and might be defective. This may explain why they forcefully disable long mode
there,
Quoted 5 lines
Quoted 1 line
but that's just speculation.
There are some of these '32bit only' CPUs out there in the wild which actually support long mode. Some of them even do not have the long mode CPUID bit fused out.
Yes, I'm aware of this as well. We might even have talked to the same "victim" :-)
Quoted 5 lines
But whether it works is a different story:
- If the CPUID bit is on, then the chance is high, but it runs out of spec (guarantee wise)
Quoted 8 lines
- If it's off is still might work by some definition of work as they might have fused off more or there are actual defects in some 64bit only area which are irrelevant when in 32bit mode.
Even if it could work perfectly fine, the BIOS/SMM/ucode can prevent switching to long mode.
It's a lost cause.
I agree. While I bought this netbook to have a 64-bit CPU and was extremely disappointed,
Quoted 7 lines
Quoted 1 line
Where did you get an idea that it had 64-bit SoC from?
It's an N2600, and I bought this laptop because N2600 supports 64-bit (and do have another mini-itx motherboard at work with the same CPU on it working pretty well in 64-bit):
https://ark.intel.com/content/www/us/en/ark/products/58916/intel-atom-processor-n2600-1m-cache-1-6-ghz.html
Wow, TIL. :-)
Quoted 9 lines
Quoted 3 lines
Atom Based 64-bit ones are Bay Trail, Cherry Trail, Tangier (Merrifield), Anniedale (Moorefield) and all based on Skylake family (Apollo Lake, Broxton, Gemini Lake, ...).
Well, to be honest, I've never been able to remind (nor sort) all these totally crazy names. The day someone gives me a mnemotechnic hint to remind them and their ordering, that will make me reconsider them. For now they're all "something lake", and I find it particularly difficult to map them to SKUs.
It took me a few years to be on trend with those names, that's how Wikipedia [1] helps.
[1]: https://en.wikipedia.org/wiki/List_of_Intel_Atom_microprocessors
Signature · 2 lines
With Best Regards, Andy Shevchenko
W dniu 28.03.2021 o 00:25, Willy Tarreau pisze:
Quoted 4 lines
FWIW I tested on my ASUS 1025C which runs on an Atom N2600 forced to 32-bit. I had already tried in the past but wanted to give it a try again in case I'd have missed anything. Sadly it didn't work, I'm still getting the "requires an x86-64 CPU" message.
Thank you. It looks like your bootloader uses the 16-bit kernel boot protocol. The 16-bit kernel boot code checks for x86_64 presence with a similar message ( inside arch/x86/boot/cpu.c ), which I did not patch out. If you would like to test again, use the same patched kernel, but change in GRUB: "linux16" to "linux" and "initrd16" to "initrd" to use the 32-bit boot protocol. Which distribution and bootloader do you use?
W dniu 28.03.2021 o 03:07, Thomas Gleixner pisze:
Quoted 10 lines
There are some of these '32bit only' CPUs out there in the wild which actually support long mode. Some of them even do not have the long mode CPUID bit fused out. But whether it works is a different story:
- If the CPUID bit is on, then the chance is high, but it runs out of spec (guarantee wise)
- If it's off is still might work by some definition of work as they might have fused off more or there are actual defects in some 64bit only area which are irrelevant when in 32bit mode.
Of course, force enabling x86_64 would require passing a kernel command line parameter with a prominent warning in documentation, just like with "forcepae".
Greetings,
Mateusz
Quoted 6 lines · Mateusz Jonczyk
W dniu 28.03.2021 o 00:25, Willy Tarreau pisze:
Quoted 4 lines
FWIW I tested on my ASUS 1025C which runs on an Atom N2600 forced to 32-bit. I had already tried in the past but wanted to give it a try again in case I'd have missed anything. Sadly it didn't work, I'm still getting the "requires an x86-64 CPU" message.
Quoted 6 lines
Thank you. It looks like your bootloader uses the 16-bit kernel boot protocol. The 16-bit kernel boot code checks for
x86_64presence with a similar message ( insidearch/x86/boot/cpu.c), which I did not patch out. If you would like to test again, use the same patched kernel, but change in
GRUB: "linux16" to "linux" and "initrd16" to "initrd" to use the 32-bit boot protocol. Which distribution and bootloader do you use?
I'm using Lilo on an old Slackware. I can patch the 16-bit code myself, it's no big deal.
Quoted 3 lines
Of course, force enabling
x86_64would require passing a kernel command line parameter with a prominent warning in documentation, just like with "forcepae".
Sure, but I mean, I suspect that the risk could be higher with very low priced laptops were crappy chips are to be expected by definition based on contracts neither you nor me have seen.
I'll try again after patching the 16-bit code, thanks for the suggestion. Willy
Quoted 21 lines · Willy Tarreau
Quoted 6 lines · Mateusz Jonczyk
W dniu 28.03.2021 o 00:25, Willy Tarreau pisze:
Quoted 4 lines
FWIW I tested on my ASUS 1025C which runs on an Atom N2600 forced to 32-bit. I had already tried in the past but wanted to give it a try again in case I'd have missed anything. Sadly it didn't work, I'm still getting the "requires an x86-64 CPU" message.
Quoted 6 lines
Thank you. It looks like your bootloader uses the 16-bit kernel boot protocol. The 16-bit kernel boot code checks for
x86_64presence with a similar message ( insidearch/x86/boot/cpu.c), which I did not patch out. If you would like to test again, use the same patched kernel, but change in
GRUB: "linux16" to "linux" and "initrd16" to "initrd" to use the 32-bit boot protocol. Which distribution and bootloader do you use?I'm using Lilo on an old Slackware. I can patch the 16-bit code myself, it's no big deal.
Quoted 3 lines
Of course, force enabling
x86_64would require passing a kernel command line parameter with a prominent warning in documentation, just like with "forcepae".
Quoted 5 lines
Sure, but I mean, I suspect that the risk could be higher with very low priced laptops were crappy chips are to be expected by definition based on contracts neither you nor me have seen.
I'll try again after patching the 16-bit code, thanks for the suggestion.
So I added this at the end of get_cpuflags():
set_bit(X86_FEATURE_LM, cpu.flags);
But now it goes further, the screen turns black and after 2 seconds or so it reboots, it looks like a triple fault late in the init process. No need to go further on this machine!
Willy