Rev 756 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 756 | Rev 837 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2007. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2007. 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: 756 $ |
8 | $Revision: 837 $ |
9 | 9 | ||
10 | 10 | ||
Line 37... | Line 37... | ||
37 | ret |
37 | ret |
38 | endp |
38 | endp |
Line 39... | Line 39... | ||
39 | 39 | ||
40 | align 4 |
40 | align 4 |
- | 41 | proc init_mem |
|
- | 42 | ||
- | 43 | mov ecx, [0x2F0000 + 0x9100] |
|
- | 44 | test ecx, ecx |
|
- | 45 | jz .nosmap |
|
- | 46 | ||
- | 47 | xor eax, eax |
|
- | 48 | mov esi, 0x2F0000 + 0x9104 |
|
- | 49 | @@: |
|
- | 50 | cmp dword [esi+16], 1 |
|
- | 51 | jne .next |
|
- | 52 | mov edx, [esi+8] |
|
- | 53 | cmp eax, [esi+8] |
|
- | 54 | ja .next |
|
- | 55 | ||
- | 56 | mov eax, [esi+8] |
|
- | 57 | .next: |
|
- | 58 | add esi, 20 |
|
- | 59 | loop @B |
|
- | 60 | ||
- | 61 | mov [MEM_AMOUNT-OS_BASE], eax |
|
- | 62 | jmp @F |
|
- | 63 | .nosmap: |
|
- | 64 | call mem_test |
|
41 | proc init_mem |
65 | |
- | 66 | mov eax, [MEM_AMOUNT-OS_BASE] |
|
42 | mov eax, [MEM_AMOUNT-OS_BASE] |
67 | @@: |
Line 43... | Line 68... | ||
43 | mov [pg_data.mem_amount-OS_BASE], eax |
68 | mov [pg_data.mem_amount-OS_BASE], eax |
44 | 69 | ||
45 | shr eax, 12 |
70 | shr eax, 12 |
Line 69... | Line 94... | ||
69 | mov edi, sys_pgdir-OS_BASE |
94 | mov edi, sys_pgdir-OS_BASE |
70 | mov ecx, 4096/4 |
95 | mov ecx, 4096/4 |
71 | cld |
96 | cld |
72 | rep stosd |
97 | rep stosd |
Line 73... | Line 98... | ||
73 | 98 | ||
74 | mov edx, (sys_pgdir-OS_BASE)+ 0x800; (OS_BASE shr 20) |
99 | mov edx, (sys_pgdir-OS_BASE)+ (OS_BASE shr 20) |
75 | bt [cpu_caps-OS_BASE], CAPS_PSE |
100 | bt [cpu_caps-OS_BASE], CAPS_PSE |
Line 76... | Line 101... | ||
76 | jnc .no_PSE |
101 | jnc .no_PSE |
77 | 102 |