Changeset 124 for trunk/bootcode/regular/driveio.asm
- Timestamp:
- Apr 8, 2017, 12:27:24 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/driveio.asm
r123 r124 878 878 ;# ACTION : Locates the Master LVM sector on the specified disk 879 879 ;# ---------------------------------------------------------------------------- 880 ;# EFFECTS : None880 ;# EFFECTS : Leaves [Scratch] with last sector read or cleared 881 881 ;# ---------------------------------------------------------------------------- 882 882 ;# IN : DL - BIOS disk number of drive to search … … 909 909 ; This is of course no problem since it is the MBR. 910 910 DriveIO_LocateMasterLVMSector_next: 911 mov si, offset [Scratch] ; Use scratch area to load sectors 912 call ClearSectorBuffer ; Clear the scratch area 911 913 clc ; Indicate Master LVM sector not found 912 914 jcxz DriveIO_LocateMasterLVMSector_done 913 915 914 ; Clear the sector buffer 915 mov bx, cx ; Save our precious sector LBA 916 mov cx, 100h ; Clear 256 words is 512 bytes 917 mov di, offset [TmpSector] ; Offset of buffer 918 xor ax, ax ; Value to sture 919 cld ; Increment DI each time 920 rep stosw ; Store the value 921 mov cx, bx ; Restore our precious sector LBA 922 923 ; Now read the LBA sector specified in CX 916 ; Read the LBA sector specified in CX 924 917 mov ax, cx ; LBA low 925 918 xor bx, bx ; LBA high 926 mov di, ds ; Segment of tempbuffer927 mov si, offset [ TmpSector] ; Offset of tempbuffer919 mov di, ds ; Segment of scratch buffer 920 mov si, offset [Scratch] ; Offset of scratch buffer 928 921 call DriveIO_ReadSectorLBA ; Read the sector 929 922 lahf ; Save CF … … 944 937 ; of the SPT value its OS/2 geometery specifies, which, in LBA terms 945 938 ; is LVM SPT-1 -- let's check that... 946 mov bx, offset [ TmpSector]; Offset of the loaded LVM sector939 mov bx, offset [Scratch] ; Offset of the loaded LVM sector 947 940 mov al, [bx+LocLVM_Secs] ; Get the LVM SPT value (<=255) 948 941 dec al ; Adjust to LVM LBA … … 950 943 inc ah ; This one was found here 951 944 cmp al, ah ; If same, LVM LBA location OK 952 call DEBUG_DumpRegisters953 945 jne DriveIO_LocateMasterLVMSector_next 954 946
Note:
See TracChangeset
for help on using the changeset viewer.