From c66e498dba95378619d30465dafd0fd57598288e Mon Sep 17 00:00:00 2001 From: CleverMouse Date: Thu, 21 Aug 2014 12:41:24 +0000 Subject: [PATCH] add delays git-svn-id: svn://kolibrios.org@5049 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/kernel.asm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/kernel/trunk/kernel.asm b/kernel/trunk/kernel.asm index 9b600536cf..8314acddf8 100644 --- a/kernel/trunk/kernel.asm +++ b/kernel/trunk/kernel.asm @@ -725,23 +725,30 @@ endg dec ebx .wake_cpus_loop: lodsd + push esi + xor esi, esi + inc esi shl eax, 24 mov [edi+10h], eax ; assert INIT IPI mov dword [edi], 0C500h + call delay_ms @@: test dword [edi], 1000h jnz @b ; deassert INIT IPI mov dword [edi], 8500h + call delay_ms @@: test dword [edi], 1000h jnz @b ; send STARTUP IPI mov dword [edi], 600h + (8000h shr 12) + call delay_ms @@: test dword [edi], 1000h jnz @b + pop esi dec ebx jnz .wake_cpus_loop mov eax, [cpu_count] @@ -5557,19 +5564,25 @@ yes_shutdown_param: dec ebx .shutdown_cpus_loop: lodsd + push esi + xor esi, esi + inc esi shl eax, 24 mov [edi+10h], eax ; assert INIT IPI mov dword [edi], 0C500h + call delay_ms @@: test dword [edi], 1000h jnz @b ; deassert INIT IPI mov dword [edi], 8500h + call delay_ms @@: test dword [edi], 1000h jnz @b ; don't send STARTUP IPI: let other CPUs be in wait-for-startup state + pop esi dec ebx jnz .shutdown_cpus_loop .no_shutdown_cpus: