On 29/05/2024 15:32, Alejandro Vallejo wrote: > +static uint32_t read_apic_id(void) > +{ > + uint32_t apic_id; > + > + if ( has_x2apic ) > + cpuid(0xb, NULL, NULL, NULL, &apic_id); > + else > + { > + cpuid(1, NULL, &apic_id, NULL, NULL); > + apic_id >>= 24; > + } > + > + /* Never called by cpu0, so should never return 0 */ > + ASSERT(!apic_id);
Bah! Typo. That's meant to be ASSERT(apic_id). Cheers, Alejandro