Rev 983 | Rev 1130 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 983 | Rev 1090 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2004-2008. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2004-2008. 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: 983 $ |
8 | $Revision: 1090 $ |
9 | 9 | ||
10 | 10 | ||
Line 41... | Line 41... | ||
41 | proc init_mem |
41 | proc init_mem |
42 | mov eax, [MEM_AMOUNT-OS_BASE] |
42 | mov eax, [MEM_AMOUNT-OS_BASE] |
43 | mov [pg_data.mem_amount-OS_BASE], eax |
43 | mov [pg_data.mem_amount-OS_BASE], eax |
Line 44... | Line 44... | ||
44 | 44 | ||
45 | shr eax, 12 |
- | |
46 | mov edx, eax |
45 | shr eax, 12 |
47 | mov [pg_data.pages_count-OS_BASE], eax |
46 | mov [pg_data.pages_count-OS_BASE], eax |
48 | shr eax, 3 |
47 | shr eax, 3 |
Line 49... | Line 48... | ||
49 | mov [pg_data.pagemap_size-OS_BASE], eax |
48 | mov [pg_data.pagemap_size-OS_BASE], eax |
50 | 49 | ||
51 | add eax, (sys_pgmap-OS_BASE)+4095 |
50 | add eax, (sys_pgmap-OS_BASE)+4095 |
Line 52... | Line -... | ||
52 | and eax, not 4095 |
- | |
53 | mov [tmp_page_tabs], eax |
- | |
54 | 51 | and eax, not 4095 |
|
55 | cmp edx, (OS_BASE/4096) |
- | |
56 | jbe @F |
- | |
57 | mov edx, (OS_BASE/4096) |
- | |
58 | jmp .set |
- | |
59 | @@: |
- | |
60 | cmp edx, (HEAP_MIN_SIZE/4096) |
- | |
61 | jae .set |
52 | mov [tmp_page_tabs], eax |
62 | mov edx, (HEAP_MIN_SIZE/4096) |
53 | |
63 | .set: |
54 | mov edx, (((sys_pgmap-OS_BASE) + 0xFFFFFF) and not 0xFFFFFF) shr 12 |
Line 64... | Line 55... | ||
64 | mov [pg_data.kernel_pages-OS_BASE], edx |
55 | mov [pg_data.kernel_pages-OS_BASE], edx |