NetBSD-Bugs archive

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

Re: port-amd64/54962 (cannot boot NetBSD-current on VMware player 15 on Ryzen 5 3600X after sys/arch/x86/x86/cpu_topology.c:r1.18)



Hi,

Thank you for your comment.

On 2020/02/16 3:01, maxv%NetBSD.org@localhost wrote:
Synopsis: cannot boot NetBSD-current on VMware player 15 on Ryzen 5 3600X after sys/arch/x86/x86/cpu_topology.c:r1.18

State-Changed-From-To: open->feedback
State-Changed-By: maxv%NetBSD.org@localhost
State-Changed-When: Sat, 15 Feb 2020 18:01:49 +0000
State-Changed-Why:
I noticed a bug in x86_cpu_topology() some time ago:

115 		/* Maximum number of LPs sharing a cache (ebx[23:16]). */
116 		x86_cpuid(1, descs);
117 		lp_max = __SHIFTOUT(descs[1], CPUID_HTT_CORES);

The Intel specification (SDM Volume 1) says:

	"The nearest power-of-2 integer that is not smaller than EBX[23:16] is the
	 number of unique initial APICIDs reserved for addressing different logical
	 processors in a physical package"

So here lp_max should be rounded up to the nearest power-of-2.

I try the fix, however the kernel cannot boot on my environment.
Hmm, it may have other bug(s)...


Thanks,

--
//////////////////////////////////////////////////////////////////////
Internet Initiative Japan Inc.

Device Engineering Section,
Product Development Department,
Product Division,
Technology Unit

Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>


Home | Main Index | Thread Index | Old Index