Skip to content

backends: re-establish a processor's interrupt controller, timer and per-processor registers for an existing slot #568

Open

Description

@lexoliu

Each backend sets up a processor's hardware state only on its first start, inside its secondary boot path, and allocates as it goes: x86 GDT, TSS, IDT, IA32_FS_BASE, XCR0, LAPIC; aarch64 VBAR, tpidr_el1, GIC redistributor and CPU interface, CNTV; riscv stvec, tp, satp, PLIC context. A processor restored from an image keeps its slot and its memory but has lost all of that.

Scope

  • Each backend factors "program this processor's hardware for its existing slot" out of first start, and starts a processor into that path with a saved processor state.
  • The timebase can be continued from a given instant, so Cpu::now() and deadlines stay monotonic across a resume.
  • The concurrency contract names which steps run on the starting processor and which on the started one.

Done when

  • On every backend under its CI accelerator, a test boot stops a secondary in the freeze barrier, discards its controller state, restarts it through the new path, and it runs tasks again.
  • Cpu::now() is monotonic across a timebase continuation in a unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementsmp

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions