Rev 5130 | Rev 5363 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 5130 | Rev 5356 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 5130 $ |
8 | $Revision: 5356 $ |
9 | 9 | ||
10 | 10 | ||
Line 137... | Line 137... | ||
137 | bt [cpu_caps-OS_BASE], CAPS_PSE |
137 | bt [cpu_caps-OS_BASE], CAPS_PSE |
138 | jnc .no_PSE |
138 | jnc .no_PSE |
Line 139... | Line 139... | ||
139 | 139 | ||
140 | mov ebx, cr4 |
140 | mov ebx, cr4 |
141 | or ebx, CR4_PSE |
141 | or ebx, CR4_PSE |
142 | mov eax, PG_LARGE+PG_SW |
142 | mov eax, PDE_LARGE+PG_SWR |
143 | mov cr4, ebx |
143 | mov cr4, ebx |
Line 144... | Line 144... | ||
144 | dec [pg_data.kernel_tables-OS_BASE] |
144 | dec [pg_data.kernel_tables-OS_BASE] |
145 | 145 | ||
Line 146... | Line 146... | ||
146 | mov [edx], eax |
146 | mov [edx], eax |
147 | add edx, 4 |
147 | add edx, 4 |
148 | 148 | ||
149 | mov edi, [tmp_page_tabs] |
149 | mov edi, [tmp_page_tabs] |
150 | jmp .map_kernel_heap ; new kernel fits to the first 4Mb - nothing to do with ".map_low" |
150 | jmp .map_kernel_heap ; new kernel fits to the first 4Mb - nothing to do with ".map_low" |
151 | .no_PSE: |
151 | .no_PSE: |
152 | mov eax, PG_SW |
152 | mov eax, PG_SWR |
153 | mov ecx, [tmp_page_tabs] |
153 | mov ecx, [tmp_page_tabs] |
154 | shr ecx, 12 |
154 | shr ecx, 12 |
Line 166... | Line 166... | ||
166 | xor eax, eax |
166 | xor eax, eax |
167 | rep stosd |
167 | rep stosd |
Line 168... | Line 168... | ||
168 | 168 | ||
169 | mov ecx, [pg_data.kernel_tables-OS_BASE] |
169 | mov ecx, [pg_data.kernel_tables-OS_BASE] |
170 | mov eax, [tmp_page_tabs] |
170 | mov eax, [tmp_page_tabs] |
171 | or eax, PG_SW |
171 | or eax, PG_SWR |
Line 172... | Line 172... | ||
172 | mov edi, edx |
172 | mov edi, edx |
173 | 173 | ||
174 | .map_kernel_tabs: |
174 | .map_kernel_tabs: |
175 | stosd |
175 | stosd |
176 | add eax, 0x1000 |
176 | add eax, 0x1000 |
Line 177... | Line 177... | ||
177 | dec ecx |
177 | dec ecx |
Line 178... | Line 178... | ||
178 | jnz .map_kernel_tabs |
178 | jnz .map_kernel_tabs |
179 | 179 | ||
180 | mov dword [sys_proc-OS_BASE+PROC.pdt_0+(page_tabs shr 20)], sys_proc+PROC.pdt_0+PG_SW-OS_BASE |
180 | mov dword [sys_proc-OS_BASE+PROC.pdt_0+(page_tabs shr 20)], sys_proc+PROC.pdt_0+PG_SWR-OS_BASE |
181 | 181 |