Subversion Repositories Kolibri OS

Rev

Rev 855 | Rev 864 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 855 Rev 863
Line 18... Line 18...
18
public _16bit_start
18
public _16bit_start
19
public _16bit_end
19
public _16bit_end
Line 20... Line 20...
20
 
20
 
-
 
21
public _enter_bootscreen
Line 21... Line 22...
21
public _enter_bootscreen
22
public _poweroff
Line 22... Line 23...
22
 
23
 
Line 61... Line 62...
61
include "bootcode.inc"    ; 16 bit system boot code
62
include "bootcode.inc"    ; 16 bit system boot code
62
include "../bus/pci/pci16.inc"
63
include "../bus/pci/pci16.inc"
63
include "../detect/biosdisk.inc"
64
include "../detect/biosdisk.inc"
Line 64... Line -...
64
 
-
 
Line 65... Line 65...
65
;include "boot/shutdown.inc" ; shutdown or restart
65
 
Line 66... Line 66...
66
 
66
 
67
           cli
67
           cli
68
 
68
 
Line 69... Line 69...
69
           mov eax, cr0
69
           mov eax, cr0
Line -... Line 70...
-
 
70
           or eax, CR0_PG+CR0_WP+CR0_PE
70
           or eax, CR0_PG+CR0_WP+CR0_PE
71
           mov cr0, eax
71
           mov cr0, eax
72
 
-
 
73
           jmp pword 0x08:__setvars
-
 
74
 
72
 
75
 
73
           jmp pword 0x08:__setvars
76
;align 4
74
 
77
;_leave_16bit:
75
align 4
78
;
Line 76... Line 79...
76
_enter_16bit:
79
;           cli
77
           mov eax, cr0
80
;           mov eax, cr0
-
 
81
;           or eax, CR0_PG+CR0_WP+CR0_PE
-
 
82
;           mov cr0, eax
-
 
83
;           hlt
Line -... Line 84...
-
 
84
 
78
           and eax, not 0x80000001
85
align 4
79
           mov cr0, eax
86
rmode_idt:
80
           jmp far 0x1000:@F
87
           dw 0x400
81
 
88
           dd 0
82
align 4
89
           dw 0
83
_leave_16bit:
-
 
84
 
-
 
85
           cli
90
 
86
           mov eax, cr0
91
align 4
87
           or eax, CR0_PG+CR0_WP+CR0_PE
92
_poweroff:
88
           mov cr0, eax
93
           mov eax, cr0
Line 89... Line 94...
89
           hlt
94
           and eax, not 0x80000001
90
 
95
           mov cr0, eax
91
align 4
96
           jmp far 0x1000:@F
-
 
97
@@:
-
 
98
           mov eax, 0x3000
-
 
99
           mov ss, ax
-
 
100
           mov esp, 0xEC00
-
 
101
 
-
 
102
           mov ebx, 0x1000
-
 
103
           mov ds, bx
-
 
104
           mov es, bx
-
 
105
 
-
 
106
           lidt [rmode_idt]
-
 
107
 
-
 
108
APM_PowerOff:
-
 
109
           mov     ax, 5304h
-
 
110
           xor     bx, bx
-
 
111
           int     15h
-
 
112
;!!!!!!!!!!!!!!!!!!!!!!!!
-
 
113
           mov ax,0x5300
-
 
114
           xor bx,bx
-
 
115
           int 0x15
-
 
116
           push ax
-
 
117
 
-
 
118
           mov ax,0x5301
-
 
119
           xor bx,bx
-
 
120
           int 0x15
92
@@:
121
 
-
 
122
           mov ax,0x5308
-
 
123
           mov bx,1
-
 
124
           mov cx,bx
-
 
125
           int 0x15
-
 
126
 
-
 
127
           mov ax,0x530E
-
 
128
           xor bx,bx
-
 
129
           pop cx
-
 
130
           int 0x15
-
 
131
 
-
 
132
           mov ax,0x530D
-
 
133
           mov bx,1
-
 
134
           mov cx,bx
-
 
135
           int 0x15
-
 
136
 
-
 
137
           mov ax,0x530F
-
 
138
           mov bx,1
-
 
139
           mov cx,bx
93
           mov eax, 0x3000
140
           int 0x15
-
 
141
 
Line 94... Line 142...
94
           mov ss, ax
142
           mov ax,0x5307
95
           mov esp, 0xEC00
143
           mov bx,1