FABRIC-3.10.8 MC-3b: waking a worker core
Each worker core sets up its own IPI receiver before going online (amd64 LAPIC + vector 0x22 with its own stub, aarch64 banked GIC SGI 0, riscv64 sie.SSIE); core 0 sends by ICR / GICD_SGIR / SBI IPI. Park lets exactly one interrupt in without a lost-wake window. Boot self-test: IPI round trips 3/3 and 'woke x3, IPIs x3' on all three ISAs; worker vCPU threads 0.0% on the host. 3-ISA acceptance clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d7745b49be
commit
71e0be96b0
@@ -102,9 +102,22 @@ uint32_t arch_smp_enumerate(BootInfo *boot_info, uint64_t *hw_ids, uint32_t cap)
|
||||
|
||||
uint64_t arch_smp_boot_hw_id(void) { return apic_id(); }
|
||||
|
||||
/* MC-3b: exactly one interrupt may end the halt -- `sti`'s one-instruction
|
||||
* shadow covers the `hlt`, so a wake IPI can't slip in between and be lost. */
|
||||
void arch_smp_park_once(void)
|
||||
{
|
||||
__asm__ volatile ("cli; hlt" ::: "memory");
|
||||
__asm__ volatile ("sti; hlt; cli" ::: "memory");
|
||||
}
|
||||
|
||||
void arch_smp_secondary_init(sk_percpu_t *pc)
|
||||
{
|
||||
apic_secondary_enable();
|
||||
pc->ipi_target = pc->hw_id; /* the APIC id */
|
||||
}
|
||||
|
||||
void arch_smp_send_ipi(const sk_percpu_t *target)
|
||||
{
|
||||
(void)apic_send_ipi((uint8_t)target->ipi_target, 0x00004000u | SK_IPI_VECTOR); /* fixed, assert */
|
||||
}
|
||||
|
||||
const char *arch_smp_arrival(const sk_percpu_t *pc)
|
||||
|
||||
Reference in New Issue
Block a user