NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: NetBSD/i386 7.0 hangs booting 486

Am 22.11.2015 um 17:04 schrieb Christos Zoulas:
Hmm, so what's going on here? Is the code being miscompiled? Did you
compile with -O2? Also can you move the "run" printf before the test
so it prints even when it returns 0?

I needed a work-around for __get_cpuid() to finally boot the machine.
My "educated guess" in the mail before was that __get_cpuid() is called directly somewhere with parameter __level == 0.

This leads to (__get_cpuid_max (__ext, 0) < __level) being false, so that instead of returning before, the cpuid instruction directly following is executed.

Maybe a fix in __get_cpuid() could be as simple as:

-  if (__get_cpuid_max (__ext, 0) < __level)
+  if (__get_cpuid_max (__ext, 0) <= __level)


Home | Main Index | Thread Index | Old Index