HomeFreeBSD

Provide non-final but valid PCB pointer for thread0 for duration of

Description

Provide non-final but valid PCB pointer for thread0 for duration of
hammer_time(). This makes assembler exception handlers not fault
itself when setting PCB flags, and allow normal kernel trap handler to
get control. The pointer is reset after FPU parameters are obtained.

Set thread0.td_critnest to 1 for duration of hammer_time() as well.
In particular, page faults at that early stage panic immediately
instead of trying to call not yet operational VM to resolve it.

As result, faults during second half of the hammer_time() execution
have a chance to be reported instead of silent machine reboot or hang.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Details

Provenance
kibAuthored on
Parents
rS310049: cxgbe(4): Fix the tid range shown for T6 cards in misc.tids.
Branches
Unknown
Tags
Unknown