Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-20702

MSVC x64 builds hang on TSC calibration in Hyper-V Gen1

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None

    Description

      It hangs on:

      (hal\halx86\acpi\halacpi.c:835) Your machine has a SRAT, but NUMA/HotPlug are not supported!
      (hal\halx86\acpi\halacpi.c:782) ACPI Timer at: 408h (EXT: 256)
      (hal\halx86\acpi\halacpi.c:928) ACPI vUnknown_2 detected. Tables: [RSDT] [APIC] [FACP] [SRAT]
      

      It seems TSC calibration fails since it got stuck here:
      https://github.com/reactos/reactos/blob/096c0aa9d4ef7e90751e5ab7a07c8661c422e2f3/hal/halx86/apic/tsc.c#L97

       while (TscCalibrationPhase < NUM_SAMPLES) _ReadWriteBarrier
      

      Tried to set HyperV paravirtualized MSR registries for TSC control but it seems to not have effect.

      if I skip the TSC calibration, directly reading the HyperV MSR registry (HV_X64_MSR_TSC_FREQUENCY | 0x40000022) for getting TSC frequency, the x64 build goes until it loads videoprt and then hangs. If I delete videoprt, it hangs while kbdclass.sys. If I delete kbdclass.sys, it hangs when loading mouclass.sys. If I delete mouclass.sys, it hangs while loading fs_rec.sys etc.

      (Need to try to replace ApicWrite(APIC_EOI,0) with __writemsr(HV_X64_MSR_EOI,0) and __writecr8(Irql) to __writemsr(HV_X64_MSR_TPR,Irql) since HyperV offers a MSR for its virtualized x64 APIC and the EOI is used also for TSC manual calibration that freezes)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              simonelombardo simonelombardo
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: