/kernel/branches/kolibri_pe/core/export.asm |
---|
File deleted |
/kernel/branches/kolibri_pe/core/dll.c |
---|
File deleted |
/kernel/branches/kolibri_pe/core/dll.inc |
---|
208,7 → 208,6 |
endp |
align 4 |
_PciRead32: |
proc pci_read32 stdcall, bus:dword, devfn:dword, reg:dword |
push ebx |
xor eax, eax |
223,7 → 222,6 |
endp |
align 4 |
_PciRead16: |
proc pci_read16 stdcall, bus:dword, devfn:dword, reg:dword |
push ebx |
xor eax, eax |
238,7 → 236,6 |
endp |
align 4 |
_PciRead8: |
proc pci_read8 stdcall, bus:dword, devfn:dword, reg:dword |
push ebx |
xor eax, eax |
253,7 → 250,6 |
endp |
align 4 |
_PciWrite8: |
proc pci_write8 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
push ebx |
xor eax, eax |
269,7 → 265,6 |
endp |
align 4 |
_PciWrite16: |
proc pci_write16 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
push ebx |
xor eax, eax |
285,7 → 280,6 |
endp |
align 4 |
_PciWrite32: |
proc pci_write32 stdcall, bus:dword, devfn:dword, reg:dword, val:dword |
push ebx |
xor eax, eax |
393,7 → 387,6 |
endp |
align 4 |
_RegService: |
proc reg_service stdcall, name:dword, handler:dword |
push ebx |
569,7 → 562,6 |
; loaded by the load_file() function |
align 4 |
_LoadFile: |
_load_file@4: |
proc load_file stdcall, file_name:dword |
locals |
1118,7 → 1110,6 |
; ebx= pid |
align 4 |
_CreateObject: |
create_kernel_object: |
push ebx |
1147,7 → 1138,6 |
; eax= object |
align 4 |
_DestroyObject: |
destroy_kernel_object: |
pushfd |
/kernel/branches/kolibri_pe/core/exports.inc |
---|
110,6 → 110,7 |
dd szCommitPages , commit_pages ;not implemented |
dd szReleasePages , release_pages |
dd szFreeKernelSpace , free_kernel_space ;stdcall |
dd szMemAlloc , @mem_alloc@8 ;fastcall |
dd szMemFree , @mem_free@4 ;fastcall |
dd szUserAlloc , user_alloc ;stdcall |
/kernel/branches/kolibri_pe/core/heap.inc |
---|
15,7 → 15,13 |
DONT_FREE_BLOCK equ 10h |
align 4 |
proc free_kernel_space stdcall uses ebx ecx edx esi edi, base:dword |
ret |
endp |
;;;;;;;;;;;;;; USER ;;;;;;;;;;;;;;;;; |
HEAP_TOP equ 0x5FC00000 |
49,7 → 55,6 |
endp |
align 4 |
_UserAlloc: |
proc user_alloc stdcall, alloc_size:dword |
push ebx |
126,7 → 131,6 |
endp |
align 4 |
_UserFree: |
proc user_free stdcall, base:dword |
push esi |
/kernel/branches/kolibri_pe/core/memory.inc |
---|
29,8 → 29,6 |
ret |
align 4 |
_MapIoMem: |
proc map_io_mem stdcall, base:dword, size:dword, flags:dword |
push edi |
73,7 → 71,6 |
; ecx= count |
align 4 |
_CommitPages: |
commit_pages: |
push edi |
test ecx, ecx |
139,7 → 136,6 |
; ecx= count |
align 4 |
_UnmapPages: |
unmap_pages: |
push edi |
366,7 → 362,6 |
; eax= phisical page address |
align 4 |
_GetPgAddr: |
get_pg_addr: |
shr eax, 12 |
mov eax, [page_tabs+eax*4] |
865,11 → 860,10 |
.buffer_overflow: |
push 3 |
.ret: |
mov ecx, [used_buf] |
cmp ecx, [ipc_tmp] |
mov eax, [used_buf] |
cmp eax, [ipc_tmp] |
jz @f |
call @mem_free@4 |
stdcall free_kernel_space,eax |
@@: |
pop eax |
popf |
1111,7 → 1105,6 |
endp |
align 4 |
_CreateRingBuffer: |
proc create_ring_buffer stdcall, size:dword, flags:dword |
locals |
buf_ptr dd ? |
1158,8 → 1151,7 |
pop ebx |
ret |
.mm_fail: |
mov ecx, [buf_ptr] |
call @mem_free@4 |
;stdcall free_kernel_space, [buf_ptr] |
pop ebx |
xor eax, eax |
.fail: |
/kernel/branches/kolibri_pe/core/malloc.inc |
---|
20,9 → 20,6 |
; esi= nb |
; ebx= idx |
; |
align 4 |
_Kmalloc: |
malloc: |
push esi |
200,7 → 197,6 |
; eax= mem |
align 4 |
_Kfree: |
free: |
push edi |
mov edi, eax |
/kernel/branches/kolibri_pe/include/core.h |
---|
1,8 → 1,7 |
#define OS_BASE 0xE0000000 |
#define IMAGE_BASE 0xE0100000 |
#define LOAD_BASE 0x00100000 |
void printf (const char *format, ...); |
#define CALLER ((addr_t) __builtin_return_address(0)) |
/kernel/branches/kolibri_pe/include/mm.h |
---|
83,11 → 83,7 |
pfn_t alloc_page() __attribute__ ((deprecated)); |
#define __export __attribute__ ((dllexport)) |
md_t* __fastcall md_alloc(size_t size, u32_t flags) ; |
void* __fastcall mem_alloc(size_t size, u32_t flags); |
void __fastcall mem_free(void *mem); |
void* __fastcall __export mem_alloc(size_t size, u32_t flags) asm ("MemAlloc"); |
void __fastcall __export mem_free(void *mem) asm ("MemFree"); |
/kernel/branches/kolibri_pe/kernel.asm |
---|
131,44 → 131,10 |
public _load_file@4 |
public _kernel_exports |
public _strncmp@12 |
public _LoadFile ; stdcall export |
public _CreateObject ; export |
public _DestroyObject ; export |
public _CreateRingBuffer ; stdcall export |
public _CommitPages ; export |
public _GetPgAddr ; export |
public _MapIoMem ; stdcall export |
public _UnmapPages ; export |
public _Kmalloc ; export |
public _Kfree ; export |
public _UserAlloc ; stdcall export |
public _UserFree ; stdcall export |
public _RegService ; stdcall export |
public _SysMsgBoardStr ; export |
public _SetScreen ; export FIXME make fastcall |
public _PciApi ; export |
public _PciRead8 ; stdcall export |
public _PciRead16 ; stdcall export |
public _PciRead32 ; stdcall export |
public _PciWrite8 ; stdcall export |
public _PciWrite16 ; stdcall export |
public _PciWrite32 ; stdcall export |
public _SelectHwCursor ; stdcall export |
public _SetHwCursor ; stdcall export |
public _HwCursorRestore ; export |
public _HwCursorCreate ; export |
extrn __edata |
extrn _16bit_start |
186,12 → 152,9 |
extrn @init_heap@8 |
extrn @find_large_md@4 |
extrn _MemAlloc |
extrn _MemFree |
extrn @mem_alloc@8 |
extrn @mem_free@4 |
@mem_alloc@8 equ _MemAlloc |
@mem_free@4 equ _MemFree |
extrn @load_pe@4 |
extrn @load_pe_driver@4 |
4582,8 → 4545,6 |
pdl1: ret |
align 4 |
_SysMsgBoardStr: |
sys_msg_board_str: |
pushad |
5099,9 → 5060,7 |
paleholder: |
ret |
align 4 |
_SetScreen: |
set_screen: |
cmp eax, [Screen_Max_X] |
jne .set |
/kernel/branches/kolibri_pe/makefile |
---|
35,6 → 35,12 |
boot/boot.asm \ |
boot/start.asm |
#include <types.h> |
#include <core.h> |
#include <spinlock.h> |
#include <link.h> |
#include <mm.h> |
#include <slab.h> |
H_SRC:= \ |
include/types.h \ |
54,8 → 60,8 |
kernel.gz :kernel.mnt |
7z a -tgzip kernel.gz kernel.mnt |
kernel.mnt: kernel.obj bin/export.obj $(PE_OBJS) Makefile ld.x |
ld $(LDFLAGS) -T ld.x -o $@ kernel.obj bin/export.obj $(PE_OBJS) |
kernel.mnt: kernel.obj $(PE_OBJS) Makefile ld.x |
ld $(LDFLAGS) -T ld.x -o $@ kernel.obj $(PE_OBJS) |
bin/%.obj : core/%.c $(H_SRC) Makefile |
$(CC) $(CFLAGS) -o $@ $< |
63,9 → 69,6 |
bin/%.obj: %.asm |
$(FASM) $< $@ |
bin/export.obj: core/export.asm |
as -o $@ $< |
kernel.obj: $(KERNEL_SRC) |
$(FASM) kernel.asm |
/kernel/branches/kolibri_pe/const.inc |
---|
202,7 → 202,6 |
_16BIT_BASE equ 0x00010000 |
LOAD_BASE equ 0x00100000 |
OS_BASE equ 0xE0000000 |
IMAGE_BASE equ (OS_BASE+LOAD_BASE) |
window_data equ OS_BASE |
/kernel/branches/kolibri_pe/bus/pci/pci32.inc |
---|
32,7 → 32,7 |
;*************************************************************************** |
align 4 |
_PciApi: |
pci_api: |
cmp [pci_access_enabled],1 |
/kernel/branches/kolibri_pe/ld.x |
---|
20,14 → 20,6 |
{ |
*(.flat) *(.text) *(.rdata) *(.data) |
} |
.edata ALIGN(32): |
{ |
*(.edata) |
_code_end = .; |
. = ALIGN(4096); |
} |
__edata = . - 0xE0000000; |
.bss ALIGN(4096) : |
36,8 → 28,6 |
} |
__kernel_end = . - 0xE0000000; |
/DISCARD/ : |
{ |
*(.debug$S) |
45,6 → 35,7 |
*(.debug$F) |
*(.drectve) |
*(.reloc) |
*(.edata) |
} |
} |
/kernel/branches/kolibri_pe/data32.inc |
---|
359,16 → 359,9 |
scr_width rd 1 |
scr_height rd 1 |
_HwCursorCreate: |
create_cursor rd 1 |
_SelectHwCursor: |
select_hw_cursor rd 1 |
_SetHwCursor: |
set_hw_cursor rd 1 |
_HwCursorRestore: |
hw_restore rd 1 |
def_cursor rd 1 |
/kernel/branches/kolibri_pe/kernel32.inc |
---|
182,6 → 182,7 |
include "core/malloc.inc" ; small kernel heap |
include "core/taskman.inc" |
include "core/dll.inc" |
include "core/peload.inc" ; |
include "core/exports.inc" |
include "core/string.inc" |
include "core/v86.inc" ; virtual-8086 manager |