Project

General

Profile

Bug #11332 ยป 0001-cpuid_pass2-Don-t-clobber-eax-when-skipping-leaves.patch

Spencer Berger, 2019-07-06 05:43 AM

View differences:

usr/src/uts/i86pc/os/cpuid.c
3438 3438
	 * (We already handled n == 0 and n == 1 in pass 1)
3439 3439
	 */
3440 3440
	for (n = 2, cp = &cpi->cpi_std[2]; n < nmax; n++, cp++) {
3441
		cp->cp_eax = n;
3442

  
3443 3441
		/*
3444 3442
		 * leaves 6 and 7 were handled in pass 1
3445 3443
		 */
3446 3444
		if (n == 6 || n == 7)
3447 3445
			continue;
3448 3446

  
3447
		cp->cp_eax = n;
3448

  
3449 3449
		/*
3450 3450
		 * CPUID function 4 expects %ecx to be initialized
3451 3451
		 * with an index which indicates which cache to return
    (1-1/1)