/kernel/branches/kolibri_pe/boot/boot.asm |
---|
16,9 → 16,10 |
CR0_WP equ 0x00010000 ;write protect |
CR0_PG equ 0x80000000 ;paging |
public _16bit_start |
public _16bit_end |
public _enter_bootscreen |
public _leave_bootscreen |
public _bx_from_load |
26,12 → 27,14 |
section '.boot' code readable align 16 |
_16bit_start: |
_enter_bootscreen: |
org 0 |
use16 |
_enter_bootscreen: |
mov eax, cr0 |
and eax, not 0x80000001 |
mov cr0, eax |
71,4 → 74,32 |
jmp pword 0x08:__setvars |
align 4 |
_leave_bootscreen: |
_enter_16bit: |
mov eax, cr0 |
and eax, not 0x80000001 |
mov cr0, eax |
jmp far 0x1000:@F |
align 4 |
_leave_16bit: |
cli |
mov eax, cr0 |
or eax, CR0_PG+CR0_WP+CR0_PE |
mov cr0, eax |
hlt |
align 4 |
@@: |
mov eax, 0x3000 |
mov ss, ax |
mov esp, 0xEC00 |
mov ebx, 0x1000 |
mov ds, bx |
mov es, bx |
cli |
hlt |
align 4 |
_16bit_end: |
/kernel/branches/kolibri_pe/bus/pci/pci32.inc |
---|
398,9 → 398,9 |
cmp ebp, 1 ; PCI_FUNCTION_ID |
jnz .not_PCI_BIOS_PRESENT |
mov edx, 'PCI ' |
mov al, [OS_BASE+0x2F0000 + 0x9020] |
mov bx, [OS_BASE+0x2F0000 + 0x9022] |
mov cl, [OS_BASE+0x2F0000 + 0x9021] |
mov al, [BOOT_VAR + 0x9020] |
mov bx, [BOOT_VAR + 0x9022] |
mov cl, [BOOT_VAR + 0x9021] |
xor ah, ah |
jmp .return_abcd |
/kernel/branches/kolibri_pe/const.inc |
---|
198,7 → 198,7 |
kernel_tabs equ (page_tabs+ (OS_BASE shr 10)) ;0xFDE00000 |
master_tab equ (page_tabs+ (page_tabs shr 10)) ;0xFDFF70000 |
BOOT_BASE equ 0x00010000 |
_16BIT_BASE equ 0x00010000 |
LOAD_BASE equ 0x00100000 |
OS_BASE equ 0xE0000000 |
297,41 → 297,42 |
VGABasePtr equ (OS_BASE+0x00A0000) |
;RAMDISK equ (OS_BASE+0x0100000) |
RAMDISK_FAT equ (OS_BASE+0x0280000) |
FLOPPY_FAT equ (OS_BASE+0x0282000) |
IDE_DMA equ 0x284000 |
RAMDISK_FAT equ (OS_BASE+0x0180000) |
FLOPPY_FAT equ (OS_BASE+0x0182000) |
BgrAuxTable equ (OS_BASE+0x0298000) |
IDE_DMA equ 0x184000 |
BgrAuxTable equ (OS_BASE+0x0198000) |
; unused? |
SB16Buffer equ (OS_BASE+0x2A0000) |
SB16_Status equ (OS_BASE+0x02B0000) |
SB16Buffer equ (OS_BASE+0x01A0000) |
SB16_Status equ (OS_BASE+0x01B0000) |
BUTTON_INFO equ (OS_BASE+0x02C0000) |
RESERVED_PORTS equ (OS_BASE+0x02D0000) |
IRQ_SAVE equ (OS_BASE+0x02E0000) |
BOOT_VAR equ (OS_BASE+0x02f0000) |
BUTTON_INFO equ (OS_BASE+0x01C0000) |
RESERVED_PORTS equ (OS_BASE+0x01D0000) |
IRQ_SAVE equ (OS_BASE+0x01E0000) |
BOOT_VAR equ (OS_BASE+0x01f0000) |
stack_data_start equ (OS_BASE+0x0300000) |
eth_data_start equ (OS_BASE+0x0300000) |
stack_data equ (OS_BASE+0x0304000) |
stack_data_end equ (OS_BASE+0x031ffff) |
resendQ equ (OS_BASE+0x0320000) |
VMODE_BASE equ (OS_BASE+0x0328000) |
skin_data equ (OS_BASE+0x0330000) |
draw_data equ (OS_BASE+0x0338000); |
stack_data_start equ (OS_BASE+0x0200000) |
eth_data_start equ (OS_BASE+0x0200000) |
stack_data equ (OS_BASE+0x0204000) |
stack_data_end equ (OS_BASE+0x021ffff) |
resendQ equ (OS_BASE+0x0220000) |
VMODE_BASE equ (OS_BASE+0x0228000) |
skin_data equ (OS_BASE+0x0230000) |
draw_data equ (OS_BASE+0x0238000); |
BgrDrawMode equ (OS_BASE+0x033BFF4) |
BgrDataWidth equ (OS_BASE+0x033BFF8) |
BgrDataHeight equ (OS_BASE+0x033BFFC) |
BgrDrawMode equ (OS_BASE+0x023BFF4) |
BgrDataWidth equ (OS_BASE+0x023BFF8) |
BgrDataHeight equ (OS_BASE+0x023BFFC) |
;display_data equ (OS_BASE+0x033C000) ;1024*1280=0x140000 |
;display_data equ (OS_BASE+0x023C000) ;1024*1280=0x140000 |
virtual at (OS_BASE+0x033CF80) |
virtual at (OS_BASE+0x023CF80) |
tss TSS |
end virtual |
LAST_PAGE equ 0x0340000 |
LAST_PAGE equ 0x0240000 |
;sys_pgmap equ (OS_BASE+LAST_PAGE) |
/kernel/branches/kolibri_pe/core/v86.inc |
---|
91,8 → 91,8 |
; now V86 specific: initialize known addresses in first Mb |
pop eax |
; first page - BIOS data (shared between all machines!) |
; physical address = 0x2f0000 |
; linear address = BOOT_VAR = OS_BASE + 0x2f0000 |
; physical address = 0x1f0000 |
; linear address = BOOT_VAR = OS_BASE + 0x1f0000 |
mov dword [eax], (BOOT_VAR - OS_BASE) or 111b |
mov dword [eax+800h], BOOT_VAR |
; page before 0xA0000 - Extended BIOS Data Area (shared between all machines!) |
/kernel/branches/kolibri_pe/drivers/infinity.asm |
---|
33,7 → 33,7 |
USE_SSE2_MIXER equ 0 ;floating point mixer. Disabled by default |
OS_BASE equ 0x80000000 |
OS_BASE equ 0xE0000000 |
CAPS_SSE2 equ 26 |
PG_SW equ 0x003 |
/kernel/branches/kolibri_pe/drivers/sb16/CONFIG.INC |
---|
5,11 → 5,11 |
;constants-------------------------------------------------------- |
API_VERSION equ 0 ;debug |
OS_BASE equ 0x80000000 |
OS_BASE equ 0xE0000000 |
new_app_base equ 0x0 |
PROC_BASE equ (OS_BASE+0x080000) |
SB16Buffer equ (OS_BASE+0x2A0000) |
SB16_Status equ (OS_BASE+0x2B0000) |
SB16Buffer equ (OS_BASE+0x1A0000) |
SB16_Status equ (OS_BASE+0x1B0000) |
DMAPage equ ((SB16Buffer-OS_BASE) shr 16) |
SB16Buffer0 equ SB16Buffer |
/kernel/branches/kolibri_pe/fs/parse_fn.inc |
---|
40,7 → 40,7 |
locals |
buff db 4 dup(?) ; for test cd |
endl |
mov eax,[_bx_from_load+OS_BASE+BOOT_BASE] |
mov eax,[_bx_from_load+OS_BASE+_16BIT_BASE] |
mov ecx,sysdir_path |
mov [ecx-64],dword 'sys' |
cmp al,'r' ; if ram disk |
/kernel/branches/kolibri_pe/kernel.asm |
---|
123,8 → 123,10 |
public __setvars |
extrn _16bit_start |
extrn _16bit_end |
extrn _enter_bootscreen |
extrn _leave_bootscreen |
extrn _init |
extrn _init_mm |
352,15 → 354,17 |
call _init_mm |
mov [pg_data.pg_mutex], 0 |
mov esi, _enter_bootscreen |
mov ecx, _leave_bootscreen |
mov esi, _16bit_start |
mov ecx, _16bit_end |
shr ecx, 2 |
mov edi, BOOT_BASE |
mov edi, _16BIT_BASE |
cld |
rep movsd |
jmp far 0x60:0x00000; |
xchg bx, bx |
jmp far 0x60:_enter_bootscreen; |
align 4 |
__setvars: |
mov ax,os_stack |
376,7 → 380,7 |
; SAVE & CLEAR 0-0xffff |
xor esi, esi |
mov edi,0x2F0000 |
mov edi,0x1F0000 |
mov ecx,0x10000 / 4 |
rep movsd |
xor edi, edi |
5164,7 → 5168,7 |
; mov ecx,1000 |
; rep movsb |
mov esi,OS_BASE+0x2F0000 ; restore 0x0 - 0xffff |
mov esi, BOOT_VAR ; restore 0x0 - 0xffff |
mov edi, OS_BASE |
mov ecx,0x10000/4 |
cld |
/kernel/branches/kolibri_pe/ld.x |
---|
26,6 → 26,7 |
{ |
*(.bss) *(COMMON) |
} |
__kernel_end = . - 0xE0000000; |
/DISCARD/ : |
{ |