* 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:
Evgeny Grechnikov (Diamond) 2007-05-25 09:37:08 +00:00
parent aa94143ec9
commit 61c54a1be6
7 changed files with 54 additions and 88 deletions

View File

@ -381,9 +381,11 @@ cfgmanager:
@@:
mov [di], al
.preboot_gr_end:
; following 6 lines set variables to 1 if its current value is 0
cmp [di+preboot_dma-preboot_graph], 1
adc [di+preboot_dma-preboot_graph], 0
cmp [di+preboot_dma-preboot_graph], 0
jnz @f
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
adc [di+preboot_vrrm-preboot_graph], 0
cmp [di+preboot_device-preboot_graph], 1

View File

@ -216,6 +216,8 @@ do_change_task:
mov ebx, [ebx+APPDATA.pl0_stack]
add ebx, RING0_STACK_SIZE
mov [tss._esp0], ebx
push graph_data
pop gs
mov ecx, cr0
or ecx, CR0_TS ;set task switch flag
mov cr0, ecx

View File

@ -10,30 +10,35 @@ include "skindata.inc"
;skin_data = 0x00778000
load_skin_file:
; eax = filename
; edx = destination
mov ebx,1
or ecx,-1
mov esi,12
pushad
push eax
mov [skin_to_load.adr],edx
mov [skin_to_load.stradr],_skin_file_default
mov eax,skin_to_load
call file_system_lfn
pop eax
popad
ret
skin_to_load:
dd 0,0,0
dd 64*1024
.adr dd 0
db 0
.stradr dd 0
read_skin_file:
stdcall load_file, ebx
test eax, eax
jz .notfound
cmp dword [eax], 'SKIN'
jnz .noskin
cmp ebx, 32*1024
jb @f
mov ebx, 32*1024
@@:
lea ecx, [ebx+3]
shr ecx, 2
mov esi, eax
mov edi, skin_data
rep movsd
stdcall kernel_free, eax
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
.ident dd ?
@ -75,20 +80,10 @@ struct SKIN_BITMAPS
.data dd ?
ends
load_skin:
pushad
load_default_skin:
mov [_skinh],22
mov eax,_skin_file
mov edx,skin_data
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
mov ebx,_skin_file_default
call read_skin_file
ret
parse_skin_data:

View File

@ -55,8 +55,6 @@ skin_udata:
skin_active SKIN_DATA
skin_inactive SKIN_DATA
_skin_file rb 256
align 4
skin_udata.end:

View File

@ -475,47 +475,19 @@ display_settings:
cmp eax,8 ; set window skin
jne no_set_skin
mov eax,ebx
mov edi,[TASK_BASE]
add ebx,[edi+TASKDATA.mem_start] ; abs start of info block
pushd [ebx+0] [ebx+4] [ebx+8] [ebx+12]
mov dword[ebx+0],0 ; read
mov dword[ebx+4],0 ; from the beginning
mov dword[ebx+8],64 ; 32 KBytes maximum
mov ecx,skin_data+64*512
sub ecx,[edi+0x10]
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
call read_skin_file
mov [esp+32+36], eax
test eax, eax
jnz .ret
xor eax, eax
xor ebx, ebx
mov ecx, [ScreenWidth]
mov edx, [ScreenHeight]
call calculatescreen
jmp redraw_screen_direct
.exit:
mov [esp+32+36],eax
popad
ret
.ret:
popad
ret
no_set_skin:
popad

View File

@ -748,12 +748,7 @@ no_lib_load:
; LOAD DEFAULT SKIN
mov esi,_skin_file_default
mov edi,_skin_file
movsd
movsd
movsd
call load_skin
call load_default_skin
;protect io permission map

View File

@ -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 0x900010b7, 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 0x900610b7, 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
mov esi, ebx ; Pointer to packet data
mov bx, ETHER_IP ; Type of packet
push ebp
call dword [drvr_transmit] ; Call the drivers transmit function
pop ebp
; OK, we have sent a packet, so increment the count
inc dword [ip_tx_count]