From 5ce26ca2dae12263a867330f54c7d8c397006f1b Mon Sep 17 00:00:00 2001 From: "Artem Jerdev (art_zh)" Date: Wed, 24 Nov 2010 16:10:45 +0000 Subject: [PATCH] Kolibri-A: non-cacheable WinMap = BARE TEST VERSION! = git-svn-id: svn://kolibrios.org@1710 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/Kolibri-A/trunk/const.inc | 1 + kernel/branches/Kolibri-A/trunk/core/heap.inc | 5 ++- .../branches/Kolibri-A/trunk/core/memory.inc | 2 + kernel/branches/Kolibri-A/trunk/gui/font.inc | 2 + kernel/branches/Kolibri-A/trunk/gui/mouse.inc | 3 ++ .../branches/Kolibri-A/trunk/gui/skincode.inc | 6 ++- .../branches/Kolibri-A/trunk/gui/window.inc | 3 ++ kernel/branches/Kolibri-A/trunk/kernel.asm | 37 ++++--------------- 8 files changed, 27 insertions(+), 32 deletions(-) diff --git a/kernel/branches/Kolibri-A/trunk/const.inc b/kernel/branches/Kolibri-A/trunk/const.inc index c0039d0202..b47cc013e0 100644 --- a/kernel/branches/Kolibri-A/trunk/const.inc +++ b/kernel/branches/Kolibri-A/trunk/const.inc @@ -252,6 +252,7 @@ Screen_Max_Y equ (OS_BASE+0x000FE04) BytesPerScanLine equ (OS_BASE+0x000FE08) SCR_MODE equ (OS_BASE+0x000FE0C) +KERNEL_ALLOC_FLAG equ (OS_BASE+0x000FE70) mmio_pcie_cfg_addr equ (OS_BASE+0x000FE74) mmio_pcie_cfg_lim equ (OS_BASE+0x000FE78) mmio_pcie_cfg_pdes equ (OS_BASE+0x000FE7C) diff --git a/kernel/branches/Kolibri-A/trunk/core/heap.inc b/kernel/branches/Kolibri-A/trunk/core/heap.inc index 9f7021dc57..ef2694f612 100644 --- a/kernel/branches/Kolibri-A/trunk/core/heap.inc +++ b/kernel/branches/Kolibri-A/trunk/core/heap.inc @@ -110,6 +110,7 @@ proc init_kernel_heap mov [mem_used.fd], eax mov [mem_used.bk], eax + mov [KERNEL_ALLOC_FLAG], dword PG_SW stdcall alloc_pages, dword 32 mov ecx, 32 mov edx, eax @@ -571,7 +572,7 @@ proc kernel_alloc stdcall, size:dword mov edi, eax mov edx, [lin_addr] @@: - stdcall map_page,edx,edi,dword PG_SW + stdcall map_page,edx,edi,dword [KERNEL_ALLOC_FLAG] add edx, 0x1000 add edi, 0x1000 dec ecx @@ -1538,3 +1539,5 @@ proc shmem_close stdcall, name:dword .fail: ret endp +diff16 "heap code end ",0,$ +diff16 "heap code size",init_kernel_heap,$ diff --git a/kernel/branches/Kolibri-A/trunk/core/memory.inc b/kernel/branches/Kolibri-A/trunk/core/memory.inc index 1d35930a44..dcff0a179b 100644 --- a/kernel/branches/Kolibri-A/trunk/core/memory.inc +++ b/kernel/branches/Kolibri-A/trunk/core/memory.inc @@ -1441,3 +1441,5 @@ proc create_ring_buffer stdcall, size:dword, flags:dword .fail: ret endp +diff16 "memman code end",0,$ +diff16 "memman code sze",alloc_page,$ diff --git a/kernel/branches/Kolibri-A/trunk/gui/font.inc b/kernel/branches/Kolibri-A/trunk/gui/font.inc index b5fbbab459..db94aa5582 100644 --- a/kernel/branches/Kolibri-A/trunk/gui/font.inc +++ b/kernel/branches/Kolibri-A/trunk/gui/font.inc @@ -130,3 +130,5 @@ dtext: ; Text String Output (rw by Johnny_B[john@kolibrios.org]) popad pop eax ; << // Alver 22.06.2008 // << ret +diff16 "font code end ",0,$ +diff16 "font code size",dtext,$ diff --git a/kernel/branches/Kolibri-A/trunk/gui/mouse.inc b/kernel/branches/Kolibri-A/trunk/gui/mouse.inc index 32055cf99d..c9aca5f503 100644 --- a/kernel/branches/Kolibri-A/trunk/gui/mouse.inc +++ b/kernel/branches/Kolibri-A/trunk/gui/mouse.inc @@ -699,3 +699,6 @@ mouse._.check_sys_window_actions: ;//////////////////////////////////////////// .exit: ret + +diff16 "mouse code end ",0,$ +diff16 "mouse code size",mouse_check_events,$ diff --git a/kernel/branches/Kolibri-A/trunk/gui/skincode.inc b/kernel/branches/Kolibri-A/trunk/gui/skincode.inc index 7012f74b9e..135ee57c26 100644 --- a/kernel/branches/Kolibri-A/trunk/gui/skincode.inc +++ b/kernel/branches/Kolibri-A/trunk/gui/skincode.inc @@ -68,10 +68,10 @@ ends struct SKIN_BUTTONS .type dd ? - .pos: + .pos: .left dw ? .top dw ? - .size: + .size: .width dw ? .height dw ? ends @@ -458,3 +458,5 @@ drawwindow_IV: ret 4 +diff16 "skin code end ",0,$ +diff16 "skin code size",read_skin_file,$ diff --git a/kernel/branches/Kolibri-A/trunk/gui/window.inc b/kernel/branches/Kolibri-A/trunk/gui/window.inc index ebf199d8ce..3f99f8c4a4 100644 --- a/kernel/branches/Kolibri-A/trunk/gui/window.inc +++ b/kernel/branches/Kolibri-A/trunk/gui/window.inc @@ -2083,3 +2083,6 @@ window._.draw_negative_box: ;////////////////////////////////////////////////// call draw_rectangle.forced pop esi ebx eax ret + +diff16 "window code end",0,$ +diff16 "window.inc size",syscall_draw_window,$ diff --git a/kernel/branches/Kolibri-A/trunk/kernel.asm b/kernel/branches/Kolibri-A/trunk/kernel.asm index 05d1b8fae3..b6ef93b188 100644 --- a/kernel/branches/Kolibri-A/trunk/kernel.asm +++ b/kernel/branches/Kolibri-A/trunk/kernel.asm @@ -198,7 +198,6 @@ diff16 "end of tmp_gdt ",0,$ include "data16.inc" -diff16 "end of data16 ",0,$ use32 org $+0x10000 @@ -500,9 +499,11 @@ v20ga32: shr eax,16 mov [graph_data_l+4],al mov [graph_data_l+7],ah - + + or [KERNEL_ALLOC_FLAG], dword PG_NOCACHE stdcall kernel_alloc, [_WinMapSize] - mov [_WinMapAddress], eax + mov [_WinMapAddress], eax + xor [KERNEL_ALLOC_FLAG], dword PG_NOCACHE xor eax,eax inc eax @@ -894,31 +895,9 @@ if preboot_blogesc jne .bll1 end if -; mov [ENABLE_TASKSWITCH],byte 1 ; multitasking enabled - -; UNMASK ALL IRQ'S - -; mov esi,boot_allirqs -; call boot_log -; -; cli ;guarantee forbidance of interrupts. -; mov al,0 ; unmask all irq's -; out 0xA1,al -; out 0x21,al -; -; mov ecx,32 -; -; ready_for_irqs: -; -; mov al,0x20 ; ready for irqs -; out 0x20,al -; out 0xa0,al -; -; loop ready_for_irqs ; flush the queue stdcall attach_int_handler, 1, irq1, 0 -; mov [dma_hdd],1 cmp [IDEContrRegsBaseAddr], 0 setnz [dma_hdd] mov [timer_ticks_enable],1 ; for cd driver @@ -926,11 +905,9 @@ end if sti call change_task - jmp osloop + jmp osloop ; Fly :) -; jmp $ ; wait here for timer to take control - - ; Fly :) +diff16 "init code end: ",0,$ include 'unpacker.inc' include 'fdo.inc' @@ -2238,6 +2215,7 @@ nosb1: test ecx, ecx jz @f cmp eax, static_background_data + jz .ret @@: mov ebx, [mem_BACKGROUND] @@ -2726,6 +2704,7 @@ sys_redrawstat: mov [edx + RECT.left], 0 mov [edx + RECT.top], 0 mov eax, [Screen_Max_X] + mov [edx + RECT.right], eax mov eax, [Screen_Max_Y] mov [edx + RECT.bottom], eax