Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 3193 → Rev 3194

/kernel/branches/Kolibri-A/trunk/boot/rdload.inc
File deleted
Property changes:
Deleted: svn:keywords
-Rev
\ No newline at end of property
/kernel/branches/Kolibri-A/trunk/boot/bootcode.inc
49,36 → 49,29
 
push ax
pop es
mov [es:0x9031], ax
 
; --------------- APM - removed--------------------
and word [es:0x9044], 0 ; ver = 0.0 (APM not found)
 
cfgmanager:
 
 
; DMA ACCESS TO HD
 
mov al, 1
mov [es:0x901F], al
; mov al, 1
 
; GRAPHICS ACCELERATION
; force yes
mov [es:0x901C], al
; mov [es:0x901C], al
 
 
; VRR_M USE
 
mov [es:0x9030], byte 2
mov [es:0x901E], al
; mov [es:0x9030], byte 2
 
; BOOT DEVICE
 
xor ax, ax
mov [boot_dev], al
mov es, ax
; mov es, ax
 
 
; SET GRAPHICS
 
mov ax, 0xA000 ; AtomBIOS Fn00
/kernel/branches/Kolibri-A/trunk/data32.inc
212,22 → 212,6
db D32 ;lim 16-19+props
db 0 ;base 24-31
 
; --------------- APM ---------------------
apm_code_32:
dw 0x0f ; limit 64kb
db 0, 0, 0
dw 11010000b *256 +10011010b
db 0x00
apm_code_16:
dw 0x0f
db 0, 0, 0
dw 10010000b *256 +10011010b
db 0x00
apm_data_16:
dw 0x0f
db 0, 0, 0
dw 10010000b *256 +10010010b
db 0x00
; -----------------------------------------
 
graph_data_l:
/kernel/branches/Kolibri-A/trunk/kernel.asm
248,13 → 248,7
bios32_entry dd ?
tmp_page_tabs dd ?
 
;use16
;org $-0x10000
;include "boot/shutdown.inc" ; shutdown or restart
;org $+0x10000
 
use32
 
__DEBUG__ fix 1
__DEBUG_LEVEL__ fix 1
include 'init.inc'
291,41 → 285,11
mov cr3, eax ; flush TLB
 
; SAVE REAL MODE VARIABLES
mov ax, [BOOT_VAR + 0x9031]
xor eax, eax
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
; protected-mode 16-bit data segment
 
shl eax, 4
mov [dword apm_code_32 + 2], ax
shr eax, 16
mov [dword apm_code_32 + 4], al
 
shl ecx, 4
mov [dword apm_code_16 + 2], cx
shr ecx, 16
mov [dword apm_code_16 + 4], cl
 
shl edx, 4
mov [dword apm_data_16 + 2], dx
shr edx, 16
mov [dword apm_data_16 + 4], dl
 
mov dword[apm_entry], ebx
mov word [apm_entry + 4], apm_code_32 - gdts
 
mov eax, [BOOT_VAR + 0x9044] ; version & flags
mov [apm_vf], eax
; -----------------------------------------
mov al, [BOOT_VAR+0x901F] ; DMA access
inc eax
; mov al, [BOOT_VAR+0x901F] ; DMA access
mov [allow_dma_access], al
mov eax, 32 ; << bpp
mov [ScreenBPP],al
4379,16 → 4343,10
hlt ; Houston, we've had a problem
 
; --------------- APM ---------------------
uglobal
apm_entry dp 0
apm_vf dd 0
endg
 
align 4
sys_apm:
xor eax,eax
cmp word [apm_vf], ax ; Check APM BIOS enable
jne @f
inc eax
or dword [esp + 44], eax ; error
add eax,7
4395,45 → 4353,6
mov dword [esp + 32], eax ; 32-bit protected-mode interface not supported
ret
 
@@:
; xchg eax, ecx
; xchg ebx, ecx
 
cmp dx, 3
ja @f
and [esp + 44], byte 0xfe ; emulate func 0..3 as func 0
mov eax,[apm_vf]
mov [esp + 32], eax
shr eax, 16
mov [esp + 28], eax
ret
 
@@:
 
mov esi,[master_tab+(OS_BASE shr 20)]
xchg [master_tab], esi
push esi
mov edi, cr3
mov cr3, edi ;flush TLB
 
call pword [apm_entry] ;call APM BIOS
 
xchg eax, [esp]
mov [master_tab], eax
mov eax, cr3
mov cr3, eax
pop eax
 
mov [esp + 4 ], edi
mov [esp + 8], esi
mov [esp + 20], ebx
mov [esp + 24], edx
mov [esp + 28], ecx
mov [esp + 32], eax
setc al
and [esp + 44], byte 0xfe
or [esp + 44], al
ret
; -----------------------------------------
 
align 4