Subversion Repositories Kolibri OS

Rev

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

Rev 4432 Rev 4434
Line 175... Line 175...
175
;;                                                                      ;;
175
;;                                                                      ;;
176
;;                  SWITCH TO 32 BIT PROTECTED MODE                     ;;
176
;;                  SWITCH TO 32 BIT PROTECTED MODE                     ;;
177
;;                                                                      ;;
177
;;                                                                      ;;
178
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
178
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 179... Line -...
179
 
-
 
180
 
-
 
181
; CR0 Flags - Protected mode and Paging
-
 
182
 
179
 
Line 183... Line 180...
183
        mov     ecx, CR0_PE
180
        cld
Line 184... Line -...
184
 
-
 
185
; Enabling 32 bit protected mode
-
 
186
 
-
 
187
        sidt    [cs:old_ints_h]
-
 
188
 
181
 
189
        cli                             ; disable all irqs
-
 
190
        cld
-
 
191
        mov     al, 255                 ; mask all irqs
-
 
192
        out     0xa1, al
-
 
193
        out     0x21, al
-
 
194
   l.5:
-
 
195
        in      al, 0x64                ; Enable A20
-
 
196
        test    al, 2
-
 
197
        jnz     l.5
-
 
198
        mov     al, 0xD1
-
 
199
        out     0x64, al
-
 
200
   l.6:
-
 
201
        in      al, 0x64
-
 
202
        test    al, 2
-
 
203
        jnz     l.6
-
 
204
        mov     al, 0xDF
-
 
205
        out     0x60, al
-
 
206
   l.7:
-
 
207
        in      al, 0x64
-
 
208
        test    al, 2
-
 
209
        jnz     l.7
-
 
210
        mov     al, 0xFF
182
; Enabling 32 bit protected mode
211
        out     0x64, al
183
 
212
 
184
        mov     ecx, CR0_PE             ; CR0 Flags - Protected mode and Paging
213
        lgdt    [cs:tmp_gdt]            ; Load GDT
185
        lgdt    [cs:tmp_gdt]            ; Load GDT
214
        mov     eax, cr0                ; protected mode
186
        mov     eax, cr0                ; protected mode