Changeset 95


Ignore:
Timestamp:
Apr 8, 2017, 12:26:39 AM (8 years ago)
Author:
Ben Rietbroek
Message:

Moved 'CheckFor13extensions' to module 'driveio' [v1.1.1-testing]

CAUTION:
This is a testbuild !
AirBoot uses the BIOS to access disks and a small coding error can trash
partition tables or other vital disk structures. You are advised to make
backups of TRACK0 and EBRs before using this testbuild. More info at:
https://rousseaux.github.io/netlabs.air-boot/pdf/AirBoot-v1.1.0-manual.pdf

Location:
trunk/bootcode/regular
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bootcode/regular/driveio.asm

    r84 r95  
    2525DB 'DRIVEIO',0
    2626ENDIF
     27
     28;
     29; Check if INT13X extensions are supported.
     30; AirBoot requires these extensions, and will halt if they are not available.
     31; Modified: AX, BX, CX, DX, CF
     32DriveIO_CheckFor13extensions    Proc Near
     33        mov     ah, 41h
     34        mov     bx, 55AAh
     35        mov     dl, [BIOS_BootDisk]     ; We check using the boot-disk
     36        int     13h
     37        jc      PCCF13E_NotFound        ; Error occured
     38        cmp     bx, 0AA55h
     39        je      PCCF13E_Found
     40    PCCF13E_NotFound:
     41        ret
     42    PCCF13E_Found:
     43        and     cx, 1                   ; Check 42h-44h,47h,48h supported
     44        jz      PCCF13E_NotFound        ; Sig OK but no support, strange beast
     45        mov     byte ptr [CurIO_UseExtension], 1
     46        ret
     47DriveIO_CheckFor13extensions    EndP
     48
    2749
    2850; Note: Some routines set DS/ES to CS or even address via CS, even if its not
  • trunk/bootcode/regular/other.asm

    r78 r95  
    198198        mov      [bx], al
    199199
    200         call     DriveIO_LoadMasterLVMSector         ; returns NC if no valid LVM record found
     200
     201        ; CHECKSUM CALCULATION DOES NOT WORK YET HERE
     202        ; CRC TABLE NOT INITED YET
     203        ; Returns NC if no valid LVM record found
     204        call     DriveIO_LoadMasterLVMSector
    201205
    202206        pushf
     
    343347
    344348        ; This sets [CurIO_UseExtension] flag.
    345         call    PRECRAP_CheckFor13extensions
     349        call    DriveIO_CheckFor13extensions
    346350        mov     al,[CurIO_UseExtension]
    347351        test    al,al
     
    441445        ret
    442446AFTERCRAP_Main  EndP
    443 
    444 
    445 
    446 
    447 PRECRAP_CheckFor13extensions    Proc Near
    448         mov     ah, 41h
    449         mov     bx, 55AAh
    450         mov     dl, [BIOS_BootDisk]     ; We check using the boot-disk
    451         int     13h
    452         cmp     bx, 0AA55h
    453         je      PCCF13E_Found
    454     PCCF13E_NotFound:
    455         ret
    456     PCCF13E_Found:
    457         and     cx, 1
    458         jz      PCCF13E_NotFound
    459         mov     byte ptr [CurIO_UseExtension], 1
    460         ret
    461 PRECRAP_CheckFor13extensions    EndP
    462447
    463448
Note: See TracChangeset for help on using the changeset viewer.