[coreboot] [PATCH] Seabios on Virtutech Simics x86-440bx model
Magnus Christensson
mch at virtutech.com
Wed Nov 11 13:48:37 CET 2009
Kevin O'Connor wrote:
> Hi Magnus,
>
> Is:
>
> for (i = 0, actual_cpu_count = 0; i < MaxCountCPUs; i++) {
> int log_cpus = (ebx >> 16) & 0xff;
> log_cpus = 1UL << fls(log_cpus - 1); /* round up to power of 2 */
> if ((cpuid_features & (1 << 28)) && (i & (log_cpus - 1)) != 0)
> continue;
>
> equivalent to:
>
> int log_cpus = 1;
> if (cpuid_features & (1 << 28)) {
> log_cpus = (ebx >> 16) & 0xff;
> log_cpus = 1UL << fls(log_cpus - 1); /* round up to power of 2 */
> }
> for (i = 0, actual_cpu_count = 0; i < MaxCountCPUs; i+=log_cpus) {
>
Yes, that should do the same thing.
M.
More information about the coreboot
mailing list