diff --git a/kernel/branches/Kolibri-acpi/boot/bootcode.inc b/kernel/branches/Kolibri-acpi/boot/bootcode.inc index 212208122f..e7e2f629bc 100644 --- a/kernel/branches/Kolibri-acpi/boot/bootcode.inc +++ b/kernel/branches/Kolibri-acpi/boot/bootcode.inc @@ -145,7 +145,7 @@ FirstDataSector dw 0 ; begin of data ; ;========================================================================= -include 'bootvesa.inc' ;Include source for boot vesa +include 'bootvesa.inc' ;Include source for boot vesa if defined extended_primary_loader include 'parsers.inc' end if @@ -387,7 +387,7 @@ sayerr: push 0 pop es - and word [es:0x9031], 0 + and word [es:BOOT_IDE_BASE_ADDR], 0 ; \begin{Mario79} ; find HDD IDE DMA PCI device ; check for PCI BIOS @@ -424,7 +424,7 @@ sayerr: int 0x1A jc .nopci and cx, 0xFFF0 ; clear address decode type - mov [es:0x9031], cx + mov [es:BOOT_IDE_BASE_ADDR], cx .nopci: ; \end{Mario79} @@ -456,15 +456,15 @@ wait_loop: ; variant 2 loopnz @b ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; --------------- APM --------------------- - and word [es:0x9044], 0 ; ver = 0.0 (APM not found) + and word [es:BOOT_APM_VERSION], 0 ; ver = 0.0 (APM not found) mov ax, 0x5300 xor bx, bx int 0x15 - jc apm_end ; APM not found + jc apm_end ; APM not found test cx, 2 - jz apm_end ; APM 32-bit protected-mode interface not supported - mov [es:0x9044], ax ; Save APM Version - mov [es:0x9046], cx ; Save APM flags + jz apm_end ; APM 32-bit protected-mode interface not supported + mov [es:BOOT_APM_VERSION], ax ; Save APM Version + mov [es:BOOT_APM_FLAGS], cx ; Save APM flags ; Write APM ver ---- and ax, 0xf0f @@ -483,10 +483,10 @@ wait_loop: ; variant 2 xor bx, bx int 0x15 - mov [es:0x9040], ebx - mov [es:0x9050], ax - mov [es:0x9052], cx - mov [es:0x9054], dx + mov [es:BOOT_APM_ENTRY], ebx + mov [es:BOOT_APM_CODE_32], ax + mov [es:BOOT_APM_CODE_16], cx + mov [es:BOOT_APM_DATA_16], dx apm_end: _setcursor d80x25_top_num, 0 @@ -630,7 +630,7 @@ end if push dword [es:8*4] pop dword [.oldtimer] push dword [.timer] - pop dword [es:8*4] + pop dword [es:8*4] ; mov eax, [es:8*4] ; mov [.oldtimer], eax ; mov eax, [.timer] @@ -716,7 +716,7 @@ end if cmp ah, 0x50;x,0x50E0 ; down jne .pgup cmp word[es:si+10], -1 - je .loops + je .loops add word [cursor_pos], size_of_step jmp .loops @@ -771,7 +771,7 @@ end if push word [es:bp+6] pop word [number_vm] mov word [preboot_graph], bp ;save choose - + jmp .d .change_b: @@ -947,18 +947,17 @@ end if ; GRAPHICS ACCELERATION ; force yes - mov [es:0x901C], byte 1 + mov [es:BOOT_MTRR], byte 1 ; DMA ACCESS TO HD mov al, [preboot_dma] - mov [es:0x901F], al + mov [es:BOOT_DMA], al ;; VRR_M USE ; ; mov al,[preboot_vrrm] ; mov [es:0x9030], al - mov [es:0x901E], byte 1 ; BOOT DEVICE @@ -1005,7 +1004,7 @@ include '../detect/biosmem.inc' ; TODO: !!!! read only first sector and set variables !!!!! ; ... ; TODO: !!! then read flippy image track by track - + mov cx, 0x0001 ; startcyl,startsector .a1: push cx dx @@ -1097,7 +1096,7 @@ include '../detect/biosmem.inc' ; and copy them to extended memory mov si, movedesc mov [si+8*2+3], bh ; from - + mov ax, word [BPB_BytsPerSec] shr ax, 1 ; words per sector mov cx, word [BPB_RsvdSecCnt] @@ -1105,7 +1104,7 @@ include '../detect/biosmem.inc' mul cx push ax ; save to stack count of words in boot+FAT xchg ax, cx - + push es push ds pop es @@ -1131,7 +1130,7 @@ sayerr_memmove: ; TODO: BPB_NumFATs !!!!! add bx, word [BPB_BytsPerSec] ; !!! TODO: may be need multiply by BPB_RsvdSecCnt !!! mov byte [si+8*2+3], bh ; bx - begin of FAT - + mov ax, word [BPB_BytsPerSec] shr ax, 1 ; words per sector mov cx, word [BPB_FATSz16] @@ -1146,12 +1145,12 @@ sayerr_memmove: pop es test ah, ah jnz sayerr_floppy - + mov ax, cx shl ax, 1 and eax, 0ffffh ; ax - count of bytes in FAT add dword [si+8*3+2], eax - + ; reading RootDir ; TODO: BPB_NumFATs add bx, ax @@ -1176,7 +1175,7 @@ sayerr_memmove: pop bx push bx add word [FirstDataSector], bx ; Begin of data region of floppy - + ; read RootDir call conv_abs_to_THS pop ax @@ -1337,7 +1336,7 @@ end if xor ax, ax mov es, ax - mov ax, [es:0x9008] ; vga & 320x200 + mov ax, [es:BOOT_VESA_MODE] ; vga & 320x200 mov bx, ax cmp ax, 0x13 je setgr diff --git a/kernel/branches/Kolibri-acpi/boot/bootvesa.inc b/kernel/branches/Kolibri-acpi/boot/bootvesa.inc index a75b654c27..f24cf9c38d 100644 --- a/kernel/branches/Kolibri-acpi/boot/bootvesa.inc +++ b/kernel/branches/Kolibri-acpi/boot/bootvesa.inc @@ -193,7 +193,7 @@ calc_vmodes_table: mov word [es:bx], 640 mov word [es:bx+2], 480 mov word [es:bx+6], 0x13 - + mov word [es:bx+10], 640 mov word [es:bx+12], 480 mov word [es:bx+16], 0x12 @@ -251,7 +251,7 @@ calc_vmodes_table: mov [es:bx+6], cx ; +6 : mode number movzx ax, byte [es:mi.BitsPerPixel] mov word [es:bx+8], ax ; +8 : bits per pixel - add bx, size_of_step ; size of record + add bx, size_of_step ; size of record @@: add si, 2 @@ -278,11 +278,11 @@ calc_vmodes_table: ; je .exit ; add bx,word [es:bp+2] ; add bx,word [es:bp+8] -; +; ; cmp ax,bx ; ja .loops ; jmp .again -;.loops: +;.loops: ; push dword [es:si] ; push dword [es:si+4] ; push dword [es:si+8] @@ -353,7 +353,7 @@ end if mov si, mode9 .print: call printplain - ret + ret ;----------------------------------------------------------------------------- check_first_parm: if defined extended_primary_loader @@ -493,7 +493,7 @@ end if ;----------------------------------------------------------------------------- ;default_vmode: - + ;----------------------------------------------------------------------------- draw_vmodes_table: _setcursor 9, 2 @@ -515,10 +515,10 @@ draw_vmodes_table: add cx, size_of_step*long_v_table - + cmp ax, cx jb .ok - + sub cx, size_of_step*long_v_table add cx, size_of_step cmp cx, word[end_cursor] @@ -624,7 +624,7 @@ draw_vmodes_table: ;draw cursor mov word[ds:_rs+21], '>>' mov word[ds:_rs+46], '<<' - + .next: @@ -707,7 +707,7 @@ clear_vmodes_table: mov cx, 70 add di, 20 dec bp - jns .loop_start + jns .loop_start pop es popa ret @@ -720,15 +720,15 @@ set_vmode: mov si, word [preboot_graph] ;[preboot_graph] mov cx, word [es:si+6] ; number of mode - + mov ax, word [es:si+0] ; resolution X mov bx, word [es:si+2] ; resolution Y - mov word [es:0x900A], ax ; resolution X - mov word [es:0x900C], bx ; resolution Y - mov word [es:0x9008], cx ; number of mode + mov word [es:BOOT_X_RES], ax ; resolution X + mov word [es:BOOT_Y_RES], bx ; resolution Y + mov word [es:BOOT_VESA_MODE], cx ; number of mode cmp cx, 0x12 je .mode0x12_0x13 @@ -747,11 +747,11 @@ set_vmode: int 0x10 ; LFB mov eax, [es:mi.PhysBasePtr];di+0x28] - mov [es:0x9018], eax + mov [es:BOOT_LFB], eax ; ---- vbe voodoo BytesPerLine equ 0x10 mov ax, [es:di+BytesPerLine] - mov [es:0x9001], ax + mov [es:BOOT_PITCH], ax ; BPP cmp [es:mi.BitsPerPixel], 16 jne .l0 @@ -760,12 +760,12 @@ set_vmode: mov [es:mi.BitsPerPixel], 15 .l0: mov al, byte [es:di+0x19] - mov [es:0x9000], al + mov [es:BOOT_BPP], al jmp .exit .mode0x12_0x13: - mov byte [es:0x9000], 32 - or dword [es:0x9018], 0xFFFFFFFF; 0x800000 + mov byte [es:BOOT_BPP], 32 + or dword [es:BOOT_LFB], 0xFFFFFFFF; 0x800000 ; VESA 1.2 PM BANK SWITCH ADDRESS @@ -788,10 +788,6 @@ set_vmode: .exit: ret - -; mov dword[es:0x9018],0x000A0000 -; ret - ;============================================================================= ;============================================================================= ;============================================================================= diff --git a/kernel/branches/Kolibri-acpi/const.inc b/kernel/branches/Kolibri-acpi/const.inc index a874f0eb85..c8393a72a7 100644 --- a/kernel/branches/Kolibri-acpi/const.inc +++ b/kernel/branches/Kolibri-acpi/const.inc @@ -363,22 +363,30 @@ PG_SHARED equ 0x200 ;;;;;;;;;;;boot time variables -;BOOT_BPP equ 0x9000 ;byte bits per pixel -BOOT_SCANLINE equ 0x9001 ;word scanline length +BOOT_BPP equ 0x9000 ;byte bits per pixel +BOOT_PITCH equ 0x9001 ;word scanline length BOOT_VESA_MODE equ 0x9008 ;word vesa video mode -;;BOOT_X_RES equ 0x900A ;word X res -;;BOOT_Y_RES equ 0x900C ;word Y res +BOOT_X_RES equ 0x900A ;word X res +BOOT_Y_RES equ 0x900C ;word Y res ;;BOOT_MOUSE_PORT equ 0x9010 ;byte mouse port - not used BOOT_BANK_SW equ 0x9014 ;dword Vesa 1.2 pm bank switch BOOT_LFB equ 0x9018 ;dword Vesa 2.0 LFB address BOOT_MTRR equ 0x901C ;byte 0 or 1 : enable MTRR graphics acceleration BOOT_LOG equ 0x901D ;byte not used anymore (0 or 1 : enable system log display) -BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled +;BOOT_DIRECT_LFB equ 0x901E ;byte 0 or 1 : enable direct lfb write, paging disabled +BOOT_DMA equ 0x901F ; BOOT_PCI_DATA equ 0x9020 ;8bytes pci data BOOT_VRR equ 0x9030 ;byte VRR start enabled 1, 2-no -BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr +BOOT_IDE_BASE_ADDR equ 0x9031 ;word IDEContrRegsBaseAddr BOOT_MEM_AMOUNT equ 0x9034 ;dword memory amount +BOOT_APM_ENTRY equ 0x9040 +BOOT_APM_VERSION equ 0x9044 +BOOT_APM_FLAGS equ 0x9046 ;unused +BOOT_APM_CODE_32 equ 0x9050 +BOOT_APM_CODE_16 equ 0x9052 +BOOT_APM_DATA_16 equ 0x9054 + TMP_FILE_NAME equ 0 TMP_CMD_LINE equ 1024 TMP_ICON_OFFS equ 1280 diff --git a/kernel/branches/Kolibri-acpi/core/apic.inc b/kernel/branches/Kolibri-acpi/core/apic.inc index a24ec34605..531f652ffc 100644 --- a/kernel/branches/Kolibri-acpi/core/apic.inc +++ b/kernel/branches/Kolibri-acpi/core/apic.inc @@ -70,7 +70,7 @@ APIC_init: call IRQ_mask_all ; IOAPIC init - stdcall map_io_mem, [acpi_ioapic_base], 0x20, PG_SW + stdcall map_io_mem, [acpi_ioapic_base], 0x20, PG_SW+PG_NOCACHE mov [IOAPIC_base], eax mov eax, IOAPIC_VER @@ -134,7 +134,7 @@ LAPIC_init: cmp [LAPIC_BASE], 0 jne .done - stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_SW + stdcall map_io_mem, [acpi_lapic_base], 0x1000, PG_SW+PG_NOCACHE mov [LAPIC_BASE], eax mov esi, eax diff --git a/kernel/branches/Kolibri-acpi/core/memory.inc b/kernel/branches/Kolibri-acpi/core/memory.inc index 894fc3b8f7..8ec76978b9 100644 --- a/kernel/branches/Kolibri-acpi/core/memory.inc +++ b/kernel/branches/Kolibri-acpi/core/memory.inc @@ -358,7 +358,7 @@ proc init_LFB cmp dword [LFBAddress], -1 jne @f - mov [BOOT_VAR+0x901c], byte 2 + mov [BOOT_VAR+BOOT_MTRR], byte 2 ; max VGA=640*480*4=1228800 bytes ; + 32*640*4=81920 bytes for mouse pointer stdcall alloc_pages, ((1228800+81920)/4096) @@ -378,7 +378,7 @@ proc init_LFB @@: test [SCR_MODE], word 0100000000000000b jnz @f - mov [BOOT_VAR+0x901c], byte 2 + mov [BOOT_VAR+BOOT_MTRR], byte 2 ret @@: call init_mtrr @@ -1364,7 +1364,7 @@ endp align 4 proc init_mtrr - cmp [BOOT_VAR+0x901c], byte 2 + cmp [BOOT_VAR+BOOT_MTRR], byte 2 je .exit bt [cpu_caps], CAPS_MTRR diff --git a/kernel/branches/Kolibri-acpi/init.inc b/kernel/branches/Kolibri-acpi/init.inc index c51487c114..88cbecd770 100644 --- a/kernel/branches/Kolibri-acpi/init.inc +++ b/kernel/branches/Kolibri-acpi/init.inc @@ -519,15 +519,6 @@ align 4 mov eax, [ebx] pop esi pop ebx - ret - -align 4 -madt_find: - - - - - ret align 4 @@ -544,7 +535,7 @@ check_acpi: test eax, eax jz .done - xchg bx, bx +; xchg bx, bx mov [acpi_madt_base-OS_BASE], eax mov ecx, [eax+36] @@ -555,7 +546,7 @@ check_acpi: shr ebx, 24 ; read APIC ID mov [edi], ebx ; bootstrap always first - inc [cpu_count] + inc [cpu_count-OS_BASE] add edi, 4 lea edx, [eax+44] diff --git a/kernel/branches/Kolibri-acpi/kernel.asm b/kernel/branches/Kolibri-acpi/kernel.asm index b5d78fab57..5fccd81038 100644 --- a/kernel/branches/Kolibri-acpi/kernel.asm +++ b/kernel/branches/Kolibri-acpi/kernel.asm @@ -328,8 +328,10 @@ bios32_entry dd ? tmp_page_tabs dd ? -__DEBUG__ fix 1 +__DEBUG__ fix 1 __DEBUG_LEVEL__ fix 1 +include 'fdo.inc' + include 'init.inc' org OS_BASE+$ @@ -401,17 +403,17 @@ high_code: call mutex_init ; SAVE REAL MODE VARIABLES - mov ax, [BOOT_VAR + 0x9031] + mov ax, [BOOT_VAR + BOOT_IDE_BASE_ADDR] mov [IDEContrRegsBaseAddr], ax ; --------------- APM --------------------- ; init selectors - mov ebx, [BOOT_VAR+0x9040] ; offset of APM entry point - movzx eax, word [BOOT_VAR+0x9050]; real-mode segment base address of - ; protected-mode 32-bit code segment - movzx ecx, word [BOOT_VAR+0x9052]; real-mode segment base address of - ; protected-mode 16-bit code segment - movzx edx, word [BOOT_VAR+0x9054]; real-mode segment base address of + mov ebx, [BOOT_VAR+BOOT_APM_ENTRY] ; offset of APM entry point + movzx eax, word [BOOT_VAR+BOOT_APM_CODE_32] ; real-mode segment base address of + ; protected-mode 32-bit code segment + movzx ecx, word [BOOT_VAR+BOOT_APM_CODE_16]; real-mode segment base address of + ; protected-mode 16-bit code segment + movzx edx, word [BOOT_VAR+BOOT_APM_DATA_16]; real-mode segment base address of ; protected-mode 16-bit data segment shl eax, 4 @@ -432,30 +434,28 @@ high_code: mov dword[apm_entry], ebx mov word [apm_entry + 4], apm_code_32 - gdts - mov eax, [BOOT_VAR + 0x9044]; version & flags + mov eax, [BOOT_VAR + BOOT_APM_VERSION] ; version & flags mov [apm_vf], eax ; ----------------------------------------- -; movzx eax,byte [BOOT_VAR+0x9010] ; mouse port -; mov [0xF604],byte 1 ;al - mov al, [BOOT_VAR+0x901F] ; DMA access + mov al, [BOOT_VAR+BOOT_DMA] ; DMA access mov [allow_dma_access], al - movzx eax, byte [BOOT_VAR+0x9000] ; bpp + movzx eax, byte [BOOT_VAR+BOOT_BPP] ; bpp mov [ScreenBPP], al mov [_display.bpp], eax mov [_display.vrefresh], 60 - movzx eax, word [BOOT_VAR+0x900A]; X max + movzx eax, word [BOOT_VAR+BOOT_X_RES]; X max mov [_display.width], eax dec eax mov [Screen_Max_X], eax mov [screen_workarea.right], eax - movzx eax, word [BOOT_VAR+0x900C]; Y max + movzx eax, word [BOOT_VAR+BOOT_Y_RES]; Y max mov [_display.height], eax dec eax mov [Screen_Max_Y], eax mov [screen_workarea.bottom], eax - movzx eax, word [BOOT_VAR+0x9008]; screen mode + movzx eax, word [BOOT_VAR+BOOT_VESA_MODE]; screen mode mov [SCR_MODE], eax ; mov eax, [BOOT_VAR+0x9014] ; Vesa 1.2 bnk sw add ; mov [BANK_SWITCH], eax @@ -464,7 +464,7 @@ high_code: je @f cmp [SCR_MODE], word 0x12 ; VGA 640x480 je @f - movzx eax, word[BOOT_VAR+0x9001] ; for other modes + movzx eax, word[BOOT_VAR+BOOT_PITCH] ; for other modes mov [BytesPerScanLine], ax mov [_display.pitch], eax @@: @@ -482,8 +482,7 @@ high_code: ; GRAPHICS ADDRESSES - and byte [BOOT_VAR+0x901e], 0x0 - mov eax, [BOOT_VAR+0x9018] + mov eax, [BOOT_VAR+BOOT_LFB] mov [LFBAddress], eax cmp [SCR_MODE], word 0100000000000000b @@ -1054,6 +1053,12 @@ if defined debug_com_base end if + mov eax, [cpu_count] + test eax, eax + jnz @F + mov al, 1 ; at least one CPU +@@: + DEBUGF 1, "K : %d CPU detected\n", eax ; START MULTITASKING @@ -1080,7 +1085,6 @@ end if ; Fly :) include 'unpacker.inc' -include 'fdo.inc' align 4 boot_log: @@ -1214,10 +1218,10 @@ set_variables: loop .fl60 push eax - mov ax, [BOOT_VAR+0x900c] + mov ax, [BOOT_VAR+BOOT_Y_RES] shr ax, 1 shl eax, 16 - mov ax, [BOOT_VAR+0x900A] + mov ax, [BOOT_VAR+BOOT_X_RES] shr ax, 1 mov [MOUSE_X], eax diff --git a/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootvesa.inc b/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootvesa.inc index c3ee3c45e0..556c4cbbcf 100644 --- a/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootvesa.inc +++ b/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/bootvesa.inc @@ -192,7 +192,7 @@ calc_vmodes_table: mov word [es:bx], 640 mov word [es:bx+2], 480 mov word [es:bx+6], 0x13 - + mov word [es:bx+10], 640 mov word [es:bx+12], 480 mov word [es:bx+16], 0x12 @@ -249,7 +249,7 @@ calc_vmodes_table: mov [es:bx+6], cx ; +6 : mode number movzx ax, byte [es:mi.BitsPerPixel] mov word [es:bx+8], ax ; +8 : bits per pixel - add bx, size_of_step ; size of record + add bx, size_of_step ; size of record @@: add si, 2 @@ -276,11 +276,11 @@ calc_vmodes_table: ; je .exit ; add bx,word [es:bp+2] ; add bx,word [es:bp+8] -; +; ; cmp ax,bx ; ja .loops ; jmp .again -;.loops: +;.loops: ; push dword [es:si] ; push dword [es:si+4] ; push dword [es:si+8] @@ -455,7 +455,7 @@ check_first_parm: ;----------------------------------------------------------------------------- ;default_vmode: - + ;----------------------------------------------------------------------------- draw_vmodes_table: _setcursor 9, 2 @@ -477,10 +477,10 @@ draw_vmodes_table: add cx, size_of_step*long_v_table - + cmp ax, cx jb .ok - + sub cx, size_of_step*long_v_table add cx, size_of_step cmp cx, word[end_cursor] @@ -586,7 +586,7 @@ draw_vmodes_table: ;draw cursor mov word[ds:_rs+21], '>>' mov word[ds:_rs+46], '<<' - + .next: @@ -682,15 +682,15 @@ set_vmode: mov si, word [preboot_graph] ;[preboot_graph] mov cx, word [es:si+6] ; number of mode - + mov ax, word [es:si+0] ; resolution X mov bx, word [es:si+2] ; resolution Y - mov word [es:0x900A], ax ; resolution X - mov word [es:0x900C], bx ; resolution Y - mov word [es:0x9008], cx ; number of mode + mov word [es:BOOT_X_RES], ax ; resolution X + mov word [es:BOOT_Y_RES], bx ; resolution Y + mov word [es:BOOT_VESA_MODE], cx ; number of mode cmp cx, 0x12 je .mode0x12_0x13 @@ -709,11 +709,11 @@ set_vmode: int 0x10 ; LFB mov eax, [es:mi.PhysBasePtr];di+0x28] - mov [es:0x9018], eax + mov [es:BOOT_LFB], eax ; ---- vbe voodoo BytesPerLine equ 0x10 mov ax, [es:di+BytesPerLine] - mov [es:0x9001], ax + mov [es:BOOT_PITCH], ax ; BPP cmp [es:mi.BitsPerPixel], 16 jne .l0 @@ -722,12 +722,12 @@ set_vmode: mov [es:mi.BitsPerPixel], 15 .l0: mov al, byte [es:di+0x19] - mov [es:0x9000], al + mov [es:BOOT_BPP], al jmp .exit .mode0x12_0x13: - mov byte [es:0x9000], 32 - or dword [es:0x9018], 0xFFFFFFFF; 0x800000 + mov byte [es:BOOT_BPP], 32 + or dword [es:BOOT_LFB], 0xFFFFFFFF; 0x800000 ; VESA 1.2 PM BANK SWITCH ADDRESS @@ -753,9 +753,6 @@ set_vmode: ret -; mov dword[es:0x9018],0x000A0000 -; ret - ;============================================================================= ;============================================================================= ;============================================================================= diff --git a/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/kolibri_ldm.asm b/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/kolibri_ldm.asm index d5b499c5e8..a39df33f69 100644 --- a/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/kolibri_ldm.asm +++ b/kernel/branches/Kolibri-acpi/sec_loader/trunk/kolibri_ldm/kolibri_ldm.asm @@ -157,7 +157,7 @@ sayerr: push 0 pop es - and word [es:0x9031], 0 + and word [es:BOOT_IDE_BASE_ADDR], 0 ; \begin{Mario79} ; find HDD IDE DMA PCI device ; check for PCI BIOS @@ -194,7 +194,7 @@ sayerr: int 0x1A jc .nopci and cx, 0xFFF0 ; clear address decode type - mov [es:0x9031], cx + mov [es:BOOT_IDE_BASE_ADDR], cx .nopci: ; \end{Mario79} @@ -226,15 +226,15 @@ wait_loop: ; variant 2 loopnz @b ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; --------------- APM --------------------- - and word [es:0x9044], 0 ; ver = 0.0 (APM not found) + and word [es:BOOT_APM_VERSION], 0 ; ver = 0.0 (APM not found) mov ax, 0x5300 xor bx, bx int 0x15 jc apm_end ; APM not found test cx, 2 jz apm_end ; APM 32-bit protected-mode interface not supported - mov [es:0x9044], ax ; Save APM Version - mov [es:0x9046], cx ; Save APM flags + mov [es:BOOT_APM_VERSION], ax ; Save APM Version + mov [es:BOOT_APM_FLAGS], cx ; Save APM flags ; Write APM ver ---- and ax, 0xf0f @@ -253,10 +253,10 @@ wait_loop: ; variant 2 xor bx, bx int 0x15 - mov [es:0x9040], ebx - mov [es:0x9050], ax - mov [es:0x9052], cx - mov [es:0x9054], dx + mov [es:BOOT_APM_ENTRY], ebx + mov [es:BOOT_APM_CODE_32], ax + mov [es:BOOT_APM_CODE_16], cx + mov [es:BOOT_APM_DATA_16], dx apm_end: _setcursor d80x25_top_num, 0 @@ -514,7 +514,7 @@ cfgmanager: push word [es:bp+6] pop word [number_vm] mov word [preboot_graph], bp ;save choose - + jmp .d .change_b: @@ -670,18 +670,17 @@ end if ; GRAPHICS ACCELERATION ; force yes - mov [es:0x901C], byte 1 + mov [es:BOOT_MTRR], byte 1 ; DMA ACCESS TO HD mov al, [preboot_dma] - mov [es:0x901F], al + mov [es:BOOT_DMA], al ; VRR_M USE - mov al, [preboot_vrrm] - mov [es:0x9030], al - mov [es:0x901E], byte 1 +; mov al, [preboot_vrrm] +; mov [es:0x9030], al ; BOOT DEVICE @@ -698,7 +697,7 @@ end if xor ax, ax mov es, ax - mov ax, [es:0x9008] ; vga & 320x200 + mov ax, [es:BOOT_VESA_MODE] ; vga & 320x200 mov bx, ax cmp ax, 0x13 je setgr