Rev 9047 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9047 | Rev 9048 | ||
---|---|---|---|
Line 75... | Line 75... | ||
75 | format binary as "mnt" |
75 | format binary as "mnt" |
Line 76... | Line 76... | ||
76 | 76 | ||
77 | include 'macros.inc' |
77 | include 'macros.inc' |
Line 78... | Line 78... | ||
78 | include 'struct.inc' |
78 | include 'struct.inc' |
Line 79... | Line 79... | ||
79 | 79 | ||
80 | $Revision: 9045 $ |
80 | $Revision: 9048 $ |
Line 320... | Line 320... | ||
320 | call mutex_init |
320 | call mutex_init |
Line 321... | Line 321... | ||
321 | 321 | ||
322 | mov ecx, application_table_mutex |
322 | mov ecx, application_table_mutex |
Line -... | Line 323... | ||
- | 323 | call mutex_init |
|
- | 324 | ||
- | 325 | mov ecx, shmem_list_mutex |
|
- | 326 | call mutex_init |
|
- | 327 | mov ecx, pe_list_mutex |
|
- | 328 | call mutex_init |
|
- | 329 | mov ecx, shared_locked_mutex |
|
- | 330 | call mutex_init |
|
- | 331 | mov ecx, proc_mem_mutex |
|
- | 332 | call mutex_init |
|
- | 333 | mov ecx, ipc_mutex |
|
323 | call mutex_init |
334 | call mutex_init |
324 | 335 | ||
325 | mov ecx, ide_mutex |
336 | mov ecx, ide_mutex |
326 | call mutex_init |
337 | call mutex_init |
327 | mov ecx, ide_channel1_mutex |
338 | mov ecx, ide_channel1_mutex |
Line 511... | Line 522... | ||
511 | mov [ipc_pdir], eax |
522 | mov [ipc_pdir], eax |
Line 512... | Line 523... | ||
512 | 523 | ||
513 | add eax, ebx |
524 | add eax, ebx |
Line -... | Line 525... | ||
- | 525 | mov [ipc_ptab], eax |
|
- | 526 | ||
- | 527 | add eax, ebx |
|
514 | mov [ipc_ptab], eax |
528 | mov [zero_page_tab], eax |
515 | 529 | ||
Line 516... | Line 530... | ||
516 | stdcall kernel_alloc, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \ |
530 | stdcall kernel_alloc, (unpack.LZMA_BASE_SIZE+(unpack.LZMA_LIT_SIZE shl \ |
Line 2877... | Line 2891... | ||
2877 | @@: |
2891 | @@: |
2878 | mov eax, [current_slot_idx] |
2892 | mov eax, [current_slot_idx] |
2879 | mov [bgrlockpid], eax |
2893 | mov [bgrlockpid], eax |
2880 | cmp [img_background], static_background_data |
2894 | cmp [img_background], static_background_data |
2881 | jz .nomem |
2895 | jz .nomem |
- | 2896 | mov ecx, [current_process] |
|
- | 2897 | add ecx, PROC.heap_lock |
|
- | 2898 | call mutex_lock |
|
2882 | stdcall user_alloc, [mem_BACKGROUND] |
2899 | stdcall user_alloc_nolock, [mem_BACKGROUND] |
2883 | mov [esp+32], eax |
2900 | mov [esp+32], eax |
2884 | test eax, eax |
2901 | test eax, eax |
2885 | jz .nomem |
2902 | jz .nomem_unlock |
2886 | mov ebx, eax |
2903 | mov ebx, eax |
2887 | shr ebx, 12 |
2904 | shr ebx, 12 |
2888 | or dword [page_tabs+(ebx-1)*4], MEM_BLOCK_DONT_FREE |
- | |
2889 | mov esi, [img_background] |
2905 | mov esi, [img_background] |
2890 | shr esi, 12 |
2906 | shr esi, 12 |
2891 | mov ecx, [mem_BACKGROUND] |
2907 | mov ecx, [mem_BACKGROUND] |
2892 | add ecx, 0xFFF |
2908 | add ecx, 0xFFF |
2893 | shr ecx, 12 |
2909 | shr ecx, 12 |
2894 | ;-------------------------------------- |
- | |
2895 | align 4 |
- | |
2896 | .z: |
2910 | .z: |
2897 | mov eax, [page_tabs+ebx*4] |
- | |
2898 | test al, 1 |
- | |
2899 | jz @f |
- | |
2900 | call free_page |
- | |
2901 | ;-------------------------------------- |
- | |
2902 | align 4 |
- | |
2903 | @@: |
- | |
2904 | mov eax, [page_tabs+esi*4] |
2911 | mov eax, [page_tabs+esi*4] |
2905 | or al, PG_UWR |
2912 | or eax, PG_UWR+PG_SHARED |
2906 | mov [page_tabs+ebx*4], eax |
2913 | mov [page_tabs+ebx*4], eax |
2907 | mov eax, ebx |
2914 | mov eax, ebx |
2908 | shl eax, 12 |
2915 | shl eax, 12 |
2909 | invlpg [eax] |
2916 | invlpg [eax] |
2910 | inc ebx |
2917 | inc ebx |
2911 | inc esi |
2918 | inc esi |
- | 2919 | dec ecx |
|
2912 | loop .z |
2920 | jnz .z |
- | 2921 | mov ecx, [current_process] |
|
- | 2922 | add ecx, PROC.heap_lock |
|
- | 2923 | call mutex_unlock |
|
2913 | ret |
2924 | ret |
- | 2925 | .nomem_unlock: |
|
2914 | ;-------------------------------------- |
2926 | mov ecx, [current_process] |
- | 2927 | add ecx, PROC.heap_lock |
|
2915 | align 4 |
2928 | call mutex_unlock |
2916 | .nomem: |
2929 | .nomem: |
2917 | and [bgrlockpid], 0 |
2930 | and [bgrlockpid], 0 |
2918 | mov [bgrlock], 0 |
2931 | mov [bgrlock], 0 |
2919 | ;------------------------------------------------------------------------------ |
2932 | ;------------------------------------------------------------------------------ |
2920 | align 4 |
2933 | align 4 |
Line 2924... | Line 2937... | ||
2924 | cmp [bgrlock], 0 |
2937 | cmp [bgrlock], 0 |
2925 | jz .err |
2938 | jz .err |
2926 | mov eax, [current_slot_idx] |
2939 | mov eax, [current_slot_idx] |
2927 | cmp [bgrlockpid], eax |
2940 | cmp [bgrlockpid], eax |
2928 | jnz .err |
2941 | jnz .err |
2929 | mov eax, ecx |
- | |
2930 | mov ebx, ecx |
- | |
2931 | shr eax, 12 |
- | |
2932 | mov ecx, [page_tabs+(eax-1)*4] |
- | |
2933 | test cl, MEM_BLOCK_USED or MEM_BLOCK_DONT_FREE |
- | |
2934 | jz .err |
- | |
2935 | jnp .err |
- | |
2936 | push eax |
- | |
2937 | shr ecx, 12 |
- | |
2938 | dec ecx |
- | |
2939 | ;-------------------------------------- |
- | |
2940 | align 4 |
- | |
2941 | @@: |
- | |
2942 | and dword [page_tabs+eax*4], 0 |
- | |
2943 | mov edx, eax |
- | |
2944 | shl edx, 12 |
- | |
2945 | push eax |
- | |
2946 | invlpg [edx] |
- | |
2947 | pop eax |
- | |
2948 | inc eax |
- | |
2949 | loop @b |
- | |
2950 | pop eax |
- | |
2951 | and dword [page_tabs+(eax-1)*4], not MEM_BLOCK_DONT_FREE |
- | |
2952 | stdcall user_free, ebx |
2942 | stdcall user_free, ecx |
2953 | mov [esp+32], eax |
2943 | mov [esp+32], eax |
2954 | and [bgrlockpid], 0 |
2944 | and [bgrlockpid], 0 |
2955 | mov [bgrlock], 0 |
2945 | mov [bgrlock], 0 |
2956 | ret |
2946 | ret |
2957 | ;-------------------------------------- |
2947 | ;-------------------------------------- |
Line 4923... | Line 4913... | ||
4923 | mov al, bl |
4913 | mov al, bl |
4924 | out dx, al |
4914 | out dx, al |
4925 | pop ax dx |
4915 | pop ax dx |
4926 | end if |
4916 | end if |
Line -... | Line 4917... | ||
- | 4917 | ||
- | 4918 | if 0 |
|
- | 4919 | push eax edx |
|
- | 4920 | mov al, bl |
|
- | 4921 | mov dx, 0x402 |
|
- | 4922 | out dx, al |
|
- | 4923 | pop edx eax |
|
- | 4924 | end if |
|
4927 | 4925 | ||
4928 | mov [msg_board_data+ecx], bl |
4926 | mov [msg_board_data+ecx], bl |
4929 | cmp byte [debug_direct_print], 1 |
4927 | cmp byte [debug_direct_print], 1 |
4930 | jnz .end |
4928 | jnz .end |
4931 | pusha |
4929 | pusha |