Changeset 100
- Timestamp:
- Apr 8, 2017, 12:26:54 AM (8 years ago)
- Location:
- trunk/bootcode
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/driveio.asm
r98 r100 1176 1176 1177 1177 ; See if this is a valid LVM-sector 1178 ; CY=1if valid1179 call DriveIO_LVMSectorValid1178 ; ZF=0 if valid 1179 call LVM_ValidateSector 1180 1180 1181 1181 ; pushf … … 1192 1192 1193 1193 ; Yep, we found the master LVM-sector 1194 j cDriveIO_LoadMasterLVMSector_Found1194 jnz DriveIO_LoadMasterLVMSector_Found 1195 1195 ; Try next location 1196 1196 loop DriveIO_LoadMasterLVMSector_NextTry -
trunk/bootcode/special/lvm.asm
r99 r100 125 125 LVM_CheckSectorCRC EndP 126 126 127 ; See if a LVM-sector is valid. 128 ; In : si, pointer to sector 129 ; Out : CY if valid LVM sector, NC if not 130 DriveIO_LVMSectorValid Proc Near 131 pusha 132 133 call LVM_CheckSectorSignature 134 ; NC if no signature found 135 jnc DriveIO_LVMSectorValid_End 136 137 call LVM_CheckSectorCRC 138 ; Force valid !!! 139 ;~ stc 140 141 DriveIO_LVMSectorValid_End: 142 popa 143 ret 144 DriveIO_LVMSectorValid EndP 127 ; Checks if a sector is a valid LVM-sector 128 ; Sector is considered valid LVM-sector if both signature and CRC are correct. 129 ; In: DS:SI - Sector that needs to get checked... 130 ; Out: AL = 1 -> LVM Signature found 131 ; AH = 1 -> CRC OK 132 ; ZF = 0 -> Signature found and CRC OK, ZF = 1 -> Invalid LVM sector 133 ; Note: AL thus indicates a valid signature and AH a valid CRC 134 ; Destroyed: None 135 LVM_ValidateSector Proc Near 136 xor ax, ax ; Start with all zero bits 137 call LVM_CheckSectorSignature ; CF=1 -> Signature OK 138 rcl al, 1 ; Store CF in AL 139 call LVM_CheckSectorCRC ; CF=1 -> Checksum OK 140 rcl ah, 1 ; Store CF in AH 141 test al, ah ; ZF=0 if both AL and AH are 1 142 ret 143 LVM_ValidateSector EndP 145 144 146 145 ; Updates Sector with valid LVM CRC
Note:
See TracChangeset
for help on using the changeset viewer.