forked from KolibriOS/kolibrios
* Correct value of selector gs
* Support for kpack'ed skin files * Default setting for DMA access is now "disabled" * Fixed kernel fault when network packet sending git-svn-id: svn://kolibrios.org@523 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
aa94143ec9
commit
61c54a1be6
@ -381,9 +381,11 @@ cfgmanager:
|
|||||||
@@:
|
@@:
|
||||||
mov [di], al
|
mov [di], al
|
||||||
.preboot_gr_end:
|
.preboot_gr_end:
|
||||||
; following 6 lines set variables to 1 if its current value is 0
|
cmp [di+preboot_dma-preboot_graph], 0
|
||||||
cmp [di+preboot_dma-preboot_graph], 1
|
jnz @f
|
||||||
adc [di+preboot_dma-preboot_graph], 0
|
mov [di+preboot_dma-preboot_graph], 3 ; DMA: defaults to none
|
||||||
|
@@:
|
||||||
|
; following 4 lines set variables to 1 if its current value is 0
|
||||||
cmp [di+preboot_vrrm-preboot_graph], 1
|
cmp [di+preboot_vrrm-preboot_graph], 1
|
||||||
adc [di+preboot_vrrm-preboot_graph], 0
|
adc [di+preboot_vrrm-preboot_graph], 0
|
||||||
cmp [di+preboot_device-preboot_graph], 1
|
cmp [di+preboot_device-preboot_graph], 1
|
||||||
|
@ -216,6 +216,8 @@ do_change_task:
|
|||||||
mov ebx, [ebx+APPDATA.pl0_stack]
|
mov ebx, [ebx+APPDATA.pl0_stack]
|
||||||
add ebx, RING0_STACK_SIZE
|
add ebx, RING0_STACK_SIZE
|
||||||
mov [tss._esp0], ebx
|
mov [tss._esp0], ebx
|
||||||
|
push graph_data
|
||||||
|
pop gs
|
||||||
mov ecx, cr0
|
mov ecx, cr0
|
||||||
or ecx, CR0_TS ;set task switch flag
|
or ecx, CR0_TS ;set task switch flag
|
||||||
mov cr0, ecx
|
mov cr0, ecx
|
||||||
|
@ -10,30 +10,35 @@ include "skindata.inc"
|
|||||||
|
|
||||||
;skin_data = 0x00778000
|
;skin_data = 0x00778000
|
||||||
|
|
||||||
load_skin_file:
|
read_skin_file:
|
||||||
; eax = filename
|
stdcall load_file, ebx
|
||||||
; edx = destination
|
test eax, eax
|
||||||
mov ebx,1
|
jz .notfound
|
||||||
or ecx,-1
|
cmp dword [eax], 'SKIN'
|
||||||
mov esi,12
|
jnz .noskin
|
||||||
pushad
|
cmp ebx, 32*1024
|
||||||
push eax
|
jb @f
|
||||||
mov [skin_to_load.adr],edx
|
mov ebx, 32*1024
|
||||||
|
@@:
|
||||||
mov [skin_to_load.stradr],_skin_file_default
|
lea ecx, [ebx+3]
|
||||||
mov eax,skin_to_load
|
shr ecx, 2
|
||||||
call file_system_lfn
|
mov esi, eax
|
||||||
pop eax
|
mov edi, skin_data
|
||||||
popad
|
rep movsd
|
||||||
ret
|
stdcall kernel_free, eax
|
||||||
|
|
||||||
skin_to_load:
|
|
||||||
dd 0,0,0
|
|
||||||
dd 64*1024
|
|
||||||
.adr dd 0
|
|
||||||
db 0
|
|
||||||
.stradr dd 0
|
|
||||||
|
|
||||||
|
call parse_skin_data
|
||||||
|
xor eax, eax
|
||||||
|
ret
|
||||||
|
.notfound:
|
||||||
|
xor eax, eax
|
||||||
|
inc eax
|
||||||
|
ret
|
||||||
|
.noskin:
|
||||||
|
stdcall kernel_free, eax
|
||||||
|
push 2
|
||||||
|
pop eax
|
||||||
|
ret
|
||||||
|
|
||||||
struct SKIN_HEADER
|
struct SKIN_HEADER
|
||||||
.ident dd ?
|
.ident dd ?
|
||||||
@ -75,20 +80,10 @@ struct SKIN_BITMAPS
|
|||||||
.data dd ?
|
.data dd ?
|
||||||
ends
|
ends
|
||||||
|
|
||||||
load_skin:
|
load_default_skin:
|
||||||
pushad
|
|
||||||
mov [_skinh],22
|
mov [_skinh],22
|
||||||
mov eax,_skin_file
|
mov ebx,_skin_file_default
|
||||||
mov edx,skin_data
|
call read_skin_file
|
||||||
mov [edx+SKIN_HEADER.ident],'????'
|
|
||||||
call load_skin_file
|
|
||||||
cmp eax,ERROR_SUCCESS
|
|
||||||
je @f
|
|
||||||
cmp eax,ERROR_END_OF_FILE
|
|
||||||
jne .exit
|
|
||||||
@@: call parse_skin_data
|
|
||||||
.exit:
|
|
||||||
popad
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
parse_skin_data:
|
parse_skin_data:
|
||||||
|
@ -55,8 +55,6 @@ skin_udata:
|
|||||||
skin_active SKIN_DATA
|
skin_active SKIN_DATA
|
||||||
skin_inactive SKIN_DATA
|
skin_inactive SKIN_DATA
|
||||||
|
|
||||||
_skin_file rb 256
|
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
|
|
||||||
skin_udata.end:
|
skin_udata.end:
|
||||||
|
@ -475,47 +475,19 @@ display_settings:
|
|||||||
|
|
||||||
cmp eax,8 ; set window skin
|
cmp eax,8 ; set window skin
|
||||||
jne no_set_skin
|
jne no_set_skin
|
||||||
mov eax,ebx
|
call read_skin_file
|
||||||
mov edi,[TASK_BASE]
|
mov [esp+32+36], eax
|
||||||
add ebx,[edi+TASKDATA.mem_start] ; abs start of info block
|
test eax, eax
|
||||||
pushd [ebx+0] [ebx+4] [ebx+8] [ebx+12]
|
jnz .ret
|
||||||
mov dword[ebx+0],0 ; read
|
xor eax, eax
|
||||||
mov dword[ebx+4],0 ; from the beginning
|
xor ebx, ebx
|
||||||
mov dword[ebx+8],64 ; 32 KBytes maximum
|
mov ecx, [ScreenWidth]
|
||||||
mov ecx,skin_data+64*512
|
mov edx, [ScreenHeight]
|
||||||
sub ecx,[edi+0x10]
|
call calculatescreen
|
||||||
mov dword[ebx+12],ecx ; destination
|
|
||||||
push eax
|
|
||||||
pushad
|
|
||||||
call file_system
|
|
||||||
popad
|
|
||||||
pop eax
|
|
||||||
popd [ebx+12] [ebx+8] [ebx+4] [ebx+0]
|
|
||||||
cmp eax,ERROR_SUCCESS
|
|
||||||
je @f
|
|
||||||
cmp eax,ERROR_END_OF_FILE
|
|
||||||
jne .exit
|
|
||||||
@@: cmp [skin_data+64*512+SKIN_HEADER.ident],'SKIN'
|
|
||||||
mov eax,ERROR_UNKNOWN_FS
|
|
||||||
jne .exit
|
|
||||||
mov esi,skin_data+64*512
|
|
||||||
mov edi,skin_data
|
|
||||||
mov ecx,(64*512)/4
|
|
||||||
rep movsd
|
|
||||||
call parse_skin_data
|
|
||||||
pushad
|
|
||||||
mov eax, 0
|
|
||||||
mov ebx, 0
|
|
||||||
mov ecx, [ScreenWidth]
|
|
||||||
mov edx, [ScreenHeight]
|
|
||||||
call calculatescreen
|
|
||||||
popad
|
|
||||||
mov dword[esp+32+36],0
|
|
||||||
jmp redraw_screen_direct
|
jmp redraw_screen_direct
|
||||||
.exit:
|
.ret:
|
||||||
mov [esp+32+36],eax
|
popad
|
||||||
popad
|
ret
|
||||||
ret
|
|
||||||
no_set_skin:
|
no_set_skin:
|
||||||
|
|
||||||
popad
|
popad
|
||||||
|
@ -748,12 +748,7 @@ no_lib_load:
|
|||||||
|
|
||||||
; LOAD DEFAULT SKIN
|
; LOAD DEFAULT SKIN
|
||||||
|
|
||||||
mov esi,_skin_file_default
|
call load_default_skin
|
||||||
mov edi,_skin_file
|
|
||||||
movsd
|
|
||||||
movsd
|
|
||||||
movsd
|
|
||||||
call load_skin
|
|
||||||
|
|
||||||
;protect io permission map
|
;protect io permission map
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ dd 0x595110b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
|||||||
dd 0x595210b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
dd 0x595210b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
||||||
dd 0x900010b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
dd 0x900010b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
||||||
dd 0x900110b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
dd 0x900110b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
||||||
;dd 0x900410b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0 ; tested by hidnplayr: makes system crash
|
dd 0x900410b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
||||||
dd 0x900510b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
dd 0x900510b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
||||||
dd 0x900610b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
dd 0x900610b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
||||||
dd 0x900A10b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
dd 0x900A10b7, e3c59x_probe, e3c59x_reset, e3c59x_poll, e3c59x_transmit, 0
|
||||||
@ -319,7 +319,9 @@ local MACAddress dp ? ;allocate 6 bytes in the stack
|
|||||||
xchg ch, cl ; because mirror byte-order
|
xchg ch, cl ; because mirror byte-order
|
||||||
mov esi, ebx ; Pointer to packet data
|
mov esi, ebx ; Pointer to packet data
|
||||||
mov bx, ETHER_IP ; Type of packet
|
mov bx, ETHER_IP ; Type of packet
|
||||||
|
push ebp
|
||||||
call dword [drvr_transmit] ; Call the drivers transmit function
|
call dword [drvr_transmit] ; Call the drivers transmit function
|
||||||
|
pop ebp
|
||||||
|
|
||||||
; OK, we have sent a packet, so increment the count
|
; OK, we have sent a packet, so increment the count
|
||||||
inc dword [ip_tx_count]
|
inc dword [ip_tx_count]
|
||||||
|
Loading…
Reference in New Issue
Block a user