Subversion Repositories Kolibri OS

Rev

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

Rev 7129 Rev 7132
Line 9... Line 9...
9
;;  See file COPYING for details.                               ;;
9
;;  See file COPYING for details.                               ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
10
;;  Copyright 2003 Ville Turjanmaa                              ;;
11
;;                                                              ;;
11
;;                                                              ;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
12
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 13... Line 13...
13
 
13
 
Line 14... Line 14...
14
$Revision: 7129 $
14
$Revision: 7132 $
15
 
15
 
Line 16... Line 16...
16
align 4
16
align 4
17
system_shutdown:          ; shut down the system
17
system_shutdown:          ; shut down the system
18
 
18
 
19
        cmp     byte [BOOT_VARS+BOOT_SHUTDOWN_TYPE], SYSTEM_SHUTDOWN
19
        cmp     byte [BOOT.shutdown_type], SYSTEM_SHUTDOWN
20
        jb      @F
20
        jb      @F
21
        cmp     byte [BOOT_VARS+BOOT_SHUTDOWN_TYPE], SYSTEM_RESTART
21
        cmp     byte [BOOT.shutdown_type], SYSTEM_RESTART
22
        jbe     .valid
22
        jbe     .valid
23
@@:
23
@@:
Line 60... Line 60...
60
.no_shutdown_cpus:
60
.no_shutdown_cpus:
Line 61... Line 61...
61
 
61
 
62
        cli
62
        cli
Line 63... Line 63...
63
        call    IRQ_mask_all
63
        call    IRQ_mask_all
64
 
64
 
65
        mov     eax, [OS_BASE + BOOT_SHUTDOWN_TYPE]
65
        mov     eax, dword[BOOT.shutdown_type]
Line 66... Line 66...
66
        cmp     al, SYSTEM_RESTART
66
        cmp     al, SYSTEM_RESTART
67
        jne     @F
67
        jne     @F
Line 89... Line 89...
89
        and     eax, 0x7FFFFFFF
89
        and     eax, 0x7FFFFFFF
90
        mov     cr0, eax
90
        mov     cr0, eax
91
        mov     eax, cr3
91
        mov     eax, cr3
92
        mov     cr3, eax
92
        mov     cr3, eax
Line 93... Line 93...
93
 
93
 
94
        cmp     byte [BOOT_SHUTDOWN_TYPE], SYSTEM_SHUTDOWN
94
        cmp     byte [BOOT_LO.shutdown_type], SYSTEM_SHUTDOWN
Line 95... Line 95...
95
        jne     no_acpi_power_off
95
        jne     no_acpi_power_off
Line 96... Line 96...
96
 
96
 
Line 177... Line 177...
177
 
177
 
178
align 4
178
align 4
179
restart_code_start:
179
restart_code_start:
Line 180... Line 180...
180
org 0x50000
180
org 0x50000
181
 
181
 
Line 182... Line 182...
182
        cmp     byte [BOOT_SHUTDOWN_TYPE], SYSTEM_RESTART
182
        cmp     byte [BOOT_LO.shutdown_type], SYSTEM_RESTART
183
        jne     @F
183
        jne     @F
184
 
184
 
Line 275... Line 275...
275
        out     40h, al
275
        out     40h, al
276
        out     40h, al
276
        out     40h, al
Line 277... Line 277...
277
 
277
 
278
        xor     ax, ax
278
        xor     ax, ax
279
        mov     ds, ax
279
        mov     ds, ax
280
        mov     al, [BOOT_SHUTDOWN_TYPE]
280
        mov     al, [BOOT_LO.shutdown_type]
281
        cmp     al, SYSTEM_RESTART
281
        cmp     al, SYSTEM_RESTART
Line 282... Line 282...
282
        je      .restart
282
        je      .restart
283
 
283
 
Line 348... Line 348...
348
; bootloader interface
348
; bootloader interface
349
        push    0x1000
349
        push    0x1000
350
        pop     ds
350
        pop     ds
351
        push    0
351
        push    0
352
        pop     es
352
        pop     es
353
        mov     si, [es:BOOT_KERNEL_RESTART]
353
        mov     si, [es:BOOT_LO.kernel_restart]
354
        mov     ax, 'KL'
354
        mov     ax, 'KL'
355
        jmp     0x1000:0000
355
        jmp     0x1000:0000
Line 356... Line 356...
356
 
356
 
357
align 4
357
align 4