/kernel/branches/Kolibri-acpi/blkdev/bd_drv.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/blkdev/cd_drv.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/blkdev/disk.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2011-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2011-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/blkdev/disk_cache.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2011-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2011-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/blkdev/fdc.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/blkdev/flp_drv.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/blkdev/hd_drv.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/blkdev/ide_cache.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/blkdev/rd.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; RAMDISK functions ;; |
/kernel/branches/Kolibri-acpi/blkdev/rdsave.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/bootcode.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
/kernel/branches/Kolibri-acpi/boot/booten.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/bootet.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/bootge.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/bootru.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/bootsp.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/bootstr.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/bootvesa.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
218,7 → 218,7 |
test [es:mi.ModeAttributes], 10000000b ;LFB ? |
jz @f |
cmp [es:mi.BitsPerPixel], 32 ;It show only videomodes to have support 24 and 32 bpp |
cmp [es:mi.BitsPerPixel], 16 ;List only supported videomodes (16, 24 and 32 bpp) |
jb @f |
; 16 bpp might actually be 15 bpp |
/kernel/branches/Kolibri-acpi/boot/et.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/parsers.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2011-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/preboot.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/rdload.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/ru.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/boot/shutdown.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Shutdown for Menuet ;; |
/kernel/branches/Kolibri-acpi/bootloader/boot_fat12.asm |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/bootloader/floppy1440.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/bootloader/floppy1680.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/bootloader/floppy1743.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/bootloader/floppy2880.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/bus/pci/PCIe.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2010-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2010-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; ;; |
/kernel/branches/Kolibri-acpi/bus/pci/pci16.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; PCI16.INC ;; |
/kernel/branches/Kolibri-acpi/bus/pci/pci32.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; ;; |
/kernel/branches/Kolibri-acpi/bus/usb/hccommon.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/bus/usb/hub.inc |
---|
1,11 → 1,11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4850 $ |
$Revision: 5363 $ |
; Support for USB (non-root) hubs: |
/kernel/branches/Kolibri-acpi/bus/usb/init.inc |
---|
1,11 → 1,11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4850 $ |
$Revision: 5363 $ |
; Initialization of the USB subsystem. |
/kernel/branches/Kolibri-acpi/bus/usb/memory.inc |
---|
1,11 → 1,11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4850 $ |
$Revision: 5363 $ |
; Memory management for USB structures. |
; Protocol layer uses the common kernel heap malloc/free. |
/kernel/branches/Kolibri-acpi/bus/usb/pipe.inc |
---|
1,11 → 1,11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4850 $ |
$Revision: 5363 $ |
; Functions for USB pipe manipulation: opening/closing, sending data etc. |
/kernel/branches/Kolibri-acpi/bus/usb/protocol.inc |
---|
1,11 → 1,11 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5177 $ |
$Revision: 5363 $ |
; Implementation of the USB protocol for device enumeration. |
/kernel/branches/Kolibri-acpi/const.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
98,6 → 98,9 |
MSR_SYSENTER_CS equ 0x174 |
MSR_SYSENTER_ESP equ 0x175 |
MSR_SYSENTER_EIP equ 0x176 |
MSR_CR_PAT equ 0x277 |
MSR_MTRR_DEF_TYPE equ 0x2FF |
MSR_AMD_EFER equ 0xC0000080 ; Extended Feature Enable Register |
MSR_AMD_STAR equ 0xC0000081 ; SYSCALL/SYSRET Target Address Register |
271,17 → 274,36 |
PAGE_SIZE equ 4096 |
PG_UNMAP equ 0x000 |
PG_MAP equ 0x001 |
PG_READ equ 0x001 |
PG_WRITE equ 0x002 |
PG_SW equ 0x003 |
PG_USER equ 0x005 |
PG_UW equ 0x007 |
PG_NOCACHE equ 0x018 |
PG_LARGE equ 0x080 |
PG_USER equ 0x004 |
PG_PCD equ 0x008 |
PG_PWT equ 0x010 |
PG_ACCESSED equ 0x020 |
PG_DIRTY equ 0x040 |
PG_PAT equ 0x080 |
PG_GLOBAL equ 0x100 |
PG_SHARED equ 0x200 |
PG_SWR equ 0x003 ; (PG_WRITE+PG_READ) |
PG_UR equ 0x005 ; (PG_USER+PG_READ) |
PG_UWR equ 0x007 ; (PG_USER+PG_WRITE+PG_READ) |
PG_NOCACHE equ 0x018 ; (PG_PCD+PG_PWT) |
PDE_LARGE equ 0x080 |
PAT_WB equ 0x000 |
PAT_WC equ 0x008 |
PAT_UCM equ 0x010 |
PAT_UC equ 0x018 |
PAT_TYPE_UC equ 0 |
PAT_TYPE_WC equ 1 |
PAT_TYPE_WB equ 6 |
PAT_TYPE_UCM equ 7 |
PAT_VALUE equ 0x00070106; (UC<<24)|(UCM<<16)|(WC<<8)|WB |
;;;;;;;;;;;boot time variables |
BOOT_BPP equ 0x9000 ;byte bits per pixel |
425,39 → 447,7 |
parent dd ? ;DLLDESCR |
ends |
struct display_t |
x dd ? |
y dd ? |
width dd ? |
height dd ? |
bits_per_pixel dd ? |
vrefresh dd ? |
pitch dd ? |
lfb dd ? |
modes dd ? |
ddev dd ? |
connector dd ? |
crtc dd ? |
cr_list.next dd ? |
cr_list.prev dd ? |
cursor dd ? |
init_cursor dd ? |
select_cursor dd ? |
show_cursor dd ? |
move_cursor dd ? |
restore_cursor dd ? |
disable_mouse dd ? |
mask_seqno dd ? |
check_mouse dd ? |
check_m_pixel dd ? |
bytes_per_pixel dd ? |
ends |
struct BOOT_DATA |
bpp dd ? |
scanline dd ? |
497,10 → 487,54 |
ends |
struct MUTEX |
lhead LHEAD |
wait_list LHEAD |
count dd ? |
ends |
struct RWSEM |
wait_list LHEAD |
count dd ? |
ends |
struct display_t |
x dd ? |
y dd ? |
width dd ? |
height dd ? |
bits_per_pixel dd ? |
vrefresh dd ? |
lfb dd ? |
lfb_pitch dd ? |
win_map_lock RWSEM |
win_map dd ? |
win_map_pitch dd ? |
win_map_size dd ? |
modes dd ? |
ddev dd ? |
connector dd ? |
crtc dd ? |
cr_list.next dd ? |
cr_list.prev dd ? |
cursor dd ? |
init_cursor dd ? |
select_cursor dd ? |
show_cursor dd ? |
move_cursor dd ? |
restore_cursor dd ? |
disable_mouse dd ? |
mask_seqno dd ? |
check_mouse dd ? |
check_m_pixel dd ? |
bytes_per_pixel dd ? |
ends |
struct PCIDEV |
bk dd ? |
fd dd ? |
/kernel/branches/Kolibri-acpi/core/apic.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
63,7 → 63,7 |
call IRQ_mask_all |
; IOAPIC init |
stdcall map_io_mem, [acpi_ioapic_base], 0x20, PG_SW+PG_NOCACHE |
stdcall map_io_mem, [acpi_ioapic_base], 0x20, PG_GLOBAL+PG_NOCACHE+PG_SWR |
mov [IOAPIC_base], eax |
mov eax, IOAPIC_VER |
127,7 → 127,7 |
cmp [LAPIC_BASE], 0 |
jne .done |
stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_SW+PG_NOCACHE |
stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_GLOBAL+PG_NOCACHE+PG_SWR |
mov [LAPIC_BASE], eax |
mov esi, eax |
/kernel/branches/Kolibri-acpi/core/clipboard.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/conf_lib-sp.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/conf_lib.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/debug.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/dll.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
517,7 → 517,7 |
test eax, eax |
jz .err_3 |
or eax, PG_UW |
or eax, PG_UWR |
stosd |
dec edx |
jnz @B |
579,7 → 579,7 |
@@: |
lodsd |
and eax, 0xFFFFF000 |
or eax, PG_UW |
or eax, PG_UWR |
stosd |
loop @B |
1144,7 → 1144,7 |
.map_pages_loop: |
mov eax, [page_tabs+ecx*4] |
and eax, not 0xFFF |
or al, PG_USER |
or al, PG_UR |
xchg eax, [page_tabs+edx*4] |
test al, 1 |
jz @f |
/kernel/branches/Kolibri-acpi/core/export.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/exports.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
45,6 → 45,11 |
release_pages, 'ReleasePages', \ |
alloc_dma24, 'AllocDMA24', \ ; stdcall |
\ |
init_rwsem, 'InitRwsem', \ ; gcc fastcall |
down_read, 'DownRead', \ ; gcc fastcall |
down_write, 'DownWrite', \ ; gcc fastcall |
up_read, 'UpRead', \ ; gcc fastcall |
up_write, 'UpWrite', \ ; gcc fastacll |
mutex_init, 'MutexInit', \ ; gcc fastcall |
mutex_lock, 'MutexLock', \ ; gcc fastcall |
mutex_unlock, 'MutexUnlock', \ ; gcc fastcall |
117,7 → 122,9 |
NET_remove_device, 'NetUnRegDev', \ |
NET_ptr_to_num, 'NetPtrToNum', \ |
NET_link_changed, 'NetLinkChanged', \ |
ETH_input, 'Eth_input', \ |
ETH_input, 'EthInput', \ |
NET_BUFF_alloc, 'NetAlloc', \ |
NET_BUFF_free, 'NetFree', \ |
\ |
get_pcidev_list, 'GetPCIList', \ |
\ |
/kernel/branches/Kolibri-acpi/core/ext_lib.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/fpu.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/heap.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
130,7 → 130,7 |
stdcall alloc_pages, dword 32 |
or eax, PG_SW |
or eax, PG_SWR |
mov ebx, HEAP_BASE |
mov ecx, 32 |
call commit_pages |
492,7 → 492,7 |
jz .err |
mov ecx, ebx |
or eax, PG_SW |
or eax, PG_GLOBAL+PG_SWR |
mov ebx, [lin_addr] |
call commit_pages |
506,7 → 506,7 |
test eax, eax |
jz .err |
stdcall map_page, edx, eax, dword PG_SW |
stdcall map_page, edx, eax, dword (PG_GLOBAL+PG_SWR) |
add edx, 0x1000 |
dec ebx |
jnz @B |
1451,7 → 1451,7 |
mov edx, [access] |
or edx, [owner_access] |
shl edx, 1 |
or edx, PG_USER+PG_SHARED |
or edx, PG_SHARED+PG_UR |
@@: |
lodsd |
and eax, 0xFFFFF000 |
/kernel/branches/Kolibri-acpi/core/irq.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/malloc.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/memory.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
127,8 → 127,8 |
map_page: |
push ebx |
mov eax, [esp+12] ; phis_addr |
and eax, not 0xFFF |
or eax, [esp+16] ; flags |
and eax, [pte_valid_mask] |
mov ebx, [esp+8] ; lin_addr |
shr ebx, 12 |
mov [page_tabs+ebx*4], eax |
191,8 → 191,8 |
mov edx, [base] |
shr eax, 12 |
shr ecx, 12 |
and edx, -4096 |
or edx, [flags] |
and edx, [pte_valid_mask] |
@@: |
mov [page_tabs+eax*4], edx |
invlpg [ebx] |
229,6 → 229,7 |
pop ecx |
pop eax |
and eax, [pte_valid_mask ] |
mov edi, ebx |
shr edi, 12 |
lea edi, [page_tabs+edi*4] |
340,7 → 341,7 |
shr ebx, 22 |
mov eax, [phis_addr] |
and eax, not 0xFFF |
or eax, PG_UW ;+PG_NOCACHE |
or eax, PG_UWR |
mov dword [master_tab+ebx*4], eax |
mov eax, [lin_addr] |
shr eax, 10 |
420,7 → 421,7 |
call alloc_page |
stdcall map_page_table, LFB_BASE, eax |
pop eax |
or eax, PG_UW |
or eax, PG_UWR |
mov ebx, LFB_BASE |
; max VGA=640*480*4=1228800 bytes |
; + 32*640*4=81920 bytes for mouse pointer |
447,7 → 448,7 |
bt [cpu_caps], CAPS_PSE |
jnc .map_page_tables |
or esi, PG_LARGE+PG_UW |
or esi, PDE_LARGE+PG_UWR |
mov edx, sys_proc+PROC.pdt_0+(LFB_BASE shr 20) |
@@: |
mov [edx], esi |
476,14 → 477,14 |
mov eax, [LFBAddress] |
mov edi, page_tabs + (LFB_BASE shr 10) |
or eax, PG_UW |
or eax, PG_GLOBAL+PG_UWR |
and eax, [pte_valid_mask] |
mov ecx, [pg_count] |
cld |
@@: |
stosd |
add eax, 0x1000 |
dec ecx |
jnz @B |
loop @B |
mov dword [LFBAddress], LFB_BASE |
mov eax, cr3 ;flush TLB |
679,7 → 680,7 |
ret |
.user_space: |
test eax, PG_MAP |
test eax, PG_READ |
jnz .err_access ;Страница присутствует |
;Ошибка доступа ? |
687,7 → 688,7 |
mov ecx, ebx |
shr ecx, 10 |
mov edx, [master_tab+ecx*4] |
test edx, PG_MAP |
test edx, PG_READ |
jz .fail ;таблица страниц не создана |
;неверный адрес в программе |
700,7 → 701,7 |
test eax, eax |
jz .fail |
stdcall map_page, [.err_addr], eax, PG_UW |
stdcall map_page, [.err_addr], eax, PG_UWR |
mov edi, [.err_addr] |
and edi, 0xFFFFF000 |
737,7 → 738,7 |
call alloc_page |
test eax, eax |
jz .fail |
stdcall map_page, ebx, eax, PG_UW |
stdcall map_page, ebx, eax, PG_UWR |
mov edi, ebx |
mov ecx, 1024 |
sub ebx, [esi+HDLL.base] |
748,7 → 749,7 |
jmp .exit |
.kernel_space: |
test eax, PG_MAP |
test eax, PG_READ |
jz .fail ;страница не присутствует |
test eax, 12 ;U/S (+below) |
774,7 → 775,7 |
jz .fail |
push eax |
stdcall map_page, [.err_addr], eax, dword PG_SW |
stdcall map_page, [.err_addr], eax, dword PG_SWR |
pop eax |
mov edi, [.err_addr] |
and edi, -4096 |
783,7 → 784,7 |
mov ebx, esi |
shr ebx, 12 |
mov edx, [current_slot] |
or eax, PG_SW |
or eax, PG_SWR |
mov [edx+APPDATA.io_map+ebx*4], eax |
add esi, [default_io_map] |
818,7 → 819,7 |
mov esi, [ipc_ptab] |
and eax, 0xFFFFF000 |
jz .exit |
stdcall map_page, esi, eax, PG_SW |
stdcall map_page, esi, eax, PG_SWR |
@@: |
mov edi, [lin_addr] |
and edi, 0xFFFFF000 |
849,7 → 850,7 |
and eax, 0xFFFFF000 |
jz .exit |
stdcall map_page, esi, eax, PG_SW |
stdcall map_page, esi, eax, PG_SWR |
xor edx, edx |
jmp .map |
.exit: |
881,7 → 882,7 |
mov esi, [proc_mem_tab] |
and eax, 0xFFFFF000 |
jz .exit |
stdcall map_page, esi, eax, PG_SW |
stdcall map_page, esi, eax, PG_SWR |
@@: |
mov edi, [lin_addr] |
and edi, 0xFFFFF000 |
912,7 → 913,7 |
and eax, 0xFFFFF000 |
jz .exit |
stdcall map_page, esi, eax, PG_SW |
stdcall map_page, esi, eax, PG_SWR |
xor edx, edx |
jmp .map |
.exit: |
927,7 → 928,7 |
; destroys: only eax |
proc safe_map_page stdcall, slot:dword, req_access:dword, ofs:dword |
mov eax, [esi+edx*4] |
test al, PG_MAP |
test al, PG_READ |
jz .not_present |
test al, PG_WRITE |
jz .resolve_readonly |
947,7 → 948,7 |
pop ecx |
test eax, eax |
jz .fail |
or al, PG_UW |
or al, PG_UWR |
mov [esi+edx*4], eax |
jmp .map |
.resolve_readonly: |
989,7 → 990,7 |
call alloc_page |
test eax, eax |
jz .no_hdll |
or al, PG_UW |
or al, PG_UWR |
mov [esi+edx*4], eax |
stdcall map_page, edi, eax, [req_access] |
push esi edi |
1090,7 → 1091,7 |
@@: |
mov [used_buf], ecx |
stdcall map_mem_ipc, ecx, [dst_slot], \ |
edi, esi, PG_SW |
edi, esi, PG_SWR |
mov edi, [dst_offset] |
add edi, [used_buf] |
/kernel/branches/Kolibri-acpi/core/mtrr.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
25,21 → 25,65 |
; Helper procedure for mtrr_reconfigure and set_mtrr, |
; called before changes in MTRRs. |
; 1. disable and flush caches |
; 2. clear PGE bit in cr4 |
; 3. flush TLB |
; 4. disable mtrr |
proc mtrr_begin_change |
mov eax, cr0 |
or eax, 0x60000000 ;disable caching |
mov cr0, eax |
wbinvd ;invalidate cache |
bt [cpu_caps], CAPS_PGE |
jnc .cr3_flush |
mov eax, cr4 |
btr eax, 7 ;clear cr4.PGE |
mov cr4, eax ;flush TLB |
jmp @F ;skip extra serialization |
.cr3_flush: |
mov eax, cr3 |
mov cr3, eax ;flush TLB |
@@: |
mov ecx, MSR_MTRR_DEF_TYPE |
rdmsr |
btr eax, 11 ;clear enable flag |
wrmsr ;disable mtrr |
ret |
endp |
; Helper procedure for mtrr_reconfigure and set_mtrr, |
; called after changes in MTRRs. |
; 1. enable mtrr |
; 2. flush all caches |
; 3. flush TLB |
; 4. restore cr4.PGE flag, if required |
proc mtrr_end_change |
mov ecx, MSR_MTRR_DEF_TYPE |
rdmsr |
or ah, 8 ; enable variable-ranges MTRR |
and al, 0xF0 ; default memtype = UC |
wrmsr |
wbinvd ;again invalidate |
mov eax, cr0 |
and eax, not 0x60000000 |
mov cr0, eax ; enable caching |
mov eax, cr3 |
mov cr3, eax ;flush tlb |
bt [cpu_caps], CAPS_PGE |
jnc @F |
mov eax, cr4 |
bts eax, 7 ;set cr4.PGE flag |
mov cr4, eax |
@@: |
ret |
endp |
695,12 → 739,15 |
jmp @b |
@@: |
; 9i. Configure MTRR_DEF_TYPE. |
mov ecx, 0x2FF |
rdmsr |
or ah, 8 ; enable variable-ranges MTRR |
and al, 0xF0; default memtype = UC |
; 9i. Check PAT support and reprogram PAT_MASR for write combining memory |
bt [cpu_caps], CAPS_PAT |
jnc @F |
mov ecx, MSR_CR_PAT |
mov eax, PAT_VALUE ;UC UCM WC WB |
mov edx, eax |
wrmsr |
@@: |
; 9j. Changes are done. |
call mtrr_end_change |
738,7 → 785,9 |
ret |
.found: |
; found, write values |
push ecx |
call mtrr_begin_change |
pop ecx |
xor edx, edx |
mov eax, [base] |
or eax, [mem_type] |
842,13 → 891,13 |
; It must be write-combined. |
test word [SCR_MODE], 0x4000 |
jz .exit |
mov eax, [_display.pitch] |
mov eax, [_display.lfb_pitch] |
mul [_display.height] |
dec eax |
; LFB is mapped to virtual address LFB_BASE, |
; it uses global pages if supported by CPU. |
mov ebx, [sys_proc+PROC.pdt_0+(LFB_BASE shr 20)] |
test ebx, PG_LARGE |
test ebx, PDE_LARGE |
jnz @f |
mov ebx, [page_tabs+(LFB_BASE shr 10)] |
@@: |
/kernel/branches/Kolibri-acpi/core/peload.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
42,6 → 42,7 |
jz .cleanup |
mov [base], eax |
DEBUGF 1,'K : driver %s mapped to %x\n',[file_name],[base] |
push ebx ebp |
mov ebx, [image] |
/kernel/branches/Kolibri-acpi/core/sched.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
116,8 → 116,6 |
Mov [tss._esp0],eax,[ebx+APPDATA.saved_esp0] |
mov edx, [ebx+APPDATA.tls_base] |
cmp edx, [esi+APPDATA.tls_base] |
je @f |
mov [tls_data_l+2], dx |
shr edx, 16 |
126,7 → 124,7 |
mov dx, app_tls |
mov fs, dx |
@@: |
; set gs selector unconditionally |
Mov gs,ax,graph_data |
; set CR0.TS |
155,22 → 153,24 |
;end. |
struct MUTEX_WAITER |
list LHEAD |
task dd ? |
type dd ? |
ends |
RWSEM_WAITING_FOR_WRITE equ 0 |
RWSEM_WAITING_FOR_READ equ 1 |
;void __fastcall mutex_init(struct mutex *lock) |
align 4 |
mutex_init: |
mov [ecx+MUTEX.lhead.next], ecx |
mov [ecx+MUTEX.lhead.prev], ecx |
mov [ecx+MUTEX.wait_list.next], ecx |
mov [ecx+MUTEX.wait_list.prev], ecx |
mov [ecx+MUTEX.count], 1 |
ret |
;void __fastcall mutex_lock(struct mutex *lock) |
align 4 |
200,15 → 200,13 |
call change_task |
jmp .forever |
@@: |
mov edx, [esp+MUTEX_WAITER.list.next] |
mov eax, [esp+MUTEX_WAITER.list.prev] |
mov eax, ecx |
list_del esp |
mov [eax+MUTEX_WAITER.list.next], edx |
mov [edx+MUTEX_WAITER.list.prev], eax |
cmp [ecx+MUTEX.lhead.next], ecx |
cmp [eax+MUTEX.wait_list.next], eax |
jne @F |
mov [ecx+MUTEX.count], 0 |
mov [eax+MUTEX.count], 0 |
@@: |
add esp, sizeof.MUTEX_WAITER |
224,7 → 222,7 |
pushfd |
cli |
mov eax, [ecx+MUTEX.lhead.next] |
mov eax, [ecx+MUTEX.wait_list.next] |
cmp eax, ecx |
mov [ecx+MUTEX.count], 1 |
je @F |
236,8 → 234,167 |
ret |
;void __fastcall init_rwsem(struct rw_semaphore *sem) |
align 4 |
init_rwsem: |
mov [ecx+RWSEM.wait_list.next], ecx |
mov [ecx+RWSEM.wait_list.prev], ecx |
mov [ecx+RWSEM.count], 0 |
ret |
;void __fastcall down_read(struct rw_semaphore *sem) |
align 4 |
down_read: |
pushfd |
cli |
mov eax, [ecx+RWSEM.count] |
test eax, eax |
js @F |
cmp ecx, [ecx+RWSEM.wait_list.next] |
je .ok |
@@: |
sub esp, sizeof.MUTEX_WAITER |
mov eax, [TASK_BASE] |
mov [esp+MUTEX_WAITER.task], eax |
mov [esp+MUTEX_WAITER.type], RWSEM_WAITING_FOR_READ |
mov [eax+TASKDATA.state], 1 |
list_add_tail esp, ecx ;esp= new waiter, ecx= list head |
call change_task |
add esp, sizeof.MUTEX_WAITER |
popfd |
ret |
.ok: |
inc eax |
mov [ecx+RWSEM.count], eax |
popfd |
ret |
;void __fastcall down_write(struct rw_semaphore *sem) |
align 4 |
down_write: |
pushfd |
cli |
sub esp, sizeof.MUTEX_WAITER |
mov edx, [TASK_BASE] |
mov [esp+MUTEX_WAITER.task], edx |
mov [esp+MUTEX_WAITER.type], RWSEM_WAITING_FOR_WRITE |
mov [edx+TASKDATA.state], 1 |
list_add_tail esp, ecx ;esp= new waiter, ecx= list head |
xor eax, eax |
not eax |
.forever: |
test eax, [ecx+RWSEM.count] |
jz @F |
mov [edx+TASKDATA.state], 1 |
call change_task |
jmp .forever |
@@: |
mov [ecx+RWSEM.count], eax |
list_del esp |
add esp, sizeof.MUTEX_WAITER |
popfd |
ret |
;void __fastcall up_read(struct rw_semaphore *sem) |
align 4 |
up_read: |
pushfd |
cli |
dec [ecx+RWSEM.count] |
jnz @F |
mov eax, [ecx+RWSEM.wait_list.next] |
cmp eax, ecx |
je @F |
mov eax, [eax+MUTEX_WAITER.task] |
mov [eax+TASKDATA.state], 0 |
@@: |
popfd |
ret |
;void __fastcall up_write(struct rw_semaphore *sem) |
align 4 |
up_write: |
pushfd |
cli |
mov eax, [ecx+RWSEM.wait_list.next] |
mov [ecx+RWSEM.count], 0 |
cmp ecx, eax |
je .done |
mov edx, [eax+MUTEX_WAITER.type] |
test edx, edx |
jnz .wake |
mov eax, [eax+MUTEX_WAITER.task] |
mov [eax+TASKDATA.state], 0 |
.done: |
popfd |
ret |
.wake: |
push ebx |
push esi |
push edi |
xor esi, esi |
mov edi, ecx |
.wake_list: |
mov ebx, [eax+MUTEX_WAITER.list.next] |
list_del eax |
mov edx, [eax+MUTEX_WAITER.task] |
mov [edx+TASKDATA.state], 0 |
inc esi |
cmp edi, ebx |
je .wake_done |
mov ecx, [ebx+MUTEX_WAITER.type] |
test ecx, ecx |
jz .wake_done |
mov eax, ebx |
jmp .wake_list |
.wake_done: |
add [edi+RWSEM.count], esi |
pop edi |
pop esi |
pop ebx |
popfd |
ret |
purge MUTEX_WAITER |
purge RWSEM_WAITING_FOR_WRITE |
purge RWSEM_WAITING_FOR_READ |
MAX_PRIORITY = 0 ; highest, used for kernel tasks |
USER_PRIORITY = 1 ; default |
IDLE_PRIORITY = 2 ; lowest, only IDLE thread goes here |
/kernel/branches/Kolibri-acpi/core/string.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; Author: Kees J. Bot 1 Jan 1994 ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/sync.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Synhronization for MenuetOS. ;; |
/kernel/branches/Kolibri-acpi/core/sys32-sp.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/sys32.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; ;; |
308,7 → 308,7 |
mov ecx, ebx |
shr ecx, 10 |
mov edx, [master_tab+ecx*4] |
test edx, PG_MAP |
test edx, PG_READ |
jz .fail ;page table is not created |
;incorrect address in the program |
/kernel/branches/Kolibri-acpi/core/syscall.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/taskman.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
489,7 → 489,7 |
cmp eax, ecx |
jbe @B |
mov [edi-4096+PROC.ht_next], 1 ;reserve handle 0 |
mov [edi-4096+PROC.ht_next], 3 ;reserve handles for stdin stdout and stderr |
mov eax, edi |
call get_pg_addr |
mov [edi-4096+PROC.pdt_0_phys], eax |
503,16 → 503,13 |
rep movsd |
mov eax, [edi-8192+PROC.pdt_0_phys] |
or eax, PG_SW |
or eax, PG_SWR |
mov [edi-4096+(page_tabs shr 20)], eax |
lea eax, [edi-8192] |
call set_cr3 |
mov ecx, [app_tabs] |
test ecx, ecx |
jz .done |
mov edx, [app_tabs] |
xor edi, edi |
@@: |
call alloc_page |
521,7 → 518,8 |
stdcall map_page_table, edi, eax |
add edi, 0x00400000 |
loop @B |
dec edx |
jnz @B |
mov edi, page_tabs |
530,13 → 528,9 |
xor eax, eax |
rep stosd |
mov ecx, [img_pages] |
mov ebx, PG_UWR |
xor edx, edx |
mov ecx, [img_pages] |
jcxz .bss |
sub [app_pages], ecx |
mov ebx, PG_UW |
mov esi, [img_base] |
shr esi, 10 |
add esi, page_tabs |
547,21 → 541,23 |
or eax, ebx; force user level r/w access |
stosd |
add edx, 0x1000 |
loop .remap |
.bss: |
mov ebx, [app_pages] |
test ebx, ebx |
dec [app_pages] |
dec ecx |
jnz .remap |
mov ecx, [app_pages] |
test ecx, ecx |
jz .done |
.map_bss: |
.alloc: |
call alloc_page |
test eax, eax |
jz .fail |
stdcall map_page, edx, eax, dword PG_UW |
stdcall map_page, edx, eax, dword PG_UWR |
add edx, 0x1000 |
dec ebx |
jnz .map_bss |
dec [app_pages] |
jnz .alloc |
.done: |
mov ecx, pg_data.mutex |
647,7 → 643,7 |
test eax, 1 |
jz .next |
and eax, not 0xFFF |
stdcall map_page, [tmp_task_ptab], eax, PG_SW |
stdcall map_page, [tmp_task_ptab], eax, PG_SWR |
stdcall destroy_page_table, [tmp_task_ptab] |
mov eax, [esi] |
call free_page |
792,7 → 788,7 |
push ecx |
stdcall map_memEx, [proc_mem_map], \ |
[slot], ebx, ecx, PG_MAP |
[slot], ebx, ecx, PG_READ |
pop ecx |
mov esi, [offset] |
863,7 → 859,7 |
; add ebx, new_app_base |
push ecx |
stdcall map_memEx, [proc_mem_map], \ |
[slot], ebx, ecx, PG_SW |
[slot], ebx, ecx, PG_SWR |
pop ecx |
mov edi, [offset] |
1145,9 → 1141,9 |
xor eax, eax |
mov [ecx+0], dword eax |
mov [ecx+4], dword eax |
mov eax, [Screen_Max_X] |
mov eax, [screen_workarea.right] |
mov [ecx+8], eax |
mov eax, [Screen_Max_Y] |
mov eax, [screen_workarea.bottom] |
mov [ecx+12], eax |
mov ebx, [pl0_stack] |
/kernel/branches/Kolibri-acpi/core/test_malloc.asm |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2009-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2009-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/timers.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2012-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/core/v86.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2007-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2007-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
78,7 → 78,7 |
; (I have seen one computer with EBDA segment = 0x9D80, |
; all other computers use less memory) |
mov eax, PG_UW |
mov eax, PG_UWR |
mov [page_tabs], eax |
invlpg [eax] |
89,7 → 89,7 |
mov byte [0x504], 0x10 |
mov byte [0x505], 0xF4 |
mov eax, 0x99000+PG_UW |
mov eax, 0x99000+PG_UWR |
mov edi, page_tabs+0x99*4 |
mov edx, 0x1000 |
mov ecx, 7 |
101,7 → 101,7 |
; addresses 0xC0000 - 0xFFFFF - BIOS code (shared between all machines!) |
; physical address = 0xC0000 |
mov eax, 0xC0000+PG_UW |
mov eax, 0xC0000+PG_UWR |
mov edi, page_tabs+0xC0*4 |
mov ecx, 64 |
@@: |
/kernel/branches/Kolibri-acpi/data16.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/data32.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
361,6 → 361,7 |
mst MEM_STATE |
pte_valid_mask rd 1 |
page_start rd 1 |
page_end rd 1 |
sys_page_map rd 1 |
375,12 → 376,8 |
_display display_t |
_WinMapAddress rd 1 |
_WinMapSize rd 1 |
LFBAddress dd ? |
Screen_Max_X dd ? |
Screen_Max_Y dd ? |
SCR_MODE rw 2 |
425,8 → 422,6 |
cur.lock rd 1 ;1 - lock update, 2- hide |
cur.left rd 1 ;cursor clip box |
cur.top rd 1 |
cur.right rd 1 |
cur.bottom rd 1 |
cur.w rd 1 |
cur.h rd 1 |
/kernel/branches/Kolibri-acpi/data32et.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/data32sp.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/biosdisk.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2008-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2008-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/biosmem.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2009-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2009-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/dev_fd.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/dev_hdcd.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/disks.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/getcache.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/init_ata.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2014-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/sear_par.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/detect/vortex86.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/docs/sysfuncr.txt |
---|
835,7 → 835,7 |
сворачивание окна осуществляется системой при нажатии на кнопку |
минимизации (которая для окон со скином определяется автоматически |
функцией 0, для окон без скина её можно определить функцией 8), |
восстановление - приложением @panel. |
восстановление - приложением @taskbar. |
====================================================================== |
====================== Функция 18, подфункция 11 ===================== |
1212,9 → 1212,9 |
* Получить раскладки и идентификатор страны можно с помощью |
подфункции 2 функции 26. |
* Идентификатор страны - глобальная системная переменная, которая |
самим ядром не используется; однако приложение @panel отображает |
самим ядром не используется; однако приложение @taskbar отображает |
соответствующую текущей стране иконку. |
* Приложение @panel переключает раскладки по запросу пользователя. |
* Приложение @taskbar переключает раскладки по запросу пользователя. |
====================================================================== |
========= Функция 21, подфункция 5 - установить язык системы. ======== |
1227,7 → 1227,7 |
* eax = 0 |
Замечания: |
* Язык системы - глобальная системная переменная, никак |
не используемая самим ядром, однако приложение @panel рисует |
не используемая самим ядром, однако приложение @taskbar рисует |
соответствующую иконку. |
* Проверок на корректность не делается, поскольку ядро эту |
переменную не использует. |
1426,10 → 1426,10 |
* Установить раскладки и идентификатор страны можно с помощью |
подфункции 2 функции 21. |
* Идентификатор страны - глобальная системная переменная, которая |
самим ядром не используется; однако приложение @panel отображает |
самим ядром не используется; однако приложение @taskbar отображает |
соответствующую текущей стране иконку |
(используя описываемую функцию). |
* Приложение @panel переключает раскладки по запросу пользователя. |
* Приложение @taskbar переключает раскладки по запросу пользователя. |
====================================================================== |
========== Функция 26, подфункция 5 - получить язык системы. ========= |
1441,7 → 1441,7 |
* eax = язык системы (1=eng, 2=fi, 3=ger, 4=rus) |
Замечания: |
* Язык системы - глобальная системная переменная, никак |
не используемая самим ядром, однако приложение @panel рисует |
не используемая самим ядром, однако приложение @taskbar рисует |
соответствующую иконку (используя описываемую функцию). |
* Установить язык системы можно вызовом подфункции 5 функции 21. |
2006,7 → 2006,7 |
* Рабочая область экрана определяет положение и координаты |
максимизированного окна. |
* Рабочая область экрана при нормальной работе есть весь экран |
за вычетом панели (@panel). |
за вычетом панели (@taskbar). |
* (left,top) - координаты левого верхнего угла, |
(right,bottom) - координаты правого нижнего. |
Таким образом, размер рабочей области по оси x определяется |
2028,7 → 2028,7 |
Замечания: |
* Рабочая область экрана определяет положение и координаты |
максимизированного окна. |
* Эта функция используется только приложением @panel, |
* Эта функция используется только приложением @taskbar, |
устанавливающим рабочей областью весь экран за вычетом панели. |
* (left,top) - координаты левого верхнего угла, |
(right,bottom) - координаты правого нижнего. |
/kernel/branches/Kolibri-acpi/docs/sysfuncs.txt |
---|
836,7 → 836,7 |
at pressing the minimization button (for skinned windows |
it is defined automatically by function 0, |
for other windows it can be defined manually by function 8), |
restore of a window is done by the application '@panel'. |
restore of a window is done by the application '@taskbar'. |
====================================================================== |
Function 18, subfunction 11 - get information on the disk subsystem. |
1213,9 → 1213,9 |
* To get layout and country identifier use |
subfunction 2 of function 26. |
* Country identifier is global system variable, which is not used |
by the kernel itself; however the application '@panel' displays |
by the kernel itself; however the application '@taskbar' displays |
the corresponding icon. |
* The application @panel switches layouts on user request. |
* The application @taskbar switches layouts on user request. |
====================================================================== |
========== Function 21, subfunction 5 - set system language. ========= |
1228,7 → 1228,7 |
* eax = 0 |
Remarks: |
* System language is global system variable and is not used |
by the kernel itself, however application @panel draws the |
by the kernel itself, however application @taskbar draws the |
appropriate icon. |
* Function does not check for correctness, as the kernel does not |
use this variable. |
1422,9 → 1422,9 |
* To set layout and country identifier use |
subfunction 2 of function 21. |
* Country identifier is global system variable, which is not used |
by the kernel itself; however the application '@panel' displays |
by the kernel itself; however the application '@taskbar' displays |
the corresponding icon (using this function). |
* The application @panel switches layouts on user request. |
* The application @taskbar switches layouts on user request. |
====================================================================== |
========== Function 26, subfunction 5 - get system language. ========= |
1436,7 → 1436,7 |
* eax = system language (1=eng, 2=fi, 3=ger, 4=rus) |
Remarks: |
* System language is global system variable and is not used |
by the kernel itself, however application @panel draws the |
by the kernel itself, however application @taskbar draws the |
appropriate icon (using this function). |
* To set system language use subfunction 5 of function 21. |
1996,7 → 1996,7 |
* The screen working area defines position and coordinates of |
a maximized window. |
* The screen working area in view of normal work is all screen |
without system panel (the application '@panel'). |
without taskbar ('@taskbar' application). |
* (left,top) are coordinates of the left upper corner, |
(right,bottom) are coordinates of the right lower one. |
Thus the size of working area on x axis can be calculated by |
2018,8 → 2018,8 |
Remarks: |
* The screen working area defines position and coordinates of |
a maximized window. |
* This function is used only by the application '@panel', |
which set working area to all screen without system panel. |
* This function is used only by the application '@taskbar', |
which set working area to all screen without taskbar. |
* (left,top) are coordinates of the left upper corner, |
(right,bottom) are coordinates of the right lower one. |
Thus the size of working area on x axis can be calculated by |
/kernel/branches/Kolibri-acpi/encoding.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fdo.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/ext2/blocks.inc |
---|
2,7 → 2,7 |
;; ;; |
;; Contains ext2 block handling code. ;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/ext2/ext2.asm |
---|
2,7 → 2,7 |
;; ;; |
;; Contains ext2 initialization, plus syscall handling code. ;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/ext2/ext2.inc |
---|
2,7 → 2,7 |
;; ;; |
;; Contains ext2 structures, and macros. ;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/ext2/inode.inc |
---|
2,7 → 2,7 |
;; ;; |
;; Contains ext2 inode handling code. ;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/ext2/resource.inc |
---|
2,7 → 2,7 |
;; ;; |
;; Contains common resource allocation + freeing code. ;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/fat.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; FAT32.INC ;; |
/kernel/branches/Kolibri-acpi/fs/fs_lfn.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/iso9660.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/ntfs.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/parse_fn.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/xfs.asm |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/fs/xfs.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/gui/button.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
/kernel/branches/Kolibri-acpi/gui/event.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/gui/font.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/gui/mouse.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2010-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2010-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
407,7 → 407,7 |
@@: |
add eax, [mouse.active_sys_window.new_box.height] |
cmp eax, [_display.height] |
jle .call_window_handler |
jl .call_window_handler |
sub eax, [_display.height] |
sub [mouse.active_sys_window.new_box.top], eax |
jmp .call_window_handler |
486,10 → 486,10 |
add eax, [mouse.active_sys_window.new_box.left] |
cmp eax, [_display.width] |
jl .call_window_handler |
sub eax, [_display.height] |
sub eax, [_display.width] |
neg eax |
add [mouse.active_sys_window.new_box.width], eax |
mov ecx, [_display.height] |
mov ecx, [_display.width] |
cmp ecx, eax |
jg .call_window_handler |
mov [mouse.active_sys_window.new_box.width], ecx |
526,7 → 526,7 |
mov esi, [mouse.state.pos.y] |
mov esi, [d_width_calc_area + esi*4] |
add esi, [_WinMapAddress] |
add esi, [_display.win_map] |
add esi, [mouse.state.pos.x] |
movzx esi, byte[esi] |
mov edi, esi |
/kernel/branches/Kolibri-acpi/gui/mousepointer.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/gui/skincode.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/gui/skindata.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/gui/window.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
215,7 → 215,8 |
syscall_display_settings.06: |
xor esi, esi |
mov edi, [Screen_Max_X] |
mov edi, [_display.width] |
dec edi |
mov eax, ecx |
movsx ebx, ax |
sar eax, 16 |
239,7 → 240,8 |
;-------------------------------------- |
align 4 |
.check_horizontal: |
mov edi, [Screen_Max_Y] |
mov edi, [_display.height] |
dec edi |
mov eax, edx |
movsx ebx, ax |
sar eax, 16 |
300,8 → 302,10 |
syscall_display_settings._.calculate_whole_screen: |
xor eax, eax |
xor ebx, ebx |
mov ecx, [Screen_Max_X] |
mov edx, [Screen_Max_Y] |
mov ecx, [_display.width] |
mov edx, [_display.height] |
dec ecx |
dec edx |
jmp calculatescreen |
;------------------------------------------------------------------------------ |
align 4 |
309,9 → 313,11 |
xor eax, eax |
mov [draw_limits.left], eax |
mov [draw_limits.top], eax |
mov eax, [Screen_Max_X] |
mov eax, [_display.width] |
dec eax |
mov [draw_limits.right], eax |
mov eax, [Screen_Max_Y] |
mov eax, [_display.height] |
dec eax |
mov [draw_limits.bottom], eax |
mov eax, window_data |
jmp redrawscreen |
590,12 → 596,12 |
mov eax, [edi + WDATA.box.left] |
add eax, [edi + WDATA.box.width] |
mov ebx, [Screen_Max_X] |
mov ebx, [_display.width] |
cmp eax, ebx |
jle .fix_vertical |
jl .fix_vertical |
mov eax, [edi + WDATA.box.width] |
sub eax, ebx |
jle @f |
jl @f |
mov [edi + WDATA.box.width], ebx |
;-------------------------------------- |
align 4 |
607,12 → 613,12 |
.fix_vertical: |
mov eax, [edi + WDATA.box.top] |
add eax, [edi + WDATA.box.height] |
mov ebx, [Screen_Max_Y] |
mov ebx, [_display.height] |
cmp eax, ebx |
jle .fix_client_box |
jl .fix_client_box |
mov eax, [edi + WDATA.box.height] |
sub eax, ebx |
jle @f |
jl @f |
mov [edi + WDATA.box.height], ebx |
;-------------------------------------- |
align 4 |
1718,9 → 1724,9 |
mov ecx, [edi + WDATA.box.width] |
mov edx, [edi + WDATA.box.height] |
mov esi, [Screen_Max_X] |
mov esi, [_display.width] |
cmp ecx, esi |
ja .fix_width_high |
jae .fix_width_high |
;-------------------------------------- |
align 4 |
.check_left: |
1728,13 → 1734,13 |
jl .fix_left_low |
add eax, ecx |
cmp eax, esi |
jg .fix_left_high |
jge .fix_left_high |
;-------------------------------------- |
align 4 |
.check_height: |
mov esi, [Screen_Max_Y] |
mov esi, [_display.height] |
cmp edx, esi |
ja .fix_height_high |
jae .fix_height_high |
;-------------------------------------- |
align 4 |
.check_top: |
1742,7 → 1748,7 |
jl .fix_top_low |
add ebx, edx |
cmp ebx, esi |
jg .fix_top_high |
jge .fix_top_high |
;-------------------------------------- |
align 4 |
.exit: |
1887,7 → 1893,7 |
mov edi, [d_width_calc_area + ebx*4] |
add edi, eax |
add edi, [_WinMapAddress] |
add edi, [_display.win_map] |
pop eax |
mov ah, al |
push ax |
1929,7 → 1935,7 |
mov eax, [d_width_calc_area + ebx*4] |
add eax, [esp] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
mov ebp, eax |
mov edi, [edi + APPDATA.wnd_shape] |
1992,8 → 1998,7 |
sub ebp, [ff_xsz] |
add ebp, [ff_x] |
add ebp, [Screen_Max_X] ; screen.x |
inc ebp |
add ebp, [_display.width] ; screen.x |
inc ebx |
cmp ebx, [ff_ysz] |
jb .ff_new_y |
/kernel/branches/Kolibri-acpi/hid/keyboard.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Copyright (C) MenuetOS 2000-2004 Ville Mikael Turjanmaa ;; |
;; Distributed under terms of the GNU General Public License ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/hid/mousedrv.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
115,7 → 115,7 |
; mul ecx |
mov eax, [d_width_calc_area + eax*4] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
movzx edx, byte [ebx+eax] |
shl edx, 8 |
mov esi, [edx+SLOT_BASE+APPDATA.cursor] |
501,9 → 501,10 |
mul edx |
shr eax, 15 |
.check_x: |
cmp ax, word[Screen_Max_X] |
cmp ax, word[_display.width] |
jl .set_x |
mov ax, word[Screen_Max_X] |
mov ax, word[_display.width] |
dec ax |
.set_x: |
mov [MOUSE_X], ax |
;-------------------------------------- |
522,9 → 523,10 |
mul edx |
shr eax, 15 |
.check_y: |
cmp ax, word[Screen_Max_Y] |
cmp ax, word[_display.height] |
jl .set_y |
mov ax, word[Screen_Max_Y] |
mov ax, word[_display.height] |
dec ax |
.set_y: |
mov [MOUSE_Y], ax |
;-------------------------------------- |
/kernel/branches/Kolibri-acpi/hid/set_dtc.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/imports.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/init.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
139,7 → 139,7 |
mov ebx, cr4 |
or ebx, CR4_PSE |
mov eax, PG_LARGE+PG_SW |
mov eax, PDE_LARGE+PG_SWR |
mov cr4, ebx |
dec [pg_data.kernel_tables-OS_BASE] |
149,7 → 149,7 |
mov edi, [tmp_page_tabs] |
jmp .map_kernel_heap ; new kernel fits to the first 4Mb - nothing to do with ".map_low" |
.no_PSE: |
mov eax, PG_SW |
mov eax, PG_SWR |
mov ecx, [tmp_page_tabs] |
shr ecx, 12 |
.map_low: |
168,7 → 168,7 |
mov ecx, [pg_data.kernel_tables-OS_BASE] |
mov eax, [tmp_page_tabs] |
or eax, PG_SW |
or eax, PG_SWR |
mov edi, edx |
.map_kernel_tabs: |
177,7 → 177,7 |
dec ecx |
jnz .map_kernel_tabs |
mov dword [sys_proc-OS_BASE+PROC.pdt_0+(page_tabs shr 20)], sys_proc+PROC.pdt_0+PG_SW-OS_BASE |
mov dword [sys_proc-OS_BASE+PROC.pdt_0+(page_tabs shr 20)], sys_proc+PROC.pdt_0+PG_SWR-OS_BASE |
mov edi, (sys_proc+PROC.pdt_0-OS_BASE) |
lea esi, [edi+(OS_BASE shr 20)] |
/kernel/branches/Kolibri-acpi/kernel.asm |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. |
;; PROGRAMMING: |
;; Ivan Poddubny |
;; Marat Zakiyanov (Mario79) |
351,15 → 351,26 |
mov fs, cx |
mov gs, bx |
xor eax, eax |
mov ebx, 0xFFFFF000+PG_SHARED+PG_NOCACHE+PG_UWR |
bt [cpu_caps], CAPS_PAT |
setc al |
shl eax, 7 |
or ebx, eax |
mov eax, PG_GLOBAL |
bt [cpu_caps], CAPS_PGE |
jnc @F |
or dword [sys_proc+PROC.pdt_0+(OS_BASE shr 20)], PG_GLOBAL |
or [sys_proc+PROC.pdt_0+(OS_BASE shr 20)], eax |
or ebx, eax |
mov ebx, cr4 |
or ebx, CR4_PGE |
mov cr4, ebx |
mov eax, cr4 |
or eax, CR4_PGE |
mov cr4, eax |
@@: |
mov [pte_valid_mask], ebx |
xor eax, eax |
mov dword [sys_proc+PROC.pdt_0], eax |
mov dword [sys_proc+PROC.pdt_0+4], eax |
444,13 → 455,11 |
mov [_display.width], eax |
mov [display_width_standard], eax |
dec eax |
mov [Screen_Max_X], eax |
mov [screen_workarea.right], eax |
movzx eax, word [BOOT_VARS+BOOT_Y_RES]; Y max |
mov [_display.height], eax |
mov [display_height_standard], eax |
dec eax |
mov [Screen_Max_Y], eax |
mov [screen_workarea.bottom], eax |
movzx eax, word [BOOT_VARS+BOOT_VESA_MODE] ; screen mode |
mov dword [SCR_MODE], eax |
463,10 → 472,10 |
je @f |
movzx eax, word[BOOT_VARS+BOOT_PITCH] ; for other modes |
@@: |
mov [_display.pitch], eax |
mov [_display.lfb_pitch], eax |
mov eax, [_display.width] |
mul [_display.height] |
mov [_WinMapSize], eax |
mov [_display.win_map_size], eax |
call calculate_fast_getting_offset_for_WinMapAddress |
; for Qemu or non standart video cards |
577,11 → 586,11 |
.noSYSCALL: |
; ----------------------------------------- |
stdcall alloc_page |
stdcall map_page, tss-0xF80, eax, PG_SW |
stdcall map_page, tss-0xF80, eax, PG_SWR |
stdcall alloc_page |
stdcall map_page, tss+0x80, eax, PG_SW |
stdcall map_page, tss+0x80, eax, PG_SWR |
stdcall alloc_page |
stdcall map_page, tss+0x1080, eax, PG_SW |
stdcall map_page, tss+0x1080, eax, PG_SWR |
; LOAD IDT |
661,8 → 670,8 |
mov [graph_data_l+4], al |
mov [graph_data_l+7], ah |
stdcall kernel_alloc, [_WinMapSize] |
mov [_WinMapAddress], eax |
stdcall kernel_alloc, [_display.win_map_size] |
mov [_display.win_map], eax |
xor eax, eax |
inc eax |
756,7 → 765,7 |
mov edi, OS_BASE + 8000h |
mov ecx, (ap_init16_size + 3) / 4 |
rep movsd |
stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_SW+PG_NOCACHE |
stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_GLOBAL+PG_NOCACHE+PG_SWR |
mov [LAPIC_BASE], eax |
lea edi, [eax+300h] |
mov esi, smpt+4 |
1061,14 → 1070,14 |
;protect io permission map |
mov esi, [default_io_map] |
stdcall map_page, esi, [SLOT_BASE+256+APPDATA.io_map], PG_MAP |
stdcall map_page, esi, [SLOT_BASE+256+APPDATA.io_map], PG_READ |
add esi, 0x1000 |
stdcall map_page, esi, [SLOT_BASE+256+APPDATA.io_map+4], PG_MAP |
stdcall map_page, esi, [SLOT_BASE+256+APPDATA.io_map+4], PG_READ |
stdcall map_page, tss._io_map_0, \ |
[SLOT_BASE+256+APPDATA.io_map], PG_MAP |
[SLOT_BASE+256+APPDATA.io_map], PG_READ |
stdcall map_page, tss._io_map_1, \ |
[SLOT_BASE+256+APPDATA.io_map+4], PG_MAP |
[SLOT_BASE+256+APPDATA.io_map+4], PG_READ |
; SET KEYBOARD PARAMETERS |
mov al, 0xf6 ; reset keyboard, scan enabled |
2114,7 → 2123,7 |
movzx ebx, word [MOUSE_X] |
mov eax, [d_width_calc_area + eax*4] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
movzx edx, byte [ebx+eax] |
shl edx, 8 |
mov esi, [edx+SLOT_BASE+APPDATA.cursor] |
2406,10 → 2415,10 |
;* mouse centered - start code- Mario79 |
;mouse_centered: |
; push eax |
mov eax, [Screen_Max_X] |
mov eax, [_display.width] |
shr eax, 1 |
mov [MOUSE_X], ax |
mov eax, [Screen_Max_Y] |
mov eax, [_display.height] |
shr eax, 1 |
mov [MOUSE_Y], ax |
call wakeup_osloop |
2451,11 → 2460,11 |
; cmp ecx,4 ; set mouse pointer position |
dec ecx |
jnz .set_mouse_button |
cmp dx, word[Screen_Max_Y] |
ja .end |
cmp dx, word[_display.height] |
jae .end |
rol edx, 16 |
cmp dx, word[Screen_Max_X] |
ja .end |
cmp dx, word[_display.width] |
jae .end |
mov [MOUSE_X], edx |
mov [mouse_active], 1 |
call wakeup_osloop |
2541,7 → 2550,7 |
pushfd |
cli |
mov eax, ecx |
mov ecx, [_display.pitch] |
mov ecx, [_display.lfb_pitch] |
mov [_display.width], eax |
dec eax |
mov [_display.height], edx |
2804,7 → 2813,7 |
align 4 |
@@: |
mov eax, [page_tabs+esi*4] |
or al, PG_UW |
or al, PG_UWR |
mov [page_tabs+ebx*4], eax |
mov eax, ebx |
shl eax, 12 |
2882,8 → 2891,10 |
jnz nosb9 |
; ecx = [left]*65536 + [right] |
; edx = [top]*65536 + [bottom] |
mov eax, [Screen_Max_X] |
mov ebx, [Screen_Max_Y] |
mov eax, [_display.width] |
mov ebx, [_display.height] |
dec eax |
dec ebx |
; check [right] |
cmp cx, ax |
ja .exit |
2935,8 → 2946,10 |
and [draw_data+32 + RECT.left], 0 |
and [draw_data+32 + RECT.top], 0 |
push eax ebx |
mov eax, [Screen_Max_X] |
mov ebx, [Screen_Max_Y] |
mov eax, [_display.width] |
mov ebx, [_display.height] |
dec eax |
dec ebx |
mov [draw_data+32 + RECT.right], eax |
mov [draw_data+32 + RECT.bottom], ebx |
pop ebx eax |
3298,9 → 3311,11 |
add edx, draw_data - CURRENT_TASK |
mov [edx + RECT.left], 0 |
mov [edx + RECT.top], 0 |
mov eax, [Screen_Max_X] |
mov eax, [_display.width] |
dec eax |
mov [edx + RECT.right], eax |
mov eax, [Screen_Max_Y] |
mov eax, [_display.height] |
dec eax |
mov [edx + RECT.bottom], eax |
srl1: |
3819,7 → 3834,7 |
.start_x: |
add eax, ecx |
mov ebp, [d_width_calc_area + ebx*4] |
add ebp, [_WinMapAddress] |
add ebp, [_display.win_map] |
movzx ebp, byte[eax+ebp] ; get value for current point |
cmp ebp, edi |
jne @f |
3864,9 → 3879,9 |
;----------------------------------------------------------------------------- |
align 4 |
calculatebackground: ; background |
mov edi, [_WinMapAddress] ; set os to use all pixels |
mov edi, [_display.win_map] ; set os to use all pixels |
mov eax, 0x01010101 |
mov ecx, [_WinMapSize] |
mov ecx, [_display.win_map_size] |
shr ecx, 2 |
rep stosd |
4793,9 → 4808,9 |
jnz @f |
mov word [msg_board_pos+2], (42*6) |
add word [msg_board_pos], 10 |
mov ax, word [Screen_Max_Y] |
mov ax, word [_display.width] |
cmp word [msg_board_pos], ax |
jbe @f |
jb @f |
mov word [msg_board_pos], 10 |
@@: |
; // end if |
5012,10 → 5027,9 |
.1: ; resolution |
mov eax, [Screen_Max_X] |
mov eax, [_display.width] |
shl eax, 16 |
mov ax, word [Screen_Max_Y] |
add eax, 0x00010001 |
mov ax, word [_display.height] |
mov [esp+32], eax |
ret |
.2: ; bits per pixel |
5023,7 → 5037,7 |
mov [esp+32], eax |
ret |
.3: ; bytes per scanline |
mov eax, [_display.pitch] |
mov eax, [_display.lfb_pitch] |
mov [esp+32], eax |
ret |
5100,9 → 5114,11 |
align 4 |
syscall_getscreensize: ; GetScreenSize |
mov ax, word [Screen_Max_X] |
mov ax, word [_display.width] |
dec ax |
shl eax, 16 |
mov ax, word [Screen_Max_Y] |
mov ax, word [_display.height] |
dec ax |
mov [esp + 32], eax |
ret |
;----------------------------------------------------------------------------- |
5178,10 → 5194,10 |
;----------------------------------------------------------------------------- |
align 4 |
syscall_getpixel_WinMap: ; GetPixel WinMap |
cmp ebx, [Screen_Max_X] |
jbe @f |
cmp ecx, [Screen_Max_Y] |
jbe @f |
cmp ebx, [_display.width] |
jb @f |
cmp ecx, [_display.height] |
jb @f |
xor eax, eax |
jmp .store |
;-------------------------------------- |
5188,7 → 5204,7 |
align 4 |
@@: |
mov eax, [d_width_calc_area + ecx*4] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
movzx eax, byte[eax+ebx] ; get value for current point |
;-------------------------------------- |
align 4 |
5198,8 → 5214,7 |
;----------------------------------------------------------------------------- |
align 4 |
syscall_getpixel: ; GetPixel |
mov ecx, [Screen_Max_X] |
inc ecx |
mov ecx, [_display.width] |
xor edx, edx |
mov eax, ebx |
div ecx |
5328,7 → 5343,7 |
pushad |
mov edx, [d_width_calc_area + ebx*4] |
add edx, [_WinMapAddress] |
add edx, [_display.win_map] |
movzx edx, byte [eax+edx] |
cmp dl, byte 1 |
jne @f |
5429,7 → 5444,7 |
cld |
@@: |
stosd |
add eax, [_display.pitch] |
add eax, [_display.lfb_pitch] |
dec ecx |
jnz @r |
ret |
5444,9 → 5459,7 |
pushfd |
cli |
mov [Screen_Max_X], eax |
mov [Screen_Max_Y], edx |
mov [_display.pitch], ecx |
mov [_display.lfb_pitch], ecx |
mov [screen_workarea.right], eax |
mov [screen_workarea.bottom], edx |
5460,14 → 5473,14 |
cmp [do_not_touch_winmap], 1 |
je @f |
stdcall kernel_free, [_WinMapAddress] |
stdcall kernel_free, [_display.win_map] |
mov eax, [_display.width] |
mul [_display.height] |
mov [_WinMapSize], eax |
mov [_display.win_map_size], eax |
stdcall kernel_alloc, eax |
mov [_WinMapAddress], eax |
mov [_display.win_map], eax |
test eax, eax |
jz .epic_fail |
; store for f.18.24 |
5487,8 → 5500,10 |
call repos_windows |
xor eax, eax |
xor ebx, ebx |
mov ecx, [Screen_Max_X] |
mov edx, [Screen_Max_Y] |
mov ecx, [_display.width] |
mov edx, [_display.height] |
dec ecx |
dec edx |
call calculatescreen |
pop edi |
pop esi |
5650,10 → 5665,10 |
.rsdp_found: |
mov esi, [eax+16] ; esi contains physical address of the RSDT |
mov ebp, [ipc_tmp] |
stdcall map_page, ebp, esi, PG_MAP |
stdcall map_page, ebp, esi, PG_READ |
lea eax, [esi+1000h] |
lea edx, [ebp+1000h] |
stdcall map_page, edx, eax, PG_MAP |
stdcall map_page, edx, eax, PG_READ |
and esi, 0xFFF |
add esi, ebp |
cmp dword [esi], 'RSDT' |
5667,10 → 5682,10 |
lodsd |
mov ebx, eax |
lea eax, [ebp+2000h] |
stdcall map_page, eax, ebx, PG_MAP |
stdcall map_page, eax, ebx, PG_READ |
lea eax, [ebp+3000h] |
add ebx, 0x1000 |
stdcall map_page, eax, ebx, PG_MAP |
stdcall map_page, eax, ebx, PG_READ |
and ebx, 0xFFF |
lea ebx, [ebx+ebp+2000h] |
cmp dword [ebx], 'FACP' |
5681,10 → 5696,10 |
; ebx is linear address of FADT |
mov edi, [ebx+40] ; physical address of the DSDT |
lea eax, [ebp+4000h] |
stdcall map_page, eax, edi, PG_MAP |
stdcall map_page, eax, edi, PG_READ |
lea eax, [ebp+5000h] |
lea esi, [edi+0x1000] |
stdcall map_page, eax, esi, PG_MAP |
stdcall map_page, eax, esi, PG_READ |
and esi, 0xFFF |
sub edi, esi |
cmp dword [esi+ebp+4000h], 'DSDT' |
5732,8 → 5747,8 |
add edi, 0x1000 |
push eax |
lea eax, [ebp+4000h] |
stdcall map_page, eax, edi, PG_MAP |
push PG_MAP |
stdcall map_page, eax, edi, PG_READ |
push PG_READ |
lea eax, [edi+1000h] |
push eax |
lea eax, [ebp+5000h] |
/kernel/branches/Kolibri-acpi/kernel32.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; KERNEL32.INC ;; |
111,9 → 111,9 |
io_map_0 rd 1 |
io_map_1 rd 1 |
ht_lock rd 1 |
ht_next rd 1 |
htab rd (4096-$)/4 |
ht_lock rd 1 ;htab[0] stdin |
ht_next rd 1 ;htab[1] stdout |
htab rd (4096-$)/4 ;htab[2] stderr |
pdt_0 rd 1024 |
ends |
/kernel/branches/Kolibri-acpi/kernelsp.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2013-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2013-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/kglobals.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/macros.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/memmap.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/network/ARP.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; ARP.INC ;; |
293,13 → 293,10 |
DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: IP address conflict detected!\n" |
.exit: |
call NET_packet_free |
add esp, 4 ; pop (balance stack) |
DEBUGF DEBUG_NETWORK_VERBOSE, "ARP_input: exiting\n" |
call NET_BUFF_free |
ret |
;--------------------------------------------------------------------------- |
; |
; ARP_output_request |
347,7 → 344,7 |
movsd ; |
popd [edi] ; DestIP |
push edx eax |
push eax |
call [ebx + NET_DEVICE.transmit] |
ret |
/kernel/branches/Kolibri-acpi/network/IPv4.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; IPv4.INC ;; |
16,7 → 16,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 3515 $ |
$Revision: 5522 $ |
IPv4_MAX_FRAGMENTS = 64 |
IPv4_MAX_ROUTES = 64 |
225,10 → 225,10 |
align 4 |
IPv4_input: ; TODO: add IPv4 raw sockets support |
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_input, packet from: %u.%u.%u.%u ",\ |
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_input: packet from %u.%u.%u.%u ",\ |
[edx + IPv4_header.SourceAddress + 0]:1,[edx + IPv4_header.SourceAddress + 1]:1,\ |
[edx + IPv4_header.SourceAddress + 2]:1,[edx + IPv4_header.SourceAddress + 3]:1 |
DEBUGF DEBUG_NETWORK_VERBOSE, "to: %u.%u.%u.%u\n",\ |
DEBUGF DEBUG_NETWORK_VERBOSE, "to %u.%u.%u.%u\n",\ |
[edx + IPv4_header.DestinationAddress + 0]:1,[edx + IPv4_header.DestinationAddress + 1]:1,\ |
[edx + IPv4_header.DestinationAddress + 2]:1,[edx + IPv4_header.DestinationAddress + 3]:1 |
323,8 → 323,7 |
.dump: |
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_input: dumping\n" |
inc [IPv4_packets_dumped] ; FIXME: use correct interface |
call NET_packet_free |
add esp, 4 ; pop (balance stack) |
call NET_BUFF_free |
ret |
371,7 → 370,6 |
mov [eax + IPv4_FRAGMENT_entry.PrevPtr], edi |
mov [eax + IPv4_FRAGMENT_entry.Owner], ebx |
add esp, 4 |
ret |
405,7 → 403,6 |
mov [eax + IPv4_FRAGMENT_entry.PrevPtr], -1 |
mov [eax + IPv4_FRAGMENT_entry.Owner], ebx |
add esp, 4 ; balance stack and exit |
ret |
506,7 → 503,7 |
push [edx + IPv4_FRAGMENT_entry.NextPtr] ; Set edx to the next pointer |
push edx ; Push pointer to fragment onto stack |
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv4_input: Next Fragment: 0x%x\n", edx |
call NET_packet_free ; free the previous fragment buffer (this uses the value from stack) |
call NET_BUFF_free ; free the previous fragment buffer (this uses the value from stack) |
pop edx ebx eax |
cmp edx, -1 ; Check if it is last fragment in chain |
jne .rebuild_packet_loop |
654,7 → 651,7 |
ret |
.loopback: |
mov dword [esp + 2], eax ; change source IP to dest IP |
mov dword [esp], eax ; set source IP to dest IP |
mov ecx, [esp + 10] |
add ecx, sizeof.IPv4_header |
mov edi, AF_INET4 |
749,7 → 746,6 |
; |
; |
; IN: dword [esp] = pointer to buffer containing ipv4 packet to be fragmented |
; dword [esp+4] = buffer size |
; esi = pointer to ip header in that buffer |
; ecx = max size of fragments |
; |
857,9 → 853,7 |
add esp, 12 + 4 + 6 |
.err2: |
DEBUGF DEBUG_NETWORK_VERBOSE, "Ipv4_fragment: dumping\n" |
call NET_packet_free |
add esp, 4 |
call NET_BUFF_free |
ret |
/kernel/branches/Kolibri-acpi/network/IPv6.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2012-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2012-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; IPv6.INC ;; |
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 3251 $ |
$Revision: 5522 $ |
struct IPv6_header |
147,9 → 147,7 |
.dump: |
DEBUGF DEBUG_NETWORK_VERBOSE, "IPv6_input - dumping\n" |
call kernel_free |
add esp, 4 |
call NET_BUFF_free |
ret |
.dump_options: |
/kernel/branches/Kolibri-acpi/network/PPPoE.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2012-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2012-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; PPPoE.INC ;; |
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5015 $ |
$Revision: 5522 $ |
struct PPPoE_frame |
106,8 → 106,7 |
popa |
DEBUGF DEBUG_NETWORK_VERBOSE, 'PPPoE_discovery_input: dumping\n' |
call NET_packet_free |
add esp, 4 |
call NET_BUFF_free |
ret |
232,13 → 231,11 |
.dump: |
DEBUGF DEBUG_NETWORK_VERBOSE, "PPPoE_input: dumping\n" |
call NET_packet_free |
add esp, 4 |
call NET_BUFF_free |
ret |
;----------------------------------------------------------------- |
; |
; PPPoE_output |
/kernel/branches/Kolibri-acpi/network/ethernet.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; ETHERNET.INC ;; |
33,30 → 33,25 |
ends |
struct ETH_queue_entry |
iglobal |
align 4 |
device dd ? |
packet dd ? |
size dd ? |
ETH_BROADCAST dp 0xffffffffffff |
ends |
ETH_frame_queued dd 0 ; Number of queued frames |
iglobal |
align 4 |
ETH_frame_head dd ETH_frame_head ; Pointer to next frame in the linked list |
ETH_frame_tail dd ETH_frame_head ; Pointer to last frame in the linked list |
ETH_BROADCAST dp 0xffffffffffff |
endg |
uglobal |
align 4 |
ETH_input_event dd ? |
ETH_queue rd (ETH_QUEUE_SIZE*sizeof.ETH_queue_entry + sizeof.queue)/4 |
endg |
macro ETH_init { |
init_queue ETH_queue |
movi ebx, 1 |
mov ecx, ETH_process_input |
call new_sys_threads |
72,11 → 67,10 |
; ETH_input |
; |
; This function is called by ethernet drivers, |
; It pushes the received ethernet packets onto the eth_in_queue |
; It pushes the received ethernet packets onto the ethernet input queue |
; |
; IN: [esp] = Pointer to buffer |
; [esp+4] = size of buffer |
; ebx = pointer to eth_device |
; |
; OUT: / |
; |
;----------------------------------------------------------------- |
83,12 → 77,26 |
align 4 |
ETH_input: |
push ebx |
mov esi, esp |
pop eax |
pushf |
cli |
add_to_queue ETH_queue, ETH_QUEUE_SIZE, sizeof.ETH_queue_entry, .fail |
add esp, sizeof.ETH_queue_entry |
cmp [ETH_frame_queued], ETH_QUEUE_SIZE |
jae .full |
inc [ETH_frame_queued] |
; Add frame to the end of the linked list |
mov [eax + NET_BUFF.NextPtr], ETH_frame_head |
mov ebx, [ETH_frame_tail] |
mov [eax + NET_BUFF.PrevPtr], ebx |
mov [ETH_frame_tail], eax |
mov [ebx + NET_BUFF.NextPtr], eax |
popf |
; Now queue an event to process it |
xor edx, edx |
mov eax, [ETH_input_event] |
mov ebx, [eax + EVENT.id] |
97,13 → 105,11 |
ret |
.fail: |
.full: |
DEBUGF DEBUG_NETWORK_ERROR, "ETH incoming queue is full, discarding packet!\n" |
pop ebx |
call NET_packet_free |
add esp, 4 |
popf |
push eax |
call NET_BUFF_free |
ret |
116,29 → 122,46 |
mov ecx, MANUAL_DESTROY |
call create_event |
mov [ETH_input_event], eax |
pushf |
.wait: |
popf |
mov eax, [ETH_input_event] |
mov ebx, [eax + EVENT.id] |
call wait_event |
.loop: |
get_from_queue ETH_queue, ETH_QUEUE_SIZE, sizeof.ETH_queue_entry, .wait |
pushf |
cli |
cmp [ETH_frame_queued], 0 |
je .wait |
mov eax, [esi + ETH_queue_entry.packet] |
mov ecx, [esi + ETH_queue_entry.size] |
mov ebx, [esi + ETH_queue_entry.device] |
dec [ETH_frame_queued] |
pushd .loop ; return address |
push ecx eax |
mov esi, [ETH_frame_head] |
mov ebx, [esi + NET_BUFF.NextPtr] |
mov [ETH_frame_head], ebx |
mov [ebx + NET_BUFF.PrevPtr], ETH_frame_head |
popf |
mov eax, [esi + NET_BUFF.offset] |
add eax, esi |
mov ecx, [esi + NET_BUFF.length] |
mov ebx, [esi + NET_BUFF.device] |
pushd .loop ; return address for protocol handler |
push esi ; keep pointer to NET_BUFF on stack |
DEBUGF DEBUG_NETWORK_VERBOSE, "ETH_input: size=%u\n", ecx |
sub ecx, sizeof.ETH_header |
jb .dump |
; Set registers for protocol handlers |
lea edx, [eax + sizeof.ETH_header] |
mov ax, [eax + ETH_header.Type] |
; Place protocol handlers here |
cmp ax, ETHER_PROTO_IPv4 |
je IPv4_input |
158,8 → 181,7 |
.dump: |
DEBUGF DEBUG_NETWORK_VERBOSE, "ETH_input: dumping\n" |
call NET_packet_free |
add esp, 4 |
call NET_BUFF_free |
ret |
;----------------------------------------------------------------- |
171,11 → 193,10 |
; ecx = payload size |
; edx = pointer to destination mac |
; |
; OUT: eax = start of ethernet frame / 0 on error |
; OUT: eax = start of net frame / 0 on error |
; ebx = device ptr |
; ecx = payload size |
; edx = ethernet frame size |
; edi = start of ethernet payload |
; edi = start of payload |
; |
;----------------------------------------------------------------- |
align 4 |
189,11 → 210,14 |
push ecx |
push ax edx |
add ecx, sizeof.ETH_header |
stdcall kernel_alloc, ecx |
add ecx, sizeof.ETH_header + NET_BUFF.data |
stdcall NET_BUFF_alloc, ecx |
test eax, eax |
jz .out_of_ram |
mov edi, eax |
mov [eax + NET_BUFF.type], NET_BUFF_ETH |
mov [eax + NET_BUFF.device], ebx |
mov [eax + NET_BUFF.offset], NET_BUFF.data |
lea edi, [eax + NET_BUFF.data] |
pop esi |
movsd |
204,13 → 228,14 |
pop ax |
stosw |
lea eax, [edi - sizeof.ETH_header] ; Set eax to buffer start |
lea eax, [edi - sizeof.ETH_header - NET_BUFF.data] ; Set eax to buffer start |
pop ecx |
lea edx, [ecx + sizeof.ETH_header] ; Set edx to complete buffer size |
cmp edx, ETH_FRAME_MINIMUM |
jbe .adjust_size |
.done: |
mov [eax + NET_BUFF.length], edx |
DEBUGF DEBUG_NETWORK_VERBOSE, "ETH_output: ptr=%x size=%u\n", eax, edx |
ret |
272,7 → 297,7 |
.read_mac: |
movzx ebx, word [eax + ETH_DEVICE.mac] |
mov eax, dword [eax + ETH_DEVICE.mac + 2] |
mov [esp+20+4], ebx ; TODO: fix this ugly code |
mov [esp+20+4], ebx ; FIXME |
ret |
/kernel/branches/Kolibri-acpi/network/icmp.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; ICMP.INC ;; |
131,7 → 131,6 |
; and insert packets into sockets when needed |
; |
; IN: Pointer to buffer in [esp] |
; size of buffer in [esp+4] |
; ebx = pointer to device struct |
; ecx = ICMP Packet size |
; esi = ptr to ICMP Packet data |
143,10 → 142,9 |
align 4 |
ICMP_input: |
DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP_input:\n" |
DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP_input\n" |
; First, check the checksum (altough some implementations ignore it) |
; Check the checksum |
push esi ecx |
push [esi + ICMP_header.Checksum] |
mov [esi + ICMP_header.Checksum], 0 |
155,100 → 153,34 |
call checksum_2 |
pop si |
cmp dx, si |
pop ecx edx |
pop ecx esi |
jne .checksum_mismatch |
; Check packet type |
DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP_input: Checksum OK\n" |
cmp [edx + ICMP_header.Type], ICMP_ECHO ; Is this an echo request? |
jne .check_sockets |
; Update stats (and validate device ptr) |
; Ualidate device ptr |
mov eax, edi |
call NET_ptr_to_num4 |
cmp edi, -1 |
je .dump |
; Update stats |
inc [ICMP_PACKETS_RX + edi] |
; We well re-use the packet so we can create the response as fast as possible |
; Notice: this only works on pure ethernet |
; Is this an echo request? |
cmp [esi + ICMP_header.Type], ICMP_ECHO |
je .echo_request |
DEBUGF DEBUG_NETWORK_VERBOSE, "got echo request\n" |
mov [edx + ICMP_header.Type], ICMP_ECHOREPLY ; Change Packet type to reply |
mov esi, [esp] ; Start of buffer |
cmp ebx, LOOPBACK_DEVICE |
je .loopback |
; FIXME: dont assume device is an ethernet device! |
; exchange dest and source address in IP header |
; exchange dest and source MAC in ETH header |
push dword [esi + ETH_header.DstMAC] |
push dword [esi + ETH_header.SrcMAC] |
pop dword [esi + ETH_header.DstMAC] |
pop dword [esi + ETH_header.SrcMAC] |
push word [esi + ETH_header.DstMAC + 4] |
push word [esi + ETH_header.SrcMAC + 4] |
pop word [esi + ETH_header.DstMAC + 4] |
pop word [esi + ETH_header.SrcMAC + 4] |
add esi, sizeof.ETH_header-4 |
.loopback: |
add esi, 4 |
push [esi + IPv4_header.SourceAddress] |
push [esi + IPv4_header.DestinationAddress] |
pop [esi + IPv4_header.SourceAddress] |
pop [esi + IPv4_header.DestinationAddress] |
; Recalculate ip header checksum |
movzx ecx, [esi + IPv4_header.VersionAndIHL] ; Calculate IP Header length by using IHL field |
and ecx, 0x0f |
shl cx, 2 |
mov edi, ecx ; IP header length |
mov eax, edx ; ICMP packet start addr |
push esi ; Calculate the IP checksum |
xor edx, edx ; |
call checksum_1 ; |
call checksum_2 ; |
pop esi ; |
mov [esi + IPv4_header.HeaderChecksum], dx ; |
; Recalculate ICMP CheckSum |
movzx ecx, [esi + IPv4_header.TotalLength] ; Find length of IP Packet |
xchg ch, cl ; |
sub ecx, edi ; IP packet length - IP header length = ICMP packet length |
mov esi, eax ; Calculate ICMP checksum |
xor edx, edx ; |
call checksum_1 ; |
call checksum_2 ; |
mov [eax + ICMP_header.Checksum], dx ; |
; Transmit the packet (notice that packet ptr and packet size have been on stack since start of the procedure!) |
call [ebx + NET_DEVICE.transmit] |
test eax, eax |
jnz @f |
call NET_ptr_to_num4 |
inc [ICMP_PACKETS_TX + edi] |
@@: |
ret |
.check_sockets: |
; Look for an open ICMP socket |
pusha |
mov ecx, socket_mutex |
call mutex_lock |
popa |
mov esi, [edi] ; ipv4 source address |
mov edx, [eax] ; ipv4 source address |
mov eax, net_sockets |
.try_more: |
; mov , [edx + ICMP_header.Identifier] |
; mov , [esi + ICMP_header.Identifier] |
.next_socket: |
mov eax, [eax + SOCKET.NextPtr] |
or eax, eax |
260,18 → 192,12 |
cmp [eax + SOCKET.Protocol], IP_PROTO_ICMP |
jne .next_socket |
cmp [eax + IP_SOCKET.RemoteIP], esi |
cmp [eax + IP_SOCKET.RemoteIP], edx |
jne .next_socket |
; cmp [eax + ICMP_SOCKET.Identifier], |
; jne .next_socket |
; Update stats (and validate device ptr) |
call NET_ptr_to_num4 |
cmp edi, -1 |
je .dump_ |
inc [ICMP_PACKETS_RX + edi] |
pusha |
mov ecx, socket_mutex |
call mutex_unlock |
284,11 → 210,82 |
call mutex_lock |
popa |
mov esi, edx |
jmp SOCKET_input |
.echo_request: |
; We'll reuse the packet so we can create the response as fast as possible |
DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP echo request\n" |
; Change Packet type to reply |
mov [esi + ICMP_header.Type], ICMP_ECHOREPLY |
mov eax, [esp] |
lea esi, [eax + NET_BUFF.data] |
; Check frame type |
cmp [eax + NET_BUFF.type], NET_BUFF_ETH |
jne .not_ethernet |
; exchange dest and source MAC in ETH header |
push dword [esi + ETH_header.DstMAC] |
push dword [esi + ETH_header.SrcMAC] |
pop dword [esi + ETH_header.DstMAC] |
pop dword [esi + ETH_header.SrcMAC] |
push word [esi + ETH_header.DstMAC + 4] |
push word [esi + ETH_header.SrcMAC + 4] |
pop word [esi + ETH_header.DstMAC + 4] |
pop word [esi + ETH_header.SrcMAC + 4] |
add esi, sizeof.ETH_header |
.not_ethernet: |
; Exchange dest and source address in IP header |
push [esi + IPv4_header.SourceAddress] |
push [esi + IPv4_header.DestinationAddress] |
pop [esi + IPv4_header.SourceAddress] |
pop [esi + IPv4_header.DestinationAddress] |
; Calculate IP header length |
movzx ecx, [esi + IPv4_header.VersionAndIHL] |
and ecx, 0x0f |
shl cx, 2 |
mov edi, ecx ; put it in edi for later |
; Calculate IP checksum |
mov eax, esi |
mov [eax + IPv4_header.HeaderChecksum], 0 |
xor edx, edx |
call checksum_1 |
call checksum_2 |
mov [eax + IPv4_header.HeaderChecksum], dx |
; Calculate ICMP packet length |
movzx ecx, [eax + IPv4_header.TotalLength] |
xchg ch, cl |
sub ecx, edi ; IP packet length - IP header length = ICMP packet length |
; Calculate ICMP checkSum |
mov eax, esi |
mov [esi + ICMP_header.Checksum], 0 |
xor edx, edx |
call checksum_1 |
call checksum_2 |
mov [eax + ICMP_header.Checksum], dx |
; Transmit the frame |
DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP transmitting reply\n" |
call [ebx + NET_DEVICE.transmit] |
test eax, eax |
jnz @f |
DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP transmit failed\n" |
call NET_ptr_to_num4 |
inc [ICMP_PACKETS_TX + edi] |
@@: |
ret |
.dump_: |
pusha |
mov ecx, socket_mutex |
call mutex_unlock |
297,16 → 294,12 |
DEBUGF DEBUG_NETWORK_ERROR, "ICMP_input: no socket found\n" |
jmp .dump |
.checksum_mismatch: |
DEBUGF DEBUG_NETWORK_ERROR, "ICMP_input: checksum mismatch\n" |
.dump: |
DEBUGF DEBUG_NETWORK_VERBOSE, "ICMP_input: dumping\n" |
call NET_packet_free |
add esp, 4 ; pop (balance stack) |
call NET_BUFF_free |
ret |
400,7 → 393,6 |
jz .exit |
pop esi |
push edx |
push eax |
push edi ecx |
426,7 → 418,6 |
ret |
.exit: |
DEBUGF DEBUG_NETWORK_ERROR, "Creating ICMP Packet failed\n" |
add esp, 4 |
ret |
/kernel/branches/Kolibri-acpi/network/loopback.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; loopback.inc ;; |
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 2891 $ |
$Revision: 5523 $ |
iglobal |
align 4 |
66,7 → 66,6 |
; LOOP_input |
; |
; IN: [esp+4] = Pointer to buffer |
; [esp+8] = size of buffer |
; |
; OUT: / |
; |
73,47 → 72,50 |
;----------------------------------------------------------------- |
align 4 |
LOOP_input: |
pop ebx |
pop eax |
pop ecx |
push ebx |
push ecx |
push eax |
mov eax, [esp+4] |
; Update stats |
inc [LOOPBACK_DEVICE.packets_rx] |
mov ecx, [eax + NET_BUFF.length] |
add dword[LOOPBACK_DEVICE.bytes_rx], ecx |
adc dword[LOOPBACK_DEVICE.bytes_rx + 4], 0 |
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_input: size=%u\n", ecx |
lea edx, [eax + 4] |
mov eax, dword[eax] |
mov ebx, LOOPBACK_DEVICE |
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_input: ptr=%x size=%u\n", eax, ecx |
; Reverse buffptr and returnaddr on stack |
pop edx edi |
push edx edi |
; Set registers for protocol handlers |
lea edx, [eax + NET_BUFF.data] |
mov ebx, [eax + NET_BUFF.device] |
mov eax, [eax + NET_BUFF.type] |
; Place protocol handlers here |
cmp eax, AF_INET4 |
je IPv4_input |
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_input: Unknown packet type=%x\n", ax |
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_input: Unknown packet type=%x\n", eax |
.dump: |
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_input: dumping\n" |
call NET_packet_free |
add esp, 4 |
call NET_BUFF_free |
ret |
;----------------------------------------------------------------- |
; |
; LOOP_output |
; |
; IN: |
; ecx = packet size |
; IN: ecx = packet size |
; edi = address family |
; |
; OUT: edi = 0 on error, pointer to buffer otherwise |
; eax = buffer start |
; OUT: eax = start of net frame / 0 on error |
; ebx = to device structure |
; ecx = unchanged (packet size of embedded data) |
; edx = size of complete buffer |
; edi = start of payload |
; |
;----------------------------------------------------------------- |
align 4 |
121,35 → 123,39 |
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_output\n" |
push ecx |
push edi |
cmp ecx, [LOOPBACK_DEVICE.mtu] |
ja .too_large |
add ecx, 4 |
cmp ecx, [LOOPBACK_DEVICE.mtu] |
ja .out_of_ram |
stdcall kernel_alloc, ecx |
push ecx edi |
add ecx, NET_BUFF.data |
stdcall NET_BUFF_alloc, ecx |
test eax, eax |
jz .out_of_ram |
mov edi, eax |
pop eax |
stosd |
lea eax, [edi - 4] ; Set eax to buffer start |
pop edi |
mov [eax + NET_BUFF.type], edi |
mov ebx, LOOPBACK_DEVICE |
mov [eax + NET_BUFF.device], ebx |
pop ecx |
lea edx, [ecx + 4] ; Set edx to complete buffer size |
mov ebx, LOOPBACK_DEVICE |
mov [eax + NET_BUFF.length], ecx |
lea edi, [eax + NET_BUFF.data] |
inc [LOOPBACK_DEVICE.packets_tx] |
add dword[LOOPBACK_DEVICE.bytes_tx], ecx |
adc dword[LOOPBACK_DEVICE.bytes_tx + 4], 0 |
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_output: ptr=%x size=%u\n", eax, edx |
DEBUGF DEBUG_NETWORK_VERBOSE, "LOOP_output: ptr=%x size=%u\n", eax, ecx |
ret |
.too_large: |
DEBUGF DEBUG_NETWORK_ERROR, "LOOP_output: packet is too large\n" |
xor eax, eax |
ret |
.out_of_ram: |
DEBUGF DEBUG_NETWORK_ERROR, "LOOP_output: out of memory\n" |
add esp, 4+4 |
xor edi, edi |
xor eax, eax |
ret |
/kernel/branches/Kolibri-acpi/network/queue.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2010. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; queue.inc ;; |
/kernel/branches/Kolibri-acpi/network/socket.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Part of the TCP/IP network stack for KolibriOS ;; |
98,9 → 98,9 |
;---------------------- |
; Transmit timing stuff |
t_idle dd ? |
t_rtt dd ? |
t_rtt dd ? ; round trip time |
t_rtseq dd ? |
t_srtt dd ? |
t_srtt dd ? ; smoothed round trip time |
t_rttvar dd ? |
t_rttmin dd ? |
max_sndwnd dd ? |
179,8 → 179,8 |
struct socket_queue_entry |
data_ptr dd ? |
data_size dd ? |
buf_ptr dd ? |
data_size dd ? |
ends |
754,7 → 754,7 |
pop edi |
test [eax + SOCKET.state], SS_CANTRCVMORE |
jnz .return |
jnz .last_data |
cmp ebx, EWOULDBLOCK |
jne .return |
779,6 → 779,11 |
mov [esp+32], ecx |
ret |
.last_data: |
test ecx, ecx |
jz .return |
call SOCKET_notify |
jmp .return |
817,7 → 822,7 |
rep movsd |
.nd: |
call NET_packet_free |
call NET_BUFF_free |
pop ecx eax ; return number of bytes copied to application |
xor ebx, ebx |
ret |
874,9 → 879,16 |
call SOCKET_ring_free ; free read memory |
pop eax |
cmp [eax + STREAM_SOCKET.rcv + RING_BUFFER.size], 0 |
jne .more_data |
xor ebx, ebx ; errorcode = 0 (no error) |
ret |
.more_data: |
call SOCKET_notify ; Queue another network event |
xor ebx, ebx ; errorcode = 0 (no error) |
ret |
.wouldblock: |
push EWOULDBLOCK |
pop ebx |
1429,7 → 1441,6 |
; ecx = data size |
; esi = ptr to data |
; [esp] = ptr to buf |
; [esp + 4] = buf size |
; |
; OUT: / |
; |
1439,7 → 1450,7 |
DEBUGF DEBUG_NETWORK_VERBOSE, "SOCKET_input: socket=%x, data=%x size=%u\n", eax, esi, ecx |
mov [esp+4], ecx |
push ecx |
push esi |
mov esi, esp |
1463,16 → 1474,13 |
call mutex_unlock |
popa |
call NET_packet_free |
add esp, 8 |
call NET_BUFF_free |
ret |
;-------------------------- |
; |
; IN: eax = ptr to ring struct (just a buffer of the right size) |
; OUT: eax = unchanged / 0 on error |
; eax = ptr to ring struct (just a buffer of the right size) |
; |
align 4 |
SOCKET_ring_create: |
1481,7 → 1489,7 |
mov esi, eax |
push edx |
stdcall create_ring_buffer, SOCKET_MAXDATA, PG_SW |
stdcall create_ring_buffer, SOCKET_MAXDATA, PG_SWR |
pop edx |
test eax, eax |
jz .fail |
1962,14 → 1970,8 |
jnz .no_tcp |
mov ebx, eax |
cmp [ebx + STREAM_SOCKET.rcv.start_ptr], 0 |
je @f |
stdcall kernel_free, [ebx + STREAM_SOCKET.rcv.start_ptr] |
@@: |
cmp [ebx + STREAM_SOCKET.snd.start_ptr], 0 |
je @f |
stdcall kernel_free, [ebx + STREAM_SOCKET.snd.start_ptr] |
@@: |
mov eax, ebx |
.no_tcp: |
/kernel/branches/Kolibri-acpi/network/stack.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; STACK.INC ;; |
32,6 → 32,8 |
DEBUG_NETWORK_VERBOSE = 0 |
NET_DEVICES_MAX = 16 |
NET_BUFFERS = 512 |
NET_BUFFER_SIZE = 2048 |
ARP_BLOCK = 1 ; true or false |
EPHEMERAL_PORT_MIN = 49152 |
146,7 → 148,7 |
NET_DEVICE_SLIP = 2 |
; Network link types (link protocols) |
NET_LINK_LOOPBACK = 0 ;;; Really a link type? |
NET_LINK_LOOPBACK = 0 |
NET_LINK_MAC = 1 ; Media access control (ethernet, isdn, ...) |
NET_LINK_PPP = 2 ; Point to Point Protocol (PPPoE, ...) |
NET_LINK_IEEE802.11 = 3 ; IEEE 802.11 (WiFi) |
155,6 → 157,10 |
NET_HWACC_TCP_IPv4_IN = 1 shl 0 |
NET_HWACC_TCP_IPv4_OUT = 1 shl 1 |
; Network frame types |
NET_BUFF_LOOPBACK = 0 |
NET_BUFF_ETH = 1 |
struct NET_DEVICE |
device_type dd ? ; Type field |
175,7 → 181,19 |
ends |
struct NET_BUFF |
NextPtr dd ? ; pointer to next frame in list |
PrevPtr dd ? ; pointer to previous frame in list |
device dd ? ; ptr to NET_DEVICE structure |
type dd ? ; encapsulation type: e.g. Ethernet |
length dd ? ; size of encapsulated data |
offset dd ? ; offset to actual data (24 bytes for default frame) |
data rb 0 |
ends |
; Exactly as it says.. |
macro pseudo_random reg { |
add reg, [esp] |
229,6 → 247,9 |
NET_RUNNING dd ? |
NET_DRV_LIST rd NET_DEVICES_MAX |
NET_BUFFS_FREE rd NET_BUFFERS |
.current dd ? |
endg |
245,10 → 266,27 |
align 4 |
stack_init: |
; allocate network buffers |
stdcall kernel_alloc, NET_BUFFER_SIZE*NET_BUFFERS |
test eax, eax |
jz .fail |
mov edi, NET_BUFFS_FREE |
mov ecx, NET_BUFFERS |
cld |
.loop: |
stosd |
add eax, NET_BUFFER_SIZE |
dec ecx |
jnz .loop |
mov eax, NET_BUFFS_FREE |
stosd |
; Init the network drivers list |
xor eax, eax |
mov edi, NET_RUNNING |
mov ecx, (NET_DEVICES_MAX + 2) |
mov ecx, (NET_DEVICES_MAX + 1) |
rep stosd |
ETH_init |
268,7 → 306,10 |
LOOP_init |
mov [net_tmr_count], 0 |
ret |
.fail: |
DEBUGF DEBUG_NETWORK_ERROR, "Stack init failed!\n" |
ret |
327,12 → 368,56 |
align 4 |
NET_packet_free: |
and dword[esp+4], not 0xfff |
jmp kernel_free |
proc NET_BUFF_alloc stdcall, buffersize |
cmp [buffersize], NET_BUFFER_SIZE |
ja .too_large |
spin_lock_irqsave |
mov eax, [NET_BUFFS_FREE.current] |
cmp eax, NET_BUFFS_FREE+NET_BUFFERS*4 |
jae .out_of_mem |
mov eax, [eax] |
add [NET_BUFFS_FREE.current], 4 |
spin_unlock_irqrestore |
DEBUGF DEBUG_NETWORK_VERBOSE, "net alloc: 0x%x\n", eax |
ret |
.out_of_mem: |
spin_unlock_irqrestore |
xor eax, eax |
DEBUGF DEBUG_NETWORK_ERROR, "NET_BUFF_alloc: out of mem!\n" |
ret |
.too_large: |
xor eax, eax |
DEBUGF DEBUG_NETWORK_ERROR, "NET_BUFF_alloc: too large!\n" |
ret |
endp |
align 4 |
proc NET_BUFF_free stdcall, buffer |
DEBUGF DEBUG_NETWORK_VERBOSE, "net free: 0x%x\n", [buffer] |
spin_lock_irqsave |
sub [NET_BUFFS_FREE.current], 4 |
mov eax, [NET_BUFFS_FREE.current] |
push [buffer] |
pop dword[eax] |
spin_unlock_irqrestore |
ret |
endp |
align 4 |
NET_link_changed: |
DEBUGF DEBUG_NETWORK_VERBOSE, "NET_link_changed device=0x%x status=0x%x\n", ebx, [ebx + NET_DEVICE.link_state] |
482,8 → 567,10 |
align 4 |
NET_ptr_to_num4: ; Todo, place number in device structure so we only need to verify? |
test ebx, ebx |
jz .fail |
push ecx |
mov ecx, NET_DEVICES_MAX |
mov edi, NET_DRV_LIST |
.loop: |
493,8 → 580,9 |
dec ecx |
jnz .loop |
pop ecx |
.fail: |
or edi, -1 |
pop ecx |
ret |
.found: |
/kernel/branches/Kolibri-acpi/network/tcp.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Part of the TCP/IP network stack for KolibriOS ;; |
124,9 → 124,8 |
segment_ptr dd ? |
segment_size dd ? |
device_ptr dd ? |
timestamp dd ? |
buffer_ptr dd ? |
timestamp dd ? |
ends |
/kernel/branches/Kolibri-acpi/network/tcp_input.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Part of the TCP/IP network stack for KolibriOS ;; |
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5155 $ |
$Revision: 5522 $ |
;----------------------------------------------------------------- |
; |
23,7 → 23,6 |
; Add a segment to the incoming TCP queue |
; |
; IN: [esp] = ptr to buffer |
; [esp+4] = buffer size (dont care) |
; ebx = ptr to device struct |
; ecx = segment size |
; esi = ptr to TCP segment |
37,10 → 36,8 |
TCP_input: |
; record the current time |
mov eax, [timer_ticks] ; in 1/100 seconds |
mov [esp + 4], eax |
push ebx ecx esi edi ; mind the order |
push [timer_ticks] ; in 1/100 seconds |
push ebx ecx esi edi ; mind the order (see TCP_queue_entry struct) |
mov esi, esp |
add_to_queue TCP_queue, TCP_QUEUE_SIZE, sizeof.TCP_queue_entry, .fail |
64,14 → 61,11 |
inc [TCP_segments_missed + edi] |
add esp, sizeof.TCP_queue_entry - 8 |
call NET_packet_free |
add esp, 4 |
call NET_BUFF_free |
ret |
align 4 |
proc TCP_process_input |
394,13 → 388,18 |
pop ecx |
cmp eax, TCP_PAWS_IDLE |
jle .drop_after_ack ; TODO: update stats |
jle .paws_drop |
push ecx |
mov [ebx + TCP_SOCKET.ts_recent], 0 ; timestamp was invalid, fix it. |
.no_paws: |
jmp .opt_loop |
.paws_drop: |
inc [TCPS_rcvduppack] ; update stats |
add [TCPS_rcvdupbyte], ecx |
inc [TCPS_pawsdrop] |
jmp .drop_after_ack |
.no_options: |
pop ecx |
630,6 → 629,8 |
or [ebx + TCP_SOCKET.t_flags], TF_ACKNOW |
mov eax, ecx |
inc [TCPS_rcvpartduppack] |
;;; TODO: update stats |
;----------------------------------------------- |
662,7 → 663,7 |
mov eax, ebx |
call TCP_close |
;;; TODO: update stats |
inc [TCPS_rcvafterclose] |
jmp .respond_seg_reset |
;---------------------------------------- |
985,17 → 986,14 |
mov eax, [edx + TCP_header.AckNumber] |
cmp eax, [ebx + TCP_SOCKET.SND_MAX] |
jbe @f |
;;; TODO: update stats |
inc [TCPS_rcvacktoomuch] |
jmp .drop_after_ack |
@@: |
mov edi, [edx + TCP_header.AckNumber] |
sub edi, [ebx + TCP_SOCKET.SND_UNA] ; now we got the number of acked bytes in edi |
;;; TODO: update stats |
inc [TCPS_rcvackpack] |
add [TCPS_rcvackbyte], edi |
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: acceptable ACK for %u bytes\n", edi |
;------------------------------------------ |
1209,6 → 1207,8 |
test [edx + TCP_header.Flags], TH_SYN |
jz .drop |
inc [TCPS_accepts] ; update stats |
;;; TODO: check if it's a broadcast or multicast, and drop if so |
push dword [edi] ; Ipv4 source addres |
1589,7 → 1589,7 |
.done: |
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: dumping\n" |
call NET_packet_free |
call NET_BUFF_free |
jmp .loop |
1708,7 → 1708,7 |
.drop_no_socket: |
DEBUGF DEBUG_NETWORK_VERBOSE, "TCP_input: Drop (no socket)\n" |
call NET_packet_free |
call NET_BUFF_free |
jmp .loop |
endp |
/kernel/branches/Kolibri-acpi/network/tcp_output.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Part of the TCP/IP network stack for KolibriOS ;; |
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 3289 $ |
$Revision: 5522 $ |
;----------------------------------------------------------------- |
; |
90,10 → 90,9 |
cmp ebx, [eax + STREAM_SOCKET.snd.size] |
jae @f |
and dl, not (TH_FIN) |
@@: |
@@: |
inc ecx |
jmp .no_force |
113,7 → 112,6 |
@@: |
sub esi, ebx |
;------------------------ |
; check for window shrink (107) |
146,7 → 144,6 |
cmp esi, [eax + TCP_SOCKET.t_maxseg] |
jbe @f |
mov esi, [eax + TCP_SOCKET.t_maxseg] |
or [temp_bits], TCP_BIT_SENDALOT |
@@: |
160,7 → 157,6 |
cmp edi, [eax + STREAM_SOCKET.snd.size] |
jae @f |
and dl, not (TH_FIN) |
@@: |
;------------------------------- |
403,6 → 399,50 |
or [temp_bits], TCP_BIT_SENDALOT |
.no_overflow: |
; Update stats |
test esi, esi |
jz .zero_data |
cmp [eax + TCP_SOCKET.t_force], 1 |
jne @f |
cmp esi, 1 |
jne @f |
inc [TCPS_sndprobe] |
jmp .eos |
@@: |
mov ebx, [eax + TCP_SOCKET.SND_NXT] |
cmp ebx, [eax + TCP_SOCKET.SND_MAX] |
jae @f |
inc [TCPS_sndrexmitpack] |
add [TCPS_sndrexmitbyte], esi |
jmp .eos |
@@: |
inc [TCPS_sndpack] |
add [TCPS_sndbyte], esi |
jmp .eos |
.zero_data: |
test [eax + TCP_SOCKET.t_flags], TF_ACKNOW |
jz @f |
inc [TCPS_sndacks] |
jmp .eos |
@@: |
test dl, TH_SYN + TH_FIN + TH_RST |
jz @f |
inc [TCPS_sndctrl] |
jmp .eos |
@@: |
mov ebx, [eax + TCP_SOCKET.SND_UP] |
cmp ebx, [eax + TCP_SOCKET.SND_UNA] |
jb @f |
inc [TCPS_sndurg] |
jmp .eos |
@@: |
inc [TCPS_sndwinup] |
.eos: |
;---------------------------------------------------- |
; Calculate the receive window. |
; Dont shrink window, but avoid silly window syndrome |
469,8 → 509,8 |
call IPv4_output |
jz .ip_error |
;----------------------------------------- |
; Move TCP header from stack to TCP packet |
;------------------------------------------ |
; Move TCP header from stack to TCP segment |
push ecx |
mov ecx, [esp + 4] |
482,7 → 522,6 |
pop esi ; headersize |
add esp, esi ; remove it from stack |
push edx ; packet size for send proc |
push eax ; packet ptr for send proc |
mov edx, edi ; begin of data |
497,7 → 536,7 |
; ecx = buffer size |
; edi = ptr to buffer |
mov eax, [esp + 16] ; get socket ptr |
mov eax, [esp + 12] ; get socket ptr |
push edx |
push [eax + TCP_SOCKET.SND_NXT] ; we'll need this for timing the transmission |
504,7 → 543,7 |
test ecx, ecx |
jz .nodata |
mov edx, [eax + TCP_SOCKET.SND_NXT] |
add [eax + TCP_SOCKET.SND_NXT], ecx ; update sequence number <<< CHECKME |
add [eax + TCP_SOCKET.SND_NXT], ecx ; update sequence number |
sub edx, [eax + TCP_SOCKET.SND_UNA] ; offset |
add eax, STREAM_SOCKET.snd |
call SOCKET_ring_read |
512,7 → 551,7 |
pop edi |
pop esi ; begin of data |
pop ecx ; full packet size |
mov eax, [esp + 12] ; socket ptr |
mov eax, [esp + 8] ; socket ptr |
;---------------------------------- |
; initialize retransmit timer (400) |
536,7 → 575,7 |
je @f |
mov [eax + TCP_SOCKET.t_rtt], 1 ; nope, start transmission timer |
mov [eax + TCP_SOCKET.t_rtseq], edi |
;TODO: update stats |
inc [TCPS_segstimed] |
@@: |
; set retransmission timer if not already set, and not doing an ACK or keepalive probe |
584,6 → 623,7 |
call NET_ptr_to_num4 |
inc [TCP_segments_tx + edi] |
inc [TCPS_sndtotal] |
; update advertised receive window |
test ecx, ecx |
/kernel/branches/Kolibri-acpi/network/tcp_subr.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Part of the TCP/IP network stack for KolibriOS ;; |
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5015 $ |
$Revision: 5522 $ |
align 4 |
iglobal |
292,7 → 292,7 |
call IPv4_output |
jz .error |
pop esi cx |
push edx eax |
push eax |
;----------------------------------------------- |
; Fill in the TCP header by using the socket ptr |
376,7 → 376,7 |
jz .error |
pop esi cx |
push edx eax |
push eax |
;--------------------------------------------------- |
; Fill in the TCP header by using a received segment |
/kernel/branches/Kolibri-acpi/network/tcp_timer.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Part of the TCP/IP network stack for KolibriOS ;; |
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 5013 $ |
$Revision: 5442 $ |
timer_flag_retransmission = 1 shl 0 |
timer_flag_keepalive = 1 shl 1 |
54,6 → 54,8 |
; call TCP_output ;; |
pop ebx |
inc [TCPS_delack] ; update stats |
jmp .loop |
.exit: |
/kernel/branches/Kolibri-acpi/network/tcp_usreq.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2013. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; Part of the TCP/IP network stack for KolibriOS ;; |
14,7 → 14,7 |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
$Revision: 4850 $ |
$Revision: 5442 $ |
;------------------------- |
89,6 → 89,8 |
test [eax + SOCKET.state], SS_ISCONNECTED |
jnz .eisconn |
inc [TCPS_connattempt] ; update stats |
push eax edx |
lea ecx, [eax + SOCKET.mutex] |
call mutex_lock |
/kernel/branches/Kolibri-acpi/network/udp.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; UDP.INC ;; |
154,7 → 154,7 |
.next_socket: |
mov eax, [eax + SOCKET.NextPtr] |
or eax, eax |
jz .dump_ |
jz .unlock_dump |
cmp [eax + SOCKET.Domain], AF_INET4 |
jne .next_socket |
213,8 → 213,7 |
mov [eax + UDP_SOCKET.RemotePort], cx |
jmp .updatesock |
.dump_: |
.unlock_dump: |
pusha |
mov ecx, socket_mutex |
call mutex_unlock |
221,7 → 220,6 |
popa |
DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: no socket found\n" |
jmp .dump |
.checksum_mismatch: |
228,15 → 226,12 |
DEBUGF DEBUG_NETWORK_VERBOSE, "UDP_input: checksum mismatch\n" |
.dump: |
call NET_packet_free |
add esp, 4 ; pop (balance stack) |
DEBUGF DEBUG_NETWORK_VERBOSE,"UDP_input: dumping\n" |
call NET_BUFF_free |
ret |
;----------------------------------------------------------------- |
; |
; UDP_output |
260,7 → 255,7 |
mov dx, [eax + UDP_SOCKET.LocalPort] |
DEBUGF DEBUG_NETWORK_VERBOSE, "local port=%x\n", dx |
sub esp, 8 ; Data ptr and data size will be placed here |
sub esp, 4 ; Data ptr will be placed here |
push edx esi |
mov edx, [eax + IP_SOCKET.LocalIP] |
mov eax, [eax + IP_SOCKET.RemoteIP] |
269,7 → 264,6 |
call IPv4_output |
jz .fail |
mov [esp + 8], eax ; pointer to buffer start |
mov [esp + 8 + 4], edx ; buffer size |
mov [edi + UDP_header.Length], cx |
rol [edi + UDP_header.Length], 8 |
/kernel/branches/Kolibri-acpi/proc32.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/sec_loader/trunk/startos.ini |
---|
68,8 → 68,8 |
LoaderRamImage=kolibri.img |
RamdiskPATH=/kolibri/ |
RamdiskFile=@menu,@menu |
RamdiskFile=@PANEL,@PANEL |
RamdiskFile=@RB,@PANEL |
RamdiskFile=@TASKBAR,@TASKBAR |
RamdiskFile=@RB,@TASKBAR |
[legacy_kolibri] |
name="KolibriOS" |
81,7 → 81,7 |
RamdiskSize=1440K |
RamdiskPATH=/kolibri/ |
RamdiskFile=@menu,@menu |
RamdiskFile=@PANEL,@PANEL |
RamdiskFile=@TASKBAR,@TASKBAR |
RamdiskFile=@RB,@RB |
RamdiskFile=@rcher,@rcher |
RamdiskFile=@ss,@ss |
/kernel/branches/Kolibri-acpi/sound/playnote.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; PLAYNOTE.INC version 1.1 22 November 2003 ;; |
/kernel/branches/Kolibri-acpi/unpacker.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/video/blitter.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2011-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2011-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
/kernel/branches/Kolibri-acpi/video/cursors.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
528,7 → 528,7 |
align 4 |
@@: |
mov edi, ebx |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
mov ecx, [esp] |
rep movsb |
563,7 → 563,7 |
align 4 |
@@: |
mov edi, ebx |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
rep movsd |
597,7 → 597,7 |
align 4 |
@@: |
mov edi, ebx |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
rep movsw |
659,7 → 659,6 |
cmp ebx, [_display.width] |
jb @F |
mov ebx, [_display.width] |
dec ebx |
;-------------------------------------- |
align 4 |
@@: |
666,17 → 665,12 |
cmp edi, [_display.height] |
jb @F |
mov edi, [_display.height] |
dec edi |
;-------------------------------------- |
align 4 |
@@: |
mov [cur.right], ebx |
mov [cur.bottom], edi |
sub ebx, [x] |
sub edi, [y] |
inc ebx |
inc edi |
sub ebx, [_dx] |
sub edi, [_dy] |
690,7 → 684,7 |
align 4 |
@@: |
mov esi, edx |
add edx, [_display.pitch] |
add edx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
lea ecx, [ecx+ecx*2] |
rep movsb |
713,7 → 707,7 |
mov esi, edx |
mov edi, ebx |
add edx, 32*4 |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
;-------------------------------------- |
align 4 |
.pix: |
779,7 → 773,6 |
cmp ebx, [_display.width] |
jb @F |
mov ebx, [_display.width] |
dec ebx |
;-------------------------------------- |
align 4 |
@@: |
786,17 → 779,11 |
cmp edi, [_display.height] |
jb @F |
mov edi, [_display.height] |
dec edi |
;-------------------------------------- |
align 4 |
@@: |
mov [cur.right], ebx |
mov [cur.bottom], edi |
sub ebx, [x] |
sub edi, [y] |
inc ebx |
inc edi |
sub ebx, [_dx] |
sub edi, [_dy] |
810,7 → 797,7 |
align 4 |
@@: |
mov esi, edx |
add edx, [_display.pitch] |
add edx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
rep movsd |
dec eax |
832,7 → 819,7 |
mov esi, edx |
mov edi, ebx |
add edx, 32*4 |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
;-------------------------------------- |
align 4 |
.pix: |
893,25 → 880,20 |
lea edx, [LFB_BASE+eax+ecx*2] |
mov [cur_saved_base], edx |
cmp ebx, [Screen_Max_X] |
jbe @F |
mov ebx, [Screen_Max_X] |
cmp ebx, [_display.width] |
jb @F |
mov ebx, [_display.width] |
;-------------------------------------- |
align 4 |
@@: |
cmp edi, [Screen_Max_Y] |
jbe @F |
mov edi, [Screen_Max_Y] |
cmp edi, [_display.height] |
jb @F |
mov edi, [_display.height] |
;-------------------------------------- |
align 4 |
@@: |
mov [cur.right], ebx |
mov [cur.bottom], edi |
sub ebx, [x] |
sub edi, [y] |
inc ebx |
inc edi |
sub ebx, [_dx] |
sub edi, [_dy] |
925,7 → 907,7 |
align 4 |
@@: |
mov esi, edx |
add edx, [_display.pitch] |
add edx, [_display.lfb_pitch] |
mov ecx, [cur.w] |
rep movsw |
948,7 → 930,7 |
mov esi, edx |
mov edi, ebx |
add edx, 32*4 |
add ebx, [_display.pitch] |
add ebx, [_display.lfb_pitch] |
;-------------------------------------- |
align 4 |
.pix: |
/kernel/branches/Kolibri-acpi/video/vesa12.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2011. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; VESA12.INC ;; |
/kernel/branches/Kolibri-acpi/video/vesa20.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2014. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; VESA20.INC ;; |
236,12 → 236,11 |
add eax, [putimg.arg_0] |
mov [putimg.line_increment], eax |
; winmap new line increment |
mov eax, [Screen_Max_X] |
inc eax |
mov eax, [_display.width] |
sub eax, [putimg.real_sx] |
mov [putimg.winmap_newline], eax |
; screen new line increment |
mov eax, [_display.pitch] |
mov eax, [_display.lfb_pitch] |
mov ebx, [_display.bytes_per_pixel] |
imul ecx, ebx |
sub eax, ecx |
262,7 → 261,7 |
mov eax, [d_width_calc_area + eax*4] |
add eax, [putimg.abs_cx] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
xchg eax, ebp |
mov ecx, [putimg.real_sx] |
876,16 → 875,16 |
__sys_putpixel: |
pushad |
cmp [Screen_Max_X], eax |
jb .exit |
cmp [Screen_Max_Y], ebx |
jb .exit |
cmp eax, [_display.width] |
jge .exit |
cmp ebx, [_display.height] |
jge .exit |
test edi, 1 ; force ? |
jnz .forced |
; not forced |
mov edx, [d_width_calc_area + ebx*4] |
add edx, [_WinMapAddress] |
add edx, [_display.win_map] |
movzx edx, byte [eax+edx] |
cmp edx, [CURRENT_TASK] |
jne .exit |
1441,9 → 1440,8 |
.end_y: |
mov [drbar.real_sy], ebx |
; line_inc_map |
mov eax, [Screen_Max_X] |
mov eax, [_display.width] |
sub eax, [drbar.real_sx] |
inc eax |
mov [drbar.line_inc_map], eax |
; line_inc_scr |
mov eax, [drbar.real_sx] |
1450,7 → 1448,7 |
mov ebx, [_display.bytes_per_pixel] |
imul eax, ebx |
neg eax |
add eax, [_display.pitch] |
add eax, [_display.lfb_pitch] |
mov [drbar.line_inc_scr], eax |
; pointer to screen |
mov edx, [drbar.abs_cy] |
1466,7 → 1464,7 |
mov eax, [d_width_calc_area + eax*4] |
add eax, [drbar.abs_cx] |
add eax, [_WinMapAddress] |
add eax, [_display.win_map] |
xchg eax, ebp |
mov ebx, [drbar.real_sx] |
2036,7 → 2034,7 |
; ebp:=Y*BytesPerScanLine+X*BytesPerPixel+AddrLFB |
call calculate_edi |
xchg edi, ebp |
add ebp, [_WinMapAddress] |
add ebp, [_display.win_map] |
; Now eax=x, ebx=y, edi->output, ebp=offset in WinMapAddress |
; 2) Calculate offset in background memory block |
push eax |
2149,10 → 2147,10 |
mov eax, [BgrDataWidth] |
dec eax |
xor edx, edx |
div dword [Screen_Max_X] |
div dword [screen_workarea.right] |
push eax ; high |
xor eax, eax |
div dword [Screen_Max_X] |
div dword [screen_workarea.right] |
push eax ; low |
; the same for height |
2159,10 → 2157,10 |
mov eax, [BgrDataHeight] |
dec eax |
xor edx, edx |
div dword [Screen_Max_Y] |
div dword [screen_workarea.bottom] |
push eax ; high |
xor eax, eax |
div dword [Screen_Max_Y] |
div dword [screen_workarea.bottom] |
push eax ; low |
; External loop for all y from start to end |
2258,7 → 2256,7 |
; qword [esp+36] = 2^32*(BgrDataWidth-1)/(ScreenWidth-1) |
sdp3a: |
mov eax, [_WinMapAddress] |
mov eax, [_display.win_map] |
cmp [ebp+eax], byte 1 |
jnz snbgp |
mov eax, [bgr_cur_line+esi] |
2323,8 → 2321,7 |
; advance edi, ebp to next scan line |
sub eax, [draw_data+32+RECT.left] |
sub ebp, eax |
add ebp, [Screen_Max_X] |
add ebp, 1 |
add ebp, [_display.width] |
sub edi, eax |
sub edi, eax |
cmp byte [_display.bytes_per_pixel], 2 |
2335,7 → 2332,7 |
sub edi, eax |
@@: |
add edi, [_display.pitch] |
add edi, [_display.lfb_pitch] |
; restore ecx,edx; advance esi to next background line |
mov eax, [esp+28] |
mov ebx, [esp+32] |
2356,8 → 2353,7 |
push edi |
mov esi, bgr_next_line |
mov edi, bgr_cur_line |
mov ecx, [Screen_Max_X] |
inc ecx |
mov ecx, [_display.width] |
rep movsd |
jmp bgr_resmooth1 |
/kernel/branches/Kolibri-acpi/video/vga.inc |
---|
1,6 → 1,6 |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
;; ;; |
;; Copyright (C) KolibriOS team 2004-2012. All rights reserved. ;; |
;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; |
;; Distributed under terms of the GNU General Public License ;; |
;; ;; |
;; VGA.INC ;; |