From e97775cadc77988e06f44a8e4566cd749c0d266b Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Mon, 18 Feb 2008 21:38:13 +0000 Subject: [PATCH] additional support for rhd driver git-svn-id: svn://kolibrios.org@747 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/core/dll.inc | 8 ++++++++ kernel/trunk/core/malloc.inc | 2 +- kernel/trunk/core/memory.inc | 4 ++-- kernel/trunk/core/peload.inc | 8 ++++++++ 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/kernel/trunk/core/dll.inc b/kernel/trunk/core/dll.inc index 1821aa61c3..db203b1c17 100644 --- a/kernel/trunk/core/dll.inc +++ b/kernel/trunk/core/dll.inc @@ -197,6 +197,7 @@ endp align 4 proc pci_read16 stdcall, bus:dword, devfn:dword, reg:dword + push ebx xor eax, eax xor ebx, ebx mov ah, byte [bus] @@ -204,11 +205,13 @@ proc pci_read16 stdcall, bus:dword, devfn:dword, reg:dword mov bh, byte [devfn] mov bl, byte [reg] call pci_read_reg + pop ebx ret endp align 4 proc pci_read8 stdcall, bus:dword, devfn:dword, reg:dword + push ebx xor eax, eax xor ebx, ebx mov ah, byte [bus] @@ -216,11 +219,13 @@ proc pci_read8 stdcall, bus:dword, devfn:dword, reg:dword mov bh, byte [devfn] mov bl, byte [reg] call pci_read_reg + pop ebx ret endp align 4 proc pci_write8 stdcall, bus:dword, devfn:dword, reg:dword, val:dword + push ebx xor eax, eax xor ebx, ebx mov ah, byte [bus] @@ -229,11 +234,13 @@ proc pci_write8 stdcall, bus:dword, devfn:dword, reg:dword, val:dword mov bl, byte [reg] mov ecx, [val] call pci_write_reg + pop ebx ret endp align 4 proc pci_write16 stdcall, bus:dword, devfn:dword, reg:dword, val:dword + push ebx xor eax, eax xor ebx, ebx mov ah, byte [bus] @@ -242,6 +249,7 @@ proc pci_write16 stdcall, bus:dword, devfn:dword, reg:dword, val:dword mov bl, byte [reg] mov ecx, [val] call pci_write_reg + pop ebx ret endp diff --git a/kernel/trunk/core/malloc.inc b/kernel/trunk/core/malloc.inc index 0d81900e62..0a4e49eb05 100644 --- a/kernel/trunk/core/malloc.inc +++ b/kernel/trunk/core/malloc.inc @@ -983,7 +983,7 @@ malloc_large: align 4 init_malloc: - stdcall kernel_alloc, 0x20000 + stdcall kernel_alloc, 0x30000 mov [mst.top], eax mov [mst.topsize], 128*1024 diff --git a/kernel/trunk/core/memory.inc b/kernel/trunk/core/memory.inc index 9c55163fe9..779c72ad82 100644 --- a/kernel/trunk/core/memory.inc +++ b/kernel/trunk/core/memory.inc @@ -1057,8 +1057,8 @@ new_services: mov [esp+36], eax ret @@: - cmp eax, 21 - ja @f + cmp eax, 21 ;for test purposes only + ja @f ;will be removed soon cmp ebx, OS_BASE jae .fail diff --git a/kernel/trunk/core/peload.inc b/kernel/trunk/core/peload.inc index 7894612816..07b9b20c98 100644 --- a/kernel/trunk/core/peload.inc +++ b/kernel/trunk/core/peload.inc @@ -275,10 +275,18 @@ __exports: free_kernel_space, 'FreeKernelSpace', \ ; stdcall kernel_alloc, 'KernelAlloc', \ ; stdcall kernel_free, 'KernelFree', \ ; stdcall + malloc, 'Kmalloc', \ + free, 'Kfree', \ map_io_mem, 'MapIoMem', \ ; stdcall +\ pci_api, 'PciApi', \ + pci_read8, 'PciRead8', \ ; stdcall + pci_read16, 'PciRead16', \ ; stdcall pci_read32, 'PciRead32', \ ; stdcall + pci_write8, 'PciWrite8', \ ; stdcall + pci_write16, 'PciWrite16', \ ; stdcall pci_write32, 'PciWrite32', \ ; stdcall +\ reg_service, 'RegService', \ user_alloc, 'UserAlloc', \ ; stdcall user_free, 'UserFree', \ ; stdcall