Пример #1
0
        private static void WaitForMpSyncState(MpSyncState newState,
                                               uint microseconds,
                                               ref bool success)
        {
            Tracing.Log(
                Tracing.Debug,
                "Waiting for MP sync state {0} -> {1} ({2} microseconds)",
                (uint)mpSyncState, (uint)newState, microseconds
                );

            ulong todo    = microseconds * (Processor.CyclesPerSecond / 1000000);
            ulong last    = Processor.CycleCount;
            ulong elapsed = 0;

            success = false;

            while (elapsed < todo)
            {
                ulong now = Processor.CycleCount;
                elapsed += (now - last);
                last     = now;
                if (HalDevicesApic.mpSyncState == newState)
                {
                    success = true;
                    return;
                }
            }
            Tracing.Log(Tracing.Debug, "Mp sync state timed out");
        }
Пример #2
0
 private static void WaitForMpSyncState(MpSyncState newState)
 {
     Tracing.Log(
         Tracing.Debug,
         "Waiting for MP sync state {0} -> {1} (indefinite)",
         (uint)mpSyncState, (uint)newState
         );
     while (HalDevicesApic.mpSyncState != newState)
     {
         ;
     }
 }
Пример #3
0
        private static void AnnounceApFail(int nextCpu)
        {
            MpSyncState localMpState = mpSyncState;

            DebugStub.Print("MpState {0}", __arglist(localMpState));
            DebugStub.Break();
            Platform bi = Platform.ThePlatform;

            DebugStub.Print("Cpu {0} failed. ",
                            __arglist(nextCpu));
            DebugStub.Print("GotBack-> Status {0} Count {1:x8}\n",
                            __arglist(bi.MpStatus32, bi.MpCpuCount));
        }
Пример #4
0
 private static void SetMpSyncState(MpSyncState newState)
 {
     Tracing.Log(Tracing.Debug, "Changing MP sync state {0} -> {1}",
                 (uint)mpSyncState, (uint)newState);
     mpSyncState = newState;
 }