Subversion Repositories Kolibri OS

Rev

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

Rev 6244 Rev 7121
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: 6244 $
14
$Revision: 7121 $
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_VARS+0x9030], 1
20
        jb      @F
-
 
21
        cmp     byte [BOOT_VARS+BOOT_SHUTDOWN_TYPE], SYSTEM_RESTART
-
 
22
        jbe     .valid
20
        jne     @F
23
@@:
Line 21... Line 24...
21
        ret
24
        ret
22
@@:
25
.valid:
23
        call    stop_all_services
26
        call    stop_all_services
Line 57... Line 60...
57
.no_shutdown_cpus:
60
.no_shutdown_cpus:
Line 58... Line 61...
58
 
61
 
59
        cli
62
        cli
Line 60... Line 63...
60
        call    IRQ_mask_all
63
        call    IRQ_mask_all
61
 
64
 
62
        mov     eax, [OS_BASE + 0x9030]
65
        mov     eax, [OS_BASE + BOOT_SHUTDOWN_TYPE]
Line 63... Line 66...
63
        cmp     al, SYSTEM_RESTART
66
        cmp     al, SYSTEM_RESTART
64
        jne     @F
67
        jne     @F
Line 86... Line 89...
86
        and     eax, 0x7FFFFFFF
89
        and     eax, 0x7FFFFFFF
87
        mov     cr0, eax
90
        mov     cr0, eax
88
        mov     eax, cr3
91
        mov     eax, cr3
89
        mov     cr3, eax
92
        mov     cr3, eax
Line 90... Line 93...
90
 
93
 
91
        cmp     byte [0x9030], SYSTEM_SHUTDOWN
94
        cmp     byte [BOOT_SHUTDOWN_TYPE], SYSTEM_SHUTDOWN
Line 92... Line 95...
92
        jne     no_acpi_power_off
95
        jne     no_acpi_power_off
Line 93... Line 96...
93
 
96
 
Line 174... Line 177...
174
 
177
 
175
align 4
178
align 4
176
restart_code_start:
179
restart_code_start:
Line 177... Line 180...
177
org 0x50000
180
org 0x50000
178
 
181
 
Line 179... Line 182...
179
        cmp     byte [0x9030], SYSTEM_RESTART
182
        cmp     byte [BOOT_SHUTDOWN_TYPE], SYSTEM_RESTART
180
        jne     @F
183
        jne     @F
181
 
184
 
Line 272... Line 275...
272
        out     40h, al
275
        out     40h, al
273
        out     40h, al
276
        out     40h, al
Line 274... Line 277...
274
 
277
 
275
        xor     ax, ax
278
        xor     ax, ax
276
        mov     ds, ax
279
        mov     ds, ax
277
        mov     al, [0x9030]
280
        mov     al, [BOOT_SHUTDOWN_TYPE]
278
        cmp     al, SYSTEM_RESTART
281
        cmp     al, SYSTEM_RESTART
Line 279... Line 282...
279
        je      .restart
282
        je      .restart
280
 
283