Subversion Repositories Kolibri OS

Rev

Rev 3555 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3555 Rev 3908
Line 15... Line 15...
15
;; 08.11.2004 expand_pathz and rename (only for hd) - ATV       ;;
15
;; 08.11.2004 expand_pathz and rename (only for hd) - ATV       ;;
16
;; 20.10.2004 Makedir/Removedir (only for hd) - ATV             ;;
16
;; 20.10.2004 Makedir/Removedir (only for hd) - ATV             ;;
17
;;                                                              ;;
17
;;                                                              ;;
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
18
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 19... Line 19...
19
 
19
 
Line 20... Line 20...
20
$Revision: 3555 $
20
$Revision: 3908 $
Line 21... Line 21...
21
 
21
 
Line 316... Line 316...
316
 
316
 
317
  fs_noflpdisk_read:
317
  fs_noflpdisk_read:
318
  fs_noflpdisk:
318
  fs_noflpdisk:
Line 319... Line -...
319
  ;*****************************************************************
-
 
320
 
-
 
321
        mov     eax, [edi+1]
-
 
322
        cmp     eax, 'HD0 '
-
 
323
        je      fs_yesharddisk_IDE0
-
 
324
        cmp     eax, 'HD1 '
-
 
325
        je      fs_yesharddisk_IDE1
-
 
326
        cmp     eax, 'HD2 '
-
 
327
        je      fs_yesharddisk_IDE2
-
 
328
        cmp     eax, 'HD3 '
-
 
329
        je      fs_yesharddisk_IDE3
-
 
330
        jmp     old_path_harddisk
-
 
331
fs_yesharddisk_IDE0:
-
 
332
        call    reserve_hd1
-
 
333
        mov     [hdbase], 0x1f0
-
 
334
        mov     [hdid], 0x0
-
 
335
        mov     [hdpos], 1
-
 
336
        jmp     fs_yesharddisk_partition
-
 
337
fs_yesharddisk_IDE1:
-
 
338
        call    reserve_hd1
-
 
339
        mov     [hdbase], 0x1f0
-
 
340
        mov     [hdid], 0x10
-
 
341
        mov     [hdpos], 2
-
 
342
        jmp     fs_yesharddisk_partition
-
 
343
fs_yesharddisk_IDE2:
-
 
344
        call    reserve_hd1
-
 
345
        mov     [hdbase], 0x170
-
 
346
        mov     [hdid], 0x0
-
 
347
        mov     [hdpos], 3
-
 
348
        jmp     fs_yesharddisk_partition
-
 
349
fs_yesharddisk_IDE3:
-
 
350
        call    reserve_hd1
-
 
351
        mov     [hdbase], 0x170
-
 
352
        mov     [hdid], 0x10
-
 
353
        mov     [hdpos], 4
-
 
354
fs_yesharddisk_partition:
-
 
355
        call    reserve_hd_channel
-
 
356
;    call  choice_necessity_partition
-
 
357
;    jmp   fs_yesharddisk_all
-
 
358
        jmp     fs_for_new_semantic
-
 
359
 
-
 
360
choice_necessity_partition:
-
 
361
        mov     eax, [edi+1+12]
-
 
362
        call    StringToNumber
-
 
363
        mov     [fat32part], eax
-
 
364
choice_necessity_partition_1:
-
 
365
        mov     ecx, [hdpos]
-
 
366
        xor     eax, eax
-
 
367
        mov     [hd_entries], eax; entries in hd cache
-
 
368
        mov     edx, DRIVE_DATA+2
-
 
369
        cmp     ecx, 0x80
-
 
370
        jb      search_partition_array
-
 
371
        mov     ecx, 4
-
 
372
 search_partition_array:
-
 
373
        mov     bl, [edx]
-
 
374
        movzx   ebx, bl
-
 
375
        add     eax, ebx
-
 
376
        inc     edx
-
 
377
        loop    search_partition_array
-
 
378
        mov     ecx, [hdpos]
-
 
379
        mov     edx, BiosDiskPartitions
-
 
380
        sub     ecx, 0x80
-
 
381
        jb      .s
-
 
382
        je      .f
-
 
383
 @@:
-
 
384
        mov     ebx, [edx]
-
 
385
        add     edx, 4
-
 
386
        add     eax, ebx
-
 
387
        loop    @b
-
 
388
        jmp     .f
-
 
389
 .s:
-
 
390
        sub     eax, ebx
-
 
391
 .f:
-
 
392
        add     eax, [known_part];   add   eax,[fat32part]
-
 
393
        dec     eax
-
 
394
        xor     edx, edx
-
 
395
        imul    eax, 100
-
 
396
        add     eax, DRIVE_DATA+0xa
-
 
397
        mov     [transfer_adress], eax
-
 
398
        call    partition_data_transfer_1
-
 
399
        ret
319
  ;*****************************************************************
400
 
320
 
401
 old_path_harddisk:
321
 old_path_harddisk:
402
        mov     eax, [edi+1]
322
        mov     eax, [edi+1]
403
        cmp     eax, 'HD  '
323
        cmp     eax, 'HD  '
Line 414... Line 334...
414
        call    LBA_read
334
        call    LBA_read
415
        jmp     file_system_return
335
        jmp     file_system_return
Line 416... Line 336...
416
 
336
 
Line 417... Line -...
417
  fs_no_LBA_read:
-
 
418
 
-
 
419
        cmp     byte [edi+1+11], 0; directory read
-
 
420
        je      fs_give_dir1
-
 
421
        call    reserve_hd1
-
 
422
 fs_for_new_semantic:
-
 
423
        call    choice_necessity_partition
-
 
424
 
-
 
425
  fs_yesharddisk_all:
-
 
426
        mov     eax, 1
-
 
427
        mov     ebx, [esp+24+24]
-
 
428
        cmp     [hdpos], 0      ; is hd base set?
-
 
429
        jz      hd_err_return
-
 
430
        cmp     [fat32part], 0  ; is partition set?
337
  fs_no_LBA_read:
431
        jnz     @f
-
 
432
hd_err_return:
-
 
433
        call    free_hd_channel
-
 
434
        and     [hd1_status], 0
-
 
435
        jmp     file_system_return
-
 
436
@@:
-
 
437
 
-
 
Line 438... Line 338...
438
        call    free_hd_channel
338
 
439
        and     [hd1_status], 0
339
hd_err_return:
440
 
340
 
441
  fs_noharddisk:
341
  fs_noharddisk:
Line 540... Line 440...
540
        mov     eax, 2
440
        mov     eax, 2
541
        ret
441
        ret
Line 542... Line 442...
542
 
442
 
Line -... Line 443...
-
 
443
  lbarl1:
-
 
444
 
543
  lbarl1:
445
        pushad
-
 
446
        mov     ecx, ide_mutex
Line 544... Line 447...
544
 
447
        call    mutex_lock
545
        call    reserve_hd1
448
        popad
Line 546... Line 449...
546
 
449
 
Line 631... Line 534...
631
 
534
 
632
  LBA_read_ret:
535
  LBA_read_ret:
633
        mov     [hd_error], 0
536
        mov     [hd_error], 0
634
        mov     [hd1_status], 0
537
        mov     [hd1_status], 0
-
 
538
        add     esp, 2*4
-
 
539
        pushad
-
 
540
        mov     ecx, ide_mutex
-
 
541
        call    mutex_unlock
Line 635... Line 542...
635
        add     esp, 2*4
542
        popad
Line 636... Line 543...
636
 
543