Changeset 102
- Timestamp:
- Apr 8, 2017, 12:26:57 AM (8 years ago)
- Location:
- trunk/bootcode
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/bootmenu.asm
r96 r102 720 720 mov si, offset [TmpSector] 721 721 mov di,ds 722 call DriveIO_ LoadSectorLBA722 call DriveIO_ReadSectorLBA 723 723 mov al, [si+25h] 724 724 -
trunk/bootcode/regular/driveio.asm
r100 r102 726 726 727 727 728 ; 729 ; ############################################################ 730 ; # Load a specified sector from a disk using LBA addressing # 731 ; ############################################################ 732 ; 733 ; In 734 ; -- 735 ; DL = Physical Disk 736 ; BX:CX = LBA sector 737 ; DI:SI = Target buffer 738 ; 739 ; Out 740 ; --- 741 ; AX = Error code 742 ; 743 DriveIO_LoadSectorLBA Proc Near Uses bx cx dx si di ds es 744 ; Get one sector 728 ;############################################################################## 729 ;# ACTION : Reads a sector from disk using INT13 extensions 730 ;# ---------------------------------------------------------------------------- 731 ;# IN : BX:CX - LBA address of sector 732 ;# : DI:SI - SEG:OFF of transfer buffer 733 ;# ---------------------------------------------------------------------------- 734 ;# OUT : CF=1 - failure, AH failure code 735 ;# ---------------------------------------------------------------------------- 736 ;# EFFECTS : Modifies DAP structure and fills transfer buffer 737 ;############################################################################## 738 DriveIO_ReadSectorLBA Proc Near Uses bx cx dx si di ds es 739 740 ; One sector to read 745 741 mov cs:[DriveIO_DAP_NumBlocks], 1 746 742 747 ; Setup buffer address748 mov wptr cs:[DriveIO_DAP_Transfer+0], si 749 mov wptr cs:[DriveIO_DAP_Transfer+2], di 750 751 ; Setup LBA address of requested sector752 mov wptr cs:[DriveIO_DAP_Absolute+0], cx 753 mov wptr cs:[DriveIO_DAP_Absolute+2], bx 754 mov wptr cs:[DriveIO_DAP_Absolute+4], 0 755 mov wptr cs:[DriveIO_DAP_Absolute+6], 0 743 ; Setup transfer address 744 mov wptr cs:[DriveIO_DAP_Transfer+0], si ; offset 745 mov wptr cs:[DriveIO_DAP_Transfer+2], di ; segment 746 747 ; Setup LBA64 address of requested sector 748 mov wptr cs:[DriveIO_DAP_Absolute+0], cx ; low word lower part 749 mov wptr cs:[DriveIO_DAP_Absolute+2], bx ; high word lower part 750 mov wptr cs:[DriveIO_DAP_Absolute+4], 0 ; low word upper part 751 mov wptr cs:[DriveIO_DAP_Absolute+6], 0 ; high word upper part 756 752 757 753 ; Address of packet 758 mov si, offset DriveIO_DAP754 mov si, offset [DriveIO_DAP] ; disk address packet 759 755 760 756 ; Do the extended read 761 mov ah, 42h 762 int 13h 763 764 ; Looking good so far 765 jnc DriveIO_LoadSectorLBA_succes1 766 767 ; AH should not be zero, if it is then set to undefined and set carry 768 test ah,ah 769 jnz DriveIO_LoadSectorLBA_error1 770 mov ah, 0bbh ; Undefined error 771 DriveIO_LoadSectorLBA_error1: 757 mov ah, 42h ; read function 758 int 13h ; transfer to bios 759 760 ; Error occured 761 jc DriveIO_ReadSectorLBA_exit 762 763 ; AH should also be zero 764 test ah, ah 772 765 stc 773 jmp DriveIO_LoadSectorLBA_exit 774 775 ; AL should be zero, if not then set to undefined and set carry 776 DriveIO_LoadSectorLBA_succes1: 777 test ah,ah 778 jz DriveIO_LoadSectorLBA_exit 779 stc 780 jmp DriveIO_LoadSectorLBA_exit 781 782 ; Return to caller 783 DriveIO_LoadSectorLBA_exit: 784 ret 785 DriveIO_LoadSectorLBA EndP 766 jnz DriveIO_ReadSectorLBA_exit 767 768 ; Disk read succeeded, clear CF 769 clc 770 771 DriveIO_ReadSectorLBA_exit: 772 ret 773 774 DriveIO_ReadSectorLBA EndP 786 775 787 776 -
trunk/bootcode/regular/partmain.asm
r96 r102 2174 2174 mov di,ds 2175 2175 mov si,offset [TmpSector] 2176 call DriveIO_ LoadSectorLBA2176 call DriveIO_ReadSectorLBA 2177 2177 2178 2178 ; Restore partitions LBA address to DI:SI … … 2375 2375 ; mov di,ds 2376 2376 ; mov si,offset [TmpSector] 2377 ; call DriveIO_ LoadSectorLBA2377 ; call DriveIO_ReadSectorLBA 2378 2378 2379 2379 ; ; Point to location of 'BOOTMGR' signature. -
trunk/bootcode/special/lvm.asm
r101 r102 242 242 mov si,offset [LVMSector] 243 243 mov di,ds 244 call DriveIO_ LoadSectorLBA ; Change this to normal IO-routine !!!!!!244 call DriveIO_ReadSectorLBA 245 245 pop di 246 246 pop si … … 379 379 mov si,offset [LVMSector] 380 380 mov di,ds 381 call DriveIO_ LoadSectorLBA ; Change this to normal IO-routine !!!!!!381 call DriveIO_ReadSectorLBA 382 382 pop di 383 383 pop si
Note:
See TracChangeset
for help on using the changeset viewer.