Changeset 200
- Timestamp:
- Nov 7, 2017, 7:13:10 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bootcode/regular/other.asm
r165 r200 363 363 mov cx,5 364 364 365 mov dx, [CFG_CheckConfig] 366 mov [CFG_CheckConfig], bx 365 mov dx, [CFG_CheckConfig] ; Get current CRC for configuration 366 mov [CFG_CheckConfig], bx ; Mark it as invalid 367 367 PCCC_Loop: 368 call MBR_GetCheckOfSector 368 call MBR_GetCheckOfSector ; Calculate CRC 369 369 loop PCCC_Loop 370 cmp bx, dx 371 jne PCCC_Failed 372 mov CFG_CheckConfig, dx 373 ret 370 cmp bx, dx ; Validate CRC 371 372 ; 373 ; The CRC is calculated and inserted in the loader image when 374 ; AiR-BOOT is installed. Ignoring the CRC enables manually 375 ; merging the loader without using the installer. This is used 376 ; for debugging in virtual machines, where it is easy to 377 ; merge the loader to the disk image of the VM. 378 ; 379 IFNDEF CRC_IGNORE 380 jne PCCC_Failed ; Validation failed, halt AiR-BOOT 381 ENDIF 382 383 mov CFG_CheckConfig, dx ; Restore the valid CRC 384 ret 385 386 ; 387 ; CRC validation for the configuration failed. 388 ; Inform the user of this and halt the system. 389 ; 374 390 PCCC_Failed: 375 391 mov si, offset TXT_ERROR_CheckConfig
Note:
See TracChangeset
for help on using the changeset viewer.