The CPUID opcode also does not exist on i486. See arch/x86/include/ipxe/cpuid.h I think iPXE will cope with this if it calls cpuid_supported() in the right places.
New i586 opcodes are at: https://en.wikipedia.org/wiki/X86_instruction_listings#Added_with_Pentium Martin On Wed, May 05, 2021 at 08:13:39PM +0100, Michael Brown wrote: > On 05/05/2021 19:53, Nikolai Zhubr wrote: > > Thanks for mentioning Bochs, I've copied your 486 config commandline and > > was able to build and start testing. Its way more handy than with real > > iron. It is even possible to disable e820 function by hand. > > > > Now as long as 586+ requirement is not really critical for operation, > > maybe put such fragments into conditional ifdefs and introduce some > > config option (say LEGACY486) to allow 486-compatible builds? > > I've gone to a *lot* of effort over the past 15 years to eliminate that kind > of conditional ifdef from the codebase (see the various "#ifdef considered > harmful" articles around the web). > > For unlzma.S, just changing to ".arch i486" is fine, since there are no > 586-class instructions in that file. > > For undinet.c, the "rdtsc" instructions are used only for profiling. It's > probably not worth the marginally increased accuracy from having the rdtsc > within the real-mode code: those TSC reads could be moved outside the > REAL_CODE() block and implemented using the standard profile_xxx() functions > instead of hardcoded "rdtsc" instructions. (An alternative approach would > be to conditionalise the presence of the "rdtsc" instructions, but it would > need to be an exceptionally neat solution to justify such a special case.) > > For rtc_entropy.c, the use of the TSC is intrinsic to the way that the code > operates. There is already an entropy_enable() call that is allowed to > return an error to indicate that the entropy source is unusable: this could > be extended to include a low-overhead check for the existence of the TSC. > > With those changes, there would be no need for any compile-time option or > accompanying documentation: the code would Just Work on a 486. > > Michael > _______________________________________________ > ipxe-devel mailing list > ipxe-devel@lists.ipxe.org > https://lists.ipxe.org/mailman/listinfo/ipxe-devel _______________________________________________ ipxe-devel mailing list ipxe-devel@lists.ipxe.org https://lists.ipxe.org/mailman/listinfo/ipxe-devel