Rev 2455 | Rev 2594 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2455 | Rev 2466 | ||
---|---|---|---|
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: 2455 $ |
8 | $Revision: 2466 $ |
9 | 9 | ||
Line 356... | Line 356... | ||
356 | pg_count dd ? |
356 | pg_count dd ? |
357 | endl |
357 | endl |
Line 358... | Line 358... | ||
358 | 358 | ||
359 | cmp dword [LFBAddress], -1 |
359 | cmp dword [LFBAddress], -1 |
360 | jne @f |
360 | jne @f |
361 | mov [BOOT_VAR+0x901c], byte 2 |
361 | mov [BOOT_VAR+BOOT_MTRR], byte 2 |
362 | ; max VGA=640*480*4=1228800 bytes |
362 | ; max VGA=640*480*4=1228800 bytes |
363 | ; + 32*640*4=81920 bytes for mouse pointer |
363 | ; + 32*640*4=81920 bytes for mouse pointer |
Line 364... | Line 364... | ||
364 | stdcall alloc_pages, ((1228800+81920)/4096) |
364 | stdcall alloc_pages, ((1228800+81920)/4096) |
Line 376... | Line 376... | ||
376 | mov [LFBAddress], dword LFB_BASE |
376 | mov [LFBAddress], dword LFB_BASE |
377 | ret |
377 | ret |
378 | @@: |
378 | @@: |
379 | test [SCR_MODE], word 0100000000000000b |
379 | test [SCR_MODE], word 0100000000000000b |
380 | jnz @f |
380 | jnz @f |
381 | mov [BOOT_VAR+0x901c], byte 2 |
381 | mov [BOOT_VAR+BOOT_MTRR], byte 2 |
382 | ret |
382 | ret |
383 | @@: |
383 | @@: |
384 | call init_mtrr |
384 | call init_mtrr |
Line 385... | Line 385... | ||
385 | 385 | ||
Line 1362... | Line 1362... | ||
1362 | 1362 | ||
1363 | 1363 | ||
Line 1364... | Line 1364... | ||
1364 | align 4 |
1364 | align 4 |
1365 | proc init_mtrr |
1365 | proc init_mtrr |
Line 1366... | Line 1366... | ||
1366 | 1366 | ||
1367 | cmp [BOOT_VAR+0x901c], byte 2 |
1367 | cmp [BOOT_VAR+BOOT_MTRR], byte 2 |
Line 1552... | Line 1552... | ||
1552 | xor eax, eax |
1552 | xor eax, eax |
1553 | pop ebx |
1553 | pop ebx |
1554 | .fail: |
1554 | .fail: |
1555 | ret |
1555 | ret |
1556 | endp0>>=> |
1556 | endp |
- | 1557 | ||
- | 1558 | ||
- | 1559 | align 4 |
|
- | 1560 | proc print_mem |
|
- | 1561 | mov edi, BOOT_VAR + 0x9104 |
|
- | 1562 | mov ecx, [edi-4] |
|
- | 1563 | test ecx, ecx |
|
- | 1564 | jz .done |
|
- | 1565 | ||
- | 1566 | @@: |
|
- | 1567 | mov eax, [edi] |
|
- | 1568 | mov edx, [edi+4] |
|
- | 1569 | add eax, [edi+8] |
|
- | 1570 | adc edx, [edi+12] |
|
- | 1571 | ||
- | 1572 | DEBUGF 1, "K : E820 %x%x - %x%x type %d\n", \ |
|
- | 1573 | [edi+4], [edi],\ |
|
- | 1574 | edx, eax, [edi+16] |
|
- | 1575 | add edi, 20 |
|
- | 1576 | dec ecx |
|
- | 1577 | jnz @b |
|
- | 1578 | .done: |
|
- | 1579 | ret |
|
- | 1580 | endp0>>=> |