Subversion Repositories Kolibri OS

Rev

Rev 5044 | Rev 5130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5044 Rev 5049
Line 69... Line 69...
69
format binary as "mnt"
69
format binary as "mnt"
Line 70... Line 70...
70
 
70
 
71
include 'macros.inc'
71
include 'macros.inc'
Line 72... Line 72...
72
include 'struct.inc'
72
include 'struct.inc'
Line 73... Line 73...
73
 
73
 
74
$Revision: 5044 $
74
$Revision: 5049 $
Line 723... Line 723...
723
        lea     edi, [eax+300h]
723
        lea     edi, [eax+300h]
724
        mov     esi, smpt+4
724
        mov     esi, smpt+4
725
        dec     ebx
725
        dec     ebx
726
.wake_cpus_loop:
726
.wake_cpus_loop:
727
        lodsd
727
        lodsd
-
 
728
        push    esi
-
 
729
        xor     esi, esi
-
 
730
        inc     esi
728
        shl     eax, 24
731
        shl     eax, 24
729
        mov     [edi+10h], eax
732
        mov     [edi+10h], eax
730
; assert INIT IPI
733
; assert INIT IPI
731
        mov     dword [edi], 0C500h
734
        mov     dword [edi], 0C500h
-
 
735
        call    delay_ms
732
@@:
736
@@:
733
        test    dword [edi], 1000h
737
        test    dword [edi], 1000h
734
        jnz     @b
738
        jnz     @b
735
; deassert INIT IPI
739
; deassert INIT IPI
736
        mov     dword [edi], 8500h
740
        mov     dword [edi], 8500h
-
 
741
        call    delay_ms
737
@@:
742
@@:
738
        test    dword [edi], 1000h
743
        test    dword [edi], 1000h
739
        jnz     @b
744
        jnz     @b
740
; send STARTUP IPI
745
; send STARTUP IPI
741
        mov     dword [edi], 600h + (8000h shr 12)
746
        mov     dword [edi], 600h + (8000h shr 12)
-
 
747
        call    delay_ms
742
@@:
748
@@:
743
        test    dword [edi], 1000h
749
        test    dword [edi], 1000h
744
        jnz     @b
750
        jnz     @b
-
 
751
        pop     esi
745
        dec     ebx
752
        dec     ebx
746
        jnz     .wake_cpus_loop
753
        jnz     .wake_cpus_loop
747
        mov     eax, [cpu_count]
754
        mov     eax, [cpu_count]
748
        dec     eax
755
        dec     eax
749
@@:
756
@@:
Line 5555... Line 5562...
5555
        mov     esi, smpt+4
5562
        mov     esi, smpt+4
5556
        mov     ebx, [cpu_count]
5563
        mov     ebx, [cpu_count]
5557
        dec     ebx
5564
        dec     ebx
5558
.shutdown_cpus_loop:
5565
.shutdown_cpus_loop:
5559
        lodsd
5566
        lodsd
-
 
5567
        push    esi
-
 
5568
        xor     esi, esi
-
 
5569
        inc     esi
5560
        shl     eax, 24
5570
        shl     eax, 24
5561
        mov     [edi+10h], eax
5571
        mov     [edi+10h], eax
5562
; assert INIT IPI
5572
; assert INIT IPI
5563
        mov     dword [edi], 0C500h
5573
        mov     dword [edi], 0C500h
-
 
5574
        call    delay_ms
5564
@@:
5575
@@:
5565
        test    dword [edi], 1000h
5576
        test    dword [edi], 1000h
5566
        jnz     @b
5577
        jnz     @b
5567
; deassert INIT IPI
5578
; deassert INIT IPI
5568
        mov     dword [edi], 8500h
5579
        mov     dword [edi], 8500h
-
 
5580
        call    delay_ms
5569
@@:
5581
@@:
5570
        test    dword [edi], 1000h
5582
        test    dword [edi], 1000h
5571
        jnz     @b
5583
        jnz     @b
5572
; don't send STARTUP IPI: let other CPUs be in wait-for-startup state
5584
; don't send STARTUP IPI: let other CPUs be in wait-for-startup state
-
 
5585
        pop     esi
5573
        dec     ebx
5586
        dec     ebx
5574
        jnz     .shutdown_cpus_loop
5587
        jnz     .shutdown_cpus_loop
5575
.no_shutdown_cpus:
5588
.no_shutdown_cpus:
Line 5576... Line 5589...
5576
 
5589